summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoranonym <anonym@riseup.net>2019-05-28 09:53:11 +0200
committeranonym <anonym@riseup.net>2019-05-28 09:53:11 +0200
commit1bffb90c2f9d41c6ed66e459e0faa4dd2a8e1b0f (patch)
treeb8523e66bc06eb85045c0581d033b4ddfdb34a96
parent45a56752ff93193687baa0c28faebb0ed7686f0b (diff)
parentc9bd2f2917a0e8195b7ce0a7c99f23308fabde17 (diff)
Merge remote-tracking branch 'origin/bugfix/16748-use-syslinux-from-chroot' into stable
Fix-committed: #16748
-rwxr-xr-xauto/scripts/create-usb-image-from-iso12
1 files changed, 8 insertions, 4 deletions
diff --git a/auto/scripts/create-usb-image-from-iso b/auto/scripts/create-usb-image-from-iso
index 7005571..ebc78bf 100755
--- a/auto/scripts/create-usb-image-from-iso
+++ b/auto/scripts/create-usb-image-from-iso
@@ -39,8 +39,12 @@ GET_UDISKS_OBJECT_TIMEOUT = 2
# the partition table, reserved sectors, and filesystem metadata.
SYSTEM_PARTITION_ADDITIONAL_SIZE = 10
-SYSLINUX_COM32MODULES_DIR = '/usr/lib/syslinux/modules/bios'
-
+# We use the syslinux from the chroot here, because it's the same one
+# that will be available to Tails Installer in the running Tails. Using
+# the same syslinux version here and in Tails Installer is important to
+# prevent issues when upgrading a Tails device via Tails Installer.
+CHROOT_SYSLINUX_COM32MODULES_DIR = 'chroot/usr/lib/syslinux/modules/bios'
+CHROOT_SYSLINUX_BIN='chroot/usr/bin/syslinux'
class ImageCreationError(Exception):
pass
@@ -252,7 +256,7 @@ class ImageCreator(object):
com32modules = [f for f in os.listdir(syslinux_dir) if f.endswith('.c32')]
for module in sorted(com32modules):
- src_path = os.path.join(SYSLINUX_COM32MODULES_DIR, module)
+ src_path = os.path.join(CHROOT_SYSLINUX_COM32MODULES_DIR, module)
if not os.path.isfile(src_path):
raise ImageCreationError("Could not find the '%s' COM32 module" % module)
@@ -269,7 +273,7 @@ class ImageCreator(object):
# device would cause this issue:
# https://bugs.chromium.org/p/chromium/issues/detail?id=508713#c8
execute([
- 'syslinux',
+ CHROOT_SYSLINUX_BIN,
'--offset', str(self.partition.props.partition.props.offset),
'--directory', '/syslinux/',
'--install', self.image