[parted-devel] [PATCH] Do not link to libsepol or libselinux
Petr Lautrbach
plautrba at redhat.com
Tue Nov 3 14:06:34 GMT 2020
Given that there's no code which would use it there's no reason to link
to libsepol or libselinux even when they are available.
---
README-release | 1 -
configure.ac | 12 ------------
libparted/Makefile.am | 1 -
parted.spec.in | 15 ++-------------
4 files changed, 2 insertions(+), 27 deletions(-)
diff --git a/README-release b/README-release
index 58b5e765d32f..ce628e99376b 100644
--- a/README-release
+++ b/README-release
@@ -44,7 +44,6 @@ Here are most of the steps we (maintainers) follow when making a release.
- device-mapper-devel
- ncurses-devel
- readline-devel
- - libselinux-devel
- check
- pkgconfig
- dosfstools
diff --git a/configure.ac b/configure.ac
index c46a3ffabd1a..ef786003c9a0 100644
--- a/configure.ac
+++ b/configure.ac
@@ -89,11 +89,6 @@ if test $ENABLE_DEVICE_MAPPER = yes; then
1, [device mapper (libdevmapper) support])
fi
-AC_ARG_ENABLE([selinux],
- [ --enable-selinux enable SELinux support [default=no]], ,
- enable_selinux=no
-)
-
AC_ARG_ENABLE([discover-only],
[ --enable-discover-only support only reading/probing [default=no]], ,
enable_discover_only=no
@@ -320,13 +315,6 @@ package as well (it may be called device-mapper-devel or something similar).]
fi
AC_SUBST([DM_LIBS])
-dnl Check for SELinux
-SELINUX_LIBS=""
-if test "$enable_selinux" = yes; then
- SELINUX_LIBS="-lselinux -lsepol"
-fi
-AC_SUBST([SELINUX_LIBS])
-
dnl Check for termcap
if test "$with_readline" = yes; then
OLD_LIBS="$LIBS"
diff --git a/libparted/Makefile.am b/libparted/Makefile.am
index bcdde774b22c..e52aa2acd084 100644
--- a/libparted/Makefile.am
+++ b/libparted/Makefile.am
@@ -55,7 +55,6 @@ libparted_la_LIBADD = \
$(top_builddir)/lib/libgnulib.la \
$(OS_LIBS) \
$(DM_LIBS) \
- $(SELINUX_LIBS) \
$(LIB_BLKID) \
$(UUID_LIBS) \
$(INTLLIBS)
diff --git a/parted.spec.in b/parted.spec.in
index bdbe21890aea..d0e2b11a950d 100644
--- a/parted.spec.in
+++ b/parted.spec.in
@@ -1,15 +1,9 @@
-# Default to disabling device-mapper and SELinux
+# Default to disabling device-mapper
%define use_devmapper 0
-%define use_selinux 0
-%define use_sepol 0
# Enable device-mapper support if we find devmapper
%define use_devmapper %(pkg-config --libs devmapper >/dev/null 2>&1; [ $? -eq 0 ] && echo 1)
-# Enable SELinux if we find libselinux and libsepol
-%define use_selinux %([ -r %{_libdir}/libselinux.a ] && echo 1)
-%define use_sepol %([ -r %{_libdir}/libsepol.so ] && echo 1)
-
Summary: The GNU disk partition manipulation program
Name: @PACKAGE@
Version: @VERSION@
@@ -22,7 +16,7 @@ Group: Applications/System
BuildRequires: e2fsprogs-devel readline-devel ncurses-devel gperf
BuildRequires: automake libtool gettext-devel texinfo pkgconfig
-BuildRequires: device-mapper-devel, libselinux-devel libsepol-devel
+BuildRequires: device-mapper-devel
Prereq: /sbin/install-info
@@ -52,11 +46,6 @@ Parted library, you need to install this package.
--enable-device-mapper \
%else
--disable-devmapper \
-%endif
-%if "%{use_selinux}" == "1" && "%{use_sepol}" == "1"
- --enable-selinux \
-%else
- --disable-selinux \
%endif
--enable-part-static \
--enable-pc98=no \
--
2.29.0
More information about the parted-devel
mailing list