Bug#887274: boxbackup-server should depend on e2fsprogs explicitly
Control: tags -1 + patch
On Sun, Jan 14, 2018 at 08:03:02PM +0100, Helmut Grohne wrote:
> Package: boxbackup-server
> Version: 0.12~gitcf52058f-3
> User: helmutg@debian.org
> Usertags: nonessentiale2fsprogs
[...]
> DEBIAN/config contains tune2fs. According to file it is a Bourne-Again shell script, ASCII text executable
> DEBIAN/templates contains tune2fs. According to file it is a UTF-8 Unicode text
[...]
The templates match could be considered a false positive. The
boxbackup-server.config match on the other hand is guarded with
a check for tune2fs existance, but unfortunately because of broken
shell quoting it will likely not work as intended.
(Atleast in my tests 'if [ -x $EMPTYORUNSET ]' evaluates to true.)
I'm attaching a patch that both fixes the quoting (in several more
places than just the one mentioned above) and also adds e2fsprogs
to recommends (but suggests might also work).
I'm not uploading this since boxbackup has other bugs (including RC)
which should also be investigated..... (and if boxbackup is getting
removed from buster because of unfixed RC bugs there's no point in
fixing this one either...)
If someone cares for boxbackup they should adopt the package. (It
atleast seems to be actively maintained upstream.)
Regards,
Andreas Henriksson
diff -Nru boxbackup-0.12~gitcf52058f/debian/boxbackup-server.config boxbackup-0.12~gitcf52058f/debian/boxbackup-server.config
--- boxbackup-0.12~gitcf52058f/debian/boxbackup-server.config 2017-06-30 21:01:19.000000000 +0200
+++ boxbackup-0.12~gitcf52058f/debian/boxbackup-server.config 2018-01-17 16:28:30.000000000 +0100
@@ -32,14 +32,14 @@
DIR2=`echo "$RET" | awk '{ print $2 }'`
DIR3=`echo "$RET" | awk '{ print $3 }'`
- if [ -n $DIR1 ]; then
+ if [ -n "$DIR1" ]; then
if [ -z "$DIR2" -o -z "$DIR3" ]; then
- DIR2=$DIR1
- DIR3=$DIR1
+ DIR2="$DIR1"
+ DIR3="$DIR1"
fi
PATHOK=1
- for i in $DIR1 $DIR2 $DIR3; do
+ for i in "$DIR1" "$DIR2" "$DIR3"; do
if [ `echo $i | awk '{ if (/^\/[A-Za-z0-9\.\-_]+\/?([A-Za-z0-9\.\-_]+\/?)*$/) { print 1 } else { print 0 } }'` = 0 ]; then
PATHOK=0
fi
@@ -60,13 +60,13 @@
# Try to figure out the block size of the first partition given
db_get boxbackup-server/raidDirectories
if [ "$OLDRAIDDIR" != "$RET" ]; then # Directories have been changed so we can try to guess the block size
- TMPDIR=`echo $DIR1 | sed 's/\/$//'`
+ TMPDIR=`echo "$DIR1" | sed 's/\/$//'`
while [ "$TMPDIR" != "" ]; do
DEV=`df -P | grep "$TMPDIR$" | awk '{ print $1 }'`
if [ -z "$DEV" ]; then
- TMPDIR=`echo $TMPDIR | sed 's/\/[^\/]*$//'`
+ TMPDIR=`echo "$TMPDIR" | sed 's/\/[^\/]*$//'`
else
TMPDIR=""
fi
@@ -74,10 +74,10 @@
if [ "$DEV" != "" ]; then
TUNE2FS="$(command -v tune2fs)"
- if [ -x ${TUNE2FS} ]; then
+ if [ -x "${TUNE2FS}" ]; then
BS=`${TUNE2FS} -l $DEV 2>/dev/null | grep 'Block size' | awk '{print $3 }'`
- if [ $? = 0 -a $BS != "" ]; then
+ if [ $? = 0 -a "$BS" != "" ]; then
db_set boxbackup-server/raidBlockSize "$BS"
fi
fi
@@ -97,7 +97,7 @@
fi
fi
- if [ $BSOK = 0 ]; then
+ if [ "$BSOK" = 0 ]; then
db_input critical boxbackup-server/incorrectBlocksize || true
db_go
fi
@@ -108,4 +108,3 @@
db_go
exit 0
-
diff -Nru boxbackup-0.12~gitcf52058f/debian/changelog boxbackup-0.12~gitcf52058f/debian/changelog
--- boxbackup-0.12~gitcf52058f/debian/changelog 2017-06-30 21:01:19.000000000 +0200
+++ boxbackup-0.12~gitcf52058f/debian/changelog 2018-01-17 16:28:35.000000000 +0100
@@ -1,3 +1,14 @@
+boxbackup (0.12~gitcf52058f-4) UNRELEASED; urgency=medium
+
+ * QA upload.
+ * debian/boxbackup-server.config: Fix quoting of variables primarily
+ fixing the logic that handles when tune2fs is not available.
+ * Have boxbackup-server package Recommend e2fsprogs since the
+ package configuration (optionally) uses tune2fs in some cases.
+ (Closes: #887274)
+
+ -- Andreas Henriksson <andreas@fatal.se> Wed, 17 Jan 2018 16:28:35 +0100
+
boxbackup (0.12~gitcf52058f-3) unstable; urgency=medium
* QA upload.
diff -Nru boxbackup-0.12~gitcf52058f/debian/control boxbackup-0.12~gitcf52058f/debian/control
--- boxbackup-0.12~gitcf52058f/debian/control 2017-06-30 21:01:19.000000000 +0200
+++ boxbackup-0.12~gitcf52058f/debian/control 2018-01-17 16:28:35.000000000 +0100
@@ -33,6 +33,7 @@
ucf,
${misc:Depends},
${shlibs:Depends}
+Recommends: e2fsprogs
Description: server for the BoxBackup remote backup system
BoxBackup is an automatic on-line backup system.
The server waits for connections from remote clients,
Reply to: