Bug#390243: devmapper.pc should refer to libselinux.pc
Ben Hutchings
ben at decadent.org.uk
Fri Sep 29 23:47:23 UTC 2006
Package: devmapper
Version: 1.02.08-1
Tags: patch
Bug 388718 should be fixable by using pkg-config --libs --static
devmapper. However, that doesn't yet work, because pkg-config can't see
the additional libraries that libdevmapper depends on.
I think this should be fixed in devmapper with a change along these
lines:
--- devmapper-1.02.08.orig/lib/libdevmapper.pc.in
+++ devmapper-1.02.08/lib/libdevmapper.pc.in
@@ -8,4 +8,4 @@
Version: @DM_LIB_VERSION@
Cflags: -I${includedir}
Libs: -L${libdir} -ldevmapper
-Libs.private: -lselinux -lsepol
+Requires.private: libselinux libsepol
--- devmapper-1.02.08.orig/debian/control
+++ devmapper-1.02.08/debian/control
@@ -9,7 +9,7 @@
Package: libdevmapper-dev
Section: libdevel
Architecture: any
-Depends: libdevmapper1.02 (= ${Source-Version})
+Depends: libdevmapper1.02 (= ${Source-Version}), libselinux1-dev
Description: The Linux Kernel Device Mapper header files
The Linux Kernel Device Mapper is the LVM (Linux Logical Volume Management)
Team's implementation of a minimalistic kernel-space driver that handles
-- END --
(It shouldn't be necessary to mention libsepol but currently pkg-config
currently doesn't recurse far enough to pick it up.)
For consistency it would probably be good to use libselinux's pkg-config
information when building devmapper itself, which I think the following
change should achieve:
--- devmapper-1.02.08.orig/configure.in
+++ devmapper-1.02.08/configure.in
@@ -219,20 +219,33 @@
################################################################################
dnl -- Check for selinux
if test x$SELINUX = xyes; then
- AC_CHECK_LIB(sepol, sepol_check_context, HAVE_SEPOL=yes, HAVE_SEPOL=no)
-
- if test x$HAVE_SEPOL = xyes; then
- AC_DEFINE([HAVE_SEPOL], 1, [Define to 1 if sepol_check_context is available.])
- LIBS="-lsepol $LIBS"
- fi
-
- AC_CHECK_LIB(selinux, is_selinux_enabled, HAVE_SELINUX=yes, HAVE_SELINUX=no)
-
- if test x$HAVE_SELINUX = xyes; then
- AC_DEFINE([HAVE_SELINUX], 1, [Define to 1 if selinux is available.])
- LIBS="-lselinux $LIBS"
+ if test x$PKGCONFIG = xyes; then
+ if pkg-config --exists libsepol; then
+ HAVE_SEPOL=1
+ LIBS="$(pkg-config --libs libsepol) $LIBS"
+ fi
+ if pkg-config --exists libselinux; then
+ HAVE_SELINUX=1
+ LIBS="$(pkg-config --libs libselinux) $LIBS"
+ else
+ AC_MSG_WARN(Disabling selinux)
+ fi
else
- AC_MSG_WARN(Disabling selinux)
+ AC_CHECK_LIB(sepol, sepol_check_context, HAVE_SEPOL=yes, HAVE_SEPOL=no)
+
+ if test x$HAVE_SEPOL = xyes; then
+ AC_DEFINE([HAVE_SEPOL], 1, [Define to 1 if sepol_check_context is available.])
+ LIBS="-lsepol $LIBS"
+ fi
+
+ AC_CHECK_LIB(selinux, is_selinux_enabled, HAVE_SELINUX=yes, HAVE_SELINUX=no)
+
+ if test x$HAVE_SELINUX = xyes; then
+ AC_DEFINE([HAVE_SELINUX], 1, [Define to 1 if selinux is available.])
+ LIBS="-lselinux $LIBS"
+ else
+ AC_MSG_WARN(Disabling selinux)
+ fi
fi
fi
-- END --
--
Ben Hutchings -- ben at decadentplace.org.uk shortened to ben at decadent.org.uk
If you've signed my GPG key, please send a signature on and to the new uid.
Tomorrow will be cancelled due to lack of interest.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://lists.alioth.debian.org/pipermail/pkg-lvm-maintainers/attachments/20060930/7a5374dc/attachment.pgp
More information about the pkg-lvm-maintainers
mailing list