From cd95a154121d3402bca3e7d30cedc87a8eadbae4 Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Jan 25 2018 09:29:45 +0000 Subject: import rear-2.00-4.el7_4 --- diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..bd49bec --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +SOURCES/rear-2.00.tar.gz diff --git a/.rear.metadata b/.rear.metadata new file mode 100644 index 0000000..b57604f --- /dev/null +++ b/.rear.metadata @@ -0,0 +1 @@ +6d78cd78e4c6679fba4bb224dde56ac9da0485ae SOURCES/rear-2.00.tar.gz diff --git a/README.md b/README.md deleted file mode 100644 index 98f42b4..0000000 --- a/README.md +++ /dev/null @@ -1,4 +0,0 @@ -The master branch has no content - -Look at the c7 branch if you are working with CentOS-7, or the c4/c5/c6 branch for CentOS-4, 5 or 6 -If you find this file in a distro specific branch, it means that no content has been checked in yet diff --git a/SOURCES/pr-1481.patch b/SOURCES/pr-1481.patch new file mode 100644 index 0000000..1438ff5 --- /dev/null +++ b/SOURCES/pr-1481.patch @@ -0,0 +1,27 @@ +diff --git a/usr/share/rear/prep/default/310_include_uefi_tools.sh b/usr/share/rear/prep/default/330_include_uefi_tools.sh +similarity index 58% +rename from usr/share/rear/prep/default/310_include_uefi_tools.sh +rename to usr/share/rear/prep/default/330_include_uefi_tools.sh +index 61f973a..c910d36 100644 +--- a/usr/share/rear/prep/default/310_include_uefi_tools.sh ++++ b/usr/share/rear/prep/default/330_include_uefi_tools.sh +@@ -1,14 +1,9 @@ +-# When /boot/efi is mounted we copy the UEFI binaries we might need ++# ++# Copy UEFI binaries we might need into the ReaR recovery system. ++# + +-# If noefi is set, we can ignore UEFI altogether +-if grep -qw 'noefi' /proc/cmdline; then +- return +-fi +- +-# next step, is checking /boot/efi directory (we need it) +-if [[ ! -d /boot/efi ]]; then +- return # must be mounted +-fi ++# Include UEFI tools on demand only ++is_true $USING_UEFI_BOOTLOADER || return + + REQUIRED_PROGS=( "${REQUIRED_PROGS[@]}" + dosfsck diff --git a/SOURCES/rear-bz1532676-pr1685.patch b/SOURCES/rear-bz1532676-pr1685.patch new file mode 100644 index 0000000..f252f5a --- /dev/null +++ b/SOURCES/rear-bz1532676-pr1685.patch @@ -0,0 +1,14 @@ +diff --git a/usr/share/rear/verify/NETFS/default/550_check_backup_archive.sh b/usr/share/rear/verify/NETFS/default/550_check_backup_archive.sh +index a7bb31f..57f7537 100644 +--- a/usr/share/rear/verify/NETFS/default/550_check_backup_archive.sh ++++ b/usr/share/rear/verify/NETFS/default/550_check_backup_archive.sh +@@ -26,7 +26,9 @@ for restoreinput in "${RESTORE_ARCHIVES[@]}" ; do + if is_true "$BACKUP_INTEGRITY_CHECK" && test -f $restoreinput.md5 ; then + if ! test -f "$backup_splitted_file" ; then + LogPrint "Checking integrity of $restoreinput_filename" ++ pushd ${restoreinput%/*} + md5sum -c $restoreinput.md5 || Error "Integrity check failed. Restore aborted because BACKUP_INTEGRITY_CHECK is enabled." ++ popd + fi + fi + done diff --git a/SPECS/rear.spec b/SPECS/rear.spec new file mode 100644 index 0000000..c39ba30 --- /dev/null +++ b/SPECS/rear.spec @@ -0,0 +1,190 @@ + +Summary: Relax-and-Recover is a Linux disaster recovery and system migration tool +Name: rear +Version: 2.00 +Release: 4%{?dist} +License: GPLv3 +Group: Applications/File +URL: http://relax-and-recover.org/ + +# as GitHub stopped with download section we need to go back to Sourceforge for downloads +Source0: https://sourceforge.net/projects/rear/files/rear/2.00/%{version}/rear-%{version}.tar.gz +Patch0: pr-1481.patch +Patch1: rear-bz1532676-pr1685.patch +#Patch0: 0001-Added-PRE-POST-backup-scripts-in-order-to-be-able-to.patch +#Patch1: 0002-Solved-error-with-exit-tasks-on-PRE-POST-backup-scri.patch +#Patch2: 0003-Added-some-explanation-of-PRE-POST-backup-scripts-in.patch +BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX) +ExcludeArch: s390x +ExcludeArch: s390 + +### Dependencies on all distributions +Requires: binutils +Requires: ethtool +Requires: gzip +Requires: iputils +Requires: parted +Requires: tar +Requires: openssl +Requires: gawk +Requires: attr + +### If you require NFS, you may need the below packages +#Requires: nfsclient portmap rpcbind + +### We drop LSB requirements because it pulls in too many dependencies +### The OS is hardcoded in /etc/rear/os.conf instead +#Requires: redhat-lsb + +### Required for Bacula/MySQL support +#Requires: bacula-mysql + +### Required for OBDR +#Requires: lsscsi sg3_utils + +### Optional requirement +#Requires: cfg2html + +%ifarch x86_64 i686 +Requires: syslinux +%endif +%ifarch ppc ppc64 +Requires: yaboot +%endif + +Requires: crontabs +Requires: iproute +Requires: mkisofs + +# mingetty is not available anymore with RHEL 7 (use agetty instead via systemd) +# Note that CentOS also has %rhel defined so there is no need to use %centos +%if 0%{?rhel} && 0%{?rhel} > 6 +Requires: util-linux +%else +Requires: mingetty +Requires: util-linux +%endif + +### The rear-snapshot package is no more +#Obsoletes: rear-snapshot + +%description +Relax-and-Recover is the leading Open Source disaster recovery and system +migration solution. It comprises of a modular +frame-work and ready-to-go workflows for many common situations to produce +a bootable image and restore from backup using this image. As a benefit, +it allows to restore to different hardware and can therefore be used as +a migration tool as well. + +Currently Relax-and-Recover supports various boot media (incl. ISO, PXE, +OBDR tape, USB or eSATA storage), a variety of network protocols (incl. +sftp, ftp, http, nfs, cifs) as well as a multitude of backup strategies +(incl. IBM TSM, HP DataProtector, Symantec NetBackup, EMC NetWorker, +Bacula, Bareos, rsync). + +Relax-and-Recover was designed to be easy to set up, requires no maintenance +and is there to assist when disaster strikes. Its setup-and-forget nature +removes any excuse for not having a disaster recovery solution implemented. + +Professional services and support are available. + +%pre +if [ $1 -gt 1 ] ; then +# during upgrade remove obsolete directories +%{__rm} -rf %{_datadir}/rear/output/NETFS +fi + +%prep +%setup +%patch0 -p1 +%patch1 -p1 +#%patch2 -p1 + +echo "30 1 * * * root /usr/sbin/rear checklayout || /usr/sbin/rear mkrescue" >rear.cron + +### Add a specific os.conf so we do not depend on LSB dependencies +%{?fedora:echo -e "OS_VENDOR=Fedora\nOS_VERSION=%{?fedora}" >etc/rear/os.conf} +%{?rhel:echo -e "OS_VENDOR=RedHatEnterpriseServer\nOS_VERSION=%{?rhel}" >etc/rear/os.conf} + +%build + +%install +%{__rm} -rf %{buildroot} +%{__make} install DESTDIR="%{buildroot}" +%{__install} -Dp -m0644 rear.cron %{buildroot}%{_sysconfdir}/cron.d/rear +#%{__install} -Dp -m0644 etc/udev/rules.d/62-rear-usb.rules %{buildroot}%{_sysconfdir}/udev/rules.d/62-rear-usb.rules +%clean +%{__rm} -rf %{buildroot} + +%files +%defattr(-, root, root, 0755) +%doc AUTHORS COPYING README.adoc doc/*.txt +%doc %{_mandir}/man8/rear.8* +%config(noreplace) %{_sysconfdir}/cron.d/rear +%config(noreplace) %{_sysconfdir}/rear/ +#%config(noreplace) %{_sysconfdir}/udev/rules.d/62-rear-usb.rules +%{_datadir}/rear/ +%{_localstatedir}/lib/rear/ +%{_sbindir}/rear + +%changelog +* Fri Jan 12 2018 Pavel Cahyna - 2.00-4 +- cd to the correct directory before md5sum to fix BACKUP_INTEGRITY_CHECK. + Upstream PR#1685, bz1532676 + +* Wed Sep 13 2017 Pavel Cahyna - 2.00-3 +- Fix rear mkrescue on systems w/o UEFI. Upstream PR#1481 issue#1478 +- Resolves: #1479002 + +* Wed May 17 2017 Jakub Mazanek - 2.00-2 +- Excluding Archs s390 and s390x +- Related #1355667 + +* Mon Feb 20 2017 Jakub Mazanek - 2.00-1 +- Rebase to version 2.00 +- Resolves #1355667 + +* Tue Jul 19 2016 Petr Hracek - 1.17.2-6 +- Replace experimental grep -P with grep -E +Resolves: #1290205 + +* Wed Mar 23 2016 Petr Hracek - 1.17.2-5 +- Remove backuped patched files +Related: #1283930 + +* Wed Mar 23 2016 Petr Hracek - 1.17.2-4 +- Rear recovery over teaming interface will not work +Resolves: #1283930 + +* Tue Mar 08 2016 Petr Hracek - 1.17.2-3 +- Replace experimental grep -P with grep -E +Resolves: #1290205 + +* Tue Feb 23 2016 Petr Hracek - 1.17.2-2 +- rear does not require syslinux +- changing to arch package so that syslinux is installed +- Resolves: #1283927 + +* Mon Sep 14 2015 Petr Hracek - 1.17.2-1 +- New upstream release 1.17.2 +Related: #1059196 + +* Wed May 13 2015 Petr Hracek 1.17.0-2 +- Fix Source tag +Related: #1059196 + +* Mon May 04 2015 Petr Hracek 1.17.0-1 +- Initial package for RHEL 7 +Resolves: #1059196 + +* Fri Oct 17 2014 Gratien D'haese +- added the suse_version lines to identify the corresponding OS_VERSION + +* Fri Jun 20 2014 Gratien D'haese +- add %%pre section + +* Thu Apr 11 2013 Gratien D'haese +- changes Source + +* Thu Jun 03 2010 Dag Wieers +- Initial package. (using DAR)