mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-09-23 16:49:10 -07:00
sys-apps/apparmor: add 4.1.7
Closes: https://bugs.gentoo.org/963074 Signed-off-by: David Roman <stkw0@disroot.org> Part-of: https://codeberg.org/gentoo/gentoo/pulls/910 Signed-off-by: Sam James <sam@gentoo.org>
This commit is contained in:
@@ -1,2 +1,3 @@
|
||||
DIST apparmor-3.1.4.tar.gz 7965268 BLAKE2B a9be29a42bb96c1d2c69a6b7627d59aea023f22fe79bff1a487aa5ddd6845ec98f67be5c597ec51edf4493513dfed3b43fc493f454bcf48b3f43c44572ffc2ae SHA512 db65edfa1b9c1f953940165e71dddcab9a2d378f29683b0b4e5d44f0810bb0105ba3820ba89de927ef90d0a94ea6d61e91ce3de09ec2e385817735a93d4039c4
|
||||
DIST apparmor-4.0.3.tar.gz 8211339 BLAKE2B 715391a1fc0fb57b820a8bcebdc76ae96e436a29546b9c47019f10f4d22942431ba5c878d92bb61b47ff17012e026195b8d7d78a329cc1cc182a31bc3b512e63 SHA512 8b1240ec56fe4f987edcda9380de685e36f4ac931772e980a8f3655dfbfd7e337a4b15227c7ceecb87d9a2bb592e466ec39912ef8f2fa59f8802464d72df8da2
|
||||
DIST apparmor-v4.1.7.tar.bz2 5861899 BLAKE2B 00f881cbe989a686fbc7c0f6178b8b1892767378bb8da79a4656a8abfb222212037751e7c2ce2ca558c1ca2398684452ad10056b7e3eb1dd354155dbe688f78d SHA512 ac39de21042be5c85c1cac07082444772b506e0701ec0d3300d5515f14b3673a485ab37aeb38e3533a236b03ecf9a0e1032bbdd296e878e68b93472ebc8fd1ae
|
||||
|
||||
99
sys-apps/apparmor/apparmor-4.1.7.ebuild
Normal file
99
sys-apps/apparmor/apparmor-4.1.7.ebuild
Normal file
@@ -0,0 +1,99 @@
|
||||
# Copyright 1999-2026 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
inherit flag-o-matic systemd toolchain-funcs linux-info
|
||||
|
||||
MY_PV="$(ver_cut 1-2)"
|
||||
|
||||
DESCRIPTION="Userspace utils and init scripts for the AppArmor application security system"
|
||||
HOMEPAGE="https://gitlab.com/apparmor/apparmor/wikis/home"
|
||||
SRC_URI="https://gitlab.com/apparmor/apparmor/-/archive/v${PV}/${PN}-v${PV}.tar.bz2"
|
||||
|
||||
S=${WORKDIR}/apparmor-v${PV}/parser
|
||||
|
||||
LICENSE="GPL-2"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~arm64 ~ppc64 ~riscv"
|
||||
IUSE="doc"
|
||||
|
||||
# Was restricted previously b/c needs apparmor support in kernel
|
||||
# TODO: add check to ebuild
|
||||
#RESTRICT="test" # bug 675854
|
||||
|
||||
RDEPEND="~sys-libs/libapparmor-${PV}"
|
||||
DEPEND="${RDEPEND}"
|
||||
BDEPEND="
|
||||
dev-lang/perl
|
||||
sys-apps/which
|
||||
app-alternatives/yacc
|
||||
sys-devel/gettext
|
||||
app-alternatives/lex
|
||||
doc? ( dev-tex/latex2html )
|
||||
"
|
||||
CONFIG_CHECK="SECURITY_APPARMOR"
|
||||
|
||||
src_prepare() {
|
||||
default
|
||||
|
||||
sed -e '/^AALIB =/ s/-Bstatic/-Bdynamic/' -i Makefile || die
|
||||
|
||||
# Install rc.apparmor.functions to Gentoo-appropriate location
|
||||
sed -e '/install-indep: indep/a\\tinstall -m 755 -d ${DESTDIR}/usr/libexec' -i Makefile || die
|
||||
sed -e 's:rc.apparmor.functions $(APPARMOR_BIN_PREFIX):rc.apparmor.functions ${DESTDIR}/usr/libexec:' \
|
||||
-i Makefile || die
|
||||
sed -e ':^APPARMOR_FUNCTIONS=: s:/lib/apparmor/:/usr/libexec/:' -i apparmor.systemd || die
|
||||
sed -e 's:\. /lib/apparmor/rc.apparmor.functions:\. /usr/libexec/rc.apparmor.functions:' -i profile-load || die
|
||||
|
||||
# remove warning about missing file that controls features
|
||||
# we don't currently support
|
||||
sed -e "/installation problem/ctrue" -i rc.apparmor.functions || die
|
||||
|
||||
# bug 634782
|
||||
sed -e "s/cpp/$(tc-getCPP) -/" \
|
||||
-i ../common/list_capabilities.sh \
|
||||
-i ../common/list_af_names.sh || die
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
# ODR violations (bug #863524)
|
||||
filter-lto
|
||||
|
||||
default
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
emake \
|
||||
AR="$(tc-getAR)" \
|
||||
CC="$(tc-getCC)" \
|
||||
CPP="$(tc-getCPP) -" \
|
||||
CXX="$(tc-getCXX)" \
|
||||
USE_SYSTEM=1 \
|
||||
arch manpages
|
||||
use doc && emake pdf
|
||||
}
|
||||
|
||||
src_test() {
|
||||
emake CXX="$(tc-getCXX)" USE_SYSTEM=1 check -Onone
|
||||
}
|
||||
|
||||
src_install() {
|
||||
emake \
|
||||
CPP="$(tc-getCPP) -" \
|
||||
DESTDIR="${D}" \
|
||||
DISTRO="unknown" \
|
||||
USE_SYSTEM=1 \
|
||||
install
|
||||
|
||||
dodir /etc/apparmor.d/disable
|
||||
|
||||
newinitd "${FILESDIR}/${PN}-init-1" ${PN}
|
||||
systemd_newunit "${FILESDIR}/apparmor.service" apparmor.service
|
||||
|
||||
use doc && dodoc techdoc.pdf
|
||||
|
||||
exeinto /usr/share/apparmor
|
||||
doexe "${FILESDIR}/apparmor_load.sh"
|
||||
doexe "${FILESDIR}/apparmor_unload.sh"
|
||||
}
|
||||
Reference in New Issue
Block a user