%define rpmrelease %{nil} %define debug_package %{nil} ### Work-around the fact that openSUSE/SLES _always_ defined both :-/ %if 0%{?sles_version} == 0 %undefine sles_version %endif Summary: Relax-and-Recover is a Linux disaster recovery and system migration tool Name: rear Version: snapshot Release: 1.20250206112417406288.pr17.288.gee7044c4%{?dist} # Since some time the license value 'GPLv3' causes build failures in the openSUSE Build Service # cf. https://github.com/rear/rear/issues/2289#issuecomment-559713101 # so we use now 'GPL-3.0' that is known to work (at least for now) according to # https://github.com/rear/rear/issues/2289#issuecomment-576625186 License: GPL-3.0 Group: Applications/File URL: http://relax-and-recover.org/ Source: rear-snapshot.tar.gz # BuildRoot: is required for SLES 11 and RHEL/CentOS 5 builds on openSUSE Build Service (#2135) BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX) # rear contains only bash scripts plus documentation so that on first glance it could be "BuildArch: noarch" # but actually it is not "noarch" because it only works on those architectures that are explicitly supported. # Of course the rear bash scripts can be installed on any architecture just as any binaries can be installed on any architecture. # But the meaning of architecture dependent packages should be on what architectures they will work. # Therefore only those architectures that are actually supported are explicitly listed. # This avoids that rear can be "just installed" on architectures that are actually not supported (e.g. ARM): ExclusiveArch: %ix86 x86_64 ppc ppc64 ppc64le ia64 s390x # Furthermore for some architectures it requires architecture dependent packages (like syslinux for x86 and x86_64) # so that rear must be architecture dependent because ifarch conditions never match in case of "BuildArch: noarch" # see the GitHub issue https://github.com/rear/rear/issues/629 %ifarch %ix86 x86_64 Requires: syslinux %endif # In the end this should tell the user that rear is known to work only on ix86 x86_64 ppc ppc64 ppc64le ia64 # and on ix86 x86_64 syslinux is explicitly required to make the bootable ISO image # (in addition to the default installed bootloader grub2) while on ppc ppc64 the # default installed bootloader yaboot is also used to make the bootable ISO image. BuildRequires: make ### Mandatory dependencies on all distributions: Requires: binutils Requires: ethtool Requires: gzip Requires: iputils Requires: parted Requires: tar Requires: openssl Requires: gawk Requires: attr Requires: bc ### Non-mandatory dependencies should be specified as RPM weak dependency via ### Recommends: RPM_package_name ### because missing RPM Recommends do not cause hard errors during installation ### and using Recommends instead of Requires has the additional advantage ### that the user can use ReaR without unneeded hard requirements when ### he does not use functionality in ReaR that uses the hard requirements ### e.g. when he does not need genisoimage or mkisofs to make an ISO image ### (i.e. when he does not use "OUTPUT=ISO"), cf. ### https://github.com/rear/rear/issues/2289 ### When particular functionality in ReaR requires certain programs ### those programs need to be specified in the ReaR scripts in the ### REQUIRED_PROGS config array but not here in the RPM spec file. ### 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 %if %{?suse_version:1}0 Requires: iproute2 ### Since SLES11 there is an extra nfs-client package: Recommends: nfs-client ### In SLES11 and SLES12 there is ### /usr/bin/genisoimage provided by the genisoimage RPM and there is ### /usr/bin/mkisofs provided by the cdrkit-cdrtools-compat RPM and ### both RPMs are installed by default. ### In openSUSE Leap 15.0 and SLES15 there is (at least by default) ### no longer /usr/bin/genisoimage but there is ### only /usr/bin/mkisofs provided by the mkisofs RPM ### so we recommend all of them to get any of them if available: Recommends: cdrkit-cdrtools-compat Recommends: genisoimage Recommends: mkisofs %endif %if %{?mandriva_version:1}0 Requires: iproute2 ### Mandriva switched from 2008 away from mkisofs, ### and as a specialty call the package cdrkit-genisoimage! %if 0%{?mandriva_version} >= 2008 Requires: cdrkit-genisoimage %else Requires: mkisofs %endif #Requires: lsb %endif ### On RHEL/Fedora the genisoimage packages provides mkisofs %if %{?centos_version:1}%{?fedora:1}%{?rhel_version:1}0 Requires: iproute #Requires: mkisofs Requires: genisoimage #Requires: redhat-lsb %endif # Note that CentOS also has rhel defined so there is no need to use centos %if 0%{?rhel} Requires: util-linux %endif %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, MircroFocus Data Protector, Symantec NetBackup, EMC NetWorker, Bacula, Bareos, BORG, Duplicity, 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 -q -n rear-snapshot %build %install %{__rm} -rf %{buildroot} %{__make} install DESTDIR="%{buildroot}" sbindir="%{_sbindir}" OFFICIAL=1 %check %{__make} validate OFFICIAL=1 %files # defattr: is required for SLES 11 and RHEL/CentOS 5 builds on openSUSE Build Service (#2135) %defattr(-, root, root, 0755) %doc MAINTAINERS COPYING README.md doc/*.txt %doc %{_mandir}/man8/rear.8* %config(noreplace) %{_sysconfdir}/rear/ %config(noreplace) %{_sysconfdir}/rear/cert/ %{_datadir}/rear/ %{_localstatedir}/lib/rear/ %{_sbindir}/rear %changelog * Thu Feb 6 2025 Packit - snapshot-1.20250206112417406288.pr17.288.gee7044c4 - Enable centos-7 in Packit CI (Pavel Cahyna) - Overhauled 880_check_for_mount_by_id.sh (#3391) (Johannes Meixner) - Bump redhat-plumbers-in-action/differential-shellcheck (dependabot[bot]) - ReaR 2.9 release (Pavel Cahyna) - Update release notes for 2.9 (Pavel Cahyna) - 2.9 release preparations (Pavel Cahyna) - adding a label to 2-feature_request.yml (gdha) - change 2-feature_request.md into 2-feature_request.yml (gdha) - update 1-bug_report.yml (gdha) - fix a stupid typo (gdha) - removing validation lines (gdha) - fixing missing textarea (gdha) - description value may not contain : (gdha) - fix yaml typo (gdha) - add label to 1-bug_report.yml (gdha) - switch you nicer input fields (gdha) - output yaml form for support (gdha) - update 2-feature_request.md (gdha) - again lowercase feature (gdha) - label must be Feature? (gdha) - remove single quotes on a label (gdha) - fix typo in enhancement (gdha) - make the feature request a bit clearer (gdha) - make the template md compatible (gdha) - add the proper markdown title (gdha) - templates need to be in lowercase (gdha) - Update issue templates (Gratien D'haese) - adding config.yml to ISSUE_TEMPLATE dir (gdha) - Moving the issue and PR templates to ISSUE_TEMPLATE directory (gdha) - Automate ReaR Release Builds via GH Actions (#3390) (Schlomo Schapiro) - Build official ReaR releases via GH actions and publish as draft release (Schlomo Schapiro) - Update default.conf (#3387) (Johannes Meixner) - Create /var/run symlink dynamically during mkrescue (Pavel Cahyna) - Specify path to sbindir during RPM build (Lukáš Zaoral) - adding carmel to .codespellignore #3382 (gdha) - Update 800_enforce_usb_output.sh (Johannes Meixner) - Update 990_move_away_restored_files.sh (Johannes Meixner) - Update rear-release-notes.txt (#3373) (Johannes Meixner) - ReaR 2.8 release (Johannes Meixner) - WIP: ReaR 2.8 release preparations (#3370) (Johannes Meixner) - Remove Ubuntu 23.04 which doesn't work any more. (Schlomo Schapiro) - Documentation preparations for release 2.8 (#3367) (Schlomo Schapiro) - Update default.conf (Johannes Meixner) - fix some typos in comments (#3364) (castilma) - savelayout: error out on mounted multi-disk BTRFS filesystems (#3365) (Lukáš Zaoral) - Update default.conf (Johannes Meixner) - In 100_copy_as_is.sh error out if symlinking VAR_DIR SHARE_DIR fails (#3356) (Johannes Meixner) - Tell why 300_include_grub_tools.sh exists (Johannes Meixner) - Finish the change of "Arch to "Arch_Linux" (Pavel Cahyna) - feat: move grubby and grub2-editenv to 300_include_grub_tools.sh (#3349) (gdha) - feat: move grubby and grub2-editenv to 300_include_grub_tools.sh (#3349) (gdha) - feat: move grubby and grub2-editenv to 300_include_grub_tools.sh (#3349) (gdha) - fix: add -xdev option to find to avoid hanging NFS (#3350) (gdha) - Call 'lsblk' with 'MOUNTPOINTS' to show all mounted btrfs subvolumes (#3348) (Johannes Meixner) - Update 400_create_include_exclude_files.sh (#3347) (Johannes Meixner) - After doing lots of experiments with RAMdisks it is good to have some extra software as default in our ReaR rescue image (gdha) - Minor os-detection improvements (#3344) (Lukáš Zaoral) - Minimal changes to fix detection of Fedora from `/etc/os-release` (#3171) (Lukáš Zaoral) - Make sourcing DUPLY_PROFILE reasonably secure (#3345) (Johannes Meixner) - Update default.conf (Johannes Meixner) - Update run-in-docker - add fedora41 (Gratien D'haese) - Update 400_prep_nbkdc.sh (Johannes Meixner) - update stale.yml for clarity (gdha) - remove wiki-release-notes.yml for now (gdha) - update stale.yml with the issues or the pull requests with an assignee will not be marked as stale automatically (gdha) - Make get_disklabel_type() also work for 'multipath' devices (#3334) (Renaud Métrich) - Use OS_MASTER_VERSION for major releases (#3331) (Lukáš Zaoral) - Fix partition naming on RHEL when migrating devices (Renaud Métrich) - Update 400_restore_with_galaxy.sh: Use 'source' instead of '.' (Johannes Meixner) - Use 'source' instead of '.' (Johannes Meixner) - Use 'source' instead of '.' (Johannes Meixner) - Create wiki-release-notes.yml (Gratien D'haese) - Disable the backup & recovery test on Fedora (Pavel Cahyna) - #3312 improve the text output; add example on how to fetch NVME RAW_USB_DEVICE device (gdha) - Request BIOS for backup and restore tests (Pavel Cahyna) - #3312 parse string through uniq for RAW_USB_DEVICE (gdha) - #3178 improve USB device detection (gdha) - BACKUP=NSR: Deprecate 650_check_iso_recoverable.sh (#3309) (Johannes Meixner) - In 990_verify_rootfs.sh show relative paths in user messages for files in ROOTFS_DIR (#3308) (Johannes Meixner) - Overhauled SLE11-SLE12-SAP-HANA-UEFI-example.conf (#3306) (Johannes Meixner) - Make .codespellignore ASCII (#3307) (Johannes Meixner) - Make 13-tcg-opal-support.adoc ASCII (Johannes Meixner) - Make 420_autoresize_last_partitions.sh ASCII (Johannes Meixner) - Make lib/layout-functions.sh ASCII (Johannes Meixner) - Bump codacy/codacy-analysis-cli-action from 4.4.1 to 4.4.5 (dependabot[bot]) - Bump redhat-plumbers-in-action/differential-shellcheck (dependabot[bot]) - Update local.conf description comment (Johannes Meixner) - Update drlm-functions.sh (Johannes Meixner) - fix cross-platform cp usage (Schlomo Schapiro) - Add build dependency for Archlinux and increase development environment compatibility with MacOS (Schlomo Schapiro) - Autodetect secure boot via mokutil and guess the secure boot shim (#3278) (Schlomo Schapiro) - In skel/default/bin/dhcpcd.sh use 'source' instead of '.' (Johannes Meixner) - conf: reintroduce Linux-s390.conf (Lukáš Zaoral) - Run rear dump also only on the successfully built Docker images (Schlomo Schapiro) - Add validation record (Schlomo Schapiro) - Remove images file and ignore it (Schlomo Schapiro) - gracefully ignore transient errors for single distros for snapshot builds (Schlomo Schapiro) - Fix a typo in the user guide (Schlomo Schapiro) - remove the test file (gdha) - cat the ./exclude_file (gdha) - save the file as ./exclude_file (gdha) - use the env variable EXCLUDE_FILE to pass the exclude filename (gdha) - try the suggestion of Schlomo (gdha) - Avoid returning 1 from a script if all is OK (#3245) (pcahyna) - force a spelling error in the file name (gdha) - the codespell entrypoint.sh script does not protect against spaces (gdha) - Improve layout configuration part of the user guide (#3125) (pcahyna) - Automatically include mounted btrfs subvolumes in NETFS backups (#3175) (Lukáš Zaoral) - Migrate MAC addresses and interface names in NetworkManager keyfiles during network configuration migration (#3179) (pcahyna) - do a test with 'file name' with a space and spelling errors (gdha) - do a test with files or paths with spaces (gdha) - fix typo of seperate -> separate (gdha) - improve device recognition when creating efibootmgr entry (#3267) (damm620) - add some additional comments (gdha) - try the improved spellcheck workflow to check only for changed files (gdha) - add von/vor to .codespellignore file (gdha) - fix remaining spelling errors (gdha) - fix most typos (gdha) - Add spellcheck workflow (gdha) - bareos: require Bareos Director >= 21 (Joerg Steffens) - Add missing procps package to provide ps for SLE15 builds (Schlomo Schapiro) - Rewrite Bareos integration (#3240) (Jörg Steffens) - Update 990_verify_rootfs.sh (Johannes Meixner) - Some more unquoted strings, @pcahyna++ (Renaud Métrich) - More unquoted strings (Renaud Métrich) - Fix IPv6 address support in OUTPUT_URL/BACKUP_URL (Renaud Métrich) - In 990_verify_rootfs.sh fix issue #3021 (#3250) (Johannes Meixner) - Replace '/tmp/rear.XXX...' by '/var/tmp/rear.XXX...' in comments (#3254) (Johannes Meixner) - Disable the Fedora rawhide and 40 tests (Pavel Cahyna) - Disable the Koji scratch builds from Packit (Pavel Cahyna) - Disable the openSUSE Copr builds from Packit (Pavel Cahyna) - Replace obsolete 'egrep' with 'grep -E' (Lukáš Zaoral) - Revert "Disable CentOS Stream 8 CI builds and tests" (Pavel Cahyna) - On POWER tell the user when the initrd is big (#3233) (Johannes Meixner) - Remove broken CentOS Stream 8 (we still have CentOS8) (Schlomo Schapiro) - Disable CentOS Stream 8 CI builds and tests (Pavel Cahyna) - Fix version test in udev start by desupporting systemd < 190 (Pavel Cahyna) - Bump redhat-plumbers-in-action/differential-shellcheck (#3237) (dependabot[bot]) - Bump codacy/codacy-analysis-cli-action from 4.4.0 to 4.4.1 (dependabot[bot]) - Set RECOVERY_MODE also in PORTABLE mode (#3228) (Johannes Meixner) - Bump redhat-plumbers-in-action/differential-shellcheck (#3215) (dependabot[bot]) - Update 400_save_directories.sh (#3232) (Johannes Meixner) - In 400_create_include_exclude_files.sh fixed regression of pull request 3221 (Johannes Meixner) - Do not exclude '/var/tmp/rear.*' in default.conf (#3229) (Johannes Meixner) - Fix & improve snapshot release building & testing (#3220) (Schlomo Schapiro) - In sbin/rear make it clear when ReaR's TMP_DIR is used (#3225) (Johannes Meixner) - Update default.conf (#3224) (Johannes Meixner) - Overhauled 400_create_include_exclude_files.sh (#3221) (Johannes Meixner) - Update default.conf (#3219) (Johannes Meixner) - change find backup procedure for Veeam V12.1 and later (#3214) (Schaller Andreas) - enable default ramdisk if not set to satisfy Veeam 12.1ff requirements (#3216) (Schaller Andreas) - default.conf example for COPY_AS_IS_EXCLUDE_TSM (#3212) (Johannes Meixner) - Typo fixes: BOOT_ON_SAN -> BOOT_OVER_SAN (#3211) (Johannes Meixner) - Better describe OUTPUT_PREFIX and NETFS_PREFIX (#3204) (Johannes Meixner) - Update man page (Schlomo Schapiro) - Bump redhat-plumbers-in-action/differential-shellcheck (#3188) (dependabot[bot]) - Add veeam support (#3150) (SchallerA) - Implement portable mode --portable and OUTPUT=PORTABLE (Schlomo Schapiro) - New unique_unsorted() function (#3177) (Johannes Meixner) - move all /var/run to /run directories in skel (Schlomo Schapiro) - consolidate and archive historic validation records as they don't apply to current ReaR (Schlomo Schapiro) - Add OS version mappings for RHEL 8 and RHEL 9 Remember MASTER version and combinations so that RHEL 9.3 will be mapped to Fedora/9 (Schlomo Schapiro) - Check recover mode before applying remote update Remove double check for recovery system (Schlomo Schapiro) - change /var/run to be a symlink to /run accomodating current systemd requirements and FHS recommendation (Schlomo Schapiro) - Update 330_set_efi_arch.sh (Johannes Meixner) - Set GRUB2_IMAGE_FORMAT correctly in prep/Linux-i386/330_set_efi_arch.sh (#3192) (Johannes Meixner) - Set TMPDIR to ReaR's TMP_DIR for programs that are called by ReaR (Johannes Meixner) - #3082 improved the way to grab the BACULA_DIRECTOR and BACULA_CLIENT (gdha) - Add additional comments + code cleanup #3109 (gdha) - skip btrfs subvolumes when detecting ESP partitions (Lukáš Zaoral) - Make code robust for obscure mount point naming #3109 (gdha) - Use better bash styling for the Stale NFS detection #3109 (gdha) - #3109 improve the nfs grep to avoid false postives (gdha) - Stale NFS detection in a very early stage #3109 (gdha) - #3067 use exit code of nc to check BACULA directory availability (gdha) - docs: document booting of ReaR rescue initramfs on s390/s390x (#3158) (Lukáš Zaoral) - Allow 'shell' workflow in recovery system (Johannes Meixner) - More general name & comments of build_bootx86_efi (Pavel Cahyna) - fixup! Introduce variables EFI_ARCH{_UPPER} (Pavel Cahyna) - fixup! Introduce variables EFI_ARCH{_UPPER} (Pavel Cahyna) - Introduce EFI_ARCH* variables for IA64 (Itanium) (Pavel Cahyna) - Introduce a variable for GRUB image format (Pavel Cahyna) - Introduce EFI_ARCH* variables for arm (Lukáš Zaoral) - fixup! Introduce variables EFI_ARCH{_UPPER} (Lukáš Zaoral) - Update 04-scenarios.adoc (Johannes Meixner) - Bump codacy/codacy-analysis-cli-action from 4.3.0 to 4.4.0 (dependabot[bot]) - Bump redhat-plumbers-in-action/differential-shellcheck (dependabot[bot]) - Fix some of the OS detection issues (#3149) (Lukáš Zaoral) - Replace the OUTPUT=IPL with equivalent OUTPUT=RAMDISK (#3153) (Lukáš Zaoral) - Update 03-configuration.adoc (Johannes Meixner) - Error out if TMPDIR is set in user config (Pavel Cahyna) - Update rescue-and-backup-on-same-ISO-image-example.conf (Johannes Meixner) - New TextPrefix function (#3160) (Johannes Meixner) - Use dracut by default in SUSE 550_rebuild_initramfs.sh (#3155) (Johannes Meixner) - ErrorIfDeprecated when 'gpt_sync_mbr' is used (#3159) (Johannes Meixner) - Update _input-output-functions.sh (Johannes Meixner) - Introduce variables EFI_ARCH{_UPPER} (Pavel Cahyna) - Fix issue 3151: missing .vimrc and overhauled 130_create_dotfiles.sh (#3154) (Johannes Meixner) - Update comment about valid BOOTLOADER values (Pavel Cahyna) - Abort if BOOTLOADER=GRUB and GRUB 2 is installed (Pavel Cahyna) - Delete comment obsolete since 67ac463446 (Pavel Cahyna) - Warn when using BOOTLOADER = GRUB (Pavel Cahyna) - Specify target i386-pc if installing GRUB with EFI (Pavel Cahyna) - Declare local variables as such (Pavel Cahyna) - Make USING_UEFI_BOOTLOADER known during savelayout (Pavel Cahyna) - Check that disk is suitable before installing GRUB (Pavel Cahyna) - Support BOOTLOADER=GRUB with UEFI (Pavel Cahyna) - Invert the meaning of exit code from is_disk_a_pv (Pavel Cahyna) - Support BOOTLOADER=GRUB2 with UEFI (Pavel Cahyna) - Don't look for EFI bootloader in the start of disk (Pavel Cahyna) - Detect GRUB2 when saving layout (Pavel Cahyna) - Declare local variables as local (Pavel Cahyna) - Factor out GRUB 2 detection (Pavel Cahyna) - Update 010_PXE_check.sh (Johannes Meixner) - OUTPUT=PXE: Support downloading kernel and initrd by HTTP (#3100) (robertdahlem) - Update _input-output-functions.sh (Johannes Meixner) - Add support for new backup software Dell PowerProtect Data Manager * fully automated restore if lockbox works * ask admin to "set lockbox" and wait for working lockbox * point in time restore * restore EFI System Partition from ReaR rescue image if needed * modularise LD_LIBRARY_PATH handling for third-party backup tools (Schlomo Schapiro) - ignore HTML files that are generated from our adoc files (Schlomo Schapiro) - Ensure minimum Bash version (Schlomo Schapiro) - Support automated keyboard configuration on systems with setupcon (Schlomo Schapiro) - Fix module names with underscore bug (Schlomo Schapiro) - Support Bash assoc arrays and improve rear shell (Schlomo Schapiro) - Do not detect GRUB before including GRUB tools (Pavel Cahyna) - Don't create $VAR_DIR/recovery/bootdisk in prep (Pavel Cahyna) - Update framework-functions.sh (Johannes Meixner) - Update framework-functions.sh (Johannes Meixner) - Let is_write_protected() report devices without device node as not write protected (#3091) (Johannes Meixner) - Update help-workflow.sh (Johannes Meixner) - Improve the description of AUTOEXCLUDE_PATH (Pavel Cahyna) - Update rear.8.adoc (Johannes Meixner) - Make initrd accessible only by root (#3123) (Johannes Meixner) - Take AUTOEXCLUDE_PATH into account in layout doc (Pavel Cahyna) - More clear AUTOEXCLUDE_PATH description in default.conf (Johannes Meixner) - Correct typo in a debug message: belogs -> belongs (Pavel Cahyna) - Bump actions/upload-artifact from 3 to 4 (dependabot[bot]) - Bump actions/stale from 8 to 9 (dependabot[bot]) - Bump github/codeql-action from 2 to 3 (dependabot[bot]) - fixup! Update comment after the last changes (Pavel Cahyna) - Update comment after the last changes (Pavel Cahyna) - Adapt init files to separate rear autostart (Pavel Cahyna) - Start syslog after rescue system init (Pavel Cahyna) - Make sysinit.service start early in rescue boot (Pavel Cahyna) - Remove run-system-setup.service from rescue image (Pavel Cahyna) - multi-user target in rescue requires basic target (Pavel Cahyna) - Separate automated ReaR startup (Pavel Cahyna) - Configure network-online.target in rescue system (Pavel Cahyna) * Wed Jan 29 2025 Schlomo Schapiro - Always set OFFICIAL=1 to install ReaR from SPEC file, as the git version magic happens earlier * Thu Jul 30 2015 Johannes Meixner - For a changelog see the rear-release-notes.txt file.