Name: nvwa Version: 0.1 Release: 6 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 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 BuildRequires: golang >= 1.13 Requires: kexec-tools criu Requires: systemd-units iptables-services iproute Requires: gcc %description A tool used to automate the process of seamless update of the openEuler. %global debug_package %{nil} %prep %autosetup -n %{name}-v%{version} -p1 %build cd src 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 cd - %install mkdir -p %{buildroot}/%{_bindir} mkdir -p %{buildroot}/etc/%{name} mkdir -p %{buildroot}/etc/%{name}/log mkdir -p %{buildroot}/usr/lib/systemd/system mkdir -p %{buildroot}/var/%{name} 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 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 %post %systemd_post %{name}.service %systemd_post %{name}-pre.service %preun %systemd_preun %{name}.service %postun %systemd_postun_with_restart %{name}.service %files %license LICENSE %dir /etc/%{name}/ %dir /etc/%{name}/log %dir /var/%{name} %dir /var/%{name}/running /etc/%{name}/%{name}-restore.yaml /etc/%{name}/%{name}-server.yaml /usr/lib/systemd/system/%{name}.service /usr/lib/systemd/system/%{name}-pre.service %{_bindir}/%{name} %{_bindir}/%{name}-pin %{_bindir}/%{name}-pre.sh %changelog * Fri 06 Aug 2021 anatasluo - 0.1-6 - Add "--skip-in-flight" for criu dump/restore - restore pid file after restore from systemd * Sat 31 Jul 2021 anatasluo - 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 26 Jul 2021 anatasluo - 0.1-4 - Add use fork pid support for kernel 4.19 * Fri 19 Mar 2021 snoweay - 0.1-3 - Add secure compile args. * Thu 18 Mar 2021 anatasluo - Update to 0.1-r2 * Thu Feb 18 2021 anatasluo - Update to 0.0.1