From 1e0339a4e36f85f468ecbdc21c645541f51e5e56 Mon Sep 17 00:00:00 2001 From: Lyndon Brown Date: Wed, 11 Mar 2020 18:43:12 +0000 Subject: remove obsolete loop-aes-utils related losetup hack 677415f6d7efc1e5b888570d70af311d2900c69c (2007) in v1.0~a2-1 added a hack relating to the loop-aes-utils package and losetup. this commit bundled a bunch of changes, it was not specific to the hack, and so info about the hack is limited to a brief comment included within the related change in defaults: ``` # Workaround for loop-aes-utils divertion # (loop-aes-utils' losetup lacks features). ``` though it is very similar to the removed fdisk hack in that it seems that one package may replace a binary from another, moving the original to a new location, and this hack gives the user the opportunity to select the original instead of the one put in its place, for use in LB. the comment mentions a package called loop-aes-utils as being the package that performs such a diversion, and that the need for the hack was that losetup itself lacked features, presumably encryption support, and it is clear that it is the losetup binary that is the focus of the diversion. looking into the history of loop-aes-utils a little, this package was dropped from debian back in 2012 (#680748), favouring encrytion support of dm-crypt/cryptsetup. double checking file contents of packages, only the mount package carries an /sbin/losetup file, so presumably this means that dm-setup/cryptsetup do not perform such a diversion of losetup (i.e. their use is exclusively done directly). since the possible diversion is simply gone, that completely removes any point in having the hack of giving users choice between losetup and the diverted one. so let's remove this obsolete hack... --- scripts/build/binary_hdd | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'scripts/build/binary_hdd') diff --git a/scripts/build/binary_hdd b/scripts/build/binary_hdd index 23cc4f0e2..a4ef83170 100755 --- a/scripts/build/binary_hdd +++ b/scripts/build/binary_hdd @@ -54,6 +54,7 @@ esac Check_package chroot /usr/share/doc/mtools mtools Check_package chroot /sbin/parted parted Check_package host /sbin/fdisk fdisk +Check_package host /sbin/losetup mount echo "${LB_BOOTLOADERS}" | \ while IFS="," read -r BOOTLOADER @@ -145,7 +146,7 @@ else fi dd if=/dev/zero of=chroot/binary.img bs=1024k count=0 seek=${REAL_DIM} -FREELO="$(${LB_LOSETUP} -f)" +FREELO="$(losetup -f)" MAKEDEV=false if [ ! -b chroot/${FREELO} ] then @@ -223,7 +224,7 @@ esac Lodetach ${FREELO} -FREELO="$(${LB_LOSETUP} -f)" +FREELO="$(losetup -f)" Losetup $FREELO chroot/binary.img 1 case "${LB_BINARY_FILESYSTEM}" in -- cgit v1.2.3