[rear: 5/7] importing into master the rear-14 version

Gratien Dhaese gdha at fedoraproject.org
Tue Aug 27 12:44:28 UTC 2013


commit ffa729067b365204baf18049d1b12036a017560f
Author: Gratien D'haese <gratien.dhaese at gmail.com>
Date:   Tue Aug 27 14:03:59 2013 +0200

    importing into master the rear-14 version

 .gitignore |    2 +-
 rear.spec  |  240 ++++++++++++++++++++++++++++++++----------------------------
 sources    |    2 +-
 3 files changed, 131 insertions(+), 113 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index 1d6a1da..d1937ad 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1 +1 @@
-rear-1.12.0.tar.gz
+/rear-1.14.tar.gz
diff --git a/rear.spec b/rear.spec
index b2f1b31..21baf89 100644
--- a/rear.spec
+++ b/rear.spec
@@ -1,136 +1,154 @@
+%define rpmrelease %{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: 1.12.0
-Release: 1%{?dist}
-Summary: Relax and Recover (Rear) is a Linux Disaster Recovery framework
-
-Group: Applications/Archiving
-License: GPLv2+
-URL: http://rear.sourceforge.net
-Source0: http://downloads.sourceforge.net/%{name}/%{name}-%{version}.tar.gz
+Version: 1.14
+Release: 1%{?rpmrelease}%{?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
+#Source: https://github.com/downloads/rear/rear/rear-%{version}.tar.gz
+Source: https://sourceforge.net/projects/rear/files/rear/%{version}/rear-%{version}.tar.gz
+BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
+
 BuildArch: noarch
-BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
 
-# all RPM based systems seem to have this
-Requires: mingetty binutils iputils tar gzip ethtool parted
-Requires: iproute redhat-lsb
-%if 0%{?fedora_version} >= 9
-Requires: genisoimage rpcbind
-%else
-Requires: mkisofs portmap
-%endif
-%ifarch %ix86 x86_64 amd64
-Requires: syslinux
-%endif
+### Dependencies on all distributions
+Requires: binutils
+Requires: ethtool
+Requires: gzip
+Requires: iputils
+Requires: mingetty
+Requires: parted
+Requires: tar
+Requires: util-linux
+Requires: openssl
 
-%description
-Relax and Recover (abbreviated rear) is a highly modular disaster recovery
-framework for GNU/Linux based systems, but can be easily extended to other
-UNIX alike systems. The disaster recovery information (and maybe the backups)
-can be stored via the network, local on hard disks or USB devices, DVD/CD-R,
-tape, etc. The result is also a boot-able image that is capable of booting via
-PXE, DVD/CD and USB media.
+### If you require NFS, you may need the below packages
+#Requires: nfsclient portmap rpcbind
 
-Relax and Recover integrates with other backup software and provides integrated
-bare metal disaster recovery abilities to the compatible backup software.
+### We drop LSB requirements because it pulls in too many dependencies
+### The OS is hardcoded in /etc/rear/os.conf instead
+#Requires: redhat-lsb
 
-%prep
-%setup -q
+### Required for Bacula/MySQL support
+#Requires: bacula-mysql
 
-%build
-# no code to compile - all bash scripts
+### Required for OBDR
+#Requires: lsscsi sg3_utils
 
-%install
-rm -rf $RPM_BUILD_ROOT
-# create directories
-mkdir -vp \
-	$RPM_BUILD_ROOT%{_mandir}/man8 \
-	$RPM_BUILD_ROOT%{_datadir} \
-	$RPM_BUILD_ROOT%{_sysconfdir} \
-	$RPM_BUILD_ROOT%{_sbindir} \
-	$RPM_BUILD_ROOT%{_localstatedir}/lib/rear
-
-# copy rear components into directories
-cp -av usr/share/rear $RPM_BUILD_ROOT%{_datadir}/
-cp -av usr/sbin/rear $RPM_BUILD_ROOT%{_sbindir}/
-cp -av etc/rear $RPM_BUILD_ROOT%{_sysconfdir}/
-
-# patch rear main script with correct locations for rear components
-sed -i	-e 's#^CONFIG_DIR=.*#CONFIG_DIR="%{_sysconfdir}/rear"#' \
-	-e 's#^SHARE_DIR=.*#SHARE_DIR="%{_datadir}/rear"#' \
-	-e 's#^VAR_DIR=.*#VAR_DIR="%{_localstatedir}/lib/rear"#' \
-	$RPM_BUILD_ROOT%{_sbindir}/rear
-
-# update man page with correct locations
-sed	-e 's#/etc#%{_sysconfdir}#' \
-	-e 's#/usr/sbin#%{_sbindir}#' \
-	-e 's#/usr/share#%{_datadir}#' \
-	-e 's#/usr/share/doc/packages#%{_docdir}#' \
-	doc/rear.8 >$RPM_BUILD_ROOT%{_mandir}/man8/rear.8
-
-# remove doc files under  $RPM_BUILD_ROOT/usr/share/rear
-rm -f $RPM_BUILD_ROOT%{_datadir}/rear/README
-rm -f $RPM_BUILD_ROOT%{_datadir}/rear/COPYING
-rm -f $RPM_BUILD_ROOT%{_datadir}/rear/AUTHORS
-rm -f $RPM_BUILD_ROOT%{_datadir}/rear/TODO
-rm -rf $RPM_BUILD_ROOT%{_datadir}/rear/doc/*
+### Optional requirement
+#Requires: cfg2html
 
-%clean
-rm -rf $RPM_BUILD_ROOT
+%ifarch %ix86 x86_64
+Requires: syslinux
+%endif
+%ifarch ppc ppc64
+Requires: yaboot
+%endif
 
+%if %{?suse_version:1}0
+Requires: iproute2
+### recent SuSE versions have an extra nfs-client package
+### and switched to genisoimage/wodim
+%if 0%{?suse_version} >= 1020
+Requires: genisoimage
+%else
+Requires: mkisofs
+%endif
+###
+%if %{!?sles_version:1}0
+Requires: lsb
+%endif
+%endif
 
-%files
-%defattr(-,root,root,-)
-%doc COPYING README AUTHORS TODO
-%doc doc/*.txt
-%{_sbindir}/rear
-%{_datadir}/rear
-%{_localstatedir}/lib/rear
-%{_mandir}/man8/*
-%config(noreplace) %{_sysconfdir}/rear
+%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_version:1}%{?rhel_version:1}0
+Requires: crontabs
+Requires: iproute
+Requires: mkisofs
+#Requires: redhat-lsb
+%endif
 
-%changelog
-* Mon Nov 21 2011 Gratien D'haese <gdha at sourceforge.net> - 1.12.0-1
-- placeholder for release
+### The rear-snapshot package is no more
+Obsoletes: rear-snapshot
 
-* Mon Jan 24 2011 Gratien D'haese <gdha at sourceforge.net> - 1.9-1
-- New development release with P2V, V2V functionality, and more
-- added AUTHORS, TODO to %%doc and rm from datadir
+%description
+Relax-and-Recover is the leading Open Source disaster recovery and system
+migration solution, and successor to mkcdrec. It comprises of a modular
+framework 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.
 
-* Fri Jun 04 2010 Gratien D'haese <gdha at sourceforge.net> - 1.7.25-1
-- added the %%ifarch part for syslinux to avoid warning on ppc/ppc64
+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, Bacula, rsync).
 
-* Thu Apr 02 2009 Gratien D'haese <gdha at sourceforge.net> - 1.7.20-1
-- update %%_localstatedir/rear to %%_localstatedir/lib/rear
+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.
 
-* Mon Mar 16 2009 Gratien D'haese <gdha at sourceforge.net> - 1.7.19-1
-- updated description, made the spec file a bit more readable
-- changed BuildArchives in BuildArch
+Professional services and support are available.
 
-* Fri Mar 13 2009 Gratien D'haese <gdha at sourceforge.net> - 1.7.17-1
-- do not gzip man page in spec file - rpmbuild will do this for us
-- added extra %%doc line for excluding man page from doc itself
+%prep
+%setup -q
 
-* Tue Feb 04 2009 Gratien D'haese <gdha at sourceforge.net> - 1.7.15-1
-- update the Fedora spec file with the 1.7.14 items
-- added VAR_DIR (%%{_localstatedir}) variable to rear for /var/rear/recovery system data
+echo "30 1 * * * root /usr/sbin/rear checklayout || /usr/sbin/rear mkrescue" >rear.cron
 
-* Thu Jan 29 2009 Schlomo Schapiro <rear at schlomo.schapiro.org> - 1.7.14-1
-- added man page
+### 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}
+%{?mdkversion:echo -e "OS_VENDOR=Mandriva\nOS_VERSION=%{distro_rel}" >etc/rear/os.conf}
+%{?rhel:echo -e "OS_VENDOR=RedHatEnterpriseServer\nOS_VERSION=%{?rhel}" >etc/rear/os.conf}
+%{?sles_version:echo -e "OS_VENDOR=SUSE_LINUX\nOS_VERSION=%{?sles_version}" >etc/rear/os.conf}
+### Doesn't work as, suse_version for OpenSUSE 11.3 is 1130
+#%{?suse_version:echo -e "OS_VENDOR=SUSE_LINUX\nOS_VERSION=%{?suse_version}" >etc/rear/os.conf}
 
-* Wed Dec 17 2008 Gratien D'haese <gdha at sourceforge.net> - 1.7.10-1
-- remove contrib entry from %%doc line in spec file
+%build
 
-* Mon Dec 01 2008 Gratien D'haese <gdha at sourceforge.net> - 1.7.9-1
-- copy rear.sourcespec according OS_VENDOR
-- correct rear.spec file according comment 11 of bugzilla #468189
+%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
 
-* Mon Oct 27 2008 Gratien D'haese <gdha at sourceforge.net> - 1.7.8-1
-- Fix rpmlint error/warnings for Fedora packaging
-- updated the Summary line and %%install section
+%clean
+%{__rm} -rf %{buildroot}
 
-* Thu Oct 24 2008 Gratien D'haese <gdha at sourceforge.net> - 1.7.7-1
-- rewrote rear.spec for Fedora Packaging request
+%files
+%defattr(-, root, root, 0755)
+%doc AUTHORS COPYING README 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
+* Thu Apr 11 2013 Gratien D'haese <gratien.dhaese at gmail.com>
+- changes Source
 
-* Tue Aug 28 2006 Schlomo Schapiro <rear at schlomo.schapiro.org> - 1.0-1
-- Initial RPM Release
+* Thu Jun 03 2010 Dag Wieers <dag at wieers.com>
+- Initial package. (using DAR)
diff --git a/sources b/sources
index 74eee3d..958a297 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-bdda6ef44045d9602f07226669b7cf70  rear-1.12.0.tar.gz
+2aa597f8d5803be9bc79607839e4ff88  rear-1.14.tar.gz


More information about the scm-commits mailing list