Added RPM patches submitted by Robert Napier
authormicah <micah@758a04ac-41e6-0310-8a23-8373a73cc35d>
Fri, 11 Aug 2006 13:46:57 +0000 (13:46 +0000)
committermicah <micah@758a04ac-41e6-0310-8a23-8373a73cc35d>
Fri, 11 Aug 2006 13:46:57 +0000 (13:46 +0000)
git-svn-id: http://code.autistici.org/svn/backupninja/trunk@426 758a04ac-41e6-0310-8a23-8373a73cc35d

AUTHORS
ChangeLog
Makefile.am
autogen.sh
backupninja.spec.in
configure.in
handlers/mysql

diff --git a/AUTHORS b/AUTHORS
index a4888345424b6a478484aec7f8f9dce7dc981ae2..63294e5c26926ab9f2c3d5add25fa7261a7dd59d 100644 (file)
--- a/AUTHORS
+++ b/AUTHORS
@@ -9,6 +9,7 @@ intrigeri@boum.org -- dup handler, pgsql handler, vserver support, bug fixes
 Charles Lepple            -- trac handler
 Petr KlĂ­ma <petr.klima@madeta-group.cz>        -- autotools, RPM support and sys checks
 paulv@bikkel.org   -- rsnap handler
+Robert Napier     -- improved RPM build
 
 Patches: 
 
@@ -19,4 +20,3 @@ garcondumonde@riseup.net
 Martin Krafft madduck@debian.org -- admingroup patch
 Anarcat
 rhatto
-Robert Napier -- improved RPM build
index 0c01669dc66e08e0560eda5095dd38bc20d49a09..2daf397a2dfc0c599f89a1bb8024e9e128ec4e96 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -69,7 +69,9 @@ version 0.9.4 -- unreleased
     changed cron permissions to 644
     minor documentation fixes
     improved RPM build process allowing 'make rpm-package' and 'make
-    srpm-package' targets (thanks Robert Napier)
+    srpm-package' targets, also fixes permissions on man directories, 
+    cleans up RPM-related files during distclean, and adds default
+    EDITOR for "autogen.sh -f" if none is set. (thanks Robert Napier)
 
 version 0.9.3 -- February 1st, 2006
     autotools fixes
index 34ab32ab3588c40547638032d29852f9cc6c06b3..7339f0c6e094562e343e22083e313b57a488d110 100644 (file)
@@ -6,34 +6,40 @@ EXTRA_DIST = README COPYING AUTHORS INSTALL NEWS ChangeLog \
 
 SUBDIRS = etc examples handlers lib man src
 
-rpm_topdir=`cd $(top_srcdir) && pwd`/rpm
+local_rpm_topdir=`cd $(top_srcdir) && pwd`/rpm
 rpm-package: dist
        if test x$(HAVE_RPM) = xyes ; then \
-               mkdir -p $(rpm_topdir) ; \
-               cd $(rpm_topdir) ; \
+               mkdir -p $(local_rpm_topdir) ; \
+               cd $(local_rpm_topdir) ; \
                mkdir -p BUILD RPMS SOURCES SPECS ; \
                cd SOURCES ; \
-               ln -sf ../../$(distdir).tar.gz ; \
+               $(LN_S) ../../$(distdir).tar.gz ; \
                cd .. ; \
                cd SPECS ; \
-               ln -sf ../../backupninja.spec . ; \
-               cd .. ; \
+               $(LN_S) ../../backupninja.spec . ; \
+              cd .. ; \
                rpmbuild --define "_topdir `cd . && pwd`" -bb SPECS/backupninja.spec && \
                echo "Package successfully built in `pwd`/RPMS." ; \
        else \
                echo "Error: RPM executable and/or source directory not found." ; \
        fi
+
 srpm-package: dist
-       if test x$(HAVE_RPM) = xyes ; then \
-               cd $(rpm_topdir) ; \
+      if test x$(HAVE_RPM) = xyes ; then \
+               mkdir -p $(local_rpm_topdir) ; \
+               cd $(local_rpm_topdir) ; \
                mkdir -p BUILD SRPMS SOURCES SPECS ; \
                cd SOURCES ; \
-               ln -s ../../$(distdir).tar.gz ; \
+               $(LN_S) ../../$(distdir).tar.gz ; \
                cd .. ; \
                cd SPECS ; \
-               ln -sf ../../backupninja.spec .
+               $(LN_S) ../../backupninja.spec . \
+              cd .. ; \
                rpmbuild --define "_topdir `cd . && pwd`" -bs SPECS/backupninja.spec && \
                echo "Package successfully built in `pwd`/SRPMS." ; \
        else \
-               echo "Error: RPM executable and/or source directory not found." ; \
-       fi 
+              echo "Error: RPM executable and/or source directory not found." ; \
+       fi
+
+clean-local:
+       -rm -rf $(local_rpm_topdir)
index 63702a75e10a9dfbb1ccb41b213c8db333341756..aae1061bbd085d871930c8503040dc5d784b41e8 100755 (executable)
@@ -1,5 +1,10 @@
 #!/bin/bash
 
+if [ "x$EDITOR" = "x" ];
+then
+        EDITOR=vi
+fi
+
 if [ "x$1" = "x-f"  ]
 then
     autoscan
index ed845206db88b06e65e9b83940d1e4fc07af322c..0887691a02bffb0061611b6d611a9301ff6301f4 100644 (file)
@@ -38,22 +38,26 @@ touch "%{buildroot}%{_localstatedir}/log/backupninja.log"
 #rm -fr %{buildroot}
 
 %files
-%defattr(0750,root,root)
+%defattr(-,root,root,-)
 %{_sbindir}/*
 %{_datadir}/backupninja/*
 %{_libdir}/backupninja/*
-%{_sysconfdir}/cron.d/backupninja
-%{_sysconfdir}/logrotate.d/backupninja
 
-%defattr(0600,root,root)
+%config %{_sysconfdir}/cron.d/backupninja
+%config %{_sysconfdir}/logrotate.d/backupninja
+
 %config(noreplace) %{_sysconfdir}/backupninja.conf
-%dir %{_sysconfdir}/backup.d
 %dir %{_localstatedir}/backups
+
 %ghost %{_localstatedir}/log/backupninja.log
 
-%defattr(0644,root,root)
 %doc AUTHORS COPYING ChangeLog INSTALL NEWS README
-%{_mandir}/*
+%{_mandir}/man1/*
+%{_mandir}/man5/*
+
+%defattr(0640,root,root,0750)
+%dir %{_sysconfdir}/backup.d
+
 
 %changelog
 * Mon Apr 29 2002 Petr Klima <Petr.Klima@madeta-group.cz> 0.7.0
index 99ebdeed582304d764c57f66cbb9ebb7d2afa5bb..b32c8f33289f33adf625f57b08c00fc833ab5fdf 100644 (file)
@@ -40,6 +40,22 @@ if test "x$ac_cv_have_rpm" = "xyes"; then
 fi
 AC_SUBST(HAVE_RPM)
 
+AC_CHECK_PROG(ac_cv_have_rpm, rpm, "yes", "no")
+if test "x$ac_cv_have_rpm" = "xyes"; then
+        rpm --define '_topdir /tmp' > /dev/null 2>&1
+        AC_MSG_CHECKING(to see if we can redefine _topdir)
+        if test $? -eq 0 ; then
+                AC_MSG_RESULT(yes)
+                HAVE_RPM=yes
+        else
+                AC_MSG_RESULT(no.  You'll have to build packages manually.)
+                HAVE_RPM=no
+        fi
+fi
+AC_SUBST(HAVE_RPM)
+
+AC_PROG_LN_S
+
 AC_SUBST([CFGDIR], "${sysconfdir}")
 
 AC_CONFIG_FILES([Makefile
index 02289f1f2618e197c6e64bc59140869a9f1d31fc..cd72fc9087bb7033e009f0c8125c0e75ef80b9a4 100644 (file)
@@ -276,6 +276,7 @@ fi
                        fi
                fi
        done
+fi
 
 # clean up tmp config file
 if [ "$dbusername" != "" -a "$dbpassword" != "" ]