Your message dated Mon, 26 Sep 2011 19:57:54 +0200
with message-id <[email protected]>
and subject line Re: [Piuparts-devel] Bug#640649: TODO item  “fix scripts for 
dash as default shell”
has caused the Debian Bug report #640649,
regarding TODO item “fix scripts for dash as default shell”
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)


-- 
640649: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=640649
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: piuparts
Version: 0.41
Severity: wishlist
Tags: patch

Attached patch addresses TODO item in subject

It is somewhat difficult for me to test these changes thoroughly.
Also, note that checkbashisms still reports the use of $HOSTNAME as
"potential"bash-ism; I am nearly certain this is fine, given it is assigned
via `hostname`.

Note this patch applies to files in the [now deprecated(?)] piatti SVN
sub-repository (if that is the correct SVN term ?). Note sure where that lives
since the transition to git.

diff --git a/home/piupartsm/bin/archive_old_logs b/home/piupartsm/bin/archive_old_logs
--- a/home/piupartsm/bin/archive_old_logs
+++ b/home/piupartsm/bin/archive_old_logs
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/sh
 
 # Copyright 2009-2010 Holger Levsen ([email protected])
 # 
@@ -22,7 +22,7 @@
 
 TEMPFILE=`mktemp`
 egrep "(^sections|^master-directory)" /etc/piuparts/piuparts.conf| sed -e "s# =#=#g" -e "s#= #=#g" -e 's#=#="#' -e 's#$#"#' -e "s#sections#SECTIONS#" -e "s#master-directory#MASTER#" > $TEMPFILE
-source $TEMPFILE
+. $TEMPFILE
 rm $TEMPFILE
 if [ -z "$MASTER" ] || [ -z "$SECTIONS" ] ; then
 	echo "sections and/or master-directory not set in /etc/piuparts/piuparts.conf, exiting."
diff --git a/home/piupartsm/bin/detect_archive_issues b/home/piupartsm/bin/detect_archive_issues
--- a/home/piupartsm/bin/detect_archive_issues
+++ b/home/piupartsm/bin/detect_archive_issues
@@ -23,7 +23,7 @@
 [ -e /etc/piuparts/piuparts.conf ] || exit 0
 TEMPFILE=`mktemp`
 egrep "(^sections|^master-directory)" /etc/piuparts/piuparts.conf| sed -e "s# =#=#g" -e "s#= #=#g" -e 's#=#="#' -e 's#$#"#' -e "s#sections#SECTIONS#" -e "s#master-directory#MASTER#" > $TEMPFILE
-source $TEMPFILE
+. $TEMPFILE
 rm $TEMPFILE
 if [ -z "$MASTER" ] || [ -z "$SECTIONS" ] ; then
 	echo "sections and/or master-directory not set in /etc/piuparts/piuparts.conf, exiting."
diff --git a/home/piupartsm/bin/detect_network_issues b/home/piupartsm/bin/detect_network_issues
--- a/home/piupartsm/bin/detect_network_issues
+++ b/home/piupartsm/bin/detect_network_issues
@@ -23,7 +23,7 @@
 [ -e /etc/piuparts/piuparts.conf ] || exit 0
 TEMPFILE=`mktemp`
 egrep "(^sections|^master-directory)" /etc/piuparts/piuparts.conf| sed -e "s# =#=#g" -e "s#= #=#g" -e 's#=#="#' -e 's#$#"#' -e "s#sections#SECTIONS#" -e "s#master-directory#MASTER#" > $TEMPFILE
-source $TEMPFILE
+. $TEMPFILE
 rm $TEMPFILE
 if [ -z "$MASTER" ] || [ -z "$SECTIONS" ] ; then
 	echo "sections and/or master-directory not set in /etc/piuparts/piuparts.conf, exiting."
diff --git a/home/piupartsm/bin/detect_piuparts_issues b/home/piupartsm/bin/detect_piuparts_issues
--- a/home/piupartsm/bin/detect_piuparts_issues
+++ b/home/piupartsm/bin/detect_piuparts_issues
@@ -23,7 +23,7 @@
 [ -e /etc/piuparts/piuparts.conf ] || exit 0
 TEMPFILE=`mktemp`
 egrep "(^sections|^master-directory)" /etc/piuparts/piuparts.conf| sed -e "s# =#=#g" -e "s#= #=#g" -e 's#=#="#' -e 's#$#"#' -e "s#sections#SECTIONS#" -e "s#master-directory#MASTER#" > $TEMPFILE
-source $TEMPFILE
+. $TEMPFILE
 rm $TEMPFILE
 if [ -z "$MASTER" ] || [ -z "$SECTIONS" ] ; then
 	echo "sections and/or master-directory not set in /etc/piuparts/piuparts.conf, exiting."
diff --git a/home/piupartsm/bin/detect_slave_problems b/home/piupartsm/bin/detect_slave_problems
--- a/home/piupartsm/bin/detect_slave_problems
+++ b/home/piupartsm/bin/detect_slave_problems
@@ -28,7 +28,7 @@
 [ -e /etc/piuparts/piuparts.conf ] || exit 0
 TEMPFILE=`mktemp`
 egrep "(^sections|^master-directory)" /etc/piuparts/piuparts.conf| sed -e "s# =#=#g" -e "s#= #=#g" -e 's#=#="#' -e 's#$#"#' -e "s#sections#SECTIONS#" -e "s#master-directory#MASTER#" > $TEMPFILE
-source $TEMPFILE
+. $TEMPFILE
 rm $TEMPFILE
 if [ -z "$MASTER" ] || [ -z "$SECTIONS" ] ; then
 	echo "sections and/or master-directory not set in /etc/piuparts/piuparts.conf, exiting."
diff --git a/home/piupartsm/bin/detect_well_known_errors b/home/piupartsm/bin/detect_well_known_errors
--- a/home/piupartsm/bin/detect_well_known_errors
+++ b/home/piupartsm/bin/detect_well_known_errors
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/sh
 
 # Copyright 2009-2010 Holger Levsen ([email protected])
 # 
@@ -23,7 +23,7 @@
 [ -e /etc/piuparts/piuparts.conf ] || exit 0
 TEMPFILE=`mktemp`
 egrep "(^sections|^master-directory)" /etc/piuparts/piuparts.conf| sed -e "s# =#=#g" -e "s#= #=#g" -e 's#=#="#' -e 's#$#"#' -e "s#sections#SECTIONS#" -e "s#master-directory#MASTER#" > $TEMPFILE
-source $TEMPFILE
+. $TEMPFILE
 rm $TEMPFILE
 if [ -z "$MASTER" ] || [ -z "$SECTIONS" ] ; then
 	echo "sections and/or master-directory not set in /etc/piuparts/piuparts.conf, exiting."
@@ -43,8 +43,8 @@
 	cd $MASTER/$SECTION
 	for problem in `ls ~/bin/known_problems` ; do
 		# source files to get COMMAND, HELPTEXT and ISSUE
-		source ~/bin/known_problems/$problem 				
-		echo -n "$COMMAND" > $LOGS
+		. ~/bin/known_problems/$problem 				
+		printf "%b" "$COMMAND" > $LOGS
 		if [ -s $LOGS ] ; then 
 			OUTPUT=$HTDOCS/$SECTION/${problem%.conf}.tpl
 			echo '<table class="righttable"><tr class="titlerow"><td class="titlecell">' > $OUTPUT
@@ -60,20 +60,20 @@
 			for LOG in $(cat $LOGS|sort) ; do
 				PACKAGE=$(echo $LOG | cut -d "_" -f1|cut -d "/" -f2)
 				LATEST=$(ls -tr1 --color=none $MASTER/$SECTION/fail/${PACKAGE}_* $MASTER/$SECTION/bugged/${PACKAGE}_* $MASTER/$SECTION/pass/${PACKAGE}_* 2>/dev/null|tail -1|cut -d "/" -f7)
-				if [ "${problem%_error.conf}_error.conf" == "$problem" ] ; then 
+				if [ "${problem%_error.conf}_error.conf" = "$problem" ] ; then 
 					LATESTFAIL=$(ls -tr1 --color=none $MASTER/$SECTION/fail/${PACKAGE}_* $MASTER/$SECTION/bugged/${PACKAGE}_*  2>/dev/null|tail -1|cut -d "/" -f7-8)
-					if [ "$LATEST" != "pass" ] && [ "$LATESTFAIL" == "$LOG" ] ; then 
+					if [ "$LATEST" != "pass" ] && [ "$LATESTFAIL" = "$LOG" ] ; then 
 						echo "<li><a href='/$SECTION/$LOG'>$LOG</a> (<a href=\"http://bugs.debian.org/$PACKAGE?dist=unstable\"; target=\"_blank\">BTS</a>)</li>" >> $OUTPUT
 						echo "$LOG" >> ${KNOWNLOGS[$NR]}
-						let "COUNT += 1"
+						COUNT=$((COUNT+1))
 					fi
 				else
 					# this is an issue, not an error
 					LATESTSUCCESS=$(ls -tr1 --color=none $MASTER/$SECTION/pass/${PACKAGE}_* 2>/dev/null|tail -1|cut -d "/" -f7-8)
-					if [ "$LATEST" == "pass" ] && [ "$LATESTSUCCESS" == "$LOG" ] ; then 
+					if [ "$LATEST" = "pass" ] && [ "$LATESTSUCCESS" = "$LOG" ] ; then 
 						echo "<li><a href='/$SECTION/$LOG'>$LOG</a> (<a href=\"http://bugs.debian.org/$PACKAGE?dist=unstable\"; target=\"_blank\">BTS</a>)</li>" >> $OUTPUT
 						echo "$LOG" >> ${KNOWNLOGS[$NR]}
-						let "COUNT += 1"
+						COUNT=$((COUNT+1))
 					fi 
 				fi
 			done
@@ -83,7 +83,7 @@
 			touch ${KNOWNLOGS[$NR]}
 		fi
         done
-	let "NR += 1"
+	NR=$((NR+1))
 done
 rm $LOGS
 
@@ -110,15 +110,15 @@
 			PACKAGE=$(echo $LOG | cut -d "_" -f1|cut -d "/" -f2)
 			LATEST=$(ls -tr1 --color=none $MASTER/$SECTION/fail/${PACKAGE}_* $MASTER/$SECTION/bugged/${PACKAGE}_* $MASTER/$SECTION/pass/${PACKAGE}_* 2>/dev/null|tail -1|cut -d "/" -f7)
 			LATESTFAIL=$(ls -tr1 --color=none $MASTER/$SECTION/fail/${PACKAGE}_* $MASTER/$SECTION/bugged/${PACKAGE}_*  2>/dev/null|tail -1|cut -d "/" -f7-8)
-			if [ "$LATEST" != "pass" ] && [ "$LATESTFAIL" == "$LOG" ] ; then 
+			if [ "$LATEST" != "pass" ] && [ "$LATESTFAIL" = "$LOG" ] ; then 
 				echo "<li><a href='/$SECTION/$LOG'>$LOG</a> (<a href=\"http://bugs.debian.org/$PACKAGE?dist=unstable\"; target=\"_blank\">BTS</a>)</li>" >> $OUTPUT
-				let "COUNT += 1"
+				COUNT=$((COUNT+1))
 			fi
 		done
 		echo "</ul>" >> $OUTPUT
 		echo "<p>Affected packages in $SECTION: $COUNT</p></td></tr></table>" >> $OUTPUT
 	fi
 	rm $LOGS ${KNOWNLOGS[$NR]} $UNKNOWNLOGS
-	let "NR += 1"
+	NR=$((NR+1))
 done
 
diff --git a/home/piupartsm/bin/prepare_backup b/home/piupartsm/bin/prepare_backup
--- a/home/piupartsm/bin/prepare_backup
+++ b/home/piupartsm/bin/prepare_backup
@@ -21,7 +21,7 @@
 #
 TEMPFILE=`mktemp`
 egrep "(^sections|^master-directory)" /etc/piuparts/piuparts.conf| sed -e "s# =#=#g" -e "s#= #=#g" -e 's#=#="#' -e 's#$#"#' -e "s#sections#SECTIONS#" -e "s#master-directory#MASTER#" > $TEMPFILE
-source $TEMPFILE
+. $TEMPFILE
 rm $TEMPFILE
 if [ -z "$MASTER" ] || [ -z "$SECTIONS" ] ; then
 	echo "sections and/or master-directory not set in /etc/piuparts/piuparts.conf, exiting."
diff --git a/home/piupartsm/bin/report_stale_reserved_packages b/home/piupartsm/bin/report_stale_reserved_packages
--- a/home/piupartsm/bin/report_stale_reserved_packages
+++ b/home/piupartsm/bin/report_stale_reserved_packages
@@ -22,7 +22,7 @@
 
 TEMPFILE=`mktemp`
 egrep "(^sections|^master-directory)" /etc/piuparts/piuparts.conf| sed -e "s# =#=#g" -e "s#= #=#g" -e 's#=#="#' -e 's#$#"#' -e "s#sections#SECTIONS#" -e "s#master-directory#MASTER#" > $TEMPFILE
-source $TEMPFILE
+. $TEMPFILE
 rm $TEMPFILE
 if [ -z "$MASTER" ] || [ -z "$SECTIONS" ] ; then
 	echo "sections and/or master-directory not set in /etc/piuparts/piuparts.conf, exiting."
diff --git a/home/piupartsm/bin/report_untestable_packages b/home/piupartsm/bin/report_untestable_packages
--- a/home/piupartsm/bin/report_untestable_packages
+++ b/home/piupartsm/bin/report_untestable_packages
@@ -22,7 +22,7 @@
 
 TEMPFILE=`mktemp`
 egrep "(^sections|^master-directory)" /etc/piuparts/piuparts.conf| sed -e "s# =#=#g" -e "s#= #=#g" -e 's#=#="#' -e 's#$#"#' -e "s#sections#SECTIONS#" -e "s#master-directory#MASTER#" > $TEMPFILE
-source $TEMPFILE
+. $TEMPFILE
 rm $TEMPFILE
 if [ -z "$MASTER" ] || [ -z "$SECTIONS" ] ; then
 	echo "sections and/or master-directory not set in /etc/piuparts/piuparts.conf, exiting."
diff --git a/home/piupartsm/bin/reschedule_oldest_logs b/home/piupartsm/bin/reschedule_oldest_logs
--- a/home/piupartsm/bin/reschedule_oldest_logs
+++ b/home/piupartsm/bin/reschedule_oldest_logs
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/sh
 
 # Copyright 2009-2011 Holger Levsen ([email protected])
 # 
@@ -22,7 +22,7 @@
 
 TEMPFILE=`mktemp`
 egrep "(^sections|^master-directory)" /etc/piuparts/piuparts.conf| sed -e "s# =#=#g" -e "s#= #=#g" -e 's#=#="#' -e 's#$#"#' -e "s#sections#SECTIONS#" -e "s#master-directory#MASTER#" > $TEMPFILE
-source $TEMPFILE
+. $TEMPFILE
 rm $TEMPFILE
 if [ -z "$MASTER" ] || [ -z "$SECTIONS" ] ; then
 	echo "sections and/or master-directory not set in /etc/piuparts/piuparts.conf, exiting."
@@ -34,7 +34,7 @@
 #
 for SECTION in $SECTIONS ; do
 	# only for sid and wheezy
-        if [ "$SECTION" == "sid" ] || [ "$SECTION" == "wheezy" ] ; then
+        if [ "$SECTION" = "sid" ] || [ "$SECTION" = "wheezy" ] ; then
 		echo $SECTION
 		cd $MASTER/$SECTION
 		# we ignore bugged here - ptyhon-bts is really the way to go
diff --git a/home/piupartss/bin/detect_leftover_processes b/home/piupartss/bin/detect_leftover_processes
--- a/home/piupartss/bin/detect_leftover_processes
+++ b/home/piupartss/bin/detect_leftover_processes
@@ -23,7 +23,7 @@
 [ -e /etc/piuparts/piuparts.conf ] || exit 0
 TEMPFILE=`mktemp`
 egrep "(^sections|^master-directory)" /etc/piuparts/piuparts.conf| sed -e "s# =#=#g" -e "s#= #=#g" -e 's#=#="#' -e 's#$#"#' -e "s#sections#SECTIONS#" -e "s#master-directory#MASTER#" > $TEMPFILE
-source $TEMPFILE
+. $TEMPFILE
 rm $TEMPFILE
 if [ -z "$MASTER" ] || [ -z "$SECTIONS" ] ; then
         echo "sections and/or master-directory not set in /etc/piuparts/piuparts.conf, exiting."
diff --git a/home/piupartss/bin/update-piuparts-setup b/home/piupartss/bin/update-piuparts-setup
--- a/home/piupartss/bin/update-piuparts-setup
+++ b/home/piupartss/bin/update-piuparts-setup
@@ -73,6 +73,7 @@
 sudo chmod 775 master slave htdocs
 cd /org/piuparts.debian.org/etc
 # to support multiple host with this setup
+HOSTNAME=`hostname`
 ln -sf piuparts.conf.$HOSTNAME piuparts.conf
 
 #
diff --git a/org/piuparts.debian.org/etc/scripts/pre_upgrade_exceptions b/org/piuparts.debian.org/etc/scripts/pre_upgrade_exceptions
--- a/org/piuparts.debian.org/etc/scripts/pre_upgrade_exceptions
+++ b/org/piuparts.debian.org/etc/scripts/pre_upgrade_exceptions
@@ -10,7 +10,7 @@
 				# apt-listbugs is run on installations / upgrades 
 				# and will them fail if packages have RC bugs
 				# (which is good and sensible) 
-				echo -e "#/bin/sh\nexit 0" > /usr/sbin/apt-listbugs
+				printf "%b\n" "#/bin/sh\nexit 0" > /usr/sbin/apt-listbugs
 				;;
 esac
 

--- End Message ---
--- Begin Message ---
Hi Scott,

On Dienstag, 6. September 2011, Scott Schaefer wrote:
> Attached patch addresses TODO item in subject

great, thanks!
 
> It is somewhat difficult for me to test these changes thoroughly.

understood. We'll notice very quickly...

> Note this patch applies to files in the [now deprecated(?)] piatti SVN
> sub-repository (if that is the correct SVN term ?).  Note sure where
> that lives
> since the transition to git.

in git+ssh://git.debian.org/git/piuparts/piatti.git though it should be merged  
into piuparts.git in the future...

merged into piatti.git, branch develop for now.


cheers,
        Holger


--- End Message ---

Reply via email to