Skip to contentSkip to conversation

libmount: Add libselinux dependency to pkgconfig file

PATCH Applied Masami Hiramatsu 2 participants 2 messages Oct 11, 2019

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 libmount: Add libselinux dependency to pkgconfig file

Add libselinux dependency to libmount if it is compiled with selinux support.

Without this fix, 'pkg-config --libs --static mount' doesn't show libselinux related options.

---
 Makefile.am          |    6 ++++++
 libmount/mount.pc.in |    2 +-
 2 files changed, 7 insertions(+), 1 deletion(-)
Makefile.am +6 -0
index 51c649909..9ef752f3c 100644
@@ -136,6 +136,12 @@ edit_cmd = sed \
 	 -e 's|@LIBFDISK_PATCH_VERSION[@]|$(LIBFDISK_PATCH_VERSION)|g' \
 	 -e 's|@LIBBLKID_VERSION[@]|$(LIBBLKID_VERSION)|g'
 
+if HAVE_SELINUX
+edit_cmd += -e 's|@LIBSELINUX[@]|libselinux|g'
+else
+edit_cmd += -e 's|@LIBSELINUX[@]||g'
+endif
+
 CLEANFILES += $(PATHFILES)
 EXTRA_DIST += $(PATHFILES:=.in)
 
libmount/mount.pc.in +1 -1
index 7371b23c1..d5f0d4b55 100644
@@ -17,6 +17,6 @@ includedir=@includedir@
 Name: mount
 Description: mount library
 Version: @LIBMOUNT_VERSION@
-Requires.private: blkid
+Requires.private: blkid @LIBSELINUX@
 Cflags: -I${includedir}/libmount
 Libs: -L${libdir} -lmount
maintainer Applied
#1 lore raw
Quoted 3 lines · Masami Hiramatsu
 Makefile.am          |    6 ++++++
 libmount/mount.pc.in |    2 +-
 2 files changed, 7 insertions(+), 1 deletion(-)

Oh, really good catch. It seems libselinux is missing there for years.

Applied, thanks.

Karel

Signature · 2 lines
 Karel Zak  <[email protected]>
 http://karelzak.blogspot.com