Bug 199641

Summary: will not recompile from src.rpm on EL4 or EL4 U3
Product: Red Hat Enterprise Linux 4 Reporter: Bryce <root>
Component: cryptsetupAssignee: Milan Broz <mbroz>
Status: CLOSED CURRENTRELEASE QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 4.0CC: agk, dwysocha, mbroz, pjones, pvrabec
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: 0.1-6 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2008-06-19 13:41:00 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Bryce 2006-07-20 22:51:37 UTC
*scratch* 

I'm unsure where to file this in device-mapper or in cryptsetup.

Well, I tried this on both a EL4 (original) and an EL4 U3 box
and neither are capable of completing the compile

[root@emerald redhat]# rpmbuild -ba SPECS/cryptsetup.spec 
....
/bin/sh ../libtool --mode=link gcc  -O2 -g -pipe -m32 -march=i386
-mtune=pentium4  /usr/lib/libgcrypt.a /usr/lib/libgpg-error.a -o cryptsetup 
cryptsetup.o setup.o utils.o backends.o libdevmapper.o gcrypt.o -all-static
-ldevmapper /usr/lib/libpopt.a
mkdir .libs
gcc -O2 -g -pipe -m32 -march=i386 -mtune=pentium4 -o cryptsetup cryptsetup.o
setup.o utils.o backends.o libdevmapper.o gcrypt.o -static  /usr/lib/libgcrypt.a
/usr/lib/libgpg-error.a -ldevmapper /usr/lib/libpopt.a
/lib/libdevmapper.a(libdm-common.o)(.text+0x506): In function
`dm_set_selinux_context':
: undefined reference to `is_selinux_enabled'
/lib/libdevmapper.a(libdm-common.o)(.text+0x522): In function
`dm_set_selinux_context':
: undefined reference to `matchpathcon'
/lib/libdevmapper.a(libdm-common.o)(.text+0x571): In function
`dm_set_selinux_context':
: undefined reference to `lsetfilecon'
/lib/libdevmapper.a(libdm-common.o)(.text+0x580): In function
`dm_set_selinux_context':
: undefined reference to `freecon'
/lib/libdevmapper.a(libdm-common.o)(.text+0x62a): In function
`dm_set_selinux_context':
: undefined reference to `freecon'
collect2: ld returned 1 exit status


blah,..

I'd love to know how this dependancy gets satisfied in the build system though!
(I am assuming that EL4/ U3 are both self hosting) 

Phil
=--=

Comment 1 Bryce 2006-07-21 16:27:12 UTC
I hav a theory about the build system there and why this might be. However I
think you'd rather have a patch.

This is a patch to add --enable-seliunx to the configure script.
Just add it to the %configure line in the spec file (and obviously the Patch1: /
%patch1 -p1 stuff)

--- cryptsetup-0.1.orig/configure.in    2004-03-05 07:05:28.000000000 -0500
+++ cryptsetup-0.1/configure.in 2006-07-20 19:12:53.000000000 -0400
@@ -60,6 +60,31 @@
 
 dnl ==========================================================================
 
+
+dnl ==========================================================================
+dnl -- Disable selinux                                                          
+
+AC_MSG_CHECKING(whether to enable selinux support)
+AC_ARG_ENABLE(selinux, [  --disable-selinux       Disable selinux support],
+SELINUX=$enableval)
+AC_MSG_RESULT($SELINUX)
+
+dnl ==========================================================================
+dnl -- Check for is_selinux_enabled
+
+if test x$SELINUX = xyes; then
+        AC_CHECK_LIB(selinux, is_selinux_enabled, HAVE_SELINUX=yes,
HAVE_SELINUX=no)
+
+        if test x$HAVE_SELINUX = xyes; then
+                CFLAGS="$CFLAGS -DHAVE_SELINUX"
+                LIBS="$LIBS -lselinux"
+        else
+                AC_MSG_WARN(Disabling selinux)
+        fi
+fi
+
+dnl ==========================================================================
+
 AC_OUTPUT([
 Makefile
 src/Makefile

Adios

Phil
=--=


Comment 2 Milan Broz 2008-06-19 13:41:00 UTC
Build works with latest cryptsetup build (cryptsetup-0.1-6.src.rpm) in updated
RHEL4.6.