From e015b8cbe957a1913f178dc5e4ba166972f79320 Mon Sep 17 00:00:00 2001 From: Gordon GECOS Date: Wed, 22 Nov 2023 16:07:32 -0500 Subject: build system cleanup --- initramfs-tools/hooks/samizdat | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) (limited to 'initramfs-tools') diff --git a/initramfs-tools/hooks/samizdat b/initramfs-tools/hooks/samizdat index 1d4c1fe..fb424e6 100755 --- a/initramfs-tools/hooks/samizdat +++ b/initramfs-tools/hooks/samizdat @@ -1,21 +1,20 @@ #!/bin/sh [ "$1" = prereqs ] && { echo; exit; } - . /usr/share/initramfs-tools/hook-functions +OUR_BINPATH=/usr/local/lib/samizdat/initrd/bin + +# This insanity is necessary for initramfs-tools. +# TODO: File bug against initramfs-tools. +PATH=$OUR_BINPATH:$PATH + die() { printf 'Error: generating initramfs: %s\n' "$*" >&2; exit 1; } CopyExec() { copy_exec "$@" || die "failed to copy_exec $*"; } CopyExecE() { [ "$2" ] || die "cannot find binary to copy: $1"; shift; CopyExec "$@"; } -SAMIZDAT_INITRD_PATH=/usr/local/lib/samizdat-rhizome/initrd - -PATH=${SAMIZDAT_INITRD_PATH}:/usr/local/bin:$PATH - -repo_execs=$(echo "${SAMIZDAT_INITRD_PATH}"/*) - path_execs=' - mountpoint openvt rsync gpg2 pinentry-curses truncate dmsetup + mountpoint openvt rsync truncate dmsetup dmstats cryptsetup mkfs.btrfs btrfs fsck.hfsplus wait_for_files dynmenu parted fallocate strace btrfstune sfdisk ' @@ -23,15 +22,15 @@ path_execs=' graft_paths=" /bin/OpenVT=/bin/openvt /bin/LoSetup=/sbin/losetup - /patchroot/patchroot.sh=${SAMIZDAT_INITRD_PATH}/patchroot.sh + /patchroot/patchroot.sh=${OUR_BINPATH}/patchroot.sh " -absolute_path_copies='/lib/terminfo/l/linux /usr/bin/gpg-agent' +absolute_path_copies='/lib/terminfo/l/linux' modules='loop dm-snapshot dm-crypt btrfs hfs hfsplus' modules_dirs='kernel/drivers/net/ethernet kernel/fs/nls kernel/crypto' -for f in $repo_execs; do CopyExec "$f" /bin; done +for f in "${OUR_BINPATH}"/*; do CopyExec "$f" /bin; done for c in $path_execs; do s=$(which $c) CopyExecE "$c" "$s" /bin; -- cgit v1.2.3