rpms/rsnapshot/devel rsnapshot.conf.patch, NONE, 1.1 .cvsignore, 1.3, 1.4 rsnapshot.spec, 1.5, 1.6 sources, 1.3, 1.4 rsnapshot.patch, 1.1, NONE

Chris Petersen (xris) fedora-extras-commits at redhat.com
Fri May 19 23:34:16 UTC 2006


Author: xris

Update of /cvs/extras/rpms/rsnapshot/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv7968/devel

Modified Files:
	.cvsignore rsnapshot.spec sources 
Added Files:
	rsnapshot.conf.patch 
Removed Files:
	rsnapshot.patch 
Log Message:
auto-import rsnapshot-1.2.3-2 on branch devel from rsnapshot-1.2.3-2.src.rpm

rsnapshot.conf.patch:

--- NEW FILE rsnapshot.conf.patch ---
--- rsnapshot.conf.default.in	2005-04-03 06:58:02.000000000 -0700
+++ rsnapshot.conf.default.in.fedora	2005-04-03 06:58:11.000000000 -0700
@@ -40,7 +40,7 @@
 #
 # See the README file or the man page for more details.
 #
-#@CMD_CP@
+ at CMD_CP@
 
 # uncomment this to use the rm program instead of the built-in perl routine.
 @CMD_RM@
@@ -55,7 +55,7 @@
 @CMD_LOGGER@
 
 # Uncomment this to specify a path to "du" for disk usage checks.
-#@CMD_DU@
+ at CMD_DU@
 
 #########################################
 #           BACKUP INTERVALS            #
@@ -94,7 +94,7 @@
 
 # If you enable this, data will be written to the file you specify. The
 # amount of data written is controlled by the "loglevel" parameter.
-#logfile	/var/log/rsnapshot
+logfile	/var/log/rsnapshot
 
 # The include and exclude parameters, if enabled, simply get passed directly
 # to rsync. If you have multiple include/exclude patterns, put each one on a
@@ -138,7 +138,7 @@
 # If you enable this, make sure the lockfile directory is not world
 # writable. Otherwise anyone can prevent the program from running.
 #
-#lockfile	/var/run/rsnapshot.pid
+lockfile	/var/run/rsnapshot.pid
 
 # If enabled, rsnapshot will move the oldest directory for each interval
 # to [interval_name].delete, then it will delete that directory as a 


Index: .cvsignore
===================================================================
RCS file: /cvs/extras/rpms/rsnapshot/devel/.cvsignore,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- .cvsignore	12 Apr 2005 11:07:19 -0000	1.3
+++ .cvsignore	19 May 2006 23:34:16 -0000	1.4
@@ -1 +1 @@
-rsnapshot-1.2.1.tar.gz
+rsnapshot-1.2.3.tar.gz


Index: rsnapshot.spec
===================================================================
RCS file: /cvs/extras/rpms/rsnapshot/devel/rsnapshot.spec,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- rsnapshot.spec	12 Apr 2005 14:15:38 -0000	1.5
+++ rsnapshot.spec	19 May 2006 23:34:16 -0000	1.6
@@ -1,88 +1,134 @@
+#
+# Specfile for rsnapshot
+#
+
 Name:           rsnapshot
+Version:        1.2.3
+Release:        2
 Summary:        Local and remote filesystem snapshot utility
-Version:        1.2.1
-Release:        3
-License:        GPL
+
 Group:          Applications/System
-Url:            http://www.rsnapshot.org
-Source0:        http://www.rsnapshot.org/downloads/rsnapshot-1.2.1.tar.gz
-Patch0:         rsnapshot.patch
-BuildArch:      noarch
+License:        GPL
+URL:            http://www.rsnapshot.org/
+
+################################################################################
+
+Source:         http://www.rsnapshot.org/downloads/%{name}-%{version}.tar.gz
+
 BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
-Buildrequires:  perl, openssh-clients
-Requires:       perl, openssh-clients, rsync, coreutils, util-linux 
-AutoReqProv:    no
+
+BuildArch:      noarch
+
+################################################################################
+
+# This patch enables a few defaults in the config file that make sense to have
+# enabled in linux.
+Patch:          rsnapshot.conf.patch
+
+################################################################################
+
+BuildRequires:  rsync
+BuildRequires:  openssh-clients
+
+Requires:       openssh-clients
+Requires:       rsync
+
+################################################################################
 
 %description
-This is a remote backup program that uses rsync 
-to take backup snapshots of filesystems.
-It uses hard links to save space on disk.
+This is a remote backup program that uses rsync to take backup snapshots of
+filesystems.  It uses hard links to save space on disk.
+
+################################################################################
 
 %prep
 
-%setup -q 
-%{__perl} -pi.orig -e 's|/usr/local|/usr|g' rsnapshot.1
-%{__perl} -pi.orig -e 's|/usr/local|/usr|g' README
+%setup -q
 
 %patch
 
+# Disable the config-file testing during ./configure because it freaks out if
+# you're building as non-root on a system that actually has rsnapshot installed.
+sed -ie 's|if test -e "\$RSNAPSHOT_SYSCONFDIR/rsnapshot.conf"|if false|' configure
+
+################################################################################
+
 %build
-%configure \
-    --with-rsync=%{_bindir}/rsync \
-    --with-ssh=%{_bindir}/ssh \
-    --with-logger=%{_bindir}/logger \
-    --with-du=%{_bindir}/du
-
-%install 
-rm -rf %{buildroot}
-install -d %{buildroot}/%{_bindir}
-install -p -m 755 rsnapshot %{buildroot}/%{_bindir}/rsnapshot
-
-install -d %{buildroot}/%{_mandir}/man1
-install -p -m 644 rsnapshot.1 %{buildroot}/%{_mandir}/man1/
-
-install -d %{buildroot}/%{_sysconfdir}
-install -p -m 644 rsnapshot.conf.default %{buildroot}/%{_sysconfdir}/rsnapshot.conf.default
-install -p -m 600 rsnapshot.conf.default %{buildroot}/%{_sysconfdir}/rsnapshot.conf
+%configure                              \
+    --with-perl="%{__perl}"             \
+    --with-rsync="%{_bindir}/rsync"     \
+    --with-ssh="%{_bindir}/ssh"         \
+    --with-logger="%{_bindir}/logger"   \
+    --with-du="%{_bindir}/du"
+
+################################################################################
+
+%install
+
+rm -rf $RPM_BUILD_ROOT
+make install DESTDIR=$RPM_BUILD_ROOT
+
+# Rename the installed .default config file to a usable name
+mv $RPM_BUILD_ROOT/etc/rsnapshot.conf.default $RPM_BUILD_ROOT/etc/rsnapshot.conf
+
+################################################################################
 
 %post
-#
-# upgrade rsnapshot config file
-#
-RSNAPSHOT_CONFIG_VERSION=`%{_bindir}/rsnapshot check-config-version`
-if test $? != 0; then
-	echo "Error upgrading %{_sysconfdir}/rsnapshot.conf"
-fi
-
-if test "$RSNAPSHOT_CONFIG_VERSION" = "1.2"; then
-	# already latest version
-	exit 0
-fi
-
-if test "$RSNAPSHOT_CONFIG_VERSION" = "unknown"; then
-	%{_bindir}/rsnapshot upgrade-config-file
-	RETVAL=$?
-	exit $RETVAL
-fi
 
-echo "Error upgrading %{_sysconfdir}/rsnapshot.conf. Config format unknown!"
-exit 1
+%define logmsg logger -t %{name}/rpm
 
+# Get the version of the current rsnapshot config file so we can see if it
+# needs to be upgraded.
+    CONF_VERSION="$(%{_bindir}/rsnapshot check-config-version 2>/dev/null)"
+    if [ $? != 0 ]; then
+        %logmsg "Error upgrading %{_sysconfdir}/rsnapshot.conf."
+    fi
+
+# Old version in need of an upgrade
+    if [ "$CONF_VERSION" == "unknown" ]; then
+        %{_bindir}/rsnapshot upgrade-config-file
+        exit $?
+    fi
+
+# Latest version is 1.2, so anything else is not good.
+    if [ "$CONF_VERSION" != "1.2" ]; then
+        %logmsg "Error upgrading %{_sysconfdir}/rsnapshot.conf. Config format unknown!"
+        exit 1
+    fi
+
+################################################################################
 
 %clean
-rm -rf %{buildroot}
+
+rm -rf $RPM_BUILD_ROOT
+
+################################################################################
 
 %files
 %defattr(-,root,root)
-%doc AUTHORS COPYING ChangeLog README TODO
-%config %{_sysconfdir}/rsnapshot.conf.default
+%doc AUTHORS ChangeLog COPYING INSTALL README TODO
+%doc rsnapshot.conf.default
+%doc utils/
 %config(noreplace) %{_sysconfdir}/rsnapshot.conf
-%{_bindir}/rsnapshot
-%{_mandir}/man1/rsnapshot.1*
+%{_bindir}/*
+%{_mandir}/man1/*
+
+################################################################################
 
 %changelog
-* Tue Apr 12 2005 Gavin Henry <ghenry at suretecsystems.com>
-- Cleaned up a lot and reimported to Fedora Extras
+
+* Wed May 17 2006 Chris Petersen <rpm at forevermore.net>                  1.2.3-2
+- Add rsync and openssh-clients build requirements because the configure script checks for them.
+- Remove perl requirement because it's detected by rpm.
+
+* Wed May 17 2006 Chris Petersen <rpm at forevermore.net>                  1.2.3-1
+- Update to version 1.2.3 which is in the downloads directory but not linked on the site.
+- Change openssh requirement to openssh-clients
+- Update %post script with better info from the rpmforge spec and nifty logger reports
+- Add utils/ to the %doc files
+
+* Sat May 13 2006 Chris Petersen <rpm at forevermore.net>                  1.2.1-1
+- Update specfile to be compatible with fedora guidelines
 
 * Sun Jan 29 2005 Nathan Rosenquist <nathan at rsnapshot.org>
 - Added upgrade script


Index: sources
===================================================================
RCS file: /cvs/extras/rpms/rsnapshot/devel/sources,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- sources	12 Apr 2005 11:07:19 -0000	1.3
+++ sources	19 May 2006 23:34:16 -0000	1.4
@@ -1 +1 @@
-b126ae490889e5514f4a5d14a1128897  rsnapshot-1.2.1.tar.gz
+b27d90886b25d0e160b267f98c605aec  rsnapshot-1.2.3.tar.gz


--- rsnapshot.patch DELETED ---




More information about the fedora-extras-commits mailing list