losetup does not recognize man documented option "-P" Trying to "losetup" a file to /dev/loopn using an encryption algorithm and a clear text key in a file does not work. losetup does not recognize -P option. Reproducible: Always Steps to Reproduce: 1. # losetup -P A_CONTAINING_KEY_FILENAME -e twofish256 /dev/loop0 A_FILENAME Actual Results: losetup: invalid option -- P usage: losetup [options] loop_device file # setup losetup -F [options] loop_device [file] # setup, read /etc/fstab losetup loop_device # give info losetup -a # give info of all loops losetup -d loop_device # delete losetup -R loop_device # resize options: -e encryption -o offset -s sizelimit -p passwdfd -T -S pseed -H phash -I loinit -K gpgkey -G gpghome -C itercountk -v -r -P cleartextkey
I found where the problem is. "P:" is not in the string passed to getopt. To fix: Unpack distfiles/loop-AES-v3.1f.tar.bz2 Change the file loop-AES-v3.1f/util-linux-2.12r.diff line + while ((c = getopt(argc,argv,"aC:de:FG:H:I:K:o:p:rRs:S:Tv")) != -1) { by + while ((c = getopt(argc,argv,"aC:de:FG:H:I:K:o:p:P:rRs:S:Tv")) != -1) { This works.
please include emerge -pv util-linux since you haven't included any version info.
Sorry! # emerge -pv util-linux These are the packages that would be merged, in order: Calculating dependencies... done! [ebuild R ] sys-apps/util-linux-2.12r-r8 USE="crypt nls perl -old-crypt (-selinux) -static" 0 kB Total: 1 package (1 reinstall), Size of downloads: 0 kB
fixed in util-linux-2.13-r3 http://sources.gentoo.org/sys-apps/util-linux/files/util-linux-2.13-losetup-P.patch?rev=1.1