Blame SPECS/rear.spec

e8a0f5
%define debug_package %{nil}
e8a0f5
e8a0f5
Summary:    Relax-and-Recover is a Linux disaster recovery and system migration tool
e8a0f5
Name:       rear
e8a0f5
Version:    2.4
9602f5
Release:    18%{?dist}
e8a0f5
License:    GPLv3
e8a0f5
Group:      Applications/File
e8a0f5
URL:        http://relax-and-recover.org/
e8a0f5
e8a0f5
Source0:    https://github.com/rear/rear/archive/%{version}.tar.gz#/rear-%{version}.tar.gz
e8a0f5
Patch4:  rear-bz1492177-warning.patch
e8a0f5
Patch6:  rear-rhbz1610638.patch
e8a0f5
Patch7:  rear-rhbz1610647.patch
e8a0f5
Patch8:  rear-bz1652828-bz1652853.patch
e8a0f5
Patch9:  rear-bz1631183.patch
e8a0f5
Patch10: rear-bz1639705.patch
e8a0f5
Patch11: rear-bz1653214.patch
e8a0f5
Patch12: rear-bz1659137.patch
e8a0f5
patch13: rear-bz1663515.patch
e8a0f5
Patch14: rear-bz1672938.patch
e8a0f5
Patch15: rear-bz1685166.patch
e8a0f5
Patch16: rear-bz1655956.patch
129f2e
Patch17: rear-bz1732328.patch
129f2e
Patch18: rear-bz1726982.patch
129f2e
Patch19: rear-bz1693608.patch
129f2e
Patch20: rear-bz1700807.patch
129f2e
Patch21: rear-bz1711123.patch
129f2e
Patch22: rear-bz1692575.patch
129f2e
Patch23: rear-sfdc02343208.patch
129f2e
Patch24: rear-bz1737042.patch
67735e
Patch25: rear-bz1743303-rubrik.patch
67735e
Patch26: rear-bz1729502-ppc64-iso-level.patch
67735e
Patch27: rear-bz1843809-skip-longhorn.patch
9602f5
Patch28: rear-bz1882060.patch
9602f5
Patch29: rear-bz1832394.patch
9602f5
Patch30: rear-sfdc02772301.patch
e8a0f5
e8a0f5
ExcludeArch: s390x
e8a0f5
ExcludeArch: s390
e8a0f5
e8a0f5
### Dependencies on all distributions
e8a0f5
BuildRequires:   asciidoc
e8a0f5
Requires:   binutils
e8a0f5
Requires:   ethtool
e8a0f5
Requires:   gzip
e8a0f5
Requires:   iputils
e8a0f5
Requires:   parted
e8a0f5
Requires:   tar
e8a0f5
Requires:   openssl
e8a0f5
Requires:   gawk
e8a0f5
Requires:   attr
e8a0f5
Requires:   bc
e8a0f5
e8a0f5
### If you require NFS, you may need the below packages
e8a0f5
#Requires:  nfsclient portmap rpcbind
e8a0f5
e8a0f5
### We drop LSB requirements because it pulls in too many dependencies
e8a0f5
### The OS is hardcoded in /etc/rear/os.conf instead
e8a0f5
#Requires:  redhat-lsb
e8a0f5
e8a0f5
### Required for Bacula/MySQL support
e8a0f5
#Requires:  bacula-mysql
e8a0f5
e8a0f5
### Required for OBDR
e8a0f5
#Requires:  lsscsi sg3_utils
e8a0f5
e8a0f5
### Optional requirement
e8a0f5
#Requires:  cfg2html
e8a0f5
e8a0f5
%ifarch x86_64 i686
e8a0f5
Requires:   syslinux
e8a0f5
%endif
e8a0f5
%ifarch ppc ppc64
e8a0f5
Requires:   yaboot
e8a0f5
%endif
e8a0f5
e8a0f5
Requires:   crontabs
e8a0f5
Requires:   iproute
e8a0f5
#Requires:   mkisofs
e8a0f5
Requires:   xorriso
e8a0f5
e8a0f5
# mingetty is not available anymore with RHEL 7 (use agetty instead via systemd)
e8a0f5
# Note that CentOS also has rhel defined so there is no need to use centos
e8a0f5
%if 0%{?rhel} && 0%{?rhel} > 6
e8a0f5
Requires:   util-linux
e8a0f5
%else
e8a0f5
Requires:   mingetty
e8a0f5
Requires:   util-linux
e8a0f5
%endif
e8a0f5
e8a0f5
### The rear-snapshot package is no more
e8a0f5
#Obsoletes: rear-snapshot
e8a0f5
e8a0f5
%description
e8a0f5
Relax-and-Recover is the leading Open Source disaster recovery and system
e8a0f5
migration solution. It comprises of a modular
e8a0f5
frame-work and ready-to-go workflows for many common situations to produce
e8a0f5
a bootable image and restore from backup using this image. As a benefit,
e8a0f5
it allows to restore to different hardware and can therefore be used as
e8a0f5
a migration tool as well.
e8a0f5
e8a0f5
Currently Relax-and-Recover supports various boot media (incl. ISO, PXE,
e8a0f5
OBDR tape, USB or eSATA storage), a variety of network protocols (incl.
e8a0f5
sftp, ftp, http, nfs, cifs) as well as a multitude of backup strategies
e8a0f5
(incl.  IBM TSM, HP DataProtector, Symantec NetBackup, EMC NetWorker,
e8a0f5
Bacula, Bareos, BORG, Duplicity, rsync).
e8a0f5
e8a0f5
Relax-and-Recover was designed to be easy to set up, requires no maintenance
e8a0f5
and is there to assist when disaster strikes. Its setup-and-forget nature
e8a0f5
removes any excuse for not having a disaster recovery solution implemented.
e8a0f5
e8a0f5
Professional services and support are available.
e8a0f5
e8a0f5
%pre
e8a0f5
if [ $1 -gt 1 ] ; then
e8a0f5
# during upgrade remove obsolete directories
e8a0f5
%{__rm} -rf %{_datadir}/rear/output/NETFS
e8a0f5
fi
e8a0f5
e8a0f5
%prep
e8a0f5
%setup 
e8a0f5
%patch4 -p1
e8a0f5
%patch6 -p1
e8a0f5
%patch7 -p1
e8a0f5
%patch8 -p1
e8a0f5
%patch9 -p1
e8a0f5
%patch10 -p1
e8a0f5
%patch11 -p1
e8a0f5
%patch12 -p1
e8a0f5
%patch13 -p1
e8a0f5
%patch14 -p1
e8a0f5
%patch15 -p1
e8a0f5
%patch16 -p1
129f2e
%patch17 -p1
129f2e
%patch18 -p1
129f2e
%patch19 -p1
129f2e
%patch20 -p1
129f2e
%patch21 -p1
129f2e
%patch22 -p1
129f2e
%patch23 -p1
129f2e
%patch24 -p1
67735e
%patch25 -p1
67735e
%patch26 -p1
67735e
%patch27 -p1
9602f5
%patch28 -p1
9602f5
%patch29 -p1
9602f5
%patch30 -p1
e8a0f5
9602f5
echo "30 1 * * * root test -f /var/lib/rear/layout/disklayout.conf && /usr/sbin/rear checklayout || /usr/sbin/rear mkrescue" >rear.cron
e8a0f5
e8a0f5
### Add a specific os.conf so we do not depend on LSB dependencies
e8a0f5
%{?fedora:echo -e "OS_VENDOR=Fedora\nOS_VERSION=%{?fedora}" >etc/rear/os.conf}
e8a0f5
%{?rhel:echo -e "OS_VENDOR=RedHatEnterpriseServer\nOS_VERSION=%{?rhel}" >etc/rear/os.conf}
e8a0f5
e8a0f5
%build
e8a0f5
# asciidoc writes a timestamp to files it produces, based on the last
e8a0f5
# modified date of the source file, but is sensible to the timezone.
e8a0f5
# This makes the results differ according to the timezone of the build machine
e8a0f5
# and spurious changes will be seen.
e8a0f5
# Set the timezone to UTC as a workaround.
e8a0f5
# https://wiki.debian.org/ReproducibleBuilds/TimestampsInDocumentationGeneratedByAsciidoc
e8a0f5
TZ=UTC %{__make} -C doc
e8a0f5
e8a0f5
%install
e8a0f5
%{__rm} -rf %{buildroot}
e8a0f5
%{__make} install DESTDIR="%{buildroot}"
e8a0f5
%{__install} -Dp -m0644 rear.cron %{buildroot}%{_sysconfdir}/cron.d/rear
e8a0f5
e8a0f5
%files
e8a0f5
%defattr(-, root, root, 0755)
e8a0f5
%doc MAINTAINERS COPYING README.adoc doc/*.txt doc/user-guide/relax-and-recover-user-guide.html
e8a0f5
%doc %{_mandir}/man8/rear.8*
e8a0f5
%config(noreplace) %{_sysconfdir}/cron.d/rear
e8a0f5
%config(noreplace) %{_sysconfdir}/rear/
e8a0f5
%config(noreplace) %{_sysconfdir}/rear/cert/
e8a0f5
%{_datadir}/rear/
e8a0f5
%{_localstatedir}/lib/rear/
e8a0f5
%{_sbindir}/rear
e8a0f5
e8a0f5
%changelog
9602f5
* Mon Jan 11 2021 Vitezslav Crhonek <vcrhonek@redhat.com> - 2.4-18
9602f5
- Fix typo in default.conf
9602f5
  Resolves: #1882060
9602f5
- Modify the cron command to avoid an e-mail with error message after
9602f5
  ReaR is installed but not properly configured when the cron command
9602f5
  is triggered for the first time
9602f5
  Resolves: #1729499
9602f5
- Backport upstream code related to LUKS2 support
9602f5
  Resolves: #1832394
9602f5
- Changes for NetBackup (NBU) support, upstream PR2544
9602f5
  Resolves: #1898080
9602f5
107ca0
* Mon Aug 10 2020 Pavel Cahyna <pcahyna@redhat.com> - 2.4-17
107ca0
- Update the Rubrik patch to include complete PR2445
107ca0
  Resolves: rhbz1867696
107ca0
67735e
* Thu Jun 04 2020 Václav Doležal <vdolezal@redhat.com> - 2.4-16
67735e
- Apply upstream PR2373: Skip Longhorn Engine replica devices
67735e
  Resolves: rhbz1843809
67735e
67735e
* Mon Jun 01 2020 Václav Doležal <vdolezal@redhat.com> - 2.4-15
67735e
- Apply upstream PR2346: Have '-iso-level 3' option also for ppc64le
67735e
  Resolves: rhbz1729502
67735e
67735e
* Mon Jun 01 2020 Václav Doležal <vdolezal@redhat.com> - 2.4-14
67735e
- Backport remaining Rubrik related patches.
67735e
  Related: rhbz1743303
67735e
67735e
* Thu May 21 2020 Václav Doležal <vdolezal@redhat.com> - 2.4-13
67735e
- Backport upstream PR #2249 to add support for Rubrik backup method.
67735e
  Resolves: rhbz1743303
67735e
129f2e
* Mon Dec 16 2019 Pavel Cahyna <pcahyna@redhat.com> - 2.4-12
129f2e
- Backport upstream PR #2293 to use grub-mkstandalone instead of
129f2e
  grub-mkimage for UEFI (ISO image and GRUB_RESCUE image generation).
129f2e
  Avoids hardcoded module lists or paths and so is more robust.
129f2e
  Fixes an issue where the generated ISO image had no GRUB2 modules and
129f2e
  was therefore unbootable. The backport does not add new config settings.
129f2e
  Resolves: rhbz1737042
129f2e
129f2e
* Mon Nov 18 2019 Pavel Cahyna <pcahyna@redhat.com> - 2.4-11
129f2e
- Apply upstream PR2122: add additional NBU library path to fix support for
129f2e
  NetBackup 8.
129f2e
  Resolves: rhbz1747393
129f2e
- Apply upstream PR2021: Be safe against empty docker_root_dir (issue 1989)
129f2e
  Resolves: rhbz1729493, where ReaR can not create a backup in rescue mode,
129f2e
  because it thinks that the Docker daemon is running and hits the problem
129f2e
  with empty docker_root_dir.
129f2e
- Apply upstream PR2223 and commit 36cf20e to avoid an empty string in the
129f2e
  list of users to clone, which can lead to bash overflow with lots of users
129f2e
  and groups per user and to wrong passwd/group files in the rescue system.
129f2e
  Resolves: rhbz1729495
129f2e
- Backport of Upstream fix for issue 2035: /run is not mounted in the rescue
129f2e
  chroot, which causes LVM to hang, especially if rebuilding initramfs.
129f2e
  Resolves: rhbz1757488
129f2e
- Backport upstream PR 2218: avoid keeping build dir on errors
129f2e
  by default when used noninteractively
129f2e
  Resolves: rhbz1729501
129f2e
- Apply upstream PR2173 - Cannot restore using Bacula method
129f2e
  due to "bconsole" not showing its prompt
129f2e
  Resolves: rhbz1726992
129f2e
- Backport fix for upstream issue 2187 (disklayout.conf file contains
129f2e
  duplicate lines, breaking recovery in migration mode or when
129f2e
  thin pools are used). PR2194, 2196.
129f2e
  Resolves: rhbz1732308
129f2e
e8a0f5
* Tue Jun  4 2019 Pavel Cahyna <pcahyna@redhat.com> - 2.4-10
e8a0f5
- Apply upstream patch PR1993
e8a0f5
  Automatically exclude $BUILD_DIR from the backup
e8a0f5
  Resolves: rhbz1677733
e8a0f5
e8a0f5
* Mon Jun  3 2019 Pavel Cahyna <pcahyna@redhat.com> - 2.4-9
e8a0f5
- Update fix for bz#1657725. Previous fix was not correct, bootlist was still
e8a0f5
  invoked only with one partition argument due to incorrect array expansion.
e8a0f5
  See upstream PR2096, 2097, 2098.
e8a0f5
e8a0f5
* Tue May 28 2019 Pavel Cahyna <pcahyna@redhat.com> - 2.4-8
e8a0f5
- Apply upstream PR2065 (record permanent MAC address for team members)
e8a0f5
  Resolves: rhbz1685178
e8a0f5
e8a0f5
* Tue May 28 2019 Pavel Cahyna <pcahyna@redhat.com> - 2.4-7
e8a0f5
- Apply upstream PR2034 (multipath optimizations for lots of devices)
e8a0f5
e8a0f5
* Mon Jan 14 2019 Pavel Cahyna <pcahyna@redhat.com> - 2.4-6
e8a0f5
- Require xorriso instead of genisoimage, it is now the preferred method
e8a0f5
  and supports files over 4GB in size.
e8a0f5
- Apply upstream PR2004 (support for custom network interface naming)
e8a0f5
- Backport upstream PR2001 (UEFI support broken on Fedora 29 and RHEL 8)
e8a0f5
e8a0f5
* Thu Dec 13 2018 Pavel Cahyna <pcahyna@redhat.com> - 2.4-4
e8a0f5
- Backport fixes for upstream bugs 1974 and 1975
e8a0f5
- Backport fix for upstream bug 1913 (backup succeeds in case of tar error)
e8a0f5
- Backport fix for upstream bug 1926 (support for LACP bonding and teaming)
e8a0f5
- Apply upstream PR1954 (record permanent MAC address for bond members)
e8a0f5
e8a0f5
* Thu Aug 09 2018 Pavel Cahyna <pcahyna@redhat.com> - 2.4-3
e8a0f5
- Merge some spec changes from Fedora.
e8a0f5
- Apply upstream patch PR1887
e8a0f5
  LPAR/PPC64 bootlist is incorrectly set when having multiple 'prep' partitions
e8a0f5
- Apply upstream patch PR1885
e8a0f5
  Partition information recorded is unexpected when disk has 4K block size
e8a0f5
e8a0f5
* Wed Jul 18 2018 Pavel Cahyna <pcahyna@redhat.com> - 2.4-2
e8a0f5
- Build and install the HTML user guide. #1418459
e8a0f5
e8a0f5
* Wed Jun 27 2018 Pavel Cahyna <pcahyna@redhat.com> - 2.4-1
e8a0f5
- Rebase to version 2.4, drop patches integrated upstream
e8a0f5
  Resolves #1534646 #1484051 #1498828 #1571266 #1496518
e8a0f5
e8a0f5
* Wed Feb 14 2018 Pavel Cahyna <pcahyna@redhat.com> - 2.00-6
e8a0f5
- Ensure that NetBackup is started automatically upon recovery (PR#1544)
e8a0f5
  Also do not kill daemons spawned by sysinit.service at the service's end
e8a0f5
  (PR#1610, applies to NetBackup and also to dhclient)
e8a0f5
  Resolves #1506231
e8a0f5
- Print a warning if grub2-mkimage is about to fail and suggest what to do.
e8a0f5
  bz#1492177
e8a0f5
- Update the patch for #1388653 to the one actually merged upstream (PR1418)
e8a0f5
e8a0f5
* Fri Jan 12 2018 Pavel Cahyna <pcahyna@redhat.com> - 2.00-5
e8a0f5
- cd to the correct directory before md5sum to fix BACKUP_INTEGRITY_CHECK.
e8a0f5
  Upstream PR#1685, bz1532676
e8a0f5
e8a0f5
* Mon Oct 23 2017 Pavel Cahyna <pcahyna@redhat.com> - 2.00-4
e8a0f5
- Retry get_disk_size to fix upstream #1370, bz1388653
e8a0f5
e8a0f5
* Wed Sep 13 2017 Pavel Cahyna <pcahyna@redhat.com> - 2.00-3
e8a0f5
- Fix rear mkrescue on systems w/o UEFI. Upstream PR#1481 issue#1478
e8a0f5
- Resolves: #1479002
e8a0f5
e8a0f5
* Wed May 17 2017 Jakub Mazanek <jmazanek@redhat.com> - 2.00-2
e8a0f5
- Excluding Archs s390 and s390x
e8a0f5
- Related #1355667
e8a0f5
e8a0f5
* Mon Feb 20 2017 Jakub Mazanek <jmazanek@redhat.com> - 2.00-1
e8a0f5
- Rebase to version 2.00 
e8a0f5
- Resolves #1355667
e8a0f5
e8a0f5
* Tue Jul 19 2016 Petr Hracek <phracek@redhat.com> - 1.17.2-6
e8a0f5
- Replace experimental grep -P with grep -E
e8a0f5
Resolves: #1290205
e8a0f5
e8a0f5
* Wed Mar 23 2016 Petr Hracek <phracek@redhat.com> - 1.17.2-5
e8a0f5
- Remove backuped patched files
e8a0f5
Related: #1283930
e8a0f5
e8a0f5
* Wed Mar 23 2016 Petr Hracek <phracek@redhat.com> - 1.17.2-4
e8a0f5
- Rear recovery over teaming interface will not work
e8a0f5
Resolves: #1283930
e8a0f5
e8a0f5
* Tue Mar 08 2016 Petr Hracek <phracek@redhat.com> - 1.17.2-3
e8a0f5
- Replace experimental grep -P with grep -E
e8a0f5
Resolves: #1290205
e8a0f5
e8a0f5
* Tue Feb 23 2016 Petr Hracek <phracek@redhat.com> - 1.17.2-2
e8a0f5
- rear does not require syslinux
e8a0f5
- changing to arch package so that syslinux is installed
e8a0f5
- Resolves: #1283927
e8a0f5
e8a0f5
* Mon Sep 14 2015 Petr Hracek <phracek@redhat.com> - 1.17.2-1
e8a0f5
- New upstream release 1.17.2
e8a0f5
Related: #1059196
e8a0f5
e8a0f5
* Wed May 13 2015 Petr Hracek <phracek@redhat.com> 1.17.0-2
e8a0f5
- Fix Source tag
e8a0f5
Related: #1059196
e8a0f5
e8a0f5
* Mon May 04 2015 Petr Hracek <phracek@redhat.com> 1.17.0-1
e8a0f5
- Initial package for RHEL 7
e8a0f5
Resolves: #1059196
e8a0f5
e8a0f5
* Fri Oct 17 2014 Gratien D'haese <gratien.dhaese@gmail.com>
e8a0f5
- added the suse_version lines to identify the corresponding OS_VERSION
e8a0f5
e8a0f5
* Fri Jun 20 2014 Gratien D'haese <gratien.dhaese@gmail.com>
e8a0f5
- add %%pre section
e8a0f5
e8a0f5
* Thu Apr 11 2013 Gratien D'haese <gratien.dhaese@gmail.com>
e8a0f5
- changes Source
e8a0f5
e8a0f5
* Thu Jun 03 2010 Dag Wieers <dag@wieers.com>
e8a0f5
- Initial package. (using DAR)