Compare commits
10 Commits
902d57d6cf
...
5a7bfcd896
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5a7bfcd896 | ||
|
|
a9cf88c118 | ||
|
|
fb0b67c6ec | ||
|
|
424ef19ced | ||
|
|
796544bb4e | ||
|
|
6f34748de7 | ||
|
|
2a7765f92b | ||
|
|
4c53cb7057 | ||
|
|
2e80ad2a01 | ||
|
|
342b65ee70 |
@ -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
|
||||
|
||||
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.
156
sysmaster.spec
156
sysmaster.spec
@ -1,31 +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: 1
|
||||
Name: sysmaster
|
||||
Version: 1.1.0
|
||||
Release: 3
|
||||
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
|
||||
|
||||
ExclusiveArch: x86_64 aarch64
|
||||
ExclusiveArch: x86_64 aarch64 riscv64
|
||||
|
||||
BuildRequires: rust cargo rust-packaging
|
||||
BuildRequires: gcc clang openssl-libs
|
||||
@ -38,6 +33,11 @@ Summary: %{summary}
|
||||
%package -n devmaster
|
||||
Summary: Infrastructure of device management in userspace.
|
||||
BuildRequires: util-linux-devel kmod-devel
|
||||
Requires: %{name}%{?_isa} = %{version}-%{release}
|
||||
Requires: sysmaster
|
||||
Requires(post): sysmaster
|
||||
Requires(preun): sysmaster
|
||||
Requires(postun): sysmaster
|
||||
|
||||
%description -n devmaster
|
||||
This package provides the infrastructure of device management in userspace.
|
||||
@ -57,7 +57,6 @@ replace-with = "vendored-sources"
|
||||
directory = "vendor"
|
||||
EOF
|
||||
|
||||
|
||||
%{_cargo_build} --profile release
|
||||
|
||||
%install
|
||||
@ -71,58 +70,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 -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
|
||||
|
||||
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
|
||||
@ -130,6 +104,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
|
||||
@ -137,57 +112,75 @@ 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/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
|
||||
%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/multi-user.target.wants/devctl-trigger.service
|
||||
|
||||
%post -n devmaster
|
||||
ln -sf /usr/lib/sysmaster/system/devmaster.service /etc/sysmaster/system/sysinit.target.wants/udevd.service
|
||||
ln -sf /usr/lib/sysmaster/system/devctl-trigger.service /etc/sysmaster/system/multi-user.target.wants/udev-trigger.service
|
||||
%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 || :
|
||||
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 || :
|
||||
|
||||
|
||||
%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 || :
|
||||
|
||||
%postun -n devmaster
|
||||
test -f /usr/lib/sysmaster/system/udevd.service && ln -sf /usr/lib/sysmaster/system/udevd.service /etc/sysmaster/system/sysinit.target.wants/udevd.service
|
||||
test -f /usr/lib/sysmaster/system/udev-trigger.service && ln -sf /usr/lib/sysmaster/system/udev-trigger.service /etc/sysmaster/system/multi-user.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
|
||||
* Mon Oct 30 2023 zhangyao<zhangyao108@huawei.com> - 0.5.1-1
|
||||
- upgrade version to 0.5.1
|
||||
* Wed Jun 19 2024 zhangxianting<zhangxianting@uniontech.com> - 1.1.0-3
|
||||
- install devmaster failed at post, becuase of less file
|
||||
|
||||
* Fri Sep 01 2023 licunlong<licunlong1@huawei.com> - 0.2.5-4
|
||||
- sync patchs from upstream
|
||||
* Mon Jun 17 2024 zhangyao<zhangyao108@huawei.com> - 1.1.0-2
|
||||
- resolve wantedby invalid and fix reboot symlink not correct after reinstall
|
||||
|
||||
* Thu Aug 31 2023 licunlong<licunlong1@huawei.com> - 0.2.5-3
|
||||
- log the status message to stdout
|
||||
* Mon Apr 29 2024 wangyaoyong <yaoyong.oerv@isrc.iscas.ac.cn> - 1.1.0-1
|
||||
- update version to 1.1.0
|
||||
|
||||
* Fri Aug 25 2023 licunlong<licunlong1@huawei.com> - 0.2.5-2
|
||||
- sync patches from upstream
|
||||
* Thu Feb 22 2024 zhangyao<zhangyao108@huawei.com> - 1.0.0-1
|
||||
- update version to 1.0.0
|
||||
|
||||
* Sat Aug 5 2023 shenyangyang<shenyangyang4@huawei.com> - 0.2.5-1
|
||||
- update for compiling with rust 1.57
|
||||
* Fri Aug 25 2023 licunlong<licunlong1@huawei.com> - 0.5.0-3
|
||||
- enable subtree_control for sub cgroup on hongmeng
|
||||
|
||||
* 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 Aug 23 2023 licunlong<licunlong1@huawei.com> - 0.5.0-2
|
||||
- disable User/Group on hongmeng
|
||||
|
||||
* 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
|
||||
@ -198,6 +191,9 @@ test -f /usr/lib/sysmaster/system/udev-trigger.service && ln -sf /usr/lib/sysmas
|
||||
* 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