Diff apparmor-4.1.8 with a apparmor-5.0.2

/usr/portage/sys-apps/apparmor/apparmor-5.0.2.ebuild 2026-10-28 20:01:05.233079355 +0300
3 3

  
4 4
EAPI=8
5 5

  
6
inherit flag-o-matic linux-info systemd toolchain-funcs verify-sig
6
inherit flag-o-matic systemd toolchain-funcs linux-info verify-sig
7

  
8
MY_PV="$(ver_cut 1-2)"
7 9

  
8 10
DESCRIPTION="Userspace utils and init scripts for the AppArmor application security system"
9
HOMEPAGE="https://gitlab.com/apparmor/apparmor/-/wikis/home"
11
HOMEPAGE="https://gitlab.com/apparmor/apparmor/wikis/home"
10 12
SRC_URI="
11 13
	https://gitlab.com/apparmor/apparmor/-/archive/v${PV}/apparmor-v${PV}.tar.bz2
12 14
	verify-sig? (
......
14 16
	)
15 17
"
16 18

  
17
S=${WORKDIR}/apparmor-v${PV}/parser
19
S=${WORKDIR}/apparmor-v${PV}
18 20

  
19 21
LICENSE="GPL-2"
20 22
SLOT="0"
21 23
KEYWORDS="~amd64 ~arm64 ~ppc64 ~riscv"
22
IUSE="doc"
24
IUSE="doc test verify-sig"
23 25

  
24
# Was restricted previously b/c needs apparmor support in kernel
25
# TODO: add check to ebuild
26
#RESTRICT="test" # bug 675854
26
RESTRICT="!test? ( test )"
27 27

  
28 28
RDEPEND="~sys-libs/libapparmor-${PV}"
29 29
DEPEND="${RDEPEND}"
30 30
BDEPEND="
31
	dev-lang/perl
32 31
	sys-apps/which
33 32
	app-alternatives/yacc
34 33
	sys-devel/gettext
35 34
	app-alternatives/lex
36 35
	doc? ( dev-tex/latex2html )
36
	test? ( dev-lang/perl )
37 37
	verify-sig? ( sec-keys/openpgp-keys-apparmor )
38 38
"
39 39
CONFIG_CHECK="SECURITY_APPARMOR"
40 40

  
41
VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/apparmor.asc
42

  
41 43
src_prepare() {
42 44
	default
43 45

  
44
	sed -e '/^AALIB =/ s/-Bstatic/-Bdynamic/' -i Makefile || die
45

  
46 46
	# Install rc.apparmor.functions to Gentoo-appropriate location
47
	sed -e '/install-indep: indep/a\\tinstall -m 755 -d ${DESTDIR}/usr/libexec' -i Makefile || die
47
	sed -e '/install-indep: indep/a\\tinstall -m 755 -d ${DESTDIR}/usr/libexec' -i init/Makefile || die
48 48
	sed -e 's:rc.apparmor.functions $(APPARMOR_BIN_PREFIX):rc.apparmor.functions ${DESTDIR}/usr/libexec:' \
49
		-i Makefile || die
50
	sed -e ':^APPARMOR_FUNCTIONS=: s:/lib/apparmor/:/usr/libexec/:' -i apparmor.systemd || die
51
	sed -e 's:\. /lib/apparmor/rc.apparmor.functions:\. /usr/libexec/rc.apparmor.functions:' -i profile-load || die
49
		-i init/Makefile || die
50
	sed -e ':^APPARMOR_FUNCTIONS=: s:/lib/apparmor/:/usr/libexec/:' -i init/apparmor.systemd || die
51
	sed -e 's:\. /lib/apparmor/rc.apparmor.functions:\. /usr/libexec/rc.apparmor.functions:' -i init/profile-load || die
52 52

  
53 53
	# remove warning about missing file that controls features
54 54
	# we don't currently support
55
	sed -e "/installation problem/ctrue" -i rc.apparmor.functions || die
55
	sed -e "/installation problem/ctrue" -i init/rc.apparmor.functions || die
56 56

  
57 57
	# bug 634782
58 58
	sed -e "s/cpp/$(tc-getCPP) -/" \
59
		-i ../common/list_capabilities.sh \
60
		-i ../common/list_af_names.sh || die
59
		-i common/list_capabilities.sh \
60
		-i common/list_af_names.sh || die
61 61
}
62 62

  
63 63
src_configure() {
......
68 68
}
69 69

  
70 70
src_compile() {
71
	pushd parser || die
71 72
	emake \
72 73
		AR="$(tc-getAR)" \
73 74
		CC="$(tc-getCC)" \
......
76 77
		USE_SYSTEM=1 \
77 78
		arch manpages
78 79
	use doc && emake pdf
80
	popd || die
79 81
}
80 82

  
81 83
src_test() {
......
83 85
}
84 86

  
85 87
src_install() {
88
	pushd parser || die
86 89
	emake \
87 90
		CPP="$(tc-getCPP) -" \
88 91
		DESTDIR="${D}" \
......
90 93
		USE_SYSTEM=1 \
91 94
		install
92 95

  
96
	use doc && dodoc techdoc.pdf
97
	popd || die
98

  
99
	pushd init || die
100
	emake \
101
		CPP="$(tc-getCPP) -" \
102
		DESTDIR="${D}" \
103
		DISTRO="unknown" \
104
		USE_SYSTEM=1 \
105
		install;
106
	systemd_dounit apparmor.service
107

  
93 108
	dodir /etc/apparmor.d/disable
94 109

  
95 110
	newinitd "${FILESDIR}/${PN}-init-1" ${PN}
96
	systemd_newunit "${FILESDIR}/apparmor.service" apparmor.service
97

  
98
	use doc && dodoc techdoc.pdf
99 111

  
100 112
	exeinto /usr/share/apparmor
101 113
	doexe "${FILESDIR}/apparmor_load.sh"
102 114
	doexe "${FILESDIR}/apparmor_unload.sh"
115

  
103 116
}
Thank you!