aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrhatto <rhatto@370017ae-e619-0410-ac65-c121f96126d4>2007-12-18 21:18:49 +0000
committerrhatto <rhatto@370017ae-e619-0410-ac65-c121f96126d4>2007-12-18 21:18:49 +0000
commit589cbc035f938d109db349c9a4f4eaee34498254 (patch)
tree3eb6e9d555d459683c2b62beca72eec4c2fa6757
parent89018b9c4c143865f7a8e78a18c76f243312a6cc (diff)
downloadslackbuilds-589cbc035f938d109db349c9a4f4eaee34498254.tar.gz
slackbuilds-589cbc035f938d109db349c9a4f4eaee34498254.tar.bz2
backupninja: removed patch and added --sysconfdir=/etc
git-svn-id: svn+slack://slack.fluxo.info/var/svn/slackbuilds@1538 370017ae-e619-0410-ac65-c121f96126d4
-rw-r--r--app/backup/backupninja/backupninja-0.9.5.diff101
-rwxr-xr-xapp/backup/backupninja/backupninja.SlackBuild10
2 files changed, 7 insertions, 104 deletions
diff --git a/app/backup/backupninja/backupninja-0.9.5.diff b/app/backup/backupninja/backupninja-0.9.5.diff
deleted file mode 100644
index ccca997b..00000000
--- a/app/backup/backupninja/backupninja-0.9.5.diff
+++ /dev/null
@@ -1,101 +0,0 @@
-diff -Naur backupninja-0.9.5.orig/handlers/mysql.in backupninja-0.9.5/handlers/mysql.in
---- backupninja-0.9.5.orig/handlers/mysql.in 2007-11-19 23:28:49.000000000 -0200
-+++ backupninja-0.9.5/handlers/mysql.in 2007-12-03 18:20:25.000000000 -0200
-@@ -91,8 +91,7 @@
- then
- if [ $usevserver = yes ]
- then
-- vhome=`$VSERVER $vsname exec getent passwd "root" | @AWK@ -F: '{print $6}'`
-- home="$vroot$vhome"
-+ home=`$VSERVER $vsname exec getent passwd "root" | @AWK@ -F: '{print $6}'`
- else
- home=`getent passwd "root" | @AWK@ -F: '{print $6}'`
- fi
-@@ -100,18 +99,25 @@
- [ -d $home ] || fatal "Can't find root's home directory ($home)."
-
- mycnf="$home/.my.cnf"
--
-- if [ -f $mycnf ]
-+
-+ if [ $usevserver = yes ]
-+ then
-+ workcnf="$vroot$mycnf"
-+ else
-+ workcnf="$mycnf"
-+ fi
-+
-+ if [ -f $workcnf ]
- then
-- # rename temporarily
-- tmpcnf="$home/my.cnf.disable"
-- debug "mv $mycnf $tmpcnf"
-- mv $mycnf $tmpcnf
-+ # rename temporarily
-+ tmpcnf="$workcnf.disable"
-+ debug "mv $workcnf $tmpcnf"
-+ mv $workcnf $tmpcnf
- fi
-
- oldmask=`umask`
- umask 077
-- cat > $mycnf <<EOF
-+ cat > $workcnf <<EOF
- # auto generated backupninja mysql conf
- [mysql]
- host=$dbhost
-@@ -129,12 +135,7 @@
- password="$dbpassword"
- EOF
- umask $oldmask
-- if [ $usevserver = yes ]
-- then
-- defaultsfile="--defaults-extra-file=$vhome/.my.cnf"
-- else
-- defaultsfile="--defaults-extra-file=$mycnf"
-- fi
-+ defaultsfile="--defaults-extra-file=$mycnf"
- fi
-
- # if a user is not set, use $configfile, otherwise use $mycnf
-@@ -145,18 +146,21 @@
- userset=true;
- if [ $usevserver = yes ]
- then
-- vuserhome=`$VSERVER $vsname exec getent passwd "$user" | @AWK@ -F: '{print $6}'`
-+ userhome=`$VSERVER $vsname exec getent passwd "$user" | @AWK@ -F: '{print $6}'`
- if [ $? -eq 2 ]
- then
- fatal "User $user not found in /etc/passwd"
- fi
-- userhome="$vroot$vuserhome"
-+ debug "User home set to: $vroot$userhome"
-+ [ -f $vroot$userhome/.my.cnf ] || fatal "Can't find config file in $userhome/.my.cnf"
- else
- userhome=`getent passwd "$user" | @AWK@ -F: '{print $6}'`
- if [ $? -eq 2 ]
- then
- fatal "User $user not found in /etc/passwd"
- fi
-+ debug "User home set to: $userhome"
-+ [ -f $userhome/.my.cnf ] || fatal "Can't find config file in $userhome/.my.cnf"
- fi
-
- debug "User home set to: $userhome"
-@@ -310,12 +314,12 @@
- if [ "$dbusername" != "" -a "$dbpassword" != "" ]
- then
- ## clean up tmp config file
-- debug "rm $mycnf"
-- rm $mycnf
-+ debug "rm $workcnf"
-+ rm $workcnf
- if [ -f "$tmpcnf" ]
- then
-- debug "mv $tmpcnf $mycnf"
-- mv $tmpcnf $mycnf
-+ debug "mv $tmpcnf $workcnf"
-+ mv $tmpcnf $workcnf
- fi
- fi
-
diff --git a/app/backup/backupninja/backupninja.SlackBuild b/app/backup/backupninja/backupninja.SlackBuild
index 617dce74..4da79067 100755
--- a/app/backup/backupninja/backupninja.SlackBuild
+++ b/app/backup/backupninja/backupninja.SlackBuild
@@ -107,7 +107,7 @@ done
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
./configure \
- --prefix="$PREFIX" --libdir="$LIBDIR" $CONF_OPTIONS || exit $ERROR_CONF
+ --prefix="$PREFIX" --libdir="$LIBDIR" --sysconfdir=/etc $CONF_OPTIONS || exit $ERROR_CONF
# Compile
make $NUMJOBS || exit $ERROR_MAKE
@@ -139,7 +139,11 @@ mv $PKG/etc/logrotate.d/backupninja.new $PKG/etc/logrotate.d/backupninja
# Install documentation
DOCS="AUTHORS COPYING ChangeLog INSTALL NEWS README TODO"
mkdir -p "$PKG/usr/doc/$PKG_NAME-$PKG_VERSION" || exit $ERROR_MKDIR
-cp -a $DOCS "$PKG/usr/doc/$PKG_NAME-$PKG_VERSION"
+for doc in $DOCS; do
+ if [ -f "$doc" ]; then
+ cp -a $doc "$PKG/usr/doc/$PKG_NAME-$PKG_VERSION"
+ fi
+done
# Add package description (slack-desc)
mkdir -p "$PKG/install" || exit $ERROR_MKDIR
@@ -171,5 +175,5 @@ makepkg -l y -c n "$REPOS/$PKG_NAME-$PKG_VERSION-$ARCH-$BUILD.tgz" || exit $ERRO
# Delete source and build directories if requested
if [ "$CLEANUP" == "yes" ]; then
- rm -rf "$PKG_SRC" "$PKG"
+ rm -rf "$PKG_WORK" "$PKG"
fi