From ede4b49a190f999f51fe570a7e9b4da1ac355d12 Mon Sep 17 00:00:00 2001 From: Hook25 Date: Fri, 12 Jan 2024 12:15:29 +0100 Subject: [PATCH 1/2] Add new workaround part to snapcraft.yaml --- checkbox-snap/series_classic16/snap/snapcraft.yaml | 7 +++++++ checkbox-snap/series_classic18/snap/snapcraft.yaml | 7 +++++++ checkbox-snap/series_classic20/snap/snapcraft.yaml | 7 +++++++ checkbox-snap/series_classic22/snap/snapcraft.yaml | 7 +++++++ checkbox-snap/series_uc16/snap/snapcraft.yaml | 7 +++++++ checkbox-snap/series_uc18/snap/snapcraft.yaml | 7 +++++++ checkbox-snap/series_uc20/snap/snapcraft.yaml | 7 +++++++ checkbox-snap/series_uc22/snap/snapcraft.yaml | 7 +++++++ 8 files changed, 56 insertions(+) diff --git a/checkbox-snap/series_classic16/snap/snapcraft.yaml b/checkbox-snap/series_classic16/snap/snapcraft.yaml index f666937c9c..5a8752a545 100644 --- a/checkbox-snap/series_classic16/snap/snapcraft.yaml +++ b/checkbox-snap/series_classic16/snap/snapcraft.yaml @@ -60,3 +60,10 @@ parts: plugin: dump source: . stage: [config_vars] + workaround-automated-review-issue: + plugin: nil + override-build: | + # This is a workaround for an upstream bug in the automated snap review tool + # remove this once this issue is resolved: + # https://bugs.launchpad.net/review-tools/+bug/2049093 + dd if=/dev/urandom of=$SNAPCRAFT_PART_INSTALL/size_workaround bs=16k count=1 diff --git a/checkbox-snap/series_classic18/snap/snapcraft.yaml b/checkbox-snap/series_classic18/snap/snapcraft.yaml index 921cf398ee..99cb60826f 100644 --- a/checkbox-snap/series_classic18/snap/snapcraft.yaml +++ b/checkbox-snap/series_classic18/snap/snapcraft.yaml @@ -63,3 +63,10 @@ parts: plugin: dump source: . stage: [config_vars] + workaround-automated-review-issue: + plugin: nil + override-build: | + # This is a workaround for an upstream bug in the automated snap review tool + # remove this once this issue is resolved: + # https://bugs.launchpad.net/review-tools/+bug/2049093 + dd if=/dev/urandom of=$SNAPCRAFT_PART_INSTALL/size_workaround bs=16k count=1 diff --git a/checkbox-snap/series_classic20/snap/snapcraft.yaml b/checkbox-snap/series_classic20/snap/snapcraft.yaml index 7dfd8940d7..95ece77ecf 100644 --- a/checkbox-snap/series_classic20/snap/snapcraft.yaml +++ b/checkbox-snap/series_classic20/snap/snapcraft.yaml @@ -63,3 +63,10 @@ parts: plugin: dump source: . stage: [config_vars] + workaround-automated-review-issue: + plugin: nil + override-build: | + # This is a workaround for an upstream bug in the automated snap review tool + # remove this once this issue is resolved: + # https://bugs.launchpad.net/review-tools/+bug/2049093 + dd if=/dev/urandom of=$SNAPCRAFT_PART_INSTALL/size_workaround bs=16k count=1 diff --git a/checkbox-snap/series_classic22/snap/snapcraft.yaml b/checkbox-snap/series_classic22/snap/snapcraft.yaml index 004859af2e..4309868629 100644 --- a/checkbox-snap/series_classic22/snap/snapcraft.yaml +++ b/checkbox-snap/series_classic22/snap/snapcraft.yaml @@ -65,3 +65,10 @@ parts: source: . build-attributes: [no-patchelf] stage: [config_vars] + workaround-automated-review-issue: + plugin: nil + override-build: | + # This is a workaround for an upstream bug in the automated snap review tool + # remove this once this issue is resolved: + # https://bugs.launchpad.net/review-tools/+bug/2049093 + dd if=/dev/urandom of=$SNAPCRAFT_PART_INSTALL/size_workaround bs=16k count=1 diff --git a/checkbox-snap/series_uc16/snap/snapcraft.yaml b/checkbox-snap/series_uc16/snap/snapcraft.yaml index b6b78d5b7c..11769c4135 100644 --- a/checkbox-snap/series_uc16/snap/snapcraft.yaml +++ b/checkbox-snap/series_uc16/snap/snapcraft.yaml @@ -106,3 +106,10 @@ parts: plugin: dump source: . stage: [config_vars] + workaround-automated-review-issue: + plugin: nil + override-build: | + # This is a workaround for an upstream bug in the automated snap review tool + # remove this once this issue is resolved: + # https://bugs.launchpad.net/review-tools/+bug/2049093 + dd if=/dev/urandom of=$SNAPCRAFT_PART_INSTALL/size_workaround bs=16k count=1 diff --git a/checkbox-snap/series_uc18/snap/snapcraft.yaml b/checkbox-snap/series_uc18/snap/snapcraft.yaml index 25de42c1ea..51acfa2ce4 100644 --- a/checkbox-snap/series_uc18/snap/snapcraft.yaml +++ b/checkbox-snap/series_uc18/snap/snapcraft.yaml @@ -110,3 +110,10 @@ parts: plugin: dump source: . stage: [config_vars] + workaround-automated-review-issue: + plugin: nil + override-build: | + # This is a workaround for an upstream bug in the automated snap review tool + # remove this once this issue is resolved: + # https://bugs.launchpad.net/review-tools/+bug/2049093 + dd if=/dev/urandom of=$SNAPCRAFT_PART_INSTALL/size_workaround bs=16k count=1 diff --git a/checkbox-snap/series_uc20/snap/snapcraft.yaml b/checkbox-snap/series_uc20/snap/snapcraft.yaml index 2f9d2671bd..044ca1a46c 100644 --- a/checkbox-snap/series_uc20/snap/snapcraft.yaml +++ b/checkbox-snap/series_uc20/snap/snapcraft.yaml @@ -110,3 +110,10 @@ parts: plugin: dump source: . stage: [config_vars] + workaround-automated-review-issue: + plugin: nil + override-build: | + # This is a workaround for an upstream bug in the automated snap review tool + # remove this once this issue is resolved: + # https://bugs.launchpad.net/review-tools/+bug/2049093 + dd if=/dev/urandom of=$SNAPCRAFT_PART_INSTALL/size_workaround bs=16k count=1 diff --git a/checkbox-snap/series_uc22/snap/snapcraft.yaml b/checkbox-snap/series_uc22/snap/snapcraft.yaml index 111dd06148..126e8e0937 100644 --- a/checkbox-snap/series_uc22/snap/snapcraft.yaml +++ b/checkbox-snap/series_uc22/snap/snapcraft.yaml @@ -112,3 +112,10 @@ parts: source: . build-attributes: [no-patchelf] stage: [config_vars] + workaround-automated-review-issue: + plugin: nil + override-build: | + # This is a workaround for an upstream bug in the automated snap review tool + # remove this once this issue is resolved: + # https://bugs.launchpad.net/review-tools/+bug/2049093 + dd if=/dev/urandom of=$SNAPCRAFT_PART_INSTALL/size_workaround bs=16k count=1 From 42cf7b0ead156e618d5397deaa2f318a4856d9a0 Mon Sep 17 00:00:00 2001 From: Hook25 Date: Fri, 12 Jan 2024 14:59:02 +0100 Subject: [PATCH 2/2] Added header to file and updated comment --- checkbox-snap/series_classic16/snap/snapcraft.yaml | 8 +++++++- checkbox-snap/series_classic18/snap/snapcraft.yaml | 8 +++++++- checkbox-snap/series_classic20/snap/snapcraft.yaml | 8 +++++++- checkbox-snap/series_classic22/snap/snapcraft.yaml | 8 +++++++- checkbox-snap/series_uc16/snap/snapcraft.yaml | 8 +++++++- checkbox-snap/series_uc18/snap/snapcraft.yaml | 8 +++++++- checkbox-snap/series_uc20/snap/snapcraft.yaml | 8 +++++++- checkbox-snap/series_uc22/snap/snapcraft.yaml | 8 +++++++- 8 files changed, 56 insertions(+), 8 deletions(-) diff --git a/checkbox-snap/series_classic16/snap/snapcraft.yaml b/checkbox-snap/series_classic16/snap/snapcraft.yaml index 5a8752a545..afb2eb25de 100644 --- a/checkbox-snap/series_classic16/snap/snapcraft.yaml +++ b/checkbox-snap/series_classic16/snap/snapcraft.yaml @@ -66,4 +66,10 @@ parts: # This is a workaround for an upstream bug in the automated snap review tool # remove this once this issue is resolved: # https://bugs.launchpad.net/review-tools/+bug/2049093 - dd if=/dev/urandom of=$SNAPCRAFT_PART_INSTALL/size_workaround bs=16k count=1 + # Note: this cats /dev/urandom because the squashfs will collapse any + # predictable output to less than the desired size making this + # ineffective + echo "This file is a workaround for a bug in the automated snap review tool" > $SNAPCRAFT_PART_INSTALL/size_workaround + echo "this only contains random bytes to pad the snap to 16kb" >> $SNAPCRAFT_PART_INSTALL/size_workaround + echo "see: https://bugs.launchpad.net/review-tools/+bug/2049093" >> $SNAPCRAFT_PART_INSTALL/size_workaround + cat /dev/urandom | head -c 16384 >> $SNAPCRAFT_PART_INSTALL/size_workaround diff --git a/checkbox-snap/series_classic18/snap/snapcraft.yaml b/checkbox-snap/series_classic18/snap/snapcraft.yaml index 99cb60826f..95f2fd278c 100644 --- a/checkbox-snap/series_classic18/snap/snapcraft.yaml +++ b/checkbox-snap/series_classic18/snap/snapcraft.yaml @@ -69,4 +69,10 @@ parts: # This is a workaround for an upstream bug in the automated snap review tool # remove this once this issue is resolved: # https://bugs.launchpad.net/review-tools/+bug/2049093 - dd if=/dev/urandom of=$SNAPCRAFT_PART_INSTALL/size_workaround bs=16k count=1 + # Note: this cats /dev/urandom because the squashfs will collapse any + # predictable output to less than the desired size making this + # ineffective + echo "This file is a workaround for a bug in the automated snap review tool" > $SNAPCRAFT_PART_INSTALL/size_workaround + echo "this only contains random bytes to pad the snap to 16kb" >> $SNAPCRAFT_PART_INSTALL/size_workaround + echo "see: https://bugs.launchpad.net/review-tools/+bug/2049093" >> $SNAPCRAFT_PART_INSTALL/size_workaround + cat /dev/urandom | head -c 16384 >> $SNAPCRAFT_PART_INSTALL/size_workaround diff --git a/checkbox-snap/series_classic20/snap/snapcraft.yaml b/checkbox-snap/series_classic20/snap/snapcraft.yaml index 95ece77ecf..52640b24e9 100644 --- a/checkbox-snap/series_classic20/snap/snapcraft.yaml +++ b/checkbox-snap/series_classic20/snap/snapcraft.yaml @@ -69,4 +69,10 @@ parts: # This is a workaround for an upstream bug in the automated snap review tool # remove this once this issue is resolved: # https://bugs.launchpad.net/review-tools/+bug/2049093 - dd if=/dev/urandom of=$SNAPCRAFT_PART_INSTALL/size_workaround bs=16k count=1 + # Note: this cats /dev/urandom because the squashfs will collapse any + # predictable output to less than the desired size making this + # ineffective + echo "This file is a workaround for a bug in the automated snap review tool" > $SNAPCRAFT_PART_INSTALL/size_workaround + echo "this only contains random bytes to pad the snap to 16kb" >> $SNAPCRAFT_PART_INSTALL/size_workaround + echo "see: https://bugs.launchpad.net/review-tools/+bug/2049093" >> $SNAPCRAFT_PART_INSTALL/size_workaround + cat /dev/urandom | head -c 16384 >> $SNAPCRAFT_PART_INSTALL/size_workaround diff --git a/checkbox-snap/series_classic22/snap/snapcraft.yaml b/checkbox-snap/series_classic22/snap/snapcraft.yaml index 4309868629..06ae33b485 100644 --- a/checkbox-snap/series_classic22/snap/snapcraft.yaml +++ b/checkbox-snap/series_classic22/snap/snapcraft.yaml @@ -71,4 +71,10 @@ parts: # This is a workaround for an upstream bug in the automated snap review tool # remove this once this issue is resolved: # https://bugs.launchpad.net/review-tools/+bug/2049093 - dd if=/dev/urandom of=$SNAPCRAFT_PART_INSTALL/size_workaround bs=16k count=1 + # Note: this cats /dev/urandom because the squashfs will collapse any + # predictable output to less than the desired size making this + # ineffective + echo "This file is a workaround for a bug in the automated snap review tool" > $SNAPCRAFT_PART_INSTALL/size_workaround + echo "this only contains random bytes to pad the snap to 16kb" >> $SNAPCRAFT_PART_INSTALL/size_workaround + echo "see: https://bugs.launchpad.net/review-tools/+bug/2049093" >> $SNAPCRAFT_PART_INSTALL/size_workaround + cat /dev/urandom | head -c 16384 >> $SNAPCRAFT_PART_INSTALL/size_workaround diff --git a/checkbox-snap/series_uc16/snap/snapcraft.yaml b/checkbox-snap/series_uc16/snap/snapcraft.yaml index 11769c4135..4b933a4052 100644 --- a/checkbox-snap/series_uc16/snap/snapcraft.yaml +++ b/checkbox-snap/series_uc16/snap/snapcraft.yaml @@ -112,4 +112,10 @@ parts: # This is a workaround for an upstream bug in the automated snap review tool # remove this once this issue is resolved: # https://bugs.launchpad.net/review-tools/+bug/2049093 - dd if=/dev/urandom of=$SNAPCRAFT_PART_INSTALL/size_workaround bs=16k count=1 + # Note: this cats /dev/urandom because the squashfs will collapse any + # predictable output to less than the desired size making this + # ineffective + echo "This file is a workaround for a bug in the automated snap review tool" > $SNAPCRAFT_PART_INSTALL/size_workaround + echo "this only contains random bytes to pad the snap to 16kb" >> $SNAPCRAFT_PART_INSTALL/size_workaround + echo "see: https://bugs.launchpad.net/review-tools/+bug/2049093" >> $SNAPCRAFT_PART_INSTALL/size_workaround + cat /dev/urandom | head -c 16384 >> $SNAPCRAFT_PART_INSTALL/size_workaround diff --git a/checkbox-snap/series_uc18/snap/snapcraft.yaml b/checkbox-snap/series_uc18/snap/snapcraft.yaml index 51acfa2ce4..5177878bd5 100644 --- a/checkbox-snap/series_uc18/snap/snapcraft.yaml +++ b/checkbox-snap/series_uc18/snap/snapcraft.yaml @@ -116,4 +116,10 @@ parts: # This is a workaround for an upstream bug in the automated snap review tool # remove this once this issue is resolved: # https://bugs.launchpad.net/review-tools/+bug/2049093 - dd if=/dev/urandom of=$SNAPCRAFT_PART_INSTALL/size_workaround bs=16k count=1 + # Note: this cats /dev/urandom because the squashfs will collapse any + # predictable output to less than the desired size making this + # ineffective + echo "This file is a workaround for a bug in the automated snap review tool" > $SNAPCRAFT_PART_INSTALL/size_workaround + echo "this only contains random bytes to pad the snap to 16kb" >> $SNAPCRAFT_PART_INSTALL/size_workaround + echo "see: https://bugs.launchpad.net/review-tools/+bug/2049093" >> $SNAPCRAFT_PART_INSTALL/size_workaround + cat /dev/urandom | head -c 16384 >> $SNAPCRAFT_PART_INSTALL/size_workaround diff --git a/checkbox-snap/series_uc20/snap/snapcraft.yaml b/checkbox-snap/series_uc20/snap/snapcraft.yaml index 044ca1a46c..194b6be7b7 100644 --- a/checkbox-snap/series_uc20/snap/snapcraft.yaml +++ b/checkbox-snap/series_uc20/snap/snapcraft.yaml @@ -116,4 +116,10 @@ parts: # This is a workaround for an upstream bug in the automated snap review tool # remove this once this issue is resolved: # https://bugs.launchpad.net/review-tools/+bug/2049093 - dd if=/dev/urandom of=$SNAPCRAFT_PART_INSTALL/size_workaround bs=16k count=1 + # Note: this cats /dev/urandom because the squashfs will collapse any + # predictable output to less than the desired size making this + # ineffective + echo "This file is a workaround for a bug in the automated snap review tool" > $SNAPCRAFT_PART_INSTALL/size_workaround + echo "this only contains random bytes to pad the snap to 16kb" >> $SNAPCRAFT_PART_INSTALL/size_workaround + echo "see: https://bugs.launchpad.net/review-tools/+bug/2049093" >> $SNAPCRAFT_PART_INSTALL/size_workaround + cat /dev/urandom | head -c 16384 >> $SNAPCRAFT_PART_INSTALL/size_workaround diff --git a/checkbox-snap/series_uc22/snap/snapcraft.yaml b/checkbox-snap/series_uc22/snap/snapcraft.yaml index 126e8e0937..432d20e275 100644 --- a/checkbox-snap/series_uc22/snap/snapcraft.yaml +++ b/checkbox-snap/series_uc22/snap/snapcraft.yaml @@ -118,4 +118,10 @@ parts: # This is a workaround for an upstream bug in the automated snap review tool # remove this once this issue is resolved: # https://bugs.launchpad.net/review-tools/+bug/2049093 - dd if=/dev/urandom of=$SNAPCRAFT_PART_INSTALL/size_workaround bs=16k count=1 + # Note: this cats /dev/urandom because the squashfs will collapse any + # predictable output to less than the desired size making this + # ineffective + echo "This file is a workaround for a bug in the automated snap review tool" > $SNAPCRAFT_PART_INSTALL/size_workaround + echo "this only contains random bytes to pad the snap to 16kb" >> $SNAPCRAFT_PART_INSTALL/size_workaround + echo "see: https://bugs.launchpad.net/review-tools/+bug/2049093" >> $SNAPCRAFT_PART_INSTALL/size_workaround + cat /dev/urandom | head -c 16384 >> $SNAPCRAFT_PART_INSTALL/size_workaround