merge master to 20.04-SP4 to update to v0.2
This commit is contained in:
parent
0d2ee91e04
commit
63b61275c9
@ -1,42 +0,0 @@
|
||||
From 8b2ad8b12dbef786ae508d9b5f342a56b491cba6 Mon Sep 17 00:00:00 2001
|
||||
From: anatasluo <luolongjuna@gmail.com>
|
||||
Date: Mon, 26 Jul 2021 03:33:16 +0000
|
||||
Subject: [PATCH] add use fork pid support for kernel 4.19
|
||||
|
||||
Signed-off-by: anatasluo <luolongjuna@gmail.com>
|
||||
---
|
||||
config/nvwa-restore.yaml | 3 ++-
|
||||
src/server.go | 5 +++++
|
||||
2 files changed, 7 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/config/nvwa-restore.yaml b/config/nvwa-restore.yaml
|
||||
index 46201f9..ab97121 100644
|
||||
--- a/config/nvwa-restore.yaml
|
||||
+++ b/config/nvwa-restore.yaml
|
||||
@@ -2,4 +2,5 @@ pids:
|
||||
services:
|
||||
restore_net: false
|
||||
enable_quick_kexec: false
|
||||
-enable_pin_memory: false
|
||||
\ No newline at end of file
|
||||
+enable_pin_memory: false
|
||||
+enable_use_fork_pid: false
|
||||
diff --git a/src/server.go b/src/server.go
|
||||
index 3de06a5..a5872da 100644
|
||||
--- a/src/server.go
|
||||
+++ b/src/server.go
|
||||
@@ -219,6 +219,11 @@ func getCriuExtPara() []string {
|
||||
criuExtPara = append(criuExtPara, "--pin-memory")
|
||||
}
|
||||
|
||||
+ enableFP := nvwaRestoreConfig.GetBool("enable_use_fork_pid")
|
||||
+ if enableFP {
|
||||
+ criuExtPara = append(criuExtPara, "--use-fork-pid")
|
||||
+ }
|
||||
+
|
||||
return criuExtPara
|
||||
}
|
||||
|
||||
--
|
||||
2.25.1
|
||||
|
||||
39
0001-ignore-pin-memory-init-in-x86.patch
Normal file
39
0001-ignore-pin-memory-init-in-x86.patch
Normal file
@ -0,0 +1,39 @@
|
||||
From fe0b709d2fe196097796b3b964803226c6ca9578 Mon Sep 17 00:00:00 2001
|
||||
From: hejingxian <hejingxian@huawei.com>
|
||||
Date: Thu, 1 Dec 2022 23:02:21 +0800
|
||||
Subject: [PATCH] ignore pin memory init in x86
|
||||
|
||||
Signed-off-by: hejingxian <hejingxian@huawei.com>
|
||||
---
|
||||
misc/nvwa-pre.sh | 9 ++++++---
|
||||
1 file changed, 6 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/misc/nvwa-pre.sh b/misc/nvwa-pre.sh
|
||||
index 69f6de9..18960e7 100644
|
||||
--- a/misc/nvwa-pre.sh
|
||||
+++ b/misc/nvwa-pre.sh
|
||||
@@ -1,6 +1,6 @@
|
||||
#!/bin/bash
|
||||
|
||||
-set -e
|
||||
+#set -e
|
||||
|
||||
# 1. Increase last pid by 2011 from saved last pid.
|
||||
# So services restoring may use its old pid.
|
||||
@@ -32,8 +32,11 @@ else
|
||||
fi
|
||||
|
||||
# 2. Enable Pin Memory
|
||||
-modprobe pin_memory
|
||||
-/usr/bin/nvwa-pin --init-pagemap-read
|
||||
+is_x86=`uname -a | grep x86`
|
||||
+if [[ $is_x86"X" == "X" ]]; then
|
||||
+ modprobe pin_memory
|
||||
+ /usr/bin/nvwa-pin --init-pagemap-read
|
||||
+fi
|
||||
|
||||
# 3. Enable PMEM
|
||||
grep -q "Persistent Memory" /proc/iomem || exit 0
|
||||
--
|
||||
2.20.1.windows.1
|
||||
|
||||
@ -1,71 +0,0 @@
|
||||
From 6a262bdec754c90ab9cbb3504588648599c4a8b5 Mon Sep 17 00:00:00 2001
|
||||
From: anatasluo <luolongjuna@gmail.com>
|
||||
Date: Thu, 25 Mar 2021 11:22:43 +0800
|
||||
Subject: [PATCH 08/20] kexec: do kexec load before criu dump
|
||||
|
||||
Signed-off-by: anatasluo <luolongjuna@gmail.com>
|
||||
---
|
||||
src/server.go | 40 ++++++++++++++++++++--------------------
|
||||
1 file changed, 20 insertions(+), 20 deletions(-)
|
||||
|
||||
diff --git a/src/server.go b/src/server.go
|
||||
index 79a94b9..c6eead7 100644
|
||||
--- a/src/server.go
|
||||
+++ b/src/server.go
|
||||
@@ -252,7 +252,26 @@ func UpdateImage(ver string) int {
|
||||
return -1
|
||||
}
|
||||
|
||||
- err := findPids(criuPids)
|
||||
+ kexecLoad := "-l"
|
||||
+ if enableQK {
|
||||
+ kexecLoad = "-q"
|
||||
+ }
|
||||
+
|
||||
+ cmdline, err := loadCmdline()
|
||||
+ if err != nil {
|
||||
+ log.Error(err)
|
||||
+ return -1
|
||||
+ }
|
||||
+
|
||||
+ err, _ = runCmd(kexecExe, []string{kexecLoad, "/boot/vmlinuz-" + ver,
|
||||
+ "--initrd", "/boot/initramfs-" + ver + ".img", "--append=" +
|
||||
+ cmdline}, os.Stdin, os.Stdout, os.Stderr)
|
||||
+ if err != nil {
|
||||
+ log.Errorf("Unable to load kernel image, err is %s \n", err)
|
||||
+ return -1
|
||||
+ }
|
||||
+
|
||||
+ err = findPids(criuPids)
|
||||
if err != nil {
|
||||
return -1
|
||||
}
|
||||
@@ -305,25 +324,6 @@ func UpdateImage(ver string) int {
|
||||
|
||||
DumpAllNet(configDir)
|
||||
|
||||
- cmdline, err := loadCmdline()
|
||||
- if err != nil {
|
||||
- log.Error(err)
|
||||
- return -1
|
||||
- }
|
||||
-
|
||||
- kexecLoad := "-l"
|
||||
- if enableQK {
|
||||
- kexecLoad = "-q"
|
||||
- }
|
||||
-
|
||||
- err, _ = runCmd(kexecExe, []string{kexecLoad, "/boot/vmlinuz-" + ver,
|
||||
- "--initrd", "/boot/initramfs-" + ver + ".img", "--append=" +
|
||||
- cmdline}, os.Stdin, os.Stdout, os.Stderr)
|
||||
- if err != nil {
|
||||
- log.Errorf("Unable to load kernel image, err is %s \n", err)
|
||||
- return -1
|
||||
- }
|
||||
-
|
||||
err, _ = runCmd(kexecExe, []string{"-e"}, os.Stdin, os.Stdout, os.Stderr)
|
||||
if err != nil {
|
||||
log.Errorf("Unable to run kexec -e with err %s \n", err)
|
||||
--
|
||||
2.31.1
|
||||
|
||||
@ -1,26 +0,0 @@
|
||||
From 08ece5f9af894e245d274fff55d75730504db069 Mon Sep 17 00:00:00 2001
|
||||
From: anatasluo <luolongjuna@gmail.com>
|
||||
Date: Thu, 25 Mar 2021 16:55:50 +0800
|
||||
Subject: [PATCH 09/20] nvwa: move socket from /tmp to /run
|
||||
|
||||
Signed-off-by: anatasluo <luolongjuna@gmail.com>
|
||||
---
|
||||
src/main.go | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/main.go b/src/main.go
|
||||
index 3845a63..d139f78 100644
|
||||
--- a/src/main.go
|
||||
+++ b/src/main.go
|
||||
@@ -4,7 +4,7 @@ import (
|
||||
"flag"
|
||||
)
|
||||
|
||||
-var socketPath = "/tmp/nvwa.socket"
|
||||
+var socketPath = "/run/nvwa.socket"
|
||||
|
||||
func main() {
|
||||
server := flag.Int("server", 0,
|
||||
--
|
||||
2.31.1
|
||||
|
||||
@ -1,26 +0,0 @@
|
||||
From a7d47d33d2694b76f7d69c1c4c0beebc15fd5931 Mon Sep 17 00:00:00 2001
|
||||
From: anatasluo <luolongjuna@gmail.com>
|
||||
Date: Tue, 30 Mar 2021 14:33:31 +0800
|
||||
Subject: [PATCH 10/20] kexec: add -x
|
||||
|
||||
Signed-off-by: anatasluo <luolongjuna@gmail.com>
|
||||
---
|
||||
src/server.go | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/server.go b/src/server.go
|
||||
index c6eead7..1185789 100644
|
||||
--- a/src/server.go
|
||||
+++ b/src/server.go
|
||||
@@ -324,7 +324,7 @@ func UpdateImage(ver string) int {
|
||||
|
||||
DumpAllNet(configDir)
|
||||
|
||||
- err, _ = runCmd(kexecExe, []string{"-e"}, os.Stdin, os.Stdout, os.Stderr)
|
||||
+ err, _ = runCmd(kexecExe, []string{"-e", "-x"}, os.Stdin, os.Stdout, os.Stderr)
|
||||
if err != nil {
|
||||
log.Errorf("Unable to run kexec -e with err %s \n", err)
|
||||
return -1
|
||||
--
|
||||
2.31.1
|
||||
|
||||
@ -1,63 +0,0 @@
|
||||
From ae05433278739b1faafef7e18debccefc920c046 Mon Sep 17 00:00:00 2001
|
||||
From: anatasluo <luolongjuna@gmail.com>
|
||||
Date: Wed, 31 Mar 2021 15:37:52 +0800
|
||||
Subject: [PATCH 11/20] nvwa: move unix socket from /run to /run/nvwa
|
||||
|
||||
Signed-off-by: anatasluo <luolongjuna@gmail.com>
|
||||
---
|
||||
src/main.go | 2 +-
|
||||
src/server.go | 12 ++++++++++++
|
||||
2 files changed, 13 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/main.go b/src/main.go
|
||||
index d139f78..bcb5bb4 100644
|
||||
--- a/src/main.go
|
||||
+++ b/src/main.go
|
||||
@@ -4,7 +4,7 @@ import (
|
||||
"flag"
|
||||
)
|
||||
|
||||
-var socketPath = "/run/nvwa.socket"
|
||||
+var socketPath = "/run/nvwa/nvwa.socket"
|
||||
|
||||
func main() {
|
||||
server := flag.Int("server", 0,
|
||||
diff --git a/src/server.go b/src/server.go
|
||||
index 1185789..3de06a5 100644
|
||||
--- a/src/server.go
|
||||
+++ b/src/server.go
|
||||
@@ -6,6 +6,7 @@ import (
|
||||
"net"
|
||||
"os"
|
||||
"path"
|
||||
+ "path/filepath"
|
||||
"reflect"
|
||||
"runtime"
|
||||
"strconv"
|
||||
@@ -431,12 +432,23 @@ func ExitServer(msg string) int {
|
||||
return 0
|
||||
}
|
||||
|
||||
+func may_init_socket(path string) error {
|
||||
+ socketDir := filepath.Dir(path)
|
||||
+ log.Debugf("Socket directory %s \n", socketDir)
|
||||
+ return os.Mkdir(socketDir, 0700)
|
||||
+}
|
||||
+
|
||||
func runServer(path string) {
|
||||
registerRPC("update", UpdateImage)
|
||||
registerRPC("restore", RestoreService)
|
||||
registerRPC("init", InitEnv)
|
||||
registerRPC("exit", ExitServer)
|
||||
|
||||
+ err := may_init_socket(path)
|
||||
+ if err != nil {
|
||||
+ log.Fatal(err)
|
||||
+ }
|
||||
+
|
||||
addr, err := net.ResolveUnixAddr("unix", path)
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
--
|
||||
2.31.1
|
||||
|
||||
@ -1,32 +0,0 @@
|
||||
From a433f4516b4d32988cea19ca9be35423d430b725 Mon Sep 17 00:00:00 2001
|
||||
From: anatasluo <luolongjuna@gmail.com>
|
||||
Date: Wed, 31 Mar 2021 15:44:28 +0800
|
||||
Subject: [PATCH 12/20] pin: move pin from tools to tools/pin
|
||||
|
||||
Signed-off-by: anatasluo <luolongjuna@gmail.com>
|
||||
---
|
||||
nvwa.spec | 2 +-
|
||||
tools/{ => pin}/nvwa-pin.c | 0
|
||||
2 files changed, 1 insertion(+), 1 deletion(-)
|
||||
rename tools/{ => pin}/nvwa-pin.c (100%)
|
||||
|
||||
diff --git a/nvwa.spec b/nvwa.spec
|
||||
index f1d6cbb..8eba081 100644
|
||||
--- a/nvwa.spec
|
||||
+++ b/nvwa.spec
|
||||
@@ -28,7 +28,7 @@ go build -mod=vendor
|
||||
cd -
|
||||
|
||||
cd tools
|
||||
-gcc %{name}-pin.c -o %{name}-pin
|
||||
+gcc ./pin/%{name}-pin.c -o %{name}-pin
|
||||
cd -
|
||||
|
||||
%install
|
||||
diff --git a/tools/nvwa-pin.c b/tools/pin/nvwa-pin.c
|
||||
similarity index 100%
|
||||
rename from tools/nvwa-pin.c
|
||||
rename to tools/pin/nvwa-pin.c
|
||||
--
|
||||
2.31.1
|
||||
|
||||
@ -1,33 +0,0 @@
|
||||
From a01224e1cd57813e29ceab256b8acaa906f4e387 Mon Sep 17 00:00:00 2001
|
||||
From: anatasluo <luolongjuna@gmail.com>
|
||||
Date: Tue, 27 Jul 2021 08:03:19 +0000
|
||||
Subject: [PATCH] add support for nginx service dump/restore
|
||||
|
||||
For nginx service, it has a mount point in /run/user
|
||||
which was used by pam_systemd to store non-essential
|
||||
runtime files or objects(check more info in pam_systemd manpage).
|
||||
|
||||
To support dumpping such a mount point, criu needs enable
|
||||
--enable-external-masters.
|
||||
|
||||
Signed-off-by: anatasluo <luolongjuna@gmail.com>
|
||||
---
|
||||
src/server.go | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/server.go b/src/server.go
|
||||
index 3de06a5..6b5d2c2 100644
|
||||
--- a/src/server.go
|
||||
+++ b/src/server.go
|
||||
@@ -212,7 +212,7 @@ func loadCmdline() (string, error) {
|
||||
}
|
||||
|
||||
func getCriuExtPara() []string {
|
||||
- criuExtPara := []string{"--shell-job"}
|
||||
+ criuExtPara := []string{"--shell-job", "--enable-external-masters", "--skip-in-flight"}
|
||||
|
||||
enablePM := nvwaRestoreConfig.GetBool("enable_pin_memory")
|
||||
if enablePM {
|
||||
--
|
||||
2.31.1
|
||||
|
||||
@ -1,113 +0,0 @@
|
||||
From 710071a871bbaa9f1f514acf0710966e7ae5b53d Mon Sep 17 00:00:00 2001
|
||||
From: anatasluo <luolongjuna@gmail.com>
|
||||
Date: Fri, 6 Aug 2021 11:39:15 +0800
|
||||
Subject: [PATCH] restore pid file after restore from systemd
|
||||
|
||||
When I use systemd to restore nginx service,
|
||||
I find that systemd will check pid file and it will
|
||||
timeout since no value can be found in pid file.
|
||||
|
||||
To slove this problem, I add a ExecStartPost action to
|
||||
write back necessary pid file.
|
||||
|
||||
Signed-off-by: anatasluo <luolongjuna@gmail.com>
|
||||
---
|
||||
src/server.go | 50 ++++++++++++++++++++++++++++++++++++++++++++------
|
||||
1 file changed, 44 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/src/server.go b/src/server.go
|
||||
index 6b5d2c2..38a0bdb 100644
|
||||
--- a/src/server.go
|
||||
+++ b/src/server.go
|
||||
@@ -50,6 +50,25 @@ func overrideConf(path string, content string) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
+func getSystemdOptions(service string, option string) (error, string) {
|
||||
+ return runCmd("systemctl", []string{"show", "--property",
|
||||
+ option, "--value", service}, nil, nil, nil)
|
||||
+}
|
||||
+
|
||||
+func getPIDFile(service string) (error, string) {
|
||||
+ err, ret := getSystemdOptions(service, "PIDFile")
|
||||
+ if err != nil {
|
||||
+ log.Errorf("Unable to get pid file for service %s\n", service)
|
||||
+ log.Errorf("Error is %s \n", err)
|
||||
+ return err, ""
|
||||
+ }
|
||||
+
|
||||
+ log.Debugf("Get pid file for %s - %s \n", service, ret)
|
||||
+
|
||||
+ i := strings.Index(ret, "=")
|
||||
+ return nil, ret[i+1:]
|
||||
+}
|
||||
+
|
||||
func overrideSystemctl(service string, pid int) error {
|
||||
systemdEtc := nvwaSeverConfig.GetString("systemd_etc")
|
||||
|
||||
@@ -57,8 +76,9 @@ func overrideSystemctl(service string, pid int) error {
|
||||
_ = os.Mkdir(systemdDir, 0700)
|
||||
|
||||
content := "[Service]\nExecStart=\nExecStart="
|
||||
- content += "nvwa restore " + service + " " + strconv.Itoa(pid) + "\n"
|
||||
+ content += "nvwa restore " + service + "@" + strconv.Itoa(pid) + "\n"
|
||||
content += "User=root\nGroup=root\n"
|
||||
+
|
||||
err := overrideConf(path.Join(systemdDir, "nvwa_override_exec.conf"), content)
|
||||
if err != nil {
|
||||
return err
|
||||
@@ -118,8 +138,7 @@ func findPids(criuPids map[string]int) error {
|
||||
|
||||
services := nvwaRestoreConfig.GetStringSlice("services")
|
||||
for _, val := range services {
|
||||
- err, tmpRet := runCmd("systemctl", []string{"show", "--property",
|
||||
- "MainPID", "--value", val}, nil, nil, nil)
|
||||
+ err, tmpRet := getSystemdOptions(val, "MainPID")
|
||||
if err != nil {
|
||||
log.Errorf("Unable to get pid for service %s\n", val)
|
||||
log.Errorf("Error is %s \n", err)
|
||||
@@ -356,11 +375,27 @@ func loadConfig() {
|
||||
readConfig(nvwaRestoreConfig, "nvwa-restore")
|
||||
}
|
||||
|
||||
-func RestoreService(service string) int {
|
||||
+func RestoreService(cmd string) int {
|
||||
+ i := strings.Index(cmd, "@")
|
||||
+ service := cmd[:i]
|
||||
+ pid := cmd[i+1:]
|
||||
+
|
||||
+ log.Debugf("nvwa restore %s %s \n", service, pid)
|
||||
+
|
||||
criuExe := nvwaSeverConfig.GetString("criu_exe")
|
||||
criuDir := nvwaSeverConfig.GetString("criu_dir")
|
||||
|
||||
- err, _ := runCmd(criuExe, getCriuPara("restore", path.Join(criuDir, service), ""),
|
||||
+ err, pidfile := getPIDFile(service)
|
||||
+ if err != nil {
|
||||
+ return -1
|
||||
+ }
|
||||
+ pidfile = strings.TrimSpace(pidfile)
|
||||
+ if pidfile != "" {
|
||||
+ pidData := []byte(pid)
|
||||
+ _ = ioutil.WriteFile(pidfile, pidData, 0644)
|
||||
+ }
|
||||
+
|
||||
+ err, _ = runCmd(criuExe, getCriuPara("restore", path.Join(criuDir, service), ""),
|
||||
os.Stdin, os.Stdout, os.Stderr)
|
||||
if err != nil {
|
||||
log.Errorf("Restore %s failed, error is %s \n", service, err)
|
||||
@@ -435,7 +470,10 @@ func ExitServer(msg string) int {
|
||||
func may_init_socket(path string) error {
|
||||
socketDir := filepath.Dir(path)
|
||||
log.Debugf("Socket directory %s \n", socketDir)
|
||||
- return os.Mkdir(socketDir, 0700)
|
||||
+ if _, err := os.Stat(socketDir); os.IsNotExist(err) {
|
||||
+ return os.Mkdir(socketDir, 0700)
|
||||
+ }
|
||||
+ return nil
|
||||
}
|
||||
|
||||
func runServer(path string) {
|
||||
--
|
||||
2.31.1
|
||||
|
||||
BIN
nvwa-v0.1.tar.gz
BIN
nvwa-v0.1.tar.gz
Binary file not shown.
BIN
nvwa-v0.2.tar.gz
Normal file
BIN
nvwa-v0.2.tar.gz
Normal file
Binary file not shown.
55
nvwa.spec
55
nvwa.spec
@ -1,20 +1,15 @@
|
||||
Name: nvwa
|
||||
Version: 0.1
|
||||
Release: 6
|
||||
Version: 0.2
|
||||
Release: 2
|
||||
Summary: a tool used for openEuler kernel update
|
||||
|
||||
License: MulanPSL-2.0 and Apache-2.0 and MIT and MPL-2.0
|
||||
URL: https://gitee.com/openeuler/nvwa
|
||||
Source: %{name}-v%{version}.tar.gz
|
||||
#source1 version sys@v0.0.0-20220908164124-27713097b956
|
||||
Source1: sys.tar.gz
|
||||
|
||||
Patch1: 0001-add-use-fork-pid-support-for-kernel-4.19.patch
|
||||
Patch2: 0002-kexec-do-kexec-load-before-criu-dump.patch
|
||||
Patch3: 0003-nvwa-move-socket-from-tmp-to-run.patch
|
||||
Patch4: 0004-kexec-add-x.patch
|
||||
Patch5: 0005-nvwa-move-unix-socket-from-run-to-run-nvwa.patch
|
||||
Patch6: 0006-pin-move-pin-from-tools-to-tools-pin.patch
|
||||
Patch7: 0007-add-support-for-nginx-service-dump-restore.patch
|
||||
Patch8: 0008-restore-pid-file-after-restore-from-systemd.patch
|
||||
Patch1: 0001-ignore-pin-memory-init-in-x86.patch
|
||||
|
||||
BuildRequires: golang >= 1.13
|
||||
Requires: kexec-tools criu
|
||||
@ -28,6 +23,10 @@ A tool used to automate the process of seamless update of the openEuler.
|
||||
|
||||
%prep
|
||||
%autosetup -n %{name}-v%{version} -p1
|
||||
%ifarch loongarch64
|
||||
rm -rf src/vendor/golang.org/x/sys
|
||||
tar -xf %{SOURCE1} -C src/vendor/golang.org/x/
|
||||
%endif
|
||||
|
||||
%build
|
||||
|
||||
@ -36,7 +35,7 @@ go build -mod=vendor -buildmode=pie
|
||||
cd -
|
||||
|
||||
cd tools/pin
|
||||
gcc %{name}-pin.c -o %{name}-pin -fstack-protector-all -fPIE -pie -Wl,-z,noexecstack,-z,relro,-z,now
|
||||
gcc %{name}-pin.c -o %{name}-pin -fstack-protector-all -fPIE -pie -Wl,-z,noexecstack,-z,relo,-z,now
|
||||
cd -
|
||||
|
||||
%install
|
||||
@ -50,16 +49,20 @@ mkdir -p %{buildroot}/var/%{name}/running
|
||||
|
||||
install -m 0750 %{_builddir}/%{name}-v%{version}/src/%{name} %{buildroot}/%{_bindir}/
|
||||
install -m 0750 %{_builddir}/%{name}-v%{version}/tools/pin/%{name}-pin %{buildroot}/%{_bindir}/
|
||||
install -m 0640 %{_builddir}/%{name}-v%{version}/config/%{name}-restore.yaml %{buildroot}/etc/%{name}/
|
||||
install -m 0640 %{_builddir}/%{name}-v%{version}/config/%{name}-server.yaml %{buildroot}/etc/%{name}/
|
||||
install -m 0640 %{_builddir}/%{name}-v%{version}/src/config/%{name}-restore.yaml %{buildroot}/etc/%{name}/
|
||||
install -m 0640 %{_builddir}/%{name}-v%{version}/src/config/%{name}-server.yaml %{buildroot}/etc/%{name}/
|
||||
|
||||
install -m 0750 %{_builddir}/%{name}-v%{version}/misc/%{name}-pre.sh %{buildroot}/%{_bindir}/
|
||||
install -m 0644 %{_builddir}/%{name}-v%{version}/misc/%{name}.service %{buildroot}/usr/lib/systemd/system
|
||||
install -m 0644 %{_builddir}/%{name}-v%{version}/misc/%{name}-pre.service %{buildroot}/usr/lib/systemd/system
|
||||
|
||||
install -d $RPM_BUILD_ROOT/usr/share/bash-completion/completions
|
||||
install -p -m 0644 %{_builddir}/%{name}-v%{version}/completion/nvwa %{buildroot}/usr/share/bash-completion/completions/nvwa
|
||||
|
||||
%post
|
||||
%systemd_post %{name}.service
|
||||
%systemd_post %{name}-pre.service
|
||||
source /usr/share/bash-completion/completions/nvwa
|
||||
|
||||
%preun
|
||||
%systemd_preun %{name}.service
|
||||
@ -77,29 +80,19 @@ install -m 0644 %{_builddir}/%{name}-v%{version}/misc/%{name}-pre.service %{buil
|
||||
/etc/%{name}/%{name}-server.yaml
|
||||
/usr/lib/systemd/system/%{name}.service
|
||||
/usr/lib/systemd/system/%{name}-pre.service
|
||||
/usr/share/bash-completion/completions/nvwa
|
||||
%{_bindir}/%{name}
|
||||
%{_bindir}/%{name}-pin
|
||||
%{_bindir}/%{name}-pre.sh
|
||||
|
||||
%changelog
|
||||
* Fri Aug 06 2021 anatasluo <luolongjuna@gmail.com> - 0.1-6
|
||||
- Add "--skip-in-flight" for criu dump/restore
|
||||
- restore pid file after restore from systemd
|
||||
|
||||
* Sat Jul 31 2021 anatasluo <luolongjuna@gmail.com> - 0.1-5
|
||||
- Add necessary patches from version 0.2
|
||||
- Do kexec before criu dump
|
||||
- Change nvwa socket location
|
||||
- Add x for kexec
|
||||
- Change pin location
|
||||
|
||||
* Mon Jul 26 2021 anatasluo <luolongjuna@gmail.com> - 0.1-4
|
||||
- Add use fork pid support for kernel 4.19
|
||||
|
||||
* Thu Jul 13 2023 huajingyun <huajingyun@loongson.cn> - 0.2-2
|
||||
- add loong64 support
|
||||
* Fri Jul 30 2021 anatasluo <luolongjun@huawei.com> - 0.2-1
|
||||
- Update to 0.2
|
||||
* Fri Mar 19 2021 snoweay <snoweay@163.com> - 0.1-3
|
||||
- Add secure compile args.
|
||||
|
||||
* Thu Mar 18 2021 anatasluo <luolongjun@huawei.com>
|
||||
- Add secure compile args
|
||||
* Thu Mar 18 2021 anatasluo <luolongjun@huawei.com> 0.1-2
|
||||
- Update to 0.1-r2
|
||||
* Thu Feb 18 2021 anatasluo <luolongjun@huawei.com>
|
||||
* Thu Feb 18 2021 anatasluo <luolongjun@huawei.com> - 0.0.1-1
|
||||
- Update to 0.0.1
|
||||
|
||||
BIN
sys.tar.gz
Normal file
BIN
sys.tar.gz
Normal file
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user