[Qa-jenkins-scm] [Git][qa/jenkins.debian.net][master] reproducible Debian live builds: always use proper grammar in output.

Holger Levsen (@holger) gitlab at salsa.debian.org
Mon Jan 24 12:36:10 GMT 2022



Holger Levsen pushed to branch master at Debian QA / jenkins.debian.net


Commits:
00312916 by Holger Levsen at 2022-01-24T13:35:45+01:00
reproducible Debian live builds: always use proper grammar in output.

Signed-off-by: Holger Levsen <holger at layer-acht.org>

- - - - -


1 changed file:

- bin/reproducible_debian_live_build.sh


Changes:

=====================================
bin/reproducible_debian_live_build.sh
=====================================
@@ -119,7 +119,7 @@ output_echo "Info: using the snapshot from ${SOURCE_DATE_EPOCH} (${SNAPSHOT_TIME
 # - For /etc/apt/sources.list: Use the mirror from ${MIRROR}, no security, no updates
 # - Don't cache the downloaded content, re-download for the second build
 # - Explicitly use the proxy that is set by ${http_proxy} to reduce some network traffic
-output_echo "Running lb config for the 1st build"
+output_echo "Running lb config for the 1st build."
 lb config \
 	--parent-mirror-bootstrap ${MIRROR} \
 	--parent-mirror-binary ${MIRROR} \
@@ -132,7 +132,7 @@ lb config \
 	2>&1 | tee $LB_OUTPUT
 RESULT=$?
 if [ "$RESULT" != "0" ] ; then
-   output_echo "Warning: lb config failed with $RESULT"
+   output_echo "Warning: lb config failed with $RESULT."
 fi
 
 if [ ! -z "${PACKAGES}" ] ; then
@@ -333,7 +333,7 @@ rm -f /var/lib/ucf/registry.*
 EOF
 
 # First build
-output_echo "Running lb build for the 1st build"
+output_echo "Running lb build for the 1st build."
 set +e # We are interested in the result of 'lb build', so do not fail on errors
 sudo lb build | tee -a $LB_OUTPUT
 RESULT=$?
@@ -347,7 +347,7 @@ if [ "$RESULT" != "0" ] ; then
    # Convert SNAPSHOT_TIMESTAMP to Unix time (insert suitable formatting first)
    export SOURCE_DATE_EPOCH=$(date -d $(echo ${SNAPSHOT_TIMESTAMP} | awk '{ printf "%s-%s-%sT%s:%s:%sZ", substr($0,1,4), substr($0,5,2), substr($0,7,2), substr($0,10,2), substr($0,12,2), substr($0,14,2) }') +%s)
    export MIRROR=http://snapshot.notset.fr/archive/debian/${SNAPSHOT_TIMESTAMP}
-   output_echo "Info: using the snapshot from ${SOURCE_DATE_EPOCH} (${SNAPSHOT_TIMESTAMP})"
+   output_echo "Info: using the snapshot from ${SOURCE_DATE_EPOCH} (${SNAPSHOT_TIMESTAMP})."
 
    # When reconfiguring, some values that were automatically set need to be updated as well
    lb config \
@@ -361,7 +361,7 @@ if [ "$RESULT" != "0" ] ; then
    RESULT=$?
    set -e
    if [ "$RESULT" != "0" ] ; then
-      output_echo "Error: lb build failed with $RESULT, even with an older snapshot"
+      output_echo "Error: lb build failed with $RESULT, even with an older snapshot."
       exit ${RESULT}
    fi
 fi
@@ -371,23 +371,23 @@ mkdir -p ${RESULTSDIR}/b1/${PROJECTNAME}/${CONFIGURATION}
 mv live-image-amd64.hybrid.iso ${RESULTSDIR}/b1/${PROJECTNAME}/${CONFIGURATION}
 
 # Clean for the second build
-output_echo "Running lb clean after the 1st build"
+output_echo "Running lb clean after the 1st build."
 sudo lb clean --purge | tee -a $LB_OUTPUT
 RESULT=$?
 if [ "$RESULT" != "0" ] ; then
-   output_echo "Warning: lb clean failed with $RESULT"
+   output_echo "Warning: lb clean failed with $RESULT."
 fi
 
 # Re-activate the previous configuration
-output_echo "Running lb config for the 2nd build"
+output_echo "Running lb config for the 2nd build."
 lb config
 
 # Second build
-output_echo "Running lb build for the 2nd build"
+output_echo "Running lb build for the 2nd build."
 sudo lb build | tee -a $LB_OUTPUT
 RESULT=$?
 if [ "$RESULT" != "0" ] ; then
-   output_echo "Warning: lb build failed with $RESULT"
+   output_echo "Warning: lb build failed with $RESULT."
 fi
 
 # Move the image away
@@ -395,18 +395,18 @@ mkdir -p ${RESULTSDIR}/b2/${PROJECTNAME}/${CONFIGURATION}
 mv live-image-amd64.hybrid.iso ${RESULTSDIR}/b2/${PROJECTNAME}/${CONFIGURATION}
 
 # Clean up
-output_echo "Running lb clean after the 2nd build"
+output_echo "Running lb clean after the 2nd build."
 sudo lb clean --purge | tee -a $LB_OUTPUT
 RESULT=$?
 if [ "$RESULT" != "0" ] ; then
-   output_echo "Warning: lb clean failed with $RESULT"
+   output_echo "Warning: lb clean failed with $RESULT."
 fi
 
 # The workspace is no longer required
 cd ..
 
 # Compare the images
-output_echo "Calling diffoscope on the results"
+output_echo "Calling diffoscope on the results."
 TIMEOUT="240m"
 DIFFOSCOPE="$(schroot --directory /tmp -c chroot:jenkins-reproducible-${DBDSUITE}-diffoscope diffoscope -- --version 2>&1)"
 TMPDIR=${RESULTSDIR}
@@ -422,18 +422,18 @@ if [ -f "${RESULTSDIR}/${PROJECTNAME}/${CONFIGURATION}/live-image-amd64.hybrid.i
    # Publish the output of diffoscope, there are differences
    cp -a ${RESULTSDIR}/${PROJECTNAME}/${CONFIGURATION}/live-image-amd64.hybrid.iso.html ${PAGE}
    save_artifacts debian_live_build ${CONFIGURATION}-${DEBIAN_VERSION} https://wiki.debian.org/ReproducibleInstalls/LiveImages
-   output_echo "Warning: diffoscope detected differences in the images"
+   output_echo "Warning: diffoscope detected differences in the images."
 else
    if [ "$RESULT" != "0" ] ; then
-      echo "${DIFFOSCOPE} for ${PROJECTNAME} in configuration ${CONFIGURATION} with timestamp ${SOURCE_DATE_EPOCH} (${SNAPSHOT_TIMESTAMP}) returned error code ${RESULT}" > ${PAGE}
+      echo "${DIFFOSCOPE} for ${PROJECTNAME} in configuration ${CONFIGURATION} with timestamp ${SOURCE_DATE_EPOCH} (${SNAPSHOT_TIMESTAMP}) returned error code ${RESULT}." > ${PAGE}
       save_artifacts debian_live_build ${CONFIGURATION}-${DEBIAN_VERSION} https://wiki.debian.org/ReproducibleInstalls/LiveImages
-      output_echo "Warning: diffoscope returned error code {$RESULT}"
+      output_echo "Warning: diffoscope returned error code {$RESULT}."
    else
-      echo "${PROJECTNAME} in configuration ${CONFIGURATION} with timestamp ${SOURCE_DATE_EPOCH} (${SNAPSHOT_TIMESTAMP}) is reproducible" > ${PAGE}
-      output_echo "Info: no differences found"
+      echo "${PROJECTNAME} in configuration ${CONFIGURATION} with timestamp ${SOURCE_DATE_EPOCH} (${SNAPSHOT_TIMESTAMP}) is reproducible." > ${PAGE}
+      output_echo "Info: no differences found."
    fi
 fi
-output_echo "Publishing results"
+output_echo "Publishing results."
 publish_page debian_live_build
 
 cleanup success



View it on GitLab: https://salsa.debian.org/qa/jenkins.debian.net/-/commit/0031291696e02646f11565a509f8bada850e8b89

-- 
View it on GitLab: https://salsa.debian.org/qa/jenkins.debian.net/-/commit/0031291696e02646f11565a509f8bada850e8b89
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/20220124/29012c51/attachment-0001.htm>


More information about the Qa-jenkins-scm mailing list