FS#18146 - [cryptsetup] 1.1.0-1 creates broken cryptsetup.static
Attached to Project:
Arch Linux
Opened by Christian Neukirchen (chneukirchen) - Wednesday, 03 February 2010, 18:37 GMT
Last edited by Thomas Bächler (brain0) - Tuesday, 10 August 2010, 11:53 GMT
Opened by Christian Neukirchen (chneukirchen) - Wednesday, 03 February 2010, 18:37 GMT
Last edited by Thomas Bächler (brain0) - Tuesday, 10 August 2010, 11:53 GMT
|
Details
Description:
cryptsetup-1.1.0-1 (65135) creates broken cryptsetup.static since it copies a libtool stub and not the actual binary file (which isn't even statically linked...). Steps to reproduce: % cd cryptsetup % makepkg % file src/cryptsetup-1.1.0/src/cryptsetup src/cryptsetup-1.1.0/src/cryptsetup: a /bin/sh script text executable % file src/cryptsetup-1.1.0/src/.libs/cryptsetup ... dynamically linked ... This stub gets installed as /sbin/cryptsetup.static! (And it's hard to notice since the path is hardcoded, so it will look like it works if you don't "make clean".) Building it myself results in "Your system requires SElinux libraries" errors. I hacked that out in configure.in, then it worked, and builds a proper static binary. I think this is of high severity since it will make invalid initrds, thus making the system unbootable. |
This task depends upon
Closed by Thomas Bächler (brain0)
Tuesday, 10 August 2010, 11:53 GMT
Reason for closing: Deferred
Additional comments about closing: We hope to never need static binaries again. Ever.
Tuesday, 10 August 2010, 11:53 GMT
Reason for closing: Deferred
Additional comments about closing: We hope to never need static binaries again. Ever.
However, I can't reproduce your problem, at least I can execute the cryptsetup.static binaries on both architectures here and they give me a usage message.
I did this on a very fresh Arch install, maybe you have some headers that I don't and thus the build runs correctly.
Does ./configure --enable-static build for you?
(And please keep the static binaries, it makes a chroot that can lock and unlock the root partition so much easier...)
/sbin/cryptsetup.static: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), statically linked, for GNU/Linux 2.6.18, stripped
$ file /mnt/arch32/sbin/cryptsetup.static
/mnt/arch32/sbin/cryptsetup.static: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), statically linked, for GNU/Linux 2.6.18, stripped
[chris@myhost cryptsetup]$ makepkg^M
^[[1;32m==>^[[1;0m^[[1;1m Making package: cryptsetup 1.1.0-1 i686 (Wed Feb 3 20\:56:46 UTC 2010)^[[1;0m^M
...
^[[1;32m==>^[[1;0m^[[1;1m Starting build()...^[[1;0m^M
checking for a BSD-compatible install... /bin/install -c^M
...
config.status: creating po/Makefile^M
make all-recursive^M
...
make[1]: Leaving directory `/home/chris/cryptsetup/src/cryptsetup-1.1.0'^M
checking for a BSD-compatible install... /bin/install -c^M
...
checking for dm_task_set_name in -ldevmapper... yes^M
checking for dm_task_set_message in -ldevmapper... yes^M
checking for sepol_bool_set in -lsepol... no^M
checking for is_selinux_enabled in -lselinux... no^M
checking for library containing pthread_mutex_lock... -lpthread^M
checking for library containing dm_set_selinux_context... no^M
configure: error: Your system requires SElinux libraries for static compilation.\^M
make all-recursive^M
...
^[[1;32m==>^[[1;0m^[[1;1m Finished making: cryptsetup 1.1.0-1 i686 (Wed Feb 3 2\0:57:21 UTC 2010)^[[1;0m^M
...
[chris@myhost cryptsetup]$ file src/cryptsetup-1.1.0/src/cr^Gyptsetup^M
src/cryptsetup-1.1.0/src/cryptsetup: a /bin/sh script text executable^M
Since the second configure fails here, it gets rebuild dynamically again here.
Perhaps the PKGBUILD is only missing some dependency (the selinux thing), but I can't find it.