summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorgroente <groente@puscii.nl>2018-11-27 16:19:28 +0000
committergroente <groente@puscii.nl>2018-11-27 16:19:28 +0000
commit057b1f97882e6b595f3b39c9adf6ccc59cf8ed4a (patch)
tree34db733b896990b3098e4cda2ff0ecb5b8384070
parentcf0dd8f926a0cd2e2bad8a02d62e18f3845b2a21 (diff)
various changes to adjust for usb images
-rwxr-xr-xfiles/jenkins/master/clean_old_jenkins_artifacts17
-rw-r--r--files/jenkins/master/deduplicate_reproducible_build_jobs_upstream_ISOs2
-rw-r--r--files/jenkins/master/manage_latest_iso_symlinks6
-rw-r--r--files/jenkins/slaves/isobuilders/compare_artifacts34
-rw-r--r--files/jenkins/slaves/isotesters/wrap_test_suite3
-rw-r--r--files/website/tails-website-last-month-stats2
-rw-r--r--templates/rsync/rsyncd.conf.erb4
7 files changed, 45 insertions, 23 deletions
diff --git a/files/jenkins/master/clean_old_jenkins_artifacts b/files/jenkins/master/clean_old_jenkins_artifacts
index 13317a8..6472258 100755
--- a/files/jenkins/master/clean_old_jenkins_artifacts
+++ b/files/jenkins/master/clean_old_jenkins_artifacts
@@ -28,15 +28,12 @@ require 'fileutils'
NOW = Time.now
TODAY = Time.local(NOW.year, NOW.month, NOW.day)
-EXTS = ["",
- ".apt-sources",
- ".binpkgs",
- ".buildlog",
- ".build-manifest",
- ".packages",
- ".shasum",
- ".shasum.asc",
- ".srcpkgs"]
+EXTS = [".apt-sources",
+ ".buildlog",
+ ".build-manifest",
+ ".img",
+ ".iso",
+ ".packages"]
BACKUPS = Hash[
"Today" => {
@@ -100,7 +97,7 @@ def find_all_isos(options)
# Use `**` in the regexp to avoid following symlinks in
# $topdir/builds/ and return each ISO twice.
Dir.glob("#{options[:topdir]}/builds/**/archive/build-artifacts/*.iso") do |iso_filename|
- isos << Hash[ 'filename' => iso_filename, 'mtime' => File.mtime(iso_filename) ]
+ isos << Hash[ 'filename' => iso_filename.gsub(/\.iso$/, ''), 'mtime' => File.mtime(iso_filename) ]
end
isos
end
diff --git a/files/jenkins/master/deduplicate_reproducible_build_jobs_upstream_ISOs b/files/jenkins/master/deduplicate_reproducible_build_jobs_upstream_ISOs
index 05954d5..3371560 100644
--- a/files/jenkins/master/deduplicate_reproducible_build_jobs_upstream_ISOs
+++ b/files/jenkins/master/deduplicate_reproducible_build_jobs_upstream_ISOs
@@ -29,7 +29,7 @@ for reproducible_build_job_dir in $(find "${JOBS_DIR}" \
if [ -d "${build_job_dir}" ]; then
for build_job_iso in \
$(find "${reproducible_build_job_dir}" \
- -path '*/archive/build-artifacts/1/*.iso'); do
+ -regextype egrep -regex '*/archive/build-artifacts/1/*.i(so|mg)'); do
# If the ISO file is not already a symlink
if [ ! -h "${build_job_iso}" ]; then
diff --git a/files/jenkins/master/manage_latest_iso_symlinks b/files/jenkins/master/manage_latest_iso_symlinks
index f132968..263f811 100644
--- a/files/jenkins/master/manage_latest_iso_symlinks
+++ b/files/jenkins/master/manage_latest_iso_symlinks
@@ -12,9 +12,9 @@ TOPDIR="$1"
for artifact_dir in ${TOPDIR}/build_Tails_ISO_*; do
if [ -d ${artifact_dir}/lastSuccessful/archive ]; then
if [ ! -h ${artifact_dir}/lastSuccessful/archive/latest.iso ]; then
- ISO=$(basename $(ls ${artifact_dir}/lastSuccessful/archive/build-artifacts/*.iso))
- for EXT in '' .apt-sources .binpkgs .srcpkgs .shasum .shasum.asc .packages .buildlog .build-manifest ; do
- ln -sf "build-artifacts/${ISO}${EXT}" "${artifact_dir}/lastSuccessful/archive/latest.iso${EXT}"
+ ISO=$(basename $(ls ${artifact_dir}/lastSuccessful/archive/build-artifacts/*.iso) .iso)
+ for EXT in .iso .img .apt-sources .packages .buildlog .build-manifest ; do
+ ln -sf "build-artifacts/${ISO}${EXT}" "${artifact_dir}/lastSuccessful/archive/latest${EXT}"
done
fi
fi
diff --git a/files/jenkins/slaves/isobuilders/compare_artifacts b/files/jenkins/slaves/isobuilders/compare_artifacts
index 884d45f..ddf3d41 100644
--- a/files/jenkins/slaves/isobuilders/compare_artifacts
+++ b/files/jenkins/slaves/isobuilders/compare_artifacts
@@ -14,12 +14,15 @@ ARTIFACTS_DIR="${WORKSPACE}/build-artifacts"
[ -d "${ARTIFACTS_DIR}"/1 ] || exit 6
[ -d "${ARTIFACTS_DIR}"/2 ] || exit 7
+exit_code=0
+
ISOS=$(echo "${ARTIFACTS_DIR}"/1/tails-*.iso "${ARTIFACTS_DIR}"/2/tails-*.iso)
+IMGS=$(echo "${ARTIFACTS_DIR}"/1/tails-*.img "${ARTIFACTS_DIR}"/2/tails-*.img)
echo "Running diffoscope"
if sudo TMPDIR="${WORKSPACE}" diffoscope \
- --text "${ARTIFACTS_DIR}/diffoscope.txt" \
- --html "${ARTIFACTS_DIR}/diffoscope.html" \
+ --text "${ARTIFACTS_DIR}/diffoscope.iso.txt" \
+ --html "${ARTIFACTS_DIR}/diffoscope.iso.html" \
--max-report-size 262144000 \
--max-diff-block-lines 10000 \
--max-diff-input-lines 10000000 \
@@ -28,9 +31,28 @@ if sudo TMPDIR="${WORKSPACE}" diffoscope \
else
exit_code="$?"
sudo chown -R jenkins:jenkins "${ARTIFACTS_DIR}"
- if [ -r "${ARTIFACTS_DIR}/diffoscope.txt" ] \
- && [ $((3 * 1024)) -ge $(stat --format='%s' "${ARTIFACTS_DIR}/diffoscope.txt") ]; then
- cat "${ARTIFACTS_DIR}/diffoscope.txt"
+ if [ -r "${ARTIFACTS_DIR}/diffoscope.iso.txt" ] \
+ && [ $((3 * 1024)) -ge $(stat --format='%s' "${ARTIFACTS_DIR}/diffoscope.iso.txt") ]; then
+ cat "${ARTIFACTS_DIR}/diffoscope.iso.txt"
+ fi
+fi
+
+echo "Running diffoscope"
+if sudo TMPDIR="${WORKSPACE}" diffoscope \
+ --text "${ARTIFACTS_DIR}/diffoscope.img.txt" \
+ --html "${ARTIFACTS_DIR}/diffoscope.img.html" \
+ --max-report-size 262144000 \
+ --max-diff-block-lines 10000 \
+ --max-diff-input-lines 10000000 \
+ $IMGS; then
+ sudo rm $IMGS
+else
+ exit_code=$(($exit_code + $?))
+ sudo chown -R jenkins:jenkins "${ARTIFACTS_DIR}"
+ if [ -r "${ARTIFACTS_DIR}/diffoscope.img.txt" ] \
+ && [ $((3 * 1024)) -ge $(stat --format='%s' "${ARTIFACTS_DIR}/diffoscope.img.txt") ]; then
+ cat "${ARTIFACTS_DIR}/diffoscope.img.txt"
fi
- exit $exit_code
fi
+
+exit $exit_code
diff --git a/files/jenkins/slaves/isotesters/wrap_test_suite b/files/jenkins/slaves/isotesters/wrap_test_suite
index b66392e..805b949 100644
--- a/files/jenkins/slaves/isotesters/wrap_test_suite
+++ b/files/jenkins/slaves/isotesters/wrap_test_suite
@@ -78,8 +78,11 @@ UPSTREAMJOB_ISO=$(ls tmp/tails-*.iso)
if [ "$USE_LAST_RELEASE_AS_OLD_ISO" = yes ]; then
LAST_RELEASE_VERSION=$(git show origin/master:debian/changelog | dpkg-parsechangelog -l- -S version)
PREVIOUS_ISO="tails-amd64-${LAST_RELEASE_VERSION}.iso"
+ PREVIOUS_IMG="tails-amd64-${LAST_RELEASE_VERSION}.img"
wget --no-verbose \
"${ISO_HISTORY_URL}/tails-amd64-${LAST_RELEASE_VERSION}/${PREVIOUS_ISO}"
+ wget --no-verbose \
+ "${ISO_HISTORY_URL}/tails-amd64-${LAST_RELEASE_VERSION}/${PREVIOUS_IMG}"
else
PREVIOUS_ISO="${UPSTREAMJOB_ISO}"
fi
diff --git a/files/website/tails-website-last-month-stats b/files/website/tails-website-last-month-stats
index eb00717..3e47dc8 100644
--- a/files/website/tails-website-last-month-stats
+++ b/files/website/tails-website-last-month-stats
@@ -33,6 +33,6 @@ zgrep -E \
echo -n "Downloads of the OpenPGP signature in $LAST_MONTH: "
zgrep -E \
- "/${LAST_MONTH_ABBR}/.*\"GET /torrents/files/tails-[-a-z0-9~.]\+\.iso\.sig .* 200 [0-9]\+" \
+ "/${LAST_MONTH_ABBR}/.*\"GET /torrents/files/tails-[-a-z0-9~.]\+\.i(so|mg)\.sig .* 200 [0-9]\+" \
$LOG_FILES \
| wc -l
diff --git a/templates/rsync/rsyncd.conf.erb b/templates/rsync/rsyncd.conf.erb
index dd44a78..67edf4a 100644
--- a/templates/rsync/rsyncd.conf.erb
+++ b/templates/rsync/rsyncd.conf.erb
@@ -13,7 +13,7 @@ list = no
strict modes = yes
ignore nonreadable = yes
transfer logging = no
-dont compress = *.iso *.iuk
+dont compress = *.iso *.iuk *.img
refuse options = checksum dry-run
# XXX: remove once rsync.torproject.org does not pull from here anymore (#15162)
@@ -29,5 +29,5 @@ list = no
strict modes = yes
ignore nonreadable = yes
transfer logging = no
-dont compress = *.iso *.iuk
+dont compress = *.iso *.iuk *.img
refuse options = checksum dry-run