summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCyril Brulebois <ckb@riseup.net>2020-03-04 00:58:22 +0000
committerCyril Brulebois <ckb@riseup.net>2020-03-08 04:37:46 +0100
commit060605c0778a1ff688747737cdad1408ace75c81 (patch)
tree0b7a27663a59f496eb5731ad768bc62893295603
parent4357e91856344a17c9ceeeec1447413790087ed4 (diff)
Add support for tails-workarounds (refs: #17323).
Make tails-workarounds directory available inside the chroot, so that its content can be used by any chroot local hooks. Chroot local includes seem to be the usual way to transfer things from the Tails checkout to the chroot environment; explicitly cleaning up /tmp afterwards doesn't seem to be needed.
-rw-r--r--.gitignore3
-rwxr-xr-xauto/build8
-rwxr-xr-xauto/clean3
3 files changed, 14 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore
index 3f91291..d290e8a 100644
--- a/.gitignore
+++ b/.gitignore
@@ -66,3 +66,6 @@
# The test suite's local configuration files
/features/config/local.yml
/features/config/*.d/
+
+# workarounds
+/config/chroot_local-includes/tmp/tails-workarounds
diff --git a/auto/build b/auto/build
index 83117aa..ed0fa95 100755
--- a/auto/build
+++ b/auto/build
@@ -146,6 +146,14 @@ BUILD_USB_IMAGE_FILENAME="${BUILD_BASENAME}.img"
cat config/chroot_sources/*.chroot
) > "$BUILD_APT_SOURCES"
+# make workarounds available in the chroot, if any:
+WORKAROUNDS_SRC="submodules/tails-workarounds"
+WORKAROUNDS_DST="config/chroot_local-includes/tmp/"
+if [ -d "$WORKAROUNDS_SRC" ]; then
+ mkdir -p "$WORKAROUNDS_DST"
+ cp -a "$WORKAROUNDS_SRC" "$WORKAROUNDS_DST"
+fi
+
echo "I: Building ISO image ${BUILD_ISO_FILENAME}..."
time lb build noauto ${@}
[ -e binary.iso ] || fatal "lb build failed ($?)."
diff --git a/auto/clean b/auto/clean
index 55607bd..c93b7ed 100755
--- a/auto/clean
+++ b/auto/clean
@@ -38,3 +38,6 @@ rm -f config/chroot_local-includes/usr/share/tails/build/variables
# static wiki
rm -rf config/chroot_local-includes/usr/share/doc/tails/website wiki/src/.ikiwiki
find wiki/src -name *.pot -exec rm {} \;
+
+# workarounds
+rm -rf config/chroot_local-includes/tmp/tails-workarounds