rear/rear.spec

93 lines
2.5 KiB
RPMSpec
Raw Permalink Normal View History

2020-02-28 19:53:51 +08:00
%define debug_package %{nil}
Name: rear
2024-01-04 14:07:02 +08:00
Version: 2.7
2024-03-05 14:42:06 +08:00
Release: 3
2020-02-28 19:53:51 +08:00
License: GPLv3
Summary: Relax-and-Recover is a setup-and-forget Linux bare metal disaster recovery solution
URL: http://relax-and-recover.org/
2024-01-04 14:07:02 +08:00
Source0: https://github.com/rear/rear/archive/refs/tags/%{version}.tar.gz
2023-10-17 16:16:34 +08:00
# Add cronjob and systemd timer as documentation
Source1: rear.cron
Source2: rear.service
Source3: rear.timer
2024-01-15 14:48:59 +08:00
Patch0: CVE-2024-23301.patch
2024-03-05 14:42:06 +08:00
ExclusiveArch: x86_64 loongarch64 ppc64le
2020-02-28 19:53:51 +08:00
Requires: binutils ethtool gzip iputils parted tar openssl gawk attr bc crontabs iproute
2023-10-17 16:16:34 +08:00
Requires: genisoimage util-linux
%ifarch x86_64 i686
Requires: syslinux
%endif
BuildRequires: make asciidoctor
2020-02-28 19:53:51 +08:00
BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
%description
Relax-and-Recover is a setup-and-forget Linux bare metal disaster recovery solution. It is easy to
set up and requires no maintenance so there is no excuse for not using it.
%package help
Summary: Help document for the rear
Buildarch: noarch
%description help
Help document for the rear package.
%pre
if [ $1 -gt 1 ] ; then
rm -rf %{_datadir}/rear/output/NETFS
fi
%prep
2023-10-17 16:16:34 +08:00
%autosetup -p1
sed -E -e "s:([\"' ])/lib:\1/usr/lib:g" \
-i usr/share/rear/prep/GNU/Linux/*include*.sh
sed -e 's:/lib/:/usr/lib/:g' \
-e 's:/lib\*/:/usr/lib\*/:g' \
-e 's:/usr/usr/lib:/usr/lib:g' \
-i 'usr/share/rear/conf/GNU/Linux.conf'
2020-02-28 19:53:51 +08:00
%build
2023-10-17 16:16:34 +08:00
make doc
2020-02-28 19:53:51 +08:00
%install
2023-10-17 16:16:34 +08:00
%make_install
install -p -d %{buildroot}%{_docdir}/%{name}/
install -m 0644 %{SOURCE1} %{buildroot}%{_docdir}/%{name}/
install -m 0644 %{SOURCE2} %{buildroot}%{_docdir}/%{name}/
install -m 0644 %{SOURCE3} %{buildroot}%{_docdir}/%{name}/
2020-02-28 19:53:51 +08:00
%clean
rm -rf %{buildroot}
%files
2023-10-17 16:16:34 +08:00
%doc MAINTAINERS COPYING README.adoc doc/*.txt doc/user-guide/*.html
2020-02-28 19:53:51 +08:00
%config(noreplace) %{_sysconfdir}/rear/
2023-10-17 16:16:34 +08:00
%doc %{_docdir}/%{name}/rear.*
2020-02-28 19:53:51 +08:00
%{_datadir}/rear/
2023-10-17 16:16:34 +08:00
%{_sharedstatedir}/rear/
2020-02-28 19:53:51 +08:00
%{_sbindir}/rear
%files help
%doc %{_mandir}/man8/rear.8*
%changelog
2024-03-05 14:42:06 +08:00
* Tue Mar 5 2024 yinxiulin <xiulin.yin@shingroup.cn> - 2.7-3
- Add ppc64le support
2024-01-15 14:48:59 +08:00
* Mon Jan 15 2024 wangkai <13474090681@163.com> - 2.7-2
- Fix CVE-2024-23301
2024-01-04 14:07:02 +08:00
* Thu Jan 04 2024 Paul Thomas <paulthomas100199@gmail.com> - 2.7-1
- update to version 2.7
2023-10-17 16:16:34 +08:00
* Tue Oct 17 2023 yaoxin <yao_xin001@hoperun.com> - 2.6-1
- Upgrade to 2.6
* Tue Nov 15 2022 huajingyun <huajingyun@loongson.cn> - 2.4-4
- Add loongarch64 support
2020-02-28 19:53:51 +08:00
* Wed Feb 26 2020 Ling Yang <lingyang2@huawei.com> - 2.4-3
- Package Init