#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 conf_install_source config/conf %global __cargo_common_opts %{?__cargo_common_opts} --all Name: sysmaster Version: 0.2.3 Release: 3 Summary: redesign and reimplement process1. License: Mulan PSL v2 URL: https://gitee.com/openeuler/sysmaster Source0: %{name}-%{version}.tar.gz Patch6000: backport-fix-check-if-the-returned-state-is-None.patch Patch6001: backport-fix-unwatch-all-pids-when-the-service-enters-dead.patch Patch6002: backport-fix-only-remove-one-unit-s-pid-from-db-PR-568-remove.patch # Patch6003-Patch6011: https://gitee.com/openeuler/sysmaster/pulls/585 Patch6003: backport-fix-remove-some-debug-message-no-functional-change.patch Patch6004: backport-refactor-rename-UNitNotifyFlags-to-shorten-code-a-bi.patch Patch6005: backport-feature-add-as_any-to-SubUnit-so-we-can-downcast-Sub.patch Patch6006: backport-fix-move-RefCell-to-the-inside-of-Table-no-functiona.patch Patch6007: backport-fix-add-has_source-to-events-and-use-this-in-socket..patch Patch6008: backport-fix-change-if-port.fd-is-valid-we-should-avoid-deali.patch Patch6009: backport-fix-enable-trigger-for-socket-and-use-this-interface.patch Patch6010: backport-fix-change-the-socket-logic-to-keep-the-same-as-syst.patch Patch6011: backport-fix-fix-some-cargo-clippies.patch Patch6012: backport-fix-compatible-with-rustc-1.60.patch Patch6013: backport-fix-compatible-with-rusc-1.60-lint-check.patch #Patch6014-Patch6016: https://gitee.com/openeuler/sysmaster/pulls/598 Patch6014: backport-refactor-use-UnixStream-instead-TcpListener-to-get-t.patch Patch6015: backport-feature-get-credential-from-the-connection-and-use-i.patch Patch6016: backport-typo-fix-some-typoes-no-functional-change.patch Patch6017: backport-fix-fstab-use-fixed-inotify-version-0.10.0-to-be-com.patch Patch6018: backport-fix-don-t-mount-all-subsystem-to-every-sys-fs-cgroup.patch Patch6019: backport-fix-check-if-the-given-unit-name-is-valid-before-we-.patch Patch6020: backport-fix-really-use-usec.patch Patch6021: backport-docs-note-that-we-only-support-no-more-than-500-unit.patch ExclusiveArch: x86_64 aarch64 BuildRequires: rust BuildRequires: cargo BuildRequires: rust-packaging BuildRequires: gcc clang util-linux-devel %description redesign and reimplement process1. Summary: %{summary} %prep %autosetup -p1 %cargo_prep %cargo_generate_buildrequires %build sed -i '/\[source.crates-io\]/{n;d}' ./.cargo/config sed -i '/\[source.local-registry\]/{n;d}' ./.cargo/config sed -i '/\[source.local-registry\]/a directory = "vendor"' ./.cargo/config %cargo_build %install install -Dm0550 -t %{buildroot}/usr/bin %{sysmaster_install_source}/sctl install -Dm0550 -t %{sysmaster_install_target} %{sysmaster_install_source}/init install -Dm0550 -t %{sysmaster_install_target} %{sysmaster_install_source}/sysmaster install -Dm0550 -t %{sysmaster_install_target} %{sysmaster_install_source}/fstab install -Dm0550 -t %{sysmaster_install_target} %{sysmaster_install_source}/sysmonitor install -Dm0550 -t %{sysmaster_install_target} %{sysmaster_install_source}/random_seed install -Dm0550 -t %{sysmaster_install_target} %{sysmaster_install_source}/rc-local-generator #install -Dm0640 -t %{sysmaster_install_target} %{unit_install_source}/basic.target #install -Dm0640 -t %{sysmaster_install_target} %{unit_install_source}/Multi-user.target #install -Dm0640 -t %{sysmaster_install_target} %{unit_install_source}/shutdown.target #install -Dm0640 -t %{sysmaster_install_target} %{unit_install_source}/sysinit.target install -Dm0640 -t %{sysmaster_install_target} %{unit_install_source}/* install -Dm0550 -t %{sysmaster_install_target}/plugin %{sysmaster_install_source}/libmount.so install -Dm0550 -t %{sysmaster_install_target}/plugin %{sysmaster_install_source}/libservice.so install -Dm0550 -t %{sysmaster_install_target}/plugin %{sysmaster_install_source}/libsocket.so install -Dm0550 -t %{sysmaster_install_target}/plugin %{sysmaster_install_source}/libtarget.so install -Dm0640 -t %{sysmaster_install_target}/plugin %{conf_install_source}/plugin.conf %files /usr/bin/sctl /usr/lib/sysmaster/* %changelog * Fri Jun 16 2023 licunlong - 0.2.3-3 - sync patches from upstream * Tue May 30 2023 shenyangyang - 0.2.3-2 - Support compatible compile with rust 1.60 * Sat May 6 2023 shenyangyang - 0.2.3-1 - update version to 0.2.3 * Tue Sep 20 2022 licunlong - 0.2.1-2 - rename process1 to sysmaster, and remove pctrl to /usr/bin * Tue Sep 13 2022 licunlong - 0.2.1-1 - sync patches from upstream * Mon Aug 22 2022 He Xiaowen - 0.2.0-2 - strip the libraries * Mon Aug 22 2022 He Xiaowen - 0.2.0-1 - initial package