From 91c0be85cf6636eb3e504a70a32d94c15043badb Mon Sep 17 00:00:00 2001 From: zhangyao Date: Tue, 9 Apr 2024 21:37:01 +0800 Subject: [PATCH] resolve wantedby invalid and fix reboot symlink not correct after reinstall --- backport-fix-resolve-wantedby-invalid.patch | 27 +++++++++++++++++++++ sysmaster.spec | 12 ++++++--- 2 files changed, 35 insertions(+), 4 deletions(-) create mode 100644 backport-fix-resolve-wantedby-invalid.patch diff --git a/backport-fix-resolve-wantedby-invalid.patch b/backport-fix-resolve-wantedby-invalid.patch new file mode 100644 index 0000000..0af24a1 --- /dev/null +++ b/backport-fix-resolve-wantedby-invalid.patch @@ -0,0 +1,27 @@ +From f2d77666e409dd9ae47c36680e9380900f02b6b9 Mon Sep 17 00:00:00 2001 +From: zhangyao2022 +Date: Tue, 9 Apr 2024 16:04:45 +0800 +Subject: [PATCH] fix: resolve wantedby invalid + +--- + core/sysmaster/src/manager/pre_install.rs | 4 +--- + 1 file changed, 1 insertion(+), 3 deletions(-) + +diff --git a/core/sysmaster/src/manager/pre_install.rs b/core/sysmaster/src/manager/pre_install.rs +index 69823478..7032117c 100644 +--- a/core/sysmaster/src/manager/pre_install.rs ++++ b/core/sysmaster/src/manager/pre_install.rs +@@ -543,9 +543,7 @@ impl Install { + + let mut paths: Vec = Vec::new(); + for p in &self.lookup_path.search_path { +- let mut path = String::new(); +- path = path + p + &unit_install.name(); +- paths.push(PathBuf::from(path)); ++ paths.push(Path::new(p).join(&unit_install.name())); + } + + let configer = match UeConfigData::load_config(paths, &unit_install.name()) { +-- +2.33.0 + diff --git a/sysmaster.spec b/sysmaster.spec index 8cc8dab..e848c3d 100644 --- a/sysmaster.spec +++ b/sysmaster.spec @@ -12,14 +12,15 @@ Name: sysmaster Version: 1.0.0 -Release: 2 +Release: 3 Summary: redesign and reimplement process1. License: Mulan PSL v2 URL: https://gitee.com/openeuler/sysmaster Source0: %{name}-%{version}.tar.xz -Patch0: backport-feature-devmaster-add-net_driver-builtin-to-be-compa.patch +Patch0: backport-feature-devmaster-add-net_driver-builtin-to-be-compa.patch +Patch1: backport-fix-resolve-wantedby-invalid.patch ExclusiveArch: x86_64 aarch64 @@ -137,7 +138,7 @@ sed -i 's/\"\/lib\/devmaster\/rules.d\"/&, \"\/etc\/udev\/rules.d\", \"\/run\/ud /etc/sysmaster/system/sysinit.target.wants/devmaster.service /etc/sysmaster/system/multi-user.target.wants/devctl-trigger.service -%post -n sysmaster +%posttrans -n sysmaster test -f /usr/bin/sctl && ln -sf ../bin/sctl /usr/sbin/reboot || : test -f /usr/bin/sctl && ln -sf ../bin/sctl /usr/sbin/shutdown || : test -f /usr/bin/sctl && ln -sf ../bin/sctl /usr/sbin/poweroff || : @@ -150,7 +151,7 @@ test -f /usr/bin/systemctl && ln -sf ../bin/systemctl /usr/sbin/poweroff || : test -f /usr/bin/systemctl && ln -sf ../bin/systemctl /usr/sbin/halt || : -%post -n devmaster +%posttrans -n devmaster test -f /etc/sysmaster/system/sysinit.target.wants/udevd.service && unlink /etc/sysmaster/system/sysinit.target.wants/udevd.service || : test -f /etc/sysmaster/system/sysinit.target.wants/udev-trigger.service && unlink /etc/sysmaster/system/sysinit.target.wants/udev-trigger.service || : @@ -161,6 +162,9 @@ if [ $1 -eq 0 ] ; then fi %changelog +* Wed Apr 10 2024 zhangyao - 1.0.0-3 +- resolve wantedby invalid and fix reboot symlink not correct after reinstall + * Tue Apr 9 2024 chenjiayi - 1.0.0-2 - sync patches from upstream