[Qa-jenkins-scm] [Git][qa/jenkins.debian.net][master] reproducible Debian cdebootstrap test: remove unreproducible logfiles as well
Holger Levsen (@holger)
gitlab at salsa.debian.org
Mon Aug 29 20:18:51 BST 2022
Holger Levsen pushed to branch master at Debian QA / jenkins.debian.net
Commits:
f71341bb by Holger Levsen at 2022-08-29T21:18:42+02:00
reproducible Debian cdebootstrap test: remove unreproducible logfiles as well
Signed-off-by: Holger Levsen <holger at layer-acht.org>
- - - - -
1 changed file:
- bin/reproducible_debstrap.sh
Changes:
=====================================
bin/reproducible_debstrap.sh
=====================================
@@ -64,22 +64,27 @@ for LOOP in "first" "second" ; do
case ${TOOL} in
mmdebstrap) sudo $REALTOOL $SUITE > $BUILDDIR/$SUBDIR/${TOOL}/${SUITE}.tar
;;
- debootstrap) sudo $REALTOOL $SUITE $BUILDDIR/$SUBDIR/${TOOL}/${SUITE}
+ debootstrap|cdebootstrap)
+ sudo $REALTOOL $SUITE $BUILDDIR/$SUBDIR/${TOOL}/${SUITE}
for LOGFILE in /var/log/bootstrap.log /var/log/dpkg.log /var/log/alternatives.log ; do
- output_echo "Warning: modifying $TOOL result, deleting unreproducible logfile $LOGFILE"
- sudo rm -rf --one-file-system $BUILDDIR/$SUBDIR/${TOOL}/${SUITE}/$LOGFILE
+ if [ -f $LOGFILE ] ; then
+ output_echo "Warning: modifying $TOOL result, deleting unreproducible logfile $LOGFILE"
+ sudo rm -rf --one-file-system $BUILDDIR/$SUBDIR/${TOOL}/${SUITE}/$LOGFILE
+ else
+ output_echo "Warning: shall remove $LOGFILE but it does not exist. Maybe $TOOL was improved."
+ fi
done
for FILE in /etc/machine-id /var/cache/ldconfig/aux-cache ; do
- output_echo "Warning: modifying $TOOL result, deleting unreproducible file $FILE because it will be created as needed"
- sudo rm -rf --one-file-system $BUILDDIR/$SUBDIR/${TOOL}/${SUITE}/$FILE
+ if [ -f $LOGFILE ] ; then
+ output_echo "Warning: modifying $TOOL result, deleting unreproducible file $FILE because it will be created as needed"
+ sudo rm -rf --one-file-system $BUILDDIR/$SUBDIR/${TOOL}/${SUITE}/$FILE
+ else
+ output_echo "Warning: shall remove $FILE but it does not exist. Maybe $TOOL was improved."
+ fi
done
sudo tar --mtime="@$SOURCE_DATE_EPOCH" --clamp-mtime -C $BUILDDIR/$SUBDIR/${TOOL}/ -cf $BUILDDIR/$SUBDIR/${TOOL}/${SUITE}.tar ${SUITE}
sudo rm -rf --one-file-system $BUILDDIR/$SUBDIR/${TOOL}/${SUITE}
;;
- cdebootstrap) sudo $REALTOOL $SUITE $BUILDDIR/$SUBDIR/${TOOL}/${SUITE}
- sudo tar --mtime="@$SOURCE_DATE_EPOCH" --clamp-mtime -C $BUILDDIR/$SUBDIR/${TOOL}/ -cf $BUILDDIR/$SUBDIR/${TOOL}/${SUITE}.tar ${SUITE}
- sudo rm -rf --one-file-system $BUILDDIR/$SUBDIR/${TOOL}/${SUITE}
- ;;
*) output_echo "Failure: ${TOOL} is unsupported."
exit 1
;;
View it on GitLab: https://salsa.debian.org/qa/jenkins.debian.net/-/commit/f71341bb9eda6f45e385ed5075239327051e36df
--
View it on GitLab: https://salsa.debian.org/qa/jenkins.debian.net/-/commit/f71341bb9eda6f45e385ed5075239327051e36df
You're receiving this email because of your account on salsa.debian.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/qa-jenkins-scm/attachments/20220829/0f11a79c/attachment-0001.htm>
More information about the Qa-jenkins-scm
mailing list