summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'sys-libs/libapparmor')
-rw-r--r--sys-libs/libapparmor/Manifest2
-rw-r--r--sys-libs/libapparmor/files/libapparmor-3.1.4-clang-flto-partition.patch33
-rw-r--r--sys-libs/libapparmor/libapparmor-3.1.4-r2.ebuild135
-rw-r--r--sys-libs/libapparmor/libapparmor-3.1.4.ebuild (renamed from sys-libs/libapparmor/libapparmor-3.0.1.ebuild)42
-rw-r--r--sys-libs/libapparmor/metadata.xml6
5 files changed, 201 insertions, 17 deletions
diff --git a/sys-libs/libapparmor/Manifest b/sys-libs/libapparmor/Manifest
index 385711733914..f3225ffc6ff8 100644
--- a/sys-libs/libapparmor/Manifest
+++ b/sys-libs/libapparmor/Manifest
@@ -1 +1 @@
-DIST apparmor-3.0.1.tar.gz 7785713 BLAKE2B c530d159a4139de8e59d9d975af866259b56d555e3abe2d1e2a6bfd2db57d8371d643bb93f1cd6ca96172960c09a74cc05c82d34a2e253c4c1f6ecce747f4129 SHA512 e1073e7b2cde7cc4cefcfddce8fa5069845b5873c260b9fbd4bea2ff801708101d813ff30e23a64da36f3c6394cd9339e01a170e9add69deef2d70ecd9ed9687
+DIST apparmor-3.1.4.tar.gz 7965268 BLAKE2B a9be29a42bb96c1d2c69a6b7627d59aea023f22fe79bff1a487aa5ddd6845ec98f67be5c597ec51edf4493513dfed3b43fc493f454bcf48b3f43c44572ffc2ae SHA512 db65edfa1b9c1f953940165e71dddcab9a2d378f29683b0b4e5d44f0810bb0105ba3820ba89de927ef90d0a94ea6d61e91ce3de09ec2e385817735a93d4039c4
diff --git a/sys-libs/libapparmor/files/libapparmor-3.1.4-clang-flto-partition.patch b/sys-libs/libapparmor/files/libapparmor-3.1.4-clang-flto-partition.patch
new file mode 100644
index 000000000000..6cb3528ea4db
--- /dev/null
+++ b/sys-libs/libapparmor/files/libapparmor-3.1.4-clang-flto-partition.patch
@@ -0,0 +1,33 @@
+https://gitlab.com/apparmor/apparmor/-/commit/d8bb0435c2b283fe9eed2a6db9a0b09ac2566c0e
+From d8bb0435c2b283fe9eed2a6db9a0b09ac2566c0e Mon Sep 17 00:00:00 2001
+From: John Johansen <john@jjmx.net>
+Date: Sun, 25 Feb 2024 03:31:01 +0000
+Subject: [PATCH] Merge makefiles: test for support of flto-partition flag
+--- a/configure.ac
++++ b/configure.ac
+@@ -92,6 +92,13 @@ if test "$ac_cv_prog_cc_c99" = "no"; then
+ AC_MSG_ERROR([C99 mode is required to build libapparmor])
+ fi
+
++EXTRA_CFLAGS="-Wall ${EXTRA_WARNINGS} -fPIC"
++AX_CHECK_COMPILE_FLAG([-flto-partition=none], , , [-Werror])
++AS_VAR_IF([ax_cv_check_cflags__Werror__flto_partition_none], [yes],
++ [EXTRA_CFLAGS="$EXTRA_CFLAGS -flto-partition=none"]
++ ,)
++AC_SUBST([AM_CFLAGS], ["$EXTRA_CFLAGS"])
++
+ AC_OUTPUT(
+ Makefile
+ doc/Makefile
+--- a/src/Makefile.am
++++ b/src/Makefile.am
+@@ -39,7 +39,6 @@ include $(COMMONDIR)/Make.rules
+ BUILT_SOURCES = grammar.h scanner.h af_protos.h
+ AM_LFLAGS = -v
+ AM_YFLAGS = -d -p aalogparse_
+-AM_CFLAGS = -Wall $(EXTRA_WARNINGS) -fPIC -flto-partition=none
+ AM_CPPFLAGS = -D_GNU_SOURCE -I$(top_srcdir)/include/
+ scanner.h: scanner.l
+ $(LEX) -v $<
+--
+GitLab
diff --git a/sys-libs/libapparmor/libapparmor-3.1.4-r2.ebuild b/sys-libs/libapparmor/libapparmor-3.1.4-r2.ebuild
new file mode 100644
index 000000000000..22583ffca321
--- /dev/null
+++ b/sys-libs/libapparmor/libapparmor-3.1.4-r2.ebuild
@@ -0,0 +1,135 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+DISTUTILS_EXT=1
+DISTUTILS_OPTIONAL=1
+DISTUTILS_USE_PEP517=setuptools
+PYTHON_COMPAT=( python3_{10..12} )
+GENTOO_DEPEND_ON_PERL="no"
+
+inherit autotools distutils-r1 perl-functions
+
+MY_PV="$(ver_cut 1-2)"
+
+DESCRIPTION="Library to support AppArmor userspace utilities"
+HOMEPAGE="https://gitlab.com/apparmor/apparmor/wikis/home"
+SRC_URI="https://launchpad.net/apparmor/${MY_PV}/${PV}/+download/apparmor-${PV}.tar.gz"
+S=${WORKDIR}/apparmor-${PV}/libraries/${PN}
+
+LICENSE="GPL-2 LGPL-2.1"
+SLOT="0"
+KEYWORDS="amd64 ~arm arm64 ~ppc64 ~riscv ~x86"
+IUSE="doc +perl +python static-libs"
+REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
+# depends on the package already being installed
+RESTRICT="test"
+
+RDEPEND="
+ perl? ( dev-lang/perl:= )
+ python? (
+ ${PYTHON_DEPS}
+ )
+"
+DEPEND="${RDEPEND}"
+BDEPEND="
+ dev-build/autoconf-archive
+ sys-devel/bison
+ sys-devel/flex
+ doc? ( dev-lang/perl )
+ perl? ( dev-lang/swig )
+ python? (
+ ${PYTHON_DEPS}
+ ${DISTUTILS_DEPS}
+ dev-lang/swig
+ )
+"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-3.1.4-clang-flto-partition.patch
+)
+
+src_prepare() {
+ default
+
+ use python && distutils-r1_src_prepare
+
+ # We used to rm m4/ but led to this after eautoreconf:
+ # checking whether the libapparmor man pages should be generated... yes
+ # ./configure: 5065: PROG_PODCHECKER: not found
+ # ./configure: 5068: PROG_POD2MAN: not found
+ # checking whether python bindings are enabled... yes
+ eautoreconf
+}
+
+src_configure() {
+ # Run configure through distutils-r1.eclass. Bug 764779
+ if use python; then
+ distutils-r1_src_configure
+ else
+ python_configure_all
+ fi
+}
+
+python_configure_all() {
+ # Fails with reflex/byacc, heavily relies on bisonisms
+ export LEX=flex
+ export YACC=yacc.bison
+
+ local myeconfargs=(
+ $(use_enable static-libs static)
+ $(use_with perl)
+ $(use_with python)
+ )
+
+ econf "${myeconfargs[@]}"
+}
+
+src_compile() {
+ emake -C src
+ emake -C include
+ use doc && emake -C doc
+ use perl && emake -C swig/perl
+
+ if use python ; then
+ pushd swig/python > /dev/null
+ emake libapparmor_wrap.c
+ distutils-r1_src_compile
+ popd > /dev/null
+ fi
+}
+
+src_install() {
+ emake DESTDIR="${D}" -C src install
+ emake DESTDIR="${D}" -C include install
+ use doc && emake DESTDIR="${D}" -C doc install
+
+ if use perl ; then
+ emake DESTDIR="${D}" -C swig/perl install
+ perl_set_version
+ insinto "${VENDOR_ARCH}"
+ doins swig/perl/LibAppArmor.pm
+
+ # bug 620886
+ perl_delete_localpod
+ perl_fix_packlist
+ fi
+
+ if use python ; then
+ pushd swig/python > /dev/null || die
+ distutils-r1_src_install
+ popd > /dev/null || die
+ fi
+
+ dodoc AUTHORS ChangeLog NEWS README
+
+ find "${D}" -name '*.la' -delete || die
+}
+
+python_install() {
+ distutils-r1_python_install
+
+ python_moduleinto LibAppArmor
+ python_domodule LibAppArmor.py
+}
diff --git a/sys-libs/libapparmor/libapparmor-3.0.1.ebuild b/sys-libs/libapparmor/libapparmor-3.1.4.ebuild
index c1c67c1df117..eeeff5594e54 100644
--- a/sys-libs/libapparmor/libapparmor-3.0.1.ebuild
+++ b/sys-libs/libapparmor/libapparmor-3.1.4.ebuild
@@ -1,11 +1,11 @@
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=7
+EAPI=8
+DISTUTILS_EXT=1
DISTUTILS_OPTIONAL=1
-DISTUTILS_USE_SETUPTOOLS="no"
-PYTHON_COMPAT=( python3_{7,8,9} )
+PYTHON_COMPAT=( python3_{10..11} )
GENTOO_DEPEND_ON_PERL="no"
inherit autotools distutils-r1 perl-functions
@@ -18,7 +18,7 @@ SRC_URI="https://launchpad.net/apparmor/${MY_PV}/${PV}/+download/apparmor-${PV}.
LICENSE="GPL-2 LGPL-2.1"
SLOT="0"
-KEYWORDS="amd64 ~arm ~arm64 ~x86"
+KEYWORDS="amd64 ~arm arm64 ~ppc64 ~riscv ~x86"
IUSE="doc +perl +python static-libs"
REQUIRED_USE="${PYTHON_REQUIRED_USE}"
@@ -27,12 +27,15 @@ RDEPEND="perl? ( dev-lang/perl:= )
python? ( ${PYTHON_DEPS} )"
DEPEND="${RDEPEND}"
BDEPEND="
- sys-devel/autoconf-archive
+ dev-build/autoconf-archive
sys-devel/bison
sys-devel/flex
doc? ( dev-lang/perl )
perl? ( dev-lang/swig )
- python? ( dev-lang/swig )"
+ python? (
+ dev-lang/swig
+ dev-python/setuptools[${PYTHON_USEDEP}]
+ )"
S=${WORKDIR}/apparmor-${PV}/libraries/${PN}
@@ -40,13 +43,23 @@ S=${WORKDIR}/apparmor-${PV}/libraries/${PN}
RESTRICT="test"
src_prepare() {
- rm -r m4 || die "failed to remove bundled macros"
default
+
+ # We used to rm m4/ but led to this after eautoreconf:
+ # checking whether the libapparmor man pages should be generated... yes
+ # ./configure: 5065: PROG_PODCHECKER: not found
+ # ./configure: 5068: PROG_POD2MAN: not found
+ # checking whether python bindings are enabled... yes
eautoreconf
+
use python && distutils-r1_src_prepare
}
src_configure() {
+ # Fails with reflex/byacc, heavily relies on bisonisms
+ export LEX=flex
+ export YACC=yacc.bison
+
econf \
$(use_enable static-libs static) \
$(use_with perl) \
@@ -84,15 +97,20 @@ src_install() {
fi
if use python ; then
- pushd swig/python > /dev/null
+ pushd swig/python > /dev/null || die
distutils-r1_src_install
- python_moduleinto LibAppArmor
- python_foreach_impl python_domodule LibAppArmor.py
- popd > /dev/null
+ popd > /dev/null || die
fi
dodoc AUTHORS ChangeLog NEWS README
find "${D}" -name '*.la' -delete || die
}
+
+python_install() {
+ distutils-r1_python_install
+
+ python_moduleinto LibAppArmor
+ python_domodule LibAppArmor.py
+}
diff --git a/sys-libs/libapparmor/metadata.xml b/sys-libs/libapparmor/metadata.xml
index 42d1e8f65243..32fae81e7e61 100644
--- a/sys-libs/libapparmor/metadata.xml
+++ b/sys-libs/libapparmor/metadata.xml
@@ -1,14 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
- <maintainer type="person">
- <email>kensington@gentoo.org</email>
- </maintainer>
<maintainer type="project">
<email>hardened@gentoo.org</email>
<name>Gentoo Hardened</name>
</maintainer>
<upstream>
<remote-id type="launchpad">apparmor</remote-id>
+ <remote-id type="gitlab">apparmor/apparmor</remote-id>
</upstream>
</pkgmetadata>