Skip to contentSkip to conversation

selinux version to link against libsepol, too

PATCH Harald Hoyer 2 participants 6 messages Dec 16, 2008 – Dec 18, 2008

lore
Share & tools
lore
#0 lore raw

commit 9aa4548cb8720f772ca5e3648d689fbd931dffe1

Author: Harald Hoyer <[email protected]>
Date:   Tue Dec 16 10:48:21 2008 +0100

LDFLAGS="-all-static" and configure --withselinux needs to link against libsepol, too

configure.ac +7 -0
index 4439166..cd4ccc5 100644
@@ -55,6 +55,13 @@ if test "x$with_selinux" = xyes; then
 	AC_DEFINE(USE_SELINUX, [1] ,[compile with SELinux support])
 	SELINUX_LIBS="-lselinux"
 fi
+if test "x$with_selinux" = xyes; then
+	LIBS_save=$LIBS
+	AC_CHECK_LIB(sepol, sepol_genbools,
+		[SELINUX_LIBS="$SELINUX_LIBS -lsepol"],
+		[])
+	LIBS=$LIBS_save
+fi
 AC_SUBST([SELINUX_LIBS])
 AM_CONDITIONAL(USE_SELINUX, [test "x$with_selinux" = xyes], [compile with SELinux support])
 
#1 lore raw
Quoted 6 lines · Harald Hoyer

commit 9aa4548cb8720f772ca5e3648d689fbd931dffe1

Author: Harald Hoyer <[email protected]>
Date:   Tue Dec 16 10:48:21 2008 +0100

LDFLAGS="-all-static" and configure --withselinux needs to link against libsepol, too

Why do we need to check for sepol to be available, we can just add it unconditionally, right?

What are you doing with -all-static? You still put static crap in your initrd? :)

Thanks,
Kay

#2 lore raw
In reply to Harald Hoyer
Quoted 9 lines · Kay Sievers
Quoted 5 lines · Harald Hoyer

commit 9aa4548cb8720f772ca5e3648d689fbd931dffe1

Author: Harald Hoyer <[email protected]>
Date:   Tue Dec 16 10:48:21 2008 +0100

LDFLAGS="-all-static" and configure --withselinux needs to link against libsepol, too

Why do we need to check for sepol to be available, we can just add it unconditionally, right?

hmm, maybe :)

Quoted 3 lines

What are you doing with -all-static? You still put static crap in your initrd? :)

We never used static crap in our initrd (from udev), but I provide udev-static as an rpm for those who might need it. :-)

Quoted 3 lines

Thanks,
Kay

#3 lore raw
In reply to Harald Hoyer
Quoted 8 lines · Harald Hoyer
Quoted 7 lines · Kay Sievers
Quoted 5 lines · Harald Hoyer

commit 9aa4548cb8720f772ca5e3648d689fbd931dffe1

Author: Harald Hoyer <[email protected]>
Date:   Tue Dec 16 10:48:21 2008 +0100
Quoted 7 lines
Quoted 5 lines
Quoted 2 lines

LDFLAGS="-all-static" and configure --withselinux needs to link against
libsepol, too

Why do we need to check for sepol to be available, we can just add it unconditionally, right?

hmm, maybe :)

That's how it was before we switched to autotools. The -as-needed should take care of stripping it again.

Quoted 5 lines
Quoted 2 lines

What are you doing with -all-static? You still put static crap in your initrd? :)

We never used static crap in our initrd (from udev), but I provide udev-static as an rpm for those who might need it. :-)

Yeah, it's christmas time, and we want to make the hopelessly clueless happy. I understand. :)

Kay

#4 lore raw
In reply to Harald Hoyer
Quoted 12 lines · Kay Sievers
Quoted 11 lines · Harald Hoyer
Quoted 10 lines · Kay Sievers
Quoted 7 lines · Harald Hoyer

commit 9aa4548cb8720f772ca5e3648d689fbd931dffe1

Author: Harald Hoyer <[email protected]>
Date:   Tue Dec 16 10:48:21 2008 +0100

LDFLAGS="-all-static" and configure --withselinux needs to link against
libsepol, too

Quoted 7 lines
Quoted 4 lines
Quoted 2 lines

Why do we need to check for sepol to be available, we can just add it unconditionally, right?

hmm, maybe :)

That's how it was before we switched to autotools. The -as-needed should take care of stripping it again.

Added it.

Btw, why does libselinux not ship with a pkgconfig file? Do you have that on your system?

That would make all that work without these ugly workarounds.

Thanks,
Kay

#5 lore raw
In reply to Harald Hoyer
Quoted 12 lines · Kay Sievers
Quoted 11 lines · Kay Sievers
Quoted 10 lines · Harald Hoyer
Quoted 9 lines · Kay Sievers
Quoted 6 lines · Harald Hoyer

commit 9aa4548cb8720f772ca5e3648d689fbd931dffe1

Author: Harald Hoyer <[email protected]>
Date:   Tue Dec 16 10:48:21 2008 +0100

LDFLAGS="-all-static" and configure --withselinux needs to link against
libsepol, too

Why do we need to check for sepol to be available, we can just add it unconditionally, right?

Quoted 8 lines
Quoted 3 lines
Quoted 1 line

hmm, maybe :)

That's how it was before we switched to autotools. The -as-needed should take care of stripping it again.

Added it.

Btw, why does libselinux not ship with a pkgconfig file? Do you have that on your system?

Don't know. No, no pkgconfig file.

Quoted 2 lines

That would make all that work without these ugly workarounds.

Well, well.. ;-)

Quoted 7 lines

Thanks,
Kay
--
To unsubscribe from this list: send the line "unsubscribe linux-hotplug" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html