diff -Nru dhis-tools-dns-5.0/debian/changelog dhis-tools-dns-5.0/debian/changelog --- dhis-tools-dns-5.0/debian/changelog 2016-03-10 13:04:34.000000000 +0000 +++ dhis-tools-dns-5.0/debian/changelog 2016-06-22 12:10:47.000000000 +0000 @@ -1,6 +1,19 @@ +dhis-tools-dns (5.0-8) unstable; urgency=medium + + [ Kentaro Fukuchi ] + * Fix temporary file creation in register scripts. Closes: #708727 + * Use printf instead of echo when using tabs. Closes: #708729 + + [ Guus Sliepen ] + * Don't explicitly use bash anymore. With Kentaro's patch issues with the + echo command are completely avoided, so the scripts should now be safe + with any POSIX complaint shell. + + -- Guus Sliepen Wed, 22 Jun 2016 14:10:42 +0200 + dhis-tools-dns (5.0-7) unstable; urgency=medium - * Bump debian/compat to 9. + * Bump debian/compat to 9. Closes: #817429 * Bump Standards-Version. * Convert debian/rules to dh. * Convert to 3.0 (quilt) format. diff -Nru dhis-tools-dns-5.0/debian/control dhis-tools-dns-5.0/debian/control --- dhis-tools-dns-5.0/debian/control 2016-03-10 12:50:27.000000000 +0000 +++ dhis-tools-dns-5.0/debian/control 2016-06-22 12:07:16.000000000 +0000 @@ -3,7 +3,7 @@ Priority: optional Maintainer: Guus Sliepen Build-Depends: debhelper (>= 9), libgmp3-dev -Standards-Version: 3.9.7 +Standards-Version: 3.9.8 Homepage: http://www.dhis.org/ Package: dhis-tools-dns diff -Nru dhis-tools-dns-5.0/debian/patches/dont-depend-on-bash dhis-tools-dns-5.0/debian/patches/dont-depend-on-bash --- dhis-tools-dns-5.0/debian/patches/dont-depend-on-bash 1970-01-01 00:00:00.000000000 +0000 +++ dhis-tools-dns-5.0/debian/patches/dont-depend-on-bash 2016-06-22 12:01:52.000000000 +0000 @@ -0,0 +1,16 @@ +--- a/register-p.sh ++++ b/register-p.sh +@@ -1,4 +1,4 @@ +-#!/bin/bash ++#!/bin/sh + + # Parameters + # 1 = hostname +--- a/register-q.sh ++++ b/register-q.sh +@@ -1,4 +1,4 @@ +-#!/bin/bash ++#!/bin/sh + + # Parameters + # 1 = hostname diff -Nru dhis-tools-dns-5.0/debian/patches/fix-makefile dhis-tools-dns-5.0/debian/patches/fix-makefile --- dhis-tools-dns-5.0/debian/patches/fix-makefile 2016-03-10 12:47:31.000000000 +0000 +++ dhis-tools-dns-5.0/debian/patches/fix-makefile 2016-06-22 11:49:28.000000000 +0000 @@ -1,8 +1,9 @@ --- a/Makefile +++ b/Makefile -@@ -1,18 +1,27 @@ +@@ -1,18 +1,28 @@ CC=gcc +CFLAGS?=-Wall ++CPPFLAGS?= +LDFLAGS?= + +INSTALLDIR=$(DESTDIR)/usr/sbin @@ -20,15 +21,15 @@ genpass: genpass.c - $(CC) -Wall -o genpass genpass.c -+ $(CC) $(CFLAGS) $(LDFLAGS) -o genpass genpass.c ++ $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o genpass genpass.c genkeys: genkeys.c - $(CC) -Wall -o genkeys genkeys.c -I/usr/local/include -L/usr/local/lib -lgmp -+ $(CC) $(CFLAGS) $(LDFLAGS) -o genkeys genkeys.c -lgmp ++ $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o genkeys genkeys.c -lgmp genid: genid.c - $(CC) -Wall -o genid genid.c -+ $(CC) $(CFLAGS) $(LDFLAGS) -o genid genid.c ++ $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o genid genid.c clean: rm -f core *.core genkeys genpass genid diff -Nru dhis-tools-dns-5.0/debian/patches/fix-register-scripts dhis-tools-dns-5.0/debian/patches/fix-register-scripts --- dhis-tools-dns-5.0/debian/patches/fix-register-scripts 2016-03-10 12:50:04.000000000 +0000 +++ dhis-tools-dns-5.0/debian/patches/fix-register-scripts 2016-06-22 11:51:59.000000000 +0000 @@ -18,7 +18,7 @@ + exit 1 +fi + -+temp_pass==`mktemp -p $TEMP pass.XXXXXX` || { echo "$0: Cannot create temporary file" >&2; exit 1; } ++temp_pass=`mktemp -p $TEMP pass.XXXXXX` || { echo "$0: Cannot create temporary file" >&2; exit 1; } +temp_id=`mktemp -p $TEMP id.XXXXXX` || { echo "$0: Cannot create temporary file" >&2; exit 1; } +temp_nsupdate=`mktemp -p $TEMP nsupdate.XXXXXX` || { echo "$0: Cannot create temporary file" >&2; exit 1; } +# Remove Files on exit @@ -98,7 +98,7 @@ + exit 1 +fi + -+temp_keys==`mktemp -p $TEMP keys.XXXXXX` || { echo "$0: Cannot create temporary file" >&2; exit 1; } ++temp_keys=`mktemp -p $TEMP keys.XXXXXX` || { echo "$0: Cannot create temporary file" >&2; exit 1; } + +temp_id=`mktemp -p $TEMP id.XXXXXX` || { echo "$0: Cannot create temporary file" >&2; exit 1; } +temp_nsupdate=`mktemp -p $TEMP nsupdate.XXXXXX` || { echo "$0: Cannot create temporary file" >&2; exit 1; } diff -Nru dhis-tools-dns-5.0/debian/patches/series dhis-tools-dns-5.0/debian/patches/series --- dhis-tools-dns-5.0/debian/patches/series 2016-03-10 12:49:42.000000000 +0000 +++ dhis-tools-dns-5.0/debian/patches/series 2016-06-22 12:01:16.000000000 +0000 @@ -1,3 +1,5 @@ fix-makefile fix-genid fix-register-scripts +use-printf +dont-depend-on-bash diff -Nru dhis-tools-dns-5.0/debian/patches/use-printf dhis-tools-dns-5.0/debian/patches/use-printf --- dhis-tools-dns-5.0/debian/patches/use-printf 1970-01-01 00:00:00.000000000 +0000 +++ dhis-tools-dns-5.0/debian/patches/use-printf 2016-06-22 11:59:59.000000000 +0000 @@ -0,0 +1,36 @@ +--- a/register-p.sh ++++ b/register-p.sh +@@ -27,11 +27,11 @@ + # + echo "" >> $DBFILE + echo `cat $temp_id | awk '{ print $2 }'`" {" >> $DBFILE +-echo "\thostname\t$1" >> $DBFILE ++printf "\thostname\t$1\n" >> $DBFILE + cat $temp_pass >> $DBFILE +-echo "\tcontact\t\t$2" >> $DBFILE +-echo "\temail\t\t$3" >> $DBFILE +-echo "\tservice\t\tdns" >> $DBFILE ++printf "\tcontact\t\t$2\n" >> $DBFILE ++printf "\temail\t\t$3\n" >> $DBFILE ++printf "\tservice\t\tdns\n" >> $DBFILE + echo "}" >> $DBFILE + kill -HUP `cat $DHISD_PID` + +--- a/register-q.sh ++++ b/register-q.sh +@@ -28,11 +28,11 @@ + # + echo "" >> $DBFILE + echo `cat $temp_id | awk '{ print $2 }'`" {" >> $DBFILE +-echo "\thostname\t$1" >> $DBFILE ++printf "\thostname\t$1\n" >> $DBFILE + cat $temp_keys >> $DBFILE +-echo "\tcontact\t\t$2" >> $DBFILE +-echo "\temail\t\t$3" >> $DBFILE +-echo "\tservice\t\tdns" >> $DBFILE ++printf "\tcontact\t\t$2\n" >> $DBFILE ++printf "\temail\t\t$3\n" >> $DBFILE ++printf "\tservice\t\tdns\n" >> $DBFILE + echo "}" >> $DBFILE + kill -HUP `cat $DHISD_PID` +