From 9ea69d6471d697ebf8d5f67de93a3c33681bbd08 Mon Sep 17 00:00:00 2001 From: lixin Date: Fri, 15 Mar 2024 15:47:09 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=9C=8D=E5=8A=A1=E5=81=9C?= =?UTF-8?q?=E6=AD=A2=E6=98=BE=E7=A4=BA=E5=A4=B1=E8=B4=A5=E7=9A=84=E9=97=AE?= =?UTF-8?q?=E9=A2=98=EF=BC=8C=E4=B8=8D=E5=86=8D=E5=9C=A8=E5=AE=89=E8=A3=85?= =?UTF-8?q?=E5=92=8C=E5=8D=B8=E8=BD=BD=E8=BD=AF=E4=BB=B6=E5=8C=85=E6=97=B6?= =?UTF-8?q?enable/disable=E6=9C=8D=E5=8A=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...-kill-not-kill-INT-when-stop-service.patch | 25 +++++++++++++++++++ migration-tools.spec | 9 ++++--- 2 files changed, 31 insertions(+), 3 deletions(-) create mode 100644 0004-use-kill-not-kill-INT-when-stop-service.patch diff --git a/0004-use-kill-not-kill-INT-when-stop-service.patch b/0004-use-kill-not-kill-INT-when-stop-service.patch new file mode 100644 index 0000000..ea082ee --- /dev/null +++ b/0004-use-kill-not-kill-INT-when-stop-service.patch @@ -0,0 +1,25 @@ +From 55b9f6759bc69c66ac67e18edbad7c6e341b8935 Mon Sep 17 00:00:00 2001 +From: lixin +Date: Fri, 15 Mar 2024 15:36:24 +0800 +Subject: [PATCH] use-kill-not-kill-INT-when-stop-service + +--- + ut-Migration-tools/server/migration-tools-server.service | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/ut-Migration-tools/server/migration-tools-server.service b/ut-Migration-tools/server/migration-tools-server.service +index 6616c5b..b634fa4 100644 +--- a/ut-Migration-tools/server/migration-tools-server.service ++++ b/ut-Migration-tools/server/migration-tools-server.service +@@ -5,7 +5,7 @@ After=network-online.target + [Service] + Type=simple + ExecStart=/usr/bin/python3 /usr/lib/migration-tools-server/index.py +-ExecStop=/bin/kill-INT $MAINPID ++ExecStop=/bin/kill -HUP $MAINPID + + [Install] + WantedBy=multi-user.target +-- +2.33.0 + diff --git a/migration-tools.spec b/migration-tools.spec index 716f0c6..31ae652 100644 --- a/migration-tools.spec +++ b/migration-tools.spec @@ -1,12 +1,13 @@ Name: migration-tools Version: 1.0.0 -Release: 7 +Release: 8 Summary: A tool to help users migrate the Centos system to the UOS system and openEuler system License: MulanPSL-2.0 Source0: ut-Migration-tools.tar.gz Patch0: 0001-fix-export-error-and-no-migration-details-issue.patch Patch1: 0002-fix-uefi-boot-failed.patch Patch2: 0003-modify-grub-rules-to-match-NIC-name.patch +Patch3: 0004-use-kill-not-kill-INT-when-stop-service.patch # CVE patches: >= 100 Patch100: 0001-CVE-2024-24892.patch @@ -34,6 +35,7 @@ Migration software server side %patch0 -p1 %patch1 -p1 %patch2 -p1 +%patch3 -p1 # cve patches %patch100 -p1 @@ -57,7 +59,6 @@ cp -r ut-Migration-tools/* $RPM_BUILD_ROOT/usr/lib/migration-tools-server/ %post -n migration-tools-server chmod +x /usr/lib/migration-tools-server/server/start_webview.sh ln -sf /usr/lib/migration-tools-server/server/start_webview.sh /usr/bin/migration-tools -systemctl enable migration-tools-server.service %preun -n migration-tools-server if [ $1 = 0 ];then @@ -65,7 +66,6 @@ if [ $1 = 0 ];then fi %postun -n migration-tools-server -systemctl disable migration-tools-server.service rm -rf /usr/bin/migration-tools %files -n migration-tools-server @@ -74,6 +74,9 @@ rm -rf /usr/bin/migration-tools %{_unitdir}/migration-tools-server.service %changelog +* Thu Mar 14 2024 lixin - 1.0.0-8 +- fix stop service display failed + * Thu Mar 14 2024 lixin - 1.0.0-7 - Fix the error messages that occur during upgrades and downgrades.