update version to 1.1.0
This commit is contained in:
parent
2a7765f92b
commit
6f34748de7
@ -1,69 +0,0 @@
|
||||
From 00f3c592cf4d42009fcf15916b944abec4ed3876 Mon Sep 17 00:00:00 2001
|
||||
From: zhangyao2022 <zhangyao108@huawei.com>
|
||||
Date: Sat, 28 Oct 2023 15:56:01 +0800
|
||||
Subject: [PATCH] fix(getty-generator): delelte double quote in the
|
||||
configuration file
|
||||
|
||||
---
|
||||
tools/run_with_vm/getty.target | 4 ++--
|
||||
tools/run_with_vm/getty@.service | 12 ++++++------
|
||||
tools/run_with_vm/serial-getty@.service | 10 +++++-----
|
||||
3 files changed, 13 insertions(+), 13 deletions(-)
|
||||
|
||||
diff --git a/tools/run_with_vm/getty.target b/tools/run_with_vm/getty.target
|
||||
index bd44925e..56261a2b 100644
|
||||
--- a/tools/run_with_vm/getty.target
|
||||
+++ b/tools/run_with_vm/getty.target
|
||||
@@ -1,3 +1,3 @@
|
||||
[Unit]
|
||||
-Description="Login Prompts"
|
||||
-Documentation="man sysmaster secial target"
|
||||
+Description=Login Prompts
|
||||
+Documentation=man sysmaster secial target
|
||||
diff --git a/tools/run_with_vm/getty@.service b/tools/run_with_vm/getty@.service
|
||||
index 0e0d88d4..ae25bd78 100644
|
||||
--- a/tools/run_with_vm/getty@.service
|
||||
+++ b/tools/run_with_vm/getty@.service
|
||||
@@ -1,12 +1,12 @@
|
||||
[Unit]
|
||||
-Description="Getty on %I"
|
||||
-ConditionPathExists="/dev/tty0"
|
||||
+Description=Getty on %I
|
||||
+ConditionPathExists=/dev/tty0
|
||||
|
||||
[Service]
|
||||
-ExecStart="-/sbin/agetty -o '-p -- \\u' --noclear %I"
|
||||
-Type="simple"
|
||||
-Restart="always"
|
||||
+ExecStart=-/sbin/agetty -o '-p -- \\u' --noclear %I
|
||||
+Type=simple
|
||||
+Restart=always
|
||||
RestartSec=0
|
||||
|
||||
[Install]
|
||||
-WantedBy="getty.target"
|
||||
+WantedBy=getty.target
|
||||
diff --git a/tools/run_with_vm/serial-getty@.service b/tools/run_with_vm/serial-getty@.service
|
||||
index a80f7236..01d782a6 100644
|
||||
--- a/tools/run_with_vm/serial-getty@.service
|
||||
+++ b/tools/run_with_vm/serial-getty@.service
|
||||
@@ -1,11 +1,11 @@
|
||||
[Unit]
|
||||
-Description="Serial Getty on %I"
|
||||
+Description=Serial Getty on %I
|
||||
|
||||
[Service]
|
||||
-ExecStart="-/sbin/agetty -o '-p -- \\u' --keep-baud 115200,57600,38400,9600 %I"
|
||||
-Type="simple"
|
||||
-Restart="always"
|
||||
+ExecStart=-/sbin/agetty -o '-p -- \\u' --keep-baud 115200,57600,38400,9600 %I
|
||||
+Type=simple
|
||||
+Restart=always
|
||||
RestartSec=0
|
||||
|
||||
[Install]
|
||||
-WantedBy="getty.target"
|
||||
+WantedBy=getty.target
|
||||
--
|
||||
2.33.0
|
||||
|
||||
@ -1,149 +0,0 @@
|
||||
From 13da72cb97a22cb9b97f12226bb327c121908e8d Mon Sep 17 00:00:00 2001
|
||||
From: zhangyao2022 <zhangyao108@huawei.com>
|
||||
Date: Tue, 7 Nov 2023 21:12:14 +0800
|
||||
Subject: [PATCH] fix: solve reboot time consuming
|
||||
|
||||
---
|
||||
libs/basic/src/process.rs | 88 ++++++++++++++++++++++++++++++++++-----
|
||||
1 file changed, 77 insertions(+), 11 deletions(-)
|
||||
|
||||
diff --git a/libs/basic/src/process.rs b/libs/basic/src/process.rs
|
||||
index aafd2c8d..638eafdd 100644
|
||||
--- a/libs/basic/src/process.rs
|
||||
+++ b/libs/basic/src/process.rs
|
||||
@@ -23,9 +23,11 @@ use procfs::process::Stat;
|
||||
use std::collections::HashSet;
|
||||
use std::fs::{read_dir, File};
|
||||
use std::path::{Path, PathBuf};
|
||||
-use std::thread::sleep;
|
||||
use std::time::{Duration, SystemTime};
|
||||
|
||||
+const PROCESS_FLAG_POS: usize = 8;
|
||||
+const PF_KTHREAD: u64 = 0x00200000;
|
||||
+
|
||||
///
|
||||
pub fn process_state(pid: Pid) -> Result<char> {
|
||||
if pid == Pid::from_raw(0) || pid == nix::unistd::getpid() {
|
||||
@@ -105,9 +107,7 @@ pub fn kill_all_pids(signal: i32) -> HashSet<i32> {
|
||||
let file_name = String::from(entry.file_name().to_str().unwrap());
|
||||
// Check pid directory.
|
||||
if let Ok(pid_raw) = file_name.parse::<i32>() {
|
||||
- if Pid::from_raw(pid_raw) <= Pid::from_raw(1)
|
||||
- || Pid::from_raw(pid_raw) == nix::unistd::getpid()
|
||||
- {
|
||||
+ if let Ok(true) = ignore_proc_during_shutdown(Pid::from_raw(pid_raw)) {
|
||||
continue;
|
||||
}
|
||||
unsafe {
|
||||
@@ -128,10 +128,6 @@ pub fn wait_pids(mut pids: HashSet<i32>, timeout: u64) -> HashSet<i32> {
|
||||
let now = SystemTime::now();
|
||||
let until = now + Duration::from_micros(timeout);
|
||||
|
||||
- // remove PID1, we shouldn't wait our self and init.
|
||||
- pids.remove(&1);
|
||||
- pids.remove(&nix::unistd::getpid().into());
|
||||
-
|
||||
loop {
|
||||
// 1. Find killed process by kernel.
|
||||
while let Ok(wait_status) = waitpid(Pid::from_raw(-1), Some(WaitPidFlag::WNOHANG)) {
|
||||
@@ -157,12 +153,11 @@ pub fn wait_pids(mut pids: HashSet<i32>, timeout: u64) -> HashSet<i32> {
|
||||
log::debug!("successfully killed pid: {} found by ourself.", pid);
|
||||
pids.remove(&pid);
|
||||
}
|
||||
- // 3. Sleep 1s to wait pid exits.
|
||||
- sleep(Duration::from_secs(1));
|
||||
- // 4. Wait or give up.
|
||||
if pids.is_empty() {
|
||||
break;
|
||||
}
|
||||
+
|
||||
+ // 3. Wait or give up.
|
||||
if SystemTime::now() >= until {
|
||||
log::info!("some pids haven't been killed yet, stop waiting.");
|
||||
break;
|
||||
@@ -212,6 +207,53 @@ pub fn kill_and_cont(pid: Pid, sig: Signal) -> Result<(), Errno> {
|
||||
}
|
||||
}
|
||||
|
||||
+fn ignore_proc_during_shutdown(pid: Pid) -> Result<bool> {
|
||||
+ if pid <= Pid::from_raw(1) {
|
||||
+ return Ok(true);
|
||||
+ }
|
||||
+
|
||||
+ if pid == nix::unistd::getpid() {
|
||||
+ return Ok(true);
|
||||
+ }
|
||||
+
|
||||
+ if is_kernel_thread(pid)? {
|
||||
+ return Ok(true);
|
||||
+ }
|
||||
+
|
||||
+ Ok(false)
|
||||
+}
|
||||
+
|
||||
+fn is_kernel_thread(pid: Pid) -> Result<bool> {
|
||||
+ if pid == Pid::from_raw(1) || pid == nix::unistd::getpid() {
|
||||
+ return Ok(false);
|
||||
+ }
|
||||
+
|
||||
+ if pid <= Pid::from_raw(0) {
|
||||
+ return Err(Error::Invalid {
|
||||
+ what: format!("Invalid pid: {}", pid),
|
||||
+ });
|
||||
+ }
|
||||
+
|
||||
+ let first_line = fs_util::read_first_line(Path::new(&format!("/proc/{}/stat", pid.as_raw())))?;
|
||||
+ let stat: Vec<String> = first_line
|
||||
+ .split_whitespace()
|
||||
+ .map(|s| s.to_string())
|
||||
+ .collect();
|
||||
+
|
||||
+ if stat.len() <= PROCESS_FLAG_POS {
|
||||
+ return Err(Error::Invalid {
|
||||
+ what: "process stat format".to_string(),
|
||||
+ });
|
||||
+ }
|
||||
+
|
||||
+ let flag: u64 = stat[PROCESS_FLAG_POS].parse()?;
|
||||
+ if flag & PF_KTHREAD != 0 {
|
||||
+ Ok(true)
|
||||
+ } else {
|
||||
+ Ok(false)
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use nix::libc::kill;
|
||||
@@ -244,4 +286,28 @@ mod tests {
|
||||
let res = wait_pids(pids, 10000000);
|
||||
assert_eq!(res.len(), 0);
|
||||
}
|
||||
+
|
||||
+ #[test]
|
||||
+ fn test_ignore_proc_during_shutdown() {
|
||||
+ assert!(
|
||||
+ crate::process::ignore_proc_during_shutdown(nix::unistd::Pid::from_raw(0))
|
||||
+ .unwrap_or(false)
|
||||
+ );
|
||||
+ if let Ok(ignore) =
|
||||
+ crate::process::ignore_proc_during_shutdown(nix::unistd::Pid::from_raw(1))
|
||||
+ {
|
||||
+ assert!(ignore);
|
||||
+ }
|
||||
+ if let Ok(ignore) = crate::process::ignore_proc_during_shutdown(nix::unistd::getpid()) {
|
||||
+ assert!(ignore);
|
||||
+ }
|
||||
+ if let Ok(mut child) = Command::new("/usr/bin/sleep").arg("2").spawn() {
|
||||
+ if let Ok(ignore) = crate::process::ignore_proc_during_shutdown(
|
||||
+ nix::unistd::Pid::from_raw(child.id().try_into().unwrap()),
|
||||
+ ) {
|
||||
+ assert!(!ignore);
|
||||
+ }
|
||||
+ child.wait().unwrap();
|
||||
+ }
|
||||
+ }
|
||||
}
|
||||
--
|
||||
2.33.0
|
||||
|
||||
@ -1,27 +0,0 @@
|
||||
From f2c8606173f2b408c7a1f02a0d2ef537ad1ac7f6 Mon Sep 17 00:00:00 2001
|
||||
From: zhangyao2022 <zhangyao108@huawei.com>
|
||||
Date: Tue, 7 Nov 2023 16:22:08 +0800
|
||||
Subject: [PATCH] fix: solve two sysmaster problem, exit after do_execute()
|
||||
|
||||
---
|
||||
libs/basic/src/exec_util.rs | 4 +++-
|
||||
1 file changed, 3 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/libs/basic/src/exec_util.rs b/libs/basic/src/exec_util.rs
|
||||
index f1dc20cd..e27c4d62 100644
|
||||
--- a/libs/basic/src/exec_util.rs
|
||||
+++ b/libs/basic/src/exec_util.rs
|
||||
@@ -18,7 +18,9 @@ use std::{fs, os::unix::prelude::PermissionsExt, path::PathBuf, process::Command
|
||||
///
|
||||
pub fn execute_directories(directories: Vec<&str>) -> std::io::Result<()> {
|
||||
match unsafe { unistd::fork() } {
|
||||
- Ok(unistd::ForkResult::Child) => do_execute(directories),
|
||||
+ Ok(unistd::ForkResult::Child) => {
|
||||
+ std::process::exit(do_execute(directories).map_or(1, |_| 0))
|
||||
+ }
|
||||
Ok(unistd::ForkResult::Parent { child }) => match nix::sys::wait::waitpid(child, None) {
|
||||
Ok(_) => Ok(()),
|
||||
Err(err) => Err(std::io::Error::from(err)),
|
||||
--
|
||||
2.33.0
|
||||
|
||||
Binary file not shown.
BIN
sysmaster-1.1.0.tar.xz
Normal file
BIN
sysmaster-1.1.0.tar.xz
Normal file
Binary file not shown.
168
sysmaster.spec
168
sysmaster.spec
@ -1,33 +1,26 @@
|
||||
#needsrootforbuild
|
||||
%global __cargo_skip_build 0
|
||||
%global _debugsource_packages 1
|
||||
%global _debuginfo_subpackages 1
|
||||
%define _unpackaged_files_terminate_build 0
|
||||
%global sysmaster_install_source target/release
|
||||
%global sysmaster_install_target %{buildroot}/usr/lib/sysmaster
|
||||
%global unit_install_source units
|
||||
%global unit_install_target %{sysmaster_install_target}/system
|
||||
%global conf_install_source config/conf
|
||||
%global devmaster_install_source target/release
|
||||
%global devmaster_install_target %{buildroot}/usr/lib/devmaster
|
||||
%global devmaster_conf_install_source exts/devmaster/config
|
||||
%global devmaster_conf_install_target %{buildroot}/etc/devmaster
|
||||
%global factory_install_source factory
|
||||
%global factory_install_target %{buildroot}
|
||||
%global __cargo_common_opts %{?__cargo_common_opts} --all
|
||||
%global _cargo_build /usr/bin/env CARGO_HOME=.cargo RUSTC_BOOTSTRAP=1 %{_bindir}/cargo build %__cargo_common_opts
|
||||
|
||||
Name: sysmaster
|
||||
Version: 0.5.1
|
||||
Release: 3
|
||||
Name: sysmaster
|
||||
Version: 1.1.0
|
||||
Release: 1
|
||||
Summary: redesign and reimplement process1.
|
||||
|
||||
License: Mulan PSL v2
|
||||
URL: https://gitee.com/openeuler/sysmaster
|
||||
Source0: %{name}-%{version}.tar.xz
|
||||
|
||||
Patch0: backport-fix-getty-generator-delelte-double-quote-in-the-conf.patch
|
||||
Patch1: backport-fix-solve-two-sysmaster-problem-exit-after-do_execut.patch
|
||||
Patch2: backport-fix-solve-reboot-time-consuming.patch
|
||||
|
||||
ExclusiveArch: x86_64 aarch64
|
||||
ExclusiveArch: x86_64 aarch64 riscv64
|
||||
|
||||
BuildRequires: rust cargo rust-packaging
|
||||
BuildRequires: gcc clang openssl-libs
|
||||
@ -40,6 +33,10 @@ Summary: %{summary}
|
||||
%package -n devmaster
|
||||
Summary: Infrastructure of device management in userspace.
|
||||
BuildRequires: util-linux-devel kmod-devel
|
||||
Requires: %{name}%{?_isa} = %{version}-%{release}
|
||||
Requires(post): sysmaster
|
||||
Requires(preun): sysmaster
|
||||
Requires(postun): sysmaster
|
||||
|
||||
%description -n devmaster
|
||||
This package provides the infrastructure of device management in userspace.
|
||||
@ -59,7 +56,6 @@ replace-with = "vendored-sources"
|
||||
directory = "vendor"
|
||||
EOF
|
||||
|
||||
|
||||
%{_cargo_build} --profile release
|
||||
|
||||
%install
|
||||
@ -73,66 +69,33 @@ install -Dm0750 -t %{sysmaster_install_target} %{sysmaster_install_source}/sysmo
|
||||
install -Dm0750 -t %{sysmaster_install_target} %{sysmaster_install_source}/random_seed
|
||||
install -Dm0750 -t %{sysmaster_install_target} %{sysmaster_install_source}/rc-local-generator
|
||||
install -Dm0750 -t %{sysmaster_install_target} %{sysmaster_install_source}/hostname_setup
|
||||
install -Dm0750 -t %{sysmaster_install_target} %{sysmaster_install_source}/sysmaster-run
|
||||
install -Dm0750 -t %{sysmaster_install_target}/system-generators %{sysmaster_install_source}/getty-generator
|
||||
|
||||
install -Dm0640 -t %{unit_install_target} %{unit_install_source}/*
|
||||
cp -a %{factory_install_source}/* %{factory_install_target}
|
||||
|
||||
install -Dm0640 -t %{buildroot}/etc/sysmaster %{conf_install_source}/system.conf
|
||||
|
||||
install -Dm0750 -t %{buildroot}/usr/bin %{devmaster_install_source}/devctl
|
||||
install -Dm0550 -t %{devmaster_install_target} tools/run_with_devmaster/simulate_udev.sh
|
||||
install -Dm0640 -t %{devmaster_conf_install_target} %{devmaster_conf_install_source}/config.toml
|
||||
install -Dm0640 -t %{devmaster_conf_install_target}/rules.d %{devmaster_conf_install_source}/rules.d/*
|
||||
install -Dm0640 -t %{devmaster_conf_install_target}/network.d %{devmaster_conf_install_source}/network.d/*
|
||||
install -Dm0750 -t %{buildroot}/usr/bin %{sysmaster_install_source}/devctl
|
||||
ln -s /usr/bin/devctl %{buildroot}/usr/lib/devmaster/devmaster
|
||||
|
||||
mkdir -p %{buildroot}/etc/sysmaster/system/multi-user.target.wants
|
||||
for unit in NetworkManager.service dbus.service fstab.service hostname-setup.service getty.target sshd.service devctl-trigger.service; do
|
||||
# enable service for booting
|
||||
ln -s /usr/lib/sysmaster/system/$unit %{buildroot}/etc/sysmaster/system/multi-user.target.wants/$unit
|
||||
done
|
||||
|
||||
mkdir -p %{buildroot}/etc/sysmaster/system/sysinit.target.wants
|
||||
mkdir -p %{devmaster_install_target}
|
||||
|
||||
ln -s /usr/bin/devctl %{devmaster_install_target}/devmaster
|
||||
for unit in NetworkManager.service dbus.service dbus.socket fstab.service hostname-setup.service udevd-control.socket udevd-kernel.socket; do
|
||||
install -Dm0640 -t %{unit_install_target} tools/run_with_vm/$unit
|
||||
# enble service for booting
|
||||
if [[ "$unit" == *".service" ]]; then
|
||||
ln -s /usr/lib/sysmaster/system/$unit %{buildroot}/etc/sysmaster/system/multi-user.target.wants/$unit
|
||||
fi
|
||||
for unit in udevd.service udev-trigger.service devmaster.service; do
|
||||
ln -s /usr/lib/sysmaster/system/$unit %{buildroot}/etc/sysmaster/system/sysinit.target.wants/$unit
|
||||
done
|
||||
|
||||
for unit in udevd.service udev-trigger.service; do
|
||||
install -Dm0640 -t %{unit_install_target} tools/run_with_vm/$unit
|
||||
if [[ "$unit" == *".service" ]]; then
|
||||
ln -s /usr/lib/sysmaster/system/$unit %{buildroot}/etc/sysmaster/system/sysinit.target.wants/$unit
|
||||
fi
|
||||
done
|
||||
|
||||
for unit in devmaster.service devctl-trigger.service; do
|
||||
install -Dm0640 -t %{unit_install_target} tools/run_with_devmaster/service/$unit
|
||||
if [[ "$unit" == *".service" ]]; then
|
||||
ln -s /usr/lib/sysmaster/system/$unit %{buildroot}/etc/sysmaster/system/sysinit.target.wants/$unit
|
||||
fi
|
||||
done
|
||||
|
||||
install -Dm0640 -t %{unit_install_target} tools/run_with_devmaster/service/*.service
|
||||
install -Dm0640 -t %{unit_install_target} tools/run_with_vm/getty.target
|
||||
ln -s /usr/lib/sysmaster/system//getty.target %{buildroot}/etc/sysmaster/system/multi-user.target.wants/getty.target
|
||||
install -Dm0640 -t %{unit_install_target} tools/run_with_vm/getty@.service
|
||||
install -Dm0640 -t %{unit_install_target} tools/run_with_vm/serial-getty@.service
|
||||
|
||||
# Install compatible rules for lvm
|
||||
install -Dm444 -t %{buildroot}/usr/lib/udev/rules.d rules/99-sysmaster.rules
|
||||
|
||||
# Install configurations under /etc.
|
||||
install -Dm0640 -t %{devmaster_conf_install_target} %{devmaster_conf_install_source}/config.toml
|
||||
sed -i 's/\"\/lib\/devmaster\/rules.d\"/&, \"\/etc\/udev\/rules.d\", \"\/run\/udev\/rules.d\", \"\/lib\/udev\/rules.d\"/' %{devmaster_conf_install_target}/config.toml
|
||||
|
||||
# enable sshd service by default
|
||||
ln -s /usr/lib/sysmaster/system/sshd.service %{buildroot}/etc/sysmaster/system/multi-user.target.wants/sshd.service
|
||||
sed -i 's/\"\/lib\/devmaster\/rules.d\"/&, \"\/etc\/udev\/rules.d\", \"\/run\/udev\/rules.d\", \"\/lib\/udev\/rules.d\"/' %{buildroot}/etc/devmaster/config.toml
|
||||
|
||||
%files
|
||||
%attr(0550,-,-) /usr/bin/sctl
|
||||
%dir %attr(0550,-,-) /usr/lib/sysmaster
|
||||
%dir %attr(0750,-,-) /usr/lib/sysmaster/system
|
||||
/usr/lib/sysmaster/system/*
|
||||
%attr(0640,-,-) /usr/lib/sysmaster/system/*
|
||||
%attr(0550,-,-) /usr/lib/sysmaster/init
|
||||
%attr(0550,-,-) /usr/lib/sysmaster/fstab
|
||||
%attr(0550,-,-) /usr/lib/sysmaster/sysmonitor
|
||||
@ -140,6 +103,7 @@ ln -s /usr/lib/sysmaster/system/sshd.service %{buildroot}/etc/sysmaster/system/m
|
||||
%attr(0550,-,-) /usr/lib/sysmaster/rc-local-generator
|
||||
%attr(0550,-,-) /usr/lib/sysmaster/system-generators/getty-generator
|
||||
%attr(0550,-,-) /usr/lib/sysmaster/hostname_setup
|
||||
%attr(0550,-,-) /usr/lib/sysmaster/sysmaster-run
|
||||
%attr(0550,-,-) /usr/lib/sysmaster/sysmaster
|
||||
%dir %attr(0750,-,-) /etc/sysmaster
|
||||
%dir %attr(0750,-,-) /etc/sysmaster/system
|
||||
@ -147,68 +111,69 @@ ln -s /usr/lib/sysmaster/system/sshd.service %{buildroot}/etc/sysmaster/system/m
|
||||
%dir %attr(0750,-,-) /etc/sysmaster/system/sysinit.target.wants
|
||||
/etc/sysmaster/system/multi-user.target.wants/*
|
||||
/etc/sysmaster/system/sysinit.target.wants/*
|
||||
/etc/sysmaster/system.conf
|
||||
/usr/lib/udev/rules.d/99-sysmaster.rules
|
||||
%attr(0640,-,-) /etc/sysmaster/system.conf
|
||||
%attr(0444,-,-) /usr/lib/udev/rules.d/99-sysmaster.rules
|
||||
%exclude /usr/lib/sysmaster/system/devctl-trigger.service
|
||||
%exclude /usr/lib/sysmaster/system/devmaster-simu-udev.service
|
||||
%exclude /usr/lib/sysmaster/system/devmaster.service
|
||||
%exclude /etc/sysmaster/system/sysinit.target.wants/devmaster.service
|
||||
%exclude /etc/sysmaster/system/sysinit.target.wants/devctl-trigger.service
|
||||
%exclude /etc/sysmaster/system/multi-user.target.wants/devctl-trigger.service
|
||||
|
||||
%files -n devmaster
|
||||
%dir %attr(0550,-,-) /usr/lib/devmaster
|
||||
%dir %attr(0750,-,-) /etc/devmaster
|
||||
/etc/devmaster/config.toml
|
||||
%attr(0640,-,-) /etc/devmaster/config.toml
|
||||
%dir %attr(0750,-,-) /etc/devmaster/rules.d
|
||||
/etc/devmaster/rules.d/99-default.rules
|
||||
%attr(0640,-,-) /etc/devmaster/rules.d/99-default.rules
|
||||
%dir %attr(0750,-,-) /etc/devmaster/network.d
|
||||
/etc/devmaster/network.d/99-default.link
|
||||
%attr(0640,-,-) /etc/devmaster/network.d/99-default.link
|
||||
%attr(0550,-,-) /usr/bin/devctl
|
||||
%attr(0550,-,-) /usr/lib/devmaster/devmaster
|
||||
/usr/lib/sysmaster/system/devctl-trigger.service
|
||||
/usr/lib/sysmaster/system/devmaster-simu-udev.service
|
||||
/usr/lib/sysmaster/system/devmaster.service
|
||||
/usr/lib/devmaster/simulate_udev.sh
|
||||
%attr(0640,-,-) /usr/lib/sysmaster/system/devctl-trigger.service
|
||||
%attr(0640,-,-) /usr/lib/sysmaster/system/devmaster-simu-udev.service
|
||||
%attr(0640,-,-) /usr/lib/sysmaster/system/devmaster.service
|
||||
%attr(0550,-,-) /usr/lib/devmaster/simulate_udev.sh
|
||||
/etc/sysmaster/system/sysinit.target.wants/devmaster.service
|
||||
/etc/sysmaster/system/sysinit.target.wants/devctl-trigger.service
|
||||
/etc/sysmaster/system/multi-user.target.wants/devctl-trigger.service
|
||||
|
||||
%post -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 || :
|
||||
test -f /usr/bin/sctl && ln -sf ../bin/sctl /usr/sbin/halt || :
|
||||
|
||||
%postun -n sysmaster
|
||||
test -f /usr/bin/systemctl && ln -sf ../bin/systemctl /usr/sbin/reboot || :
|
||||
test -f /usr/bin/systemctl && ln -sf ../bin/systemctl /usr/sbin/shutdown || :
|
||||
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
|
||||
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
|
||||
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 || :
|
||||
|
||||
%postun -n devmaster
|
||||
test -f /usr/lib/sysmaster/system/udevd.service && ln -s /usr/lib/sysmaster/system/udevd.service /etc/sysmaster/system/sysinit.target.wants/udevd.service
|
||||
test -f /usr/lib/sysmaster/system/udev-trigger.service && ln -s /usr/lib/sysmaster/system/udev-trigger.service /etc/sysmaster/system/sysinit.target.wants/udev-trigger.service
|
||||
if [ $1 -eq 0 ] ; then
|
||||
test -f /usr/lib/sysmaster/system/udevd.service && ln -s /usr/lib/sysmaster/system/udevd.service /etc/sysmaster/system/sysinit.target.wants/udevd.service || :
|
||||
test -f /usr/lib/sysmaster/system/udev-trigger.service && ln -s /usr/lib/sysmaster/system/udev-trigger.service /etc/sysmaster/system/sysinit.target.wants/udev-trigger.service || :
|
||||
fi
|
||||
|
||||
%changelog
|
||||
* Fri Nov 24 2023 zhangyao<zhangyao108@huawei.com> - 0.5.1-3
|
||||
- sync patchs from upstream
|
||||
* Mon Apr 29 2024 wangyaoyong <yaoyong.oerv@isrc.iscas.ac.cn> - 1.1.0-1
|
||||
- update version to 1.1.0
|
||||
|
||||
* Mon Oct 30 2023 zhangyao<zhangyao108@huawei.com> - 0.5.1-2
|
||||
- add simulate_udev.sh file
|
||||
* Thu Feb 22 2024 zhangyao<zhangyao108@huawei.com> - 1.0.0-1
|
||||
- update version to 1.0.0
|
||||
|
||||
* Mon Oct 30 2023 zhangyao<zhangyao108@huawei.com> - 0.5.1-1
|
||||
- upgrade version to 0.5.1
|
||||
* Fri Aug 25 2023 licunlong<licunlong1@huawei.com> - 0.5.0-3
|
||||
- enable subtree_control for sub cgroup on hongmeng
|
||||
|
||||
* Fri Sep 01 2023 licunlong<licunlong1@huawei.com> - 0.2.5-4
|
||||
- sync patchs from upstream
|
||||
* Wed Aug 23 2023 licunlong<licunlong1@huawei.com> - 0.5.0-2
|
||||
- disable User/Group on hongmeng
|
||||
|
||||
* Thu Aug 31 2023 licunlong<licunlong1@huawei.com> - 0.2.5-3
|
||||
- log the status message to stdout
|
||||
|
||||
* Fri Aug 25 2023 licunlong<licunlong1@huawei.com> - 0.2.5-2
|
||||
- sync patches from upstream
|
||||
|
||||
* Sat Aug 5 2023 shenyangyang<shenyangyang4@huawei.com> - 0.2.5-1
|
||||
- update for compiling with rust 1.57
|
||||
|
||||
* Thu Jul 27 2023 huyubiao<huyubiao@huawei.com> - 0.2.4-5
|
||||
- sync patches from upstream,
|
||||
change the path of the unit,
|
||||
modify permissions for some directories and files
|
||||
|
||||
* Wed Jul 19 2023 shenyangyang<shenyangyang4@huawei.com> - 0.2.4-4
|
||||
- add compile option
|
||||
* Mon Aug 14 2023 shenyangyang<shenyangyang4@huawei.com> - 0.5.0-1
|
||||
- bump version to 0.5.0 to supprot virtual machine
|
||||
|
||||
* Thu Jul 06 2023 xujing<xujing125@huawei.com> - 0.2.4-3
|
||||
- fix objcopy permission denied when rpmbuild
|
||||
@ -219,6 +184,9 @@ test -f /usr/lib/sysmaster/system/udev-trigger.service && ln -s /usr/lib/sysmast
|
||||
* Tue Jun 20 2023 shenyangyang<shenyangyang4@huawei.com> - 0.2.4-1
|
||||
- update version to 0.2.4 for docker use
|
||||
|
||||
* Mon Jun 19 2023 huyubiao<huyubiao@huawei.com> - 0.2.3-4
|
||||
- sync patches from upstream
|
||||
|
||||
* Fri Jun 16 2023 licunlong<licunlong1@huawei.com> - 0.2.3-3
|
||||
- sync patches from upstream
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user