ecryptfs: fix after security wrapper change

The replacements matched to much due to wrapperDir having `/bin` in its
path now.

cc #16654
This commit is contained in:
Robin Gloster 2017-02-16 11:31:30 +01:00
parent de31599f3f
commit 790e5bf4d8
No known key found for this signature in database
GPG Key ID: 5E4C836C632C2882

View File

@ -17,6 +17,8 @@ stdenv.mkDerivation rec {
FILES="$(grep -r '/bin/sh' src/utils -l; find src -name \*.c)" FILES="$(grep -r '/bin/sh' src/utils -l; find src -name \*.c)"
for file in $FILES; do for file in $FILES; do
substituteInPlace "$file" \ substituteInPlace "$file" \
--replace /bin/mount ${utillinux}/bin/mount \
--replace /bin/umount ${utillinux}/bin/umount \
--replace /sbin/mount.ecryptfs_private ${wrapperDir}/mount.ecryptfs_private \ --replace /sbin/mount.ecryptfs_private ${wrapperDir}/mount.ecryptfs_private \
--replace /sbin/umount.ecryptfs_private ${wrapperDir}/umount.ecryptfs_private \ --replace /sbin/umount.ecryptfs_private ${wrapperDir}/umount.ecryptfs_private \
--replace /sbin/mount.ecryptfs $out/sbin/mount.ecryptfs \ --replace /sbin/mount.ecryptfs $out/sbin/mount.ecryptfs \
@ -26,8 +28,6 @@ stdenv.mkDerivation rec {
--replace /usr/bin/ecryptfs-setup-private $out/bin/ecryptfs-setup-private \ --replace /usr/bin/ecryptfs-setup-private $out/bin/ecryptfs-setup-private \
--replace /sbin/cryptsetup ${cryptsetup}/sbin/cryptsetup \ --replace /sbin/cryptsetup ${cryptsetup}/sbin/cryptsetup \
--replace /sbin/dmsetup ${lvm2}/sbin/dmsetup \ --replace /sbin/dmsetup ${lvm2}/sbin/dmsetup \
--replace /bin/mount ${utillinux}/bin/mount \
--replace /bin/umount ${utillinux}/bin/umount \
--replace /sbin/unix_chkpwd ${wrapperDir}/unix_chkpwd \ --replace /sbin/unix_chkpwd ${wrapperDir}/unix_chkpwd \
--replace /bin/bash ${bash}/bin/bash --replace /bin/bash ${bash}/bin/bash
done done