7 VERSIONS
="2.0~testoverlayfs 2.2~testoverlayfs 2.3~testoverlayfs"
8 export SOURCE_DATE_EPOCH
=$
(date --utc '+%s')
10 [ -d "$TAILS_CHECKOUT" ] ||
exit 2
14 for version
in $VERSIONS; do
15 ISO_SRC
="$WORKDIR/$version"/iso_src
16 for dir
in EFI
/BOOT isolinux live utils
/linux utils
/mbr
; do
17 mkdir
-p "$ISO_SRC/$dir"
19 SQUASHFS_SRC
="$WORKDIR/$version"/squashfs_src
20 mkdir
-p "$SQUASHFS_SRC"
21 mkdir
-p "$SQUASHFS_SRC"/etc
/amnesia
"$SQUASHFS_SRC"/usr
/share
23 cp -a /usr
/share
/common-licenses
"$SQUASHFS_SRC"/usr
/share
/
24 mkdir
-p "$SQUASHFS_SRC"/usr
/share
/doc
25 if [ "$version" = '2.0~testoverlayfs' ]; then
26 mkdir
-p "$SQUASHFS_SRC"/usr
/share
/doc
/tor
27 echo "Some content" > "$SQUASHFS_SRC"/usr
/share
/doc
/tor
/README.Debian
29 if [ "$version" != '2.0~testoverlayfs' ]; then
30 echo "Some content" > "$SQUASHFS_SRC"/some_new_file
31 rm "$SQUASHFS_SRC"/usr
/share
/common-licenses
/BSD
33 if [ "$version" = '2.3~testoverlayfs' ]; then
34 echo "Some content 2.3" > "$SQUASHFS_SRC"/some_new_file_2.3
35 rm "$SQUASHFS_SRC"/usr
/share
/common-licenses
/MPL-1.1
37 cat > "$SQUASHFS_SRC"/etc
/amnesia
/version
<<EOF
39 ffffffffffffffffffffffffffffffffffffffff
40 live-build: 3.0.5+really+is+2.0.12-0.tails2
44 cat > "$SQUASHFS_SRC"/etc
/os-release
<<EOF
45 TAILS_PRODUCT_NAME="Tails"
46 TAILS_VERSION_ID="$version"
50 "$ISO_SRC"/live
/filesystem.squashfs \
51 -no-progress -noappend -comp xz
-Xbcj x86
-b 1024K
-Xdict-size 1024K \
54 echo vmlinuz
> "$ISO_SRC"/live
/vmlinuz
55 echo initrd
> "$ISO_SRC"/live
/initrd.img
56 echo isolinux
> "$ISO_SRC"/isolinux
/isolinux.cfg
57 echo 'filesystem.squashfs' > "$ISO_SRC"/live
/Tails.module
58 cp /usr
/lib
/syslinux
/mbr
/gptmbr.bin
"$ISO_SRC"/utils
/mbr
/mbr.bin
59 if [ "$version" = '2.0~testoverlayfs' ]; then
60 cp /usr
/bin
/syslinux
"$ISO_SRC"/utils
/linux
62 if [ "$version" = '2.3~testoverlayfs' ]; then
63 rm "$ISO_SRC"/utils
/mbr
/mbr.bin
66 -as mkisofs
-R -r -J -joliet-long -l -cache-inodes -iso-level 3 \
67 --modification-date=2019112316114600 \
68 -o "$WORKDIR/$version.iso" "$ISO_SRC"
71 for dest_version
in 2.2~testoverlayfs
2.3~testoverlayfs
; do
72 echo "Generating IUK file from 2.0~testoverlayfs to $dest_version"
74 "SOURCE_DATE_EPOCH=$SOURCE_DATE_EPOCH \
76 TMPDIR=\"${TMPDIR:-/tmp}\" \
77 PERL5LIB=\"${TAILS_CHECKOUT:?}/config/chroot_local-includes/usr/src/perl5lib/lib\" \
78 ${TAILS_CHECKOUT:?}/config/chroot_local-includes/usr/src/iuk/bin/tails-create-iuk \
79 --squashfs_diff_name \"${dest_version}.squashfs\" \
80 --old_iso \"$WORKDIR/2.0~testoverlayfs.iso\" \
81 --new_iso \"$WORKDIR/${dest_version}.iso\" \
82 --outfile \"$WORKDIR/Tails_amd64_2.0~testoverlayfs_to_${dest_version}.iuk\""
85 echo "Generated test IUKS:"
86 ls -lh "$WORKDIR"/*.iuk