sysmaster/sysmaster.spec

118 lines
3.8 KiB
RPMSpec

%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
%global _cargo_build /usr/bin/env CARGO_HOME=.cargo RUSTC_BOOTSTRAP=1 %{_bindir}/cargo build %__cargo_common_opts
Name: sysmaster
Version: 0.2.5
Release: 2
Summary: redesign and reimplement process1.
License: Mulan PSL v2
URL: https://gitee.com/openeuler/sysmaster
Source0: %{name}-%{version}.tar.gz
Patch6001: backport-fix-delete-and-re-add-the-restart-timer-to-make-time.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_generate_buildrequires
%build
%{_cargo_build} --profile release
%install
# For binary files and .so files, the permission 750 in the install phase to prevent objcopy errors.
# In the files phase, the permission is set back to 550.
install -Dm0750 -t %{buildroot}/usr/bin %{sysmaster_install_source}/sctl
install -Dm0750 -t %{sysmaster_install_target} %{sysmaster_install_source}/init
install -Dm0750 -t %{sysmaster_install_target} %{sysmaster_install_source}/sysmaster
install -Dm0640 -t %{sysmaster_install_target}/system %{unit_install_source}/*
install -Dm0640 -t %{buildroot}/etc/sysmaster %{conf_install_source}/system.conf
%files
%attr(0550,-,-) /usr/bin/sctl
%dir %attr(0550,-,-) /usr/lib/sysmaster
%dir %attr(0750,-,-) /usr/lib/sysmaster/system
/usr/lib/sysmaster/system/basic.target
%attr(0550,-,-) /usr/lib/sysmaster/init
/usr/lib/sysmaster/system/multi-user.target
/usr/lib/sysmaster/system/shutdown.target
/usr/lib/sysmaster/system/sshd-keygen.target
/usr/lib/sysmaster/system/sshd-keygen@ecdsa.service
/usr/lib/sysmaster/system/sshd-keygen@ed25519.service
/usr/lib/sysmaster/system/sshd-keygen@rsa.service
/usr/lib/sysmaster/system/sshd.service
/usr/lib/sysmaster/system/sysinit.target
%attr(0550,-,-) /usr/lib/sysmaster/sysmaster
%dir %attr(0750,-,-) /etc/sysmaster
/etc/sysmaster/system.conf
%changelog
* 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
* Thu Jul 06 2023 xujing<xujing125@huawei.com> - 0.2.4-3
- fix objcopy permission denied when rpmbuild
* Tue Jun 27 2023 shenyangyang<shenyangyang4@huawei.com> - 0.2.4-2
- modify the sshd units
* Tue Jun 20 2023 shenyangyang<shenyangyang4@huawei.com> - 0.2.4-1
- update version to 0.2.4 for docker use
* Fri Jun 16 2023 licunlong<licunlong1@huawei.com> - 0.2.3-3
- sync patches from upstream
* Tue May 30 2023 shenyangyang<shenyangyang4@huawei.com> - 0.2.3-2
- Support compatible compile with rust 1.60
* Sat May 6 2023 shenyangyang<shenyangyang4@huawei.com> - 0.2.3-1
- update version to 0.2.3
* Tue Sep 20 2022 licunlong<licunlong1@huawei.com> - 0.2.1-2
- rename process1 to sysmaster, and remove pctrl to /usr/bin
* Tue Sep 13 2022 licunlong<licunlong1@huawei.com> - 0.2.1-1
- sync patches from upstream
* Mon Aug 22 2022 He Xiaowen <hexiaowen@huawei.com> - 0.2.0-2
- strip the libraries
* Mon Aug 22 2022 He Xiaowen <hexiaowen@huawei.com> - 0.2.0-1
- initial package