diff options
author | Tails developers <amnesia@boum.org> | 2014-06-24 13:52:06 +0000 |
---|---|---|
committer | Tails developers <amnesia@boum.org> | 2014-06-25 07:23:54 +0000 |
commit | 66f1d5bb46ac6969d6984acc0adb038603a8772c (patch) | |
tree | 6b2a523e2b0991ec6cdc52751e14c20e0a1d4753 /config/binary_local-hooks | |
parent | 12c0cd7cc9f73fe2a82cf2006ed992bd1a860766 (diff) |
Include syslinux.exe for win32 in utils/win32/ on the ISO filesystem.
The APT config mangling is made in the chroot, as that's where all keys
corresponding to the configured APT repos can be found, and the APT pinning has
been setup. Note that, when this hook runs, the SquashFS has been generated
already, so modifying the content of the chroot at this point should not affect
the resulting ISO much.
Diffstat (limited to 'config/binary_local-hooks')
-rwxr-xr-x | config/binary_local-hooks/40-include_syslinux_in_ISO_filesystem | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/config/binary_local-hooks/40-include_syslinux_in_ISO_filesystem b/config/binary_local-hooks/40-include_syslinux_in_ISO_filesystem index fba22bc..276ea0e 100755 --- a/config/binary_local-hooks/40-include_syslinux_in_ISO_filesystem +++ b/config/binary_local-hooks/40-include_syslinux_in_ISO_filesystem @@ -23,11 +23,31 @@ Echo_message 'including syslinux in the ISO filesystem' # Variables LINUX_BINARY_UTILS_DIR='binary/utils/linux' +WIN32_BINARY_UTILS_DIR='binary/utils/win32' BINARY_MBR_DIR='binary/utils/mbr' CHROOT_SYSLINUX_BIN='chroot/usr/bin/syslinux' CHROOT_SYSLINUX_MBR='chroot/usr/lib/SYSLINUX/gptmbr.bin' +CHROOT_TEMP_APT_SOURCES='chroot/etc/apt/sources.list.d/tmp-deb-src.list' + +# Functions + +syslinux_deb_version_in_chroot () { + chroot chroot dpkg-query -W -f='${Version}\n' syslinux +} # Main -mkdir -p "$LINUX_BINARY_UTILS_DIR" "$BINARY_MBR_DIR" +mkdir -p "$LINUX_BINARY_UTILS_DIR" "$WIN32_BINARY_UTILS_DIR" "$BINARY_MBR_DIR" cp "$CHROOT_SYSLINUX_BIN" "$LINUX_BINARY_UTILS_DIR/" cp "$CHROOT_SYSLINUX_MBR" "$BINARY_MBR_DIR/mbr.bin" + +cat chroot/etc/apt/sources.list chroot/etc/apt/sources.list.d/*.list \ + | sed --regexp-extended -e 's,^deb(\s+),deb-src\1,' \ + > "$CHROOT_TEMP_APT_SOURCES" +Chroot chroot apt-get --yes update +Chroot chroot apt-get --yes install dpkg-dev +Chroot chroot apt-get source syslinux="$(syslinux_deb_version_in_chroot)" +cp chroot/syslinux-*/bios/win32/syslinux.exe "$WIN32_BINARY_UTILS_DIR/" +rm -r chroot/syslinux* +rm "$CHROOT_TEMP_APT_SOURCES" +Chroot chroot apt-get --yes update +Chroot chroot apt-get --yes purge dpkg-dev make # dpkg-dev depends on make |