summaryrefslogtreecommitdiff
path: root/sys-fs
diff options
context:
space:
mode:
authorIan Stakenvicius <axs@gentoo.org>2013-08-06 18:08:30 +0000
committerIan Stakenvicius <axs@gentoo.org>2013-08-06 18:08:30 +0000
commitf24aac37f890dd71b542d10c5bce9b0c2a0743d4 (patch)
tree9f1c63c4b24a3c1481b77922f5bc26c686931755 /sys-fs
parentadd ~arm, bug #473828 (diff)
downloadgentoo-2-f24aac37f890dd71b542d10c5bce9b0c2a0743d4.tar.gz
gentoo-2-f24aac37f890dd71b542d10c5bce9b0c2a0743d4.tar.bz2
gentoo-2-f24aac37f890dd71b542d10c5bce9b0c2a0743d4.zip
fixed compile error when building with USE='static selinux', bug 439414
(Portage version: 2.1.12.2/cvs/Linux x86_64, signed Manifest commit with key 2B6559ED)
Diffstat (limited to 'sys-fs')
-rw-r--r--sys-fs/lvm2/ChangeLog8
-rw-r--r--sys-fs/lvm2/files/lvm2-2.02.97-selinux-static.patch91
-rw-r--r--sys-fs/lvm2/files/lvm2-2.02.99-selinux-static.patch140
-rw-r--r--sys-fs/lvm2/lvm2-2.02.97-r1.ebuild9
-rw-r--r--sys-fs/lvm2/lvm2-2.02.98.ebuild8
-rw-r--r--sys-fs/lvm2/lvm2-2.02.99-r1.ebuild8
-rw-r--r--sys-fs/lvm2/lvm2-2.02.99.ebuild8
7 files changed, 263 insertions, 9 deletions
diff --git a/sys-fs/lvm2/ChangeLog b/sys-fs/lvm2/ChangeLog
index b3f895a78a30..7c06882570c5 100644
--- a/sys-fs/lvm2/ChangeLog
+++ b/sys-fs/lvm2/ChangeLog
@@ -1,6 +1,12 @@
# ChangeLog for sys-fs/lvm2
# Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sys-fs/lvm2/ChangeLog,v 1.311 2013/08/04 21:05:20 ssuominen Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-fs/lvm2/ChangeLog,v 1.312 2013/08/06 18:08:30 axs Exp $
+
+ 06 Aug 2013; Ian Stakenvicius <axs@gentoo.org>
+ +files/lvm2-2.02.97-selinux-static.patch,
+ +files/lvm2-2.02.99-selinux-static.patch, lvm2-2.02.97-r1.ebuild,
+ lvm2-2.02.98.ebuild, lvm2-2.02.99-r1.ebuild, lvm2-2.02.99.ebuild:
+ fixed compile error when building with USE='static selinux', bug 439414
*lvm2-2.02.99-r1 (04 Aug 2013)
diff --git a/sys-fs/lvm2/files/lvm2-2.02.97-selinux-static.patch b/sys-fs/lvm2/files/lvm2-2.02.97-selinux-static.patch
new file mode 100644
index 000000000000..38473989709a
--- /dev/null
+++ b/sys-fs/lvm2/files/lvm2-2.02.97-selinux-static.patch
@@ -0,0 +1,91 @@
+diff -Naur LVM2.2.02.97/configure.in LVM2.2.02.97.new/configure.in
+--- LVM2.2.02.97/configure.in 2013-07-31 20:14:50.989498543 -0400
++++ LVM2.2.02.97.new/configure.in 2013-07-31 20:58:36.195546461 -0400
+@@ -927,7 +927,6 @@
+ UDEV_STATIC_LIBS=`$PKG_CONFIG --static --libs libudev`
+ AC_DEFINE([UDEV_SYNC_SUPPORT], 1, [Define to 1 to enable synchronisation with udev processing.])
+ fi
+-AC_SUBST(UDEV_STATIC_LIBS)
+
+ dnl -- Enable udev rules
+ AC_MSG_CHECKING(whether to enable installation of udev rules required for synchronisation)
+@@ -1130,19 +1129,32 @@
+ if test x$SELINUX = xyes; then
+ AC_CHECK_LIB([sepol], [sepol_check_context], [
+ AC_DEFINE([HAVE_SEPOL], 1, [Define to 1 if sepol_check_context is available.])
+- SELINUX_LIBS="-lsepol"])
++ SEPOL_LIBS="-lsepol"])
+
+- AC_CHECK_LIB([selinux], [is_selinux_enabled], [
+- AC_CHECK_HEADERS([selinux/selinux.h],, hard_bailout)
+- AC_CHECK_HEADERS([selinux/label.h])
+- AC_DEFINE([HAVE_SELINUX], 1, [Define to 1 to include support for selinux.])
+- SELINUX_LIBS="-lselinux $SELINUX_LIBS"
++ dnl -- init pkgconfig if required
++ if test x$PKGCONFIG_INIT != x1; then
++ pkg_config_init
++ fi
++ PKG_CHECK_MODULES(SELINUX, libselinux, [
+ SELINUX_PC="libselinux"
+- HAVE_SELINUX=yes ], [
+- AC_MSG_WARN(Disabling selinux)
+- SELINUX_LIBS=
+- SELINUX_PC=
+- HAVE_SELINUX=no ])
++ SELINUX_STATIC_LIBS=`$PKG_CONFIG --static --libs libselinux`
++ SELINUX_LIBS="$SELINUX_LIBS $SEPOL_LIBS"
++ AC_DEFINE([HAVE_SELINUX], 1, [Define to 1 to include support for selinux.])
++ ],[
++ dnl -- old non-pkgconfig method, is buggy with static builds
++ AC_CHECK_LIB([selinux], [is_selinux_enabled], [
++ AC_CHECK_HEADERS([selinux/selinux.h],, hard_bailout)
++ AC_CHECK_HEADERS([selinux/label.h])
++ AC_DEFINE([HAVE_SELINUX], 1, [Define to 1 to include support for selinux.])
++ SELINUX_LIBS="-lselinux $SEPOL_LIBS"
++ SELINUX_STATIC_LIBS="$SELINUX_LIBS"
++ SELINUX_PC="libselinux"
++ HAVE_SELINUX=yes ], [
++ AC_MSG_WARN(Disabling selinux)
++ SELINUX_LIBS=
++ SELINUX_PC=
++ HAVE_SELINUX=no ])
++ ])
+ fi
+
+ ################################################################################
+@@ -1531,6 +1543,7 @@
+ AC_SUBST(SALCK_CFLAGS)
+ AC_SUBST(SALCK_LIBS)
+ AC_SUBST(SELINUX_LIBS)
++AC_SUBST(SELINUX_STATIC_LIBS)
+ AC_SUBST(SELINUX_PC)
+ AC_SUBST(SNAPSHOTS)
+ AC_SUBST(STATICDIR)
+@@ -1540,6 +1553,7 @@
+ AC_SUBST(THIN)
+ AC_SUBST(THIN_CHECK_CMD)
+ AC_SUBST(UDEV_LIBS)
++AC_SUBST(UDEV_STATIC_LIBS)
+ AC_SUBST(UDEV_PC)
+ AC_SUBST(UDEV_RULES)
+ AC_SUBST(UDEV_SYNC)
+diff -Naur LVM2.2.02.97/make.tmpl.in LVM2.2.02.97.new/make.tmpl.in
+--- LVM2.2.02.97/make.tmpl.in 2013-07-31 20:14:50.988498543 -0400
++++ LVM2.2.02.97.new/make.tmpl.in 2013-07-31 20:49:32.291536533 -0400
+@@ -31,7 +31,7 @@
+
+ LIBS = @LIBS@
+ # Extra libraries always linked with static binaries
+-STATIC_LIBS = $(SELINUX_LIBS) $(UDEV_STATIC_LIBS)
++STATIC_LIBS = $(SELINUX_STATIC_LIBS) $(UDEV_STATIC_LIBS)
+ DEFS += @DEFS@
+ CFLAGS += @CFLAGS@
+ CLDFLAGS += @CLDFLAGS@
+@@ -45,6 +45,7 @@
+ PTHREAD_LIBS = @PTHREAD_LIBS@
+ READLINE_LIBS = @READLINE_LIBS@
+ SELINUX_LIBS = @SELINUX_LIBS@
++SELINUX_STATIC_LIBS = @SELINUX_STATIC_LIBS@
+ UDEV_LIBS = @UDEV_LIBS@
+ UDEV_STATIC_LIBS = @UDEV_STATIC_LIBS@
+ TESTING = @TESTING@
diff --git a/sys-fs/lvm2/files/lvm2-2.02.99-selinux-static.patch b/sys-fs/lvm2/files/lvm2-2.02.99-selinux-static.patch
new file mode 100644
index 000000000000..812c37e63175
--- /dev/null
+++ b/sys-fs/lvm2/files/lvm2-2.02.99-selinux-static.patch
@@ -0,0 +1,140 @@
+diff -urN8p a/configure.in b/configure.in
+--- a/configure.in 2013-08-03 21:42:30.204749302 -0500
++++ b/configure.in 2013-08-03 21:45:17.496740871 -0500
+@@ -929,17 +929,16 @@ if test x$UDEV_SYNC = xyes; then
+ dnl -- init pkgconfig if required
+ if test x$PKGCONFIG_INIT != x1; then
+ pkg_config_init
+ fi
+ PKG_CHECK_MODULES(UDEV, libudev >= 143, [UDEV_PC="libudev"])
+ UDEV_STATIC_LIBS=`$PKG_CONFIG --static --libs libudev`
+ AC_DEFINE([UDEV_SYNC_SUPPORT], 1, [Define to 1 to enable synchronisation with udev processing.])
+ fi
+-AC_SUBST(UDEV_STATIC_LIBS)
+
+ dnl -- Enable udev rules
+ AC_MSG_CHECKING(whether to enable installation of udev rules required for synchronisation)
+ AC_ARG_ENABLE(udev_rules,
+ AC_HELP_STRING([--enable-udev_rules],
+ [install rule files needed for udev synchronisation]),
+ UDEV_RULES=$enableval, UDEV_RULES=$UDEV_SYNC)
+ AC_MSG_RESULT($UDEV_RULES)
+@@ -1173,29 +1172,42 @@ AC_ARG_ENABLE(selinux,
+ SELINUX=$enableval)
+ AC_MSG_RESULT($SELINUX)
+
+ ################################################################################
+ dnl -- Check for selinux
+ if test x$SELINUX = xyes; then
+ AC_CHECK_LIB([sepol], [sepol_check_context], [
+ AC_DEFINE([HAVE_SEPOL], 1, [Define to 1 if sepol_check_context is available.])
+- SELINUX_LIBS="-lsepol"])
++ SEPOL_LIBS="-lsepol"])
+
+- AC_CHECK_LIB([selinux], [is_selinux_enabled], [
+- AC_CHECK_HEADERS([selinux/selinux.h],, hard_bailout)
+- AC_CHECK_HEADERS([selinux/label.h])
+- AC_DEFINE([HAVE_SELINUX], 1, [Define to 1 to include support for selinux.])
+- SELINUX_LIBS="-lselinux $SELINUX_LIBS"
++ dnl -- init pkgconfig if required
++ if test x$PKGCONFIG_INIT != x1; then
++ pkg_config_init
++ fi
++ PKG_CHECK_MODULES(SELINUX, libselinux, [
+ SELINUX_PC="libselinux"
+- HAVE_SELINUX=yes ], [
+- AC_MSG_WARN(Disabling selinux)
+- SELINUX_LIBS=
+- SELINUX_PC=
+- HAVE_SELINUX=no ])
++ SELINUX_STATIC_LIBS=`$PKG_CONFIG --static --libs libselinux`
++ SELINUX_LIBS="$SELINUX_LIBS $SEPOL_LIBS"
++ AC_DEFINE([HAVE_SELINUX], 1, [Define to 1 to include support for selinux.])
++ ],[
++ dnl -- old non-pkgconfig method, is buggy with static builds
++ AC_CHECK_LIB([selinux], [is_selinux_enabled], [
++ AC_CHECK_HEADERS([selinux/selinux.h],, hard_bailout)
++ AC_CHECK_HEADERS([selinux/label.h])
++ AC_DEFINE([HAVE_SELINUX], 1, [Define to 1 to include support for selinux.])
++ SELINUX_LIBS="-lselinux $SEPOL_LIBS"
++ SELINUX_STATIC_LIBS="$SELINUX_LIBS"
++ SELINUX_PC="libselinux"
++ HAVE_SELINUX=yes ], [
++ AC_MSG_WARN(Disabling selinux)
++ SELINUX_LIBS=
++ SELINUX_PC=
++ HAVE_SELINUX=no ])
++ ])
+ fi
+
+ ################################################################################
+ dnl -- Check for realtime clock support
+ if test x$REALTIME = xyes; then
+ AC_CHECK_LIB(rt, clock_gettime, HAVE_REALTIME=yes, HAVE_REALTIME=no)
+
+ if test x$HAVE_REALTIME = xyes; then
+@@ -1589,25 +1601,27 @@ AC_SUBST(QUORUM_LIBS)
+ AC_SUBST(RAID)
+ AC_SUBST(READLINE_LIBS)
+ AC_SUBST(REPLICATORS)
+ AC_SUBST(SACKPT_CFLAGS)
+ AC_SUBST(SACKPT_LIBS)
+ AC_SUBST(SALCK_CFLAGS)
+ AC_SUBST(SALCK_LIBS)
+ AC_SUBST(SELINUX_LIBS)
++AC_SUBST(SELINUX_STATIC_LIBS)
+ AC_SUBST(SELINUX_PC)
+ AC_SUBST(SNAPSHOTS)
+ AC_SUBST(STATICDIR)
+ AC_SUBST(STATIC_LDFLAGS)
+ AC_SUBST(STATIC_LINK)
+ AC_SUBST(TESTING)
+ AC_SUBST(THIN)
+ AC_SUBST(THIN_CHECK_CMD)
+ AC_SUBST(UDEV_LIBS)
++AC_SUBST(UDEV_STATIC_LIBS)
+ AC_SUBST(UDEV_PC)
+ AC_SUBST(UDEV_RULES)
+ AC_SUBST(UDEV_SYNC)
+ AC_SUBST(UDEV_RULE_EXEC_DETECTION)
+ AC_SUBST(UDEV_HAS_BUILTIN_BLKID)
+ AC_SUBST(CUNIT_LIBS)
+ AC_SUBST(CUNIT_CFLAGS)
+ AC_SUBST(WRITE_INSTALL)
+diff -urN8p a/make.tmpl.in b/make.tmpl.in
+--- a/make.tmpl.in 2013-08-03 21:42:30.204749302 -0500
++++ b/make.tmpl.in 2013-08-03 22:09:52.017666556 -0500
+@@ -27,31 +27,32 @@ GENHTML = @GENHTML@
+ LN_S = @LN_S@
+ SED = @SED@
+ CFLOW_CMD = @CFLOW_CMD@
+ AWK = @AWK@
+ PYTHON = @PYTHON@
+
+ LIBS = @LIBS@
+ # Extra libraries always linked with static binaries
+-STATIC_LIBS = $(SELINUX_LIBS) $(UDEV_STATIC_LIBS)
++STATIC_LIBS = $(SELINUX_STATIC_LIBS) $(UDEV_STATIC_LIBS)
+ DEFS += @DEFS@
+ # FIXME set this only where it's needed, not globally?
+ CFLAGS += @CFLAGS@ @UDEV_CFLAGS@
+ CLDFLAGS += @CLDFLAGS@
+ ELDFLAGS += @ELDFLAGS@
+ LDDEPS += @LDDEPS@
+ LDFLAGS += @LDFLAGS@
+ STATIC_LDFLAGS += @STATIC_LDFLAGS@
+ LIB_SUFFIX = @LIB_SUFFIX@
+ LVMINTERNAL_LIBS = -llvm-internal $(DAEMON_LIBS) $(UDEV_LIBS) $(DL_LIBS)
+ DL_LIBS = @DL_LIBS@
+ PTHREAD_LIBS = @PTHREAD_LIBS@
+ READLINE_LIBS = @READLINE_LIBS@
+ SELINUX_LIBS = @SELINUX_LIBS@
++SELINUX_STATIC_LIBS = @SELINUX_STATIC_LIBS@
+ UDEV_LIBS = @UDEV_LIBS@
+ UDEV_STATIC_LIBS = @UDEV_STATIC_LIBS@
+ TESTING = @TESTING@
+
+ # Setup directory variables
+ prefix = @prefix@
+ exec_prefix = @exec_prefix@
+ udev_prefix = @udev_prefix@
diff --git a/sys-fs/lvm2/lvm2-2.02.97-r1.ebuild b/sys-fs/lvm2/lvm2-2.02.97-r1.ebuild
index a66376b8c8f1..f6d1512bec0a 100644
--- a/sys-fs/lvm2/lvm2-2.02.97-r1.ebuild
+++ b/sys-fs/lvm2/lvm2-2.02.97-r1.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2013 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-fs/lvm2/lvm2-2.02.97-r1.ebuild,v 1.16 2013/08/01 00:10:37 axs Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-fs/lvm2/lvm2-2.02.97-r1.ebuild,v 1.17 2013/08/06 18:08:30 axs Exp $
EAPI=5
inherit eutils multilib toolchain-funcs autotools linux-info udev
@@ -39,7 +39,10 @@ RDEPEND="${RDEPEND}
DEPEND="${DEPEND_COMMON}
virtual/pkgconfig
>=sys-devel/binutils-2.20.1-r1
- static? ( udev? ( virtual/udev[static-libs] ) )"
+ static? (
+ udev? ( virtual/udev[static-libs] )
+ selinux? ( sys-libs/libselinux[static-libs] )
+ )"
S="${WORKDIR}/${PN/lvm/LVM}.${PV}"
@@ -109,6 +112,8 @@ src_prepare() {
# for https://bugs.gentoo.org/370217
epatch "${FILESDIR}"/${P}-udev-static.patch
+ # for https://bugs.gentoo.org/439414
+ epatch "${FILESDIR}"/${P}-selinux-static.patch
# Fix calling AR directly with USE static, bug #444082
if use static ; then
diff --git a/sys-fs/lvm2/lvm2-2.02.98.ebuild b/sys-fs/lvm2/lvm2-2.02.98.ebuild
index b7f3e34f5e1b..54546476daa5 100644
--- a/sys-fs/lvm2/lvm2-2.02.98.ebuild
+++ b/sys-fs/lvm2/lvm2-2.02.98.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2013 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-fs/lvm2/lvm2-2.02.98.ebuild,v 1.6 2013/08/01 00:10:37 axs Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-fs/lvm2/lvm2-2.02.98.ebuild,v 1.7 2013/08/06 18:08:30 axs Exp $
EAPI=5
inherit eutils multilib toolchain-funcs autotools linux-info udev
@@ -39,7 +39,10 @@ RDEPEND="${RDEPEND}
DEPEND="${DEPEND_COMMON}
virtual/pkgconfig
>=sys-devel/binutils-2.20.1-r1
- static? ( udev? ( virtual/udev[static-libs] ) )"
+ static? (
+ udev? ( virtual/udev[static-libs] )
+ selinux? ( sys-libs/libselinux[static-libs] )
+ )"
S="${WORKDIR}/${PN/lvm/LVM}.${PV}"
@@ -106,6 +109,7 @@ src_prepare() {
# for https://bugs.gentoo.org/370217
epatch "${FILESDIR}"/${PN}-2.02.97-udev-static.patch
+ epatch "${FILESDIR}"/${PN}-2.02.97-selinux-static.patch
# Fix calling AR directly with USE static, bug #444082
if use static ; then
diff --git a/sys-fs/lvm2/lvm2-2.02.99-r1.ebuild b/sys-fs/lvm2/lvm2-2.02.99-r1.ebuild
index d999b150bb13..ae375454b55d 100644
--- a/sys-fs/lvm2/lvm2-2.02.99-r1.ebuild
+++ b/sys-fs/lvm2/lvm2-2.02.99-r1.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2013 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-fs/lvm2/lvm2-2.02.99-r1.ebuild,v 1.1 2013/08/04 21:05:20 ssuominen Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-fs/lvm2/lvm2-2.02.99-r1.ebuild,v 1.2 2013/08/06 18:08:30 axs Exp $
EAPI=5
inherit eutils multilib toolchain-funcs autotools linux-info udev systemd
@@ -35,7 +35,10 @@ RDEPEND="${RDEPEND}
DEPEND="${DEPEND_COMMON}
virtual/pkgconfig
>=sys-devel/binutils-2.20.1-r1
- static? ( udev? ( >=virtual/udev-200[static-libs] ) )"
+ static? (
+ udev? ( virtual/udev[static-libs] )
+ selinux? ( sys-libs/libselinux[static-libs] )
+ )"
S=${WORKDIR}/${PN/lvm/LVM}.${PV}
@@ -67,6 +70,7 @@ src_prepare() {
epatch "${FILESDIR}"/${PN}-2.02.70-asneeded.patch # -Wl,--as-needed
epatch "${FILESDIR}"/${PN}-2.02.92-dynamic-static-ldflags.patch #332905
epatch "${FILESDIR}"/${PN}-2.02.97-udev-static.patch #370217
+ epatch "${FILESDIR}"/${PN}-2.02.99-selinux-static.patch #439414
sed -i -e 's:/usr/sbin/lvm:/sbin/lvm:' scripts/lvm2_activation_generator_systemd_red_hat.c || die #479626
diff --git a/sys-fs/lvm2/lvm2-2.02.99.ebuild b/sys-fs/lvm2/lvm2-2.02.99.ebuild
index dc99a5084283..618271710844 100644
--- a/sys-fs/lvm2/lvm2-2.02.99.ebuild
+++ b/sys-fs/lvm2/lvm2-2.02.99.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2013 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-fs/lvm2/lvm2-2.02.99.ebuild,v 1.5 2013/08/02 15:53:33 ssuominen Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-fs/lvm2/lvm2-2.02.99.ebuild,v 1.6 2013/08/06 18:08:30 axs Exp $
EAPI=5
inherit eutils multilib toolchain-funcs autotools linux-info udev systemd
@@ -34,7 +34,10 @@ RDEPEND="${RDEPEND}
DEPEND="${DEPEND_COMMON}
virtual/pkgconfig
>=sys-devel/binutils-2.20.1-r1
- static? ( udev? ( >=virtual/udev-200[static-libs] ) )"
+ static? (
+ udev? ( virtual/udev[static-libs] )
+ selinux? ( sys-libs/libselinux[static-libs] )
+ )"
S=${WORKDIR}/${PN/lvm/LVM}.${PV}
@@ -66,6 +69,7 @@ src_prepare() {
epatch "${FILESDIR}"/${PN}-2.02.70-asneeded.patch # -Wl,--as-needed
epatch "${FILESDIR}"/${PN}-2.02.92-dynamic-static-ldflags.patch #332905
epatch "${FILESDIR}"/${PN}-2.02.97-udev-static.patch #370217
+ epatch "${FILESDIR}"/${PN}-2.02.99-selinux-static.patch #439414
# Fix calling AR directly with USE static, bug #444082, convert to patch and forward to upstream
if use static ; then