Skip to content
Snippets Groups Projects
Commit 13f247af authored by intrigeri's avatar intrigeri
Browse files

Fix reliance on bash for pipefail. (Closes: #602374)

Thanks to Sergio Talens-Oliag <sto@debian.org> for the bug report and patch.
parent 0b60b581
Branches
Tags
No related merge requests found
...@@ -37,3 +37,4 @@ Chris Nolan <chris@cenolan.com> -- maildir subdirectory expansion ...@@ -37,3 +37,4 @@ Chris Nolan <chris@cenolan.com> -- maildir subdirectory expansion
Dan Carley -- mysql bugfix Dan Carley -- mysql bugfix
Jordi Mallach <jordi@debian.org> -- do not error when no jobs are configured Jordi Mallach <jordi@debian.org> -- do not error when no jobs are configured
Jacob Anawalt <jlanawalt@gmail.com> -- pg_dump format option Jacob Anawalt <jlanawalt@gmail.com> -- pg_dump format option
Sergio Talens-Oliag <sto@debian.org> -- pipefail fixes
...@@ -8,10 +8,17 @@ version 0.9.9 -- UNRELEASED ...@@ -8,10 +8,17 @@ version 0.9.9 -- UNRELEASED
(Closes Roundup bug #598) (Closes Roundup bug #598)
. Remove support for duplicity < 0.4.4. Even etch-backports has . Remove support for duplicity < 0.4.4. Even etch-backports has
a newer one. a newer one.
ldap:
. Fix reliance on bash for pipefail.
mysql:
. Fix reliance on bash for pipefail.
Thanks to Sergio Talens-Oliag <sto@debian.org> for the patch.
(Closes: #602374)
postgresql: postgresql:
. Support various pg_dump formats in addition to pg_dumpall. . Support various pg_dump formats in addition to pg_dumpall.
Thanks to Jacob Anawalt <jlanawalt@gmail.com> for the patch. Thanks to Jacob Anawalt <jlanawalt@gmail.com> for the patch.
(Closes Roundup bug #2534) (Closes Roundup bug #2534)
. Fix reliance on bash for pipefail.
rdiff: rdiff:
. Support reading include/exclude patterns from files using the . Support reading include/exclude patterns from files using the
"include @/etc/backup_includes" syntax (Closes Roundup bug "include @/etc/backup_includes" syntax (Closes Roundup bug
......
...@@ -91,7 +91,7 @@ if [ "$ldif" == "yes" ]; then ...@@ -91,7 +91,7 @@ if [ "$ldif" == "yes" ]; then
execstr="$execstr > $dumpdir/$dbsuffix.ldif" execstr="$execstr > $dumpdir/$dbsuffix.ldif"
fi fi
debug "$execstr" debug "$execstr"
output=`su root -c "set -o pipefail ; $execstr" 2>&1` output=`su root -s /bin/bash -c "set -o pipefail ; $execstr" 2>&1`
code=$? code=$?
if [ "$code" == "0" ]; then if [ "$code" == "0" ]; then
debug $output debug $output
......
...@@ -303,7 +303,7 @@ then ...@@ -303,7 +303,7 @@ then
debug "su $user -c \"$execstr\"" debug "su $user -c \"$execstr\""
if [ ! $test ] if [ ! $test ]
then then
output=`su $user -c "set -o pipefail ; $execstr" 2>&1` output=`su $user -s /bin/bash -c "set -o pipefail ; $execstr" 2>&1`
code=$? code=$?
if [ "$code" == "0" ] if [ "$code" == "0" ]
then then
......
...@@ -115,13 +115,13 @@ fi ...@@ -115,13 +115,13 @@ fi
if [ "$databases" == "all" ]; then if [ "$databases" == "all" ]; then
if [ $usevserver = yes ]; then if [ $usevserver = yes ]; then
if [ "$compress" == "yes" ]; then if [ "$compress" == "yes" ]; then
execstr="$VSERVER $vsname exec su - $PGSQLUSER -c \"set -o pipefail ; $PGSQLDUMPALL | $GZIP $GZIP_OPTS > '$backupdir/${vsname}.sql.gz'\"" execstr="$VSERVER $vsname exec su - $PGSQLUSER -s /bin/bash -c \"set -o pipefail ; $PGSQLDUMPALL | $GZIP $GZIP_OPTS > '$backupdir/${vsname}.sql.gz'\""
else else
execstr="$VSERVER $vsname exec su - $PGSQLUSER -c \"$PGSQLDUMPALL > '$backupdir/${vsname}.sql'\"" execstr="$VSERVER $vsname exec su - $PGSQLUSER -c \"$PGSQLDUMPALL > '$backupdir/${vsname}.sql'\""
fi fi
else else
if [ "$compress" == "yes" ]; then if [ "$compress" == "yes" ]; then
execstr="su - $PGSQLUSER -c \"set -o pipefail ; $PGSQLDUMPALL | $GZIP $GZIP_OPTS > '$backupdir/${localhost}-all.sql.gz'\"" execstr="su - $PGSQLUSER -s /bin/bash -c \"set -o pipefail ; $PGSQLDUMPALL | $GZIP $GZIP_OPTS > '$backupdir/${localhost}-all.sql.gz'\""
else else
execstr="su - $PGSQLUSER -c \"$PGSQLDUMPALL > '$backupdir/${localhost}-all.sql'\"" execstr="su - $PGSQLUSER -c \"$PGSQLDUMPALL > '$backupdir/${localhost}-all.sql'\""
fi fi
...@@ -152,9 +152,9 @@ else ...@@ -152,9 +152,9 @@ else
globalscmd="$PGSQLDUMPALL -g > '$backupdir/globals.sql'" globalscmd="$PGSQLDUMPALL -g > '$backupdir/globals.sql'"
fi fi
if [ $usevserver = yes ]; then if [ $usevserver = yes ]; then
execstr="$VSERVER $vsname exec su - $PGSQLUSER -c \"$globalscmd\"" execstr="$VSERVER $vsname exec su - $PGSQLUSER -s /bin/bash -c \"$globalscmd\""
else else
execstr="su - $PGSQLUSER -c \"$globalscmd\"" execstr="su - $PGSQLUSER -s /bin/bash -c \"$globalscmd\""
fi fi
debug "$execstr" debug "$execstr"
if [ ! $test ]; then if [ ! $test ]; then
...@@ -189,9 +189,9 @@ else ...@@ -189,9 +189,9 @@ else
dumpcmd="$PGSQLDUMP --format=$format ${disablecustomcompress} $db | > '$backupdir/${db}.${dumpext}'" dumpcmd="$PGSQLDUMP --format=$format ${disablecustomcompress} $db | > '$backupdir/${db}.${dumpext}'"
fi fi
if [ $usevserver = yes ]; then if [ $usevserver = yes ]; then
execstr="$VSERVER $vsname exec su - $PGSQLUSER -c \"$dumpcmd\"" execstr="$VSERVER $vsname exec su - $PGSQLUSER -s /bin/bash -c \"$dumpcmd\""
else else
execstr="su - $PGSQLUSER -c \"$dumpcmd\"" execstr="su - $PGSQLUSER -s /bin/bash -c \"$dumpcmd\""
fi fi
debug "$execstr" debug "$execstr"
if [ ! $test ]; then if [ ! $test ]; then
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment