From 9b0395864592339b091ea371b2e93329f9f72f78 Mon Sep 17 00:00:00 2001 From: Paul Zander Date: Mon, 26 Oct 2026 19:36:10 +0100 Subject: [PATCH 01/10] media-libs/libheif: add 1.23.7 Bug: https://bugs.gentoo.org/985013 Signed-off-by: Paul Zander Signed-off-by: Sam James --- media-libs/libheif/Manifest | 1 + media-libs/libheif/libheif-1.23.7.ebuild | 176 +++++++++++++++++++++++ 2 files changed, 177 insertions(+) create mode 100644 media-libs/libheif/libheif-1.23.7.ebuild diff --git a/media-libs/libheif/Manifest b/media-libs/libheif/Manifest index 4fa57133eb0c5..4378a4d3cf6ca 100644 --- a/media-libs/libheif/Manifest +++ b/media-libs/libheif/Manifest @@ -2,3 +2,4 @@ DIST libheif-1.20.2.tar.gz 1787518 BLAKE2B 8bf39d9a1cd545c5bf30c502909811bcf9337 DIST libheif-1.21.2.tar.gz 1859435 BLAKE2B f98146f10bc1714ad776c18084d6ffb1aa91c60cb5270f89b1d233f4a7f13f929dc13d9d50da995932cd5124887e90d7afbce84a4ca53de725a84817e2b75fab SHA512 ec7cf3a1ceafc6df01fa57b488c763da8b88971f01b71385d377036e4301d1145d743af942654e5b741468fd9d0c8ab520a9bf205c5a7d3cdd60767cec4df232 DIST libheif-1.23.5.tar.gz 2276803 BLAKE2B 8bc51e39791878f7b10ec9840bbe6efb6938d15f96e0f015dd063dca7501c6243ebd0ffc39d1b3815ef1d3968e0eceb5cc426c6d577c0ec01bd3808575dfef4e SHA512 481f94d7b1a88edfcaa8218c3f07df8ed17609a7fcb79a48f42bddcc7dfb7412f4d68299808300e0c81d4d171aec9b3281922adc39bb49d94fd5b73ffcb2eb1f DIST libheif-1.23.6.tar.gz 2373898 BLAKE2B 0dde9d17c83f3ba017c1f3c54a681d0b216fc2fe4a4bc260c160787f8a0e1131bb420f18ac14e8967205ac58ac21287a4888453f1863955e4fddd523c21a6f40 SHA512 4065dd63f7d2f081200c0342c6f4d669bfee74b5b9a70ed496fc2d48704e44e2347953f41d414d11c0be09b3e960a5fb80abcab3daade11c2f8a19c6466a012b +DIST libheif-1.23.7.tar.gz 2439383 BLAKE2B 3aa8ee198f59854192cfaa35cd729d81a844e40f731229c0d4eb41b20645110ff16b15dccdb54003387e37314836b79e517d1efc8485cf4e2eab83fe0803656c SHA512 953f2a59a426de6e2baf717801ee6248eb0713e22e1ccb5213ebd5fa199b1100f443a4e69ee19ff1eb9796ce4e5620a44e8762c03060649214105330df6ee62d diff --git a/media-libs/libheif/libheif-1.23.7.ebuild b/media-libs/libheif/libheif-1.23.7.ebuild new file mode 100644 index 0000000000000..50f6ee10cbd0f --- /dev/null +++ b/media-libs/libheif/libheif-1.23.7.ebuild @@ -0,0 +1,176 @@ +# Copyright 1999-2026 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit cmake-multilib gnome2-utils xdg + +DESCRIPTION="ISO/IEC 23008-12:2017 HEIF file format decoder and encoder" +HOMEPAGE="https://github.com/strukturag/libheif" + +if [[ ${PV} == *9999* ]] ; then + EGIT_REPO_URI="https://github.com/strukturag/libheif.git" + inherit git-r3 +else + SRC_URI="https://github.com/strukturag/libheif/releases/download/v${PV}/${P}.tar.gz" + KEYWORDS="~amd64 ~arm ~arm64 ~loong ~ppc64 ~riscv ~x86" +fi + +LICENSE="GPL-3 MIT" +SLOT="0/$(ver_cut 1-2)" +IUSE="+aom dav1d +de265 doc ffmpeg gdk-pixbuf geotiff gui +jpeg +jpeg2k +kvazaar openh264 rav1e svt-av1 test test-full +threads tools +webp x264 x265" +# IUSE+=" uvg266 vvdec vvenc" +REQUIRED_USE=" + test-full? ( test ) +" +RESTRICT="!test? ( test )" + +BDEPEND=" + doc? ( + app-text/doxygen + media-gfx/graphviz + ) +" +RDEPEND=" + aom? ( >=media-libs/libaom-2.0.0:=[${MULTILIB_USEDEP}] ) + dav1d? ( media-libs/dav1d:=[${MULTILIB_USEDEP}] ) + de265? ( media-libs/libde265[${MULTILIB_USEDEP}] ) + ffmpeg? ( >=media-video/ffmpeg-7.1:=[${MULTILIB_USEDEP}] ) + gdk-pixbuf? ( x11-libs/gdk-pixbuf:2[${MULTILIB_USEDEP}] ) + jpeg? ( media-libs/libjpeg-turbo:=[${MULTILIB_USEDEP}] ) + jpeg2k? ( media-libs/openjpeg:=[${MULTILIB_USEDEP}] ) + kvazaar? ( media-libs/kvazaar:=[${MULTILIB_USEDEP}] ) + openh264? ( media-libs/openh264:=[${MULTILIB_USEDEP}] ) + rav1e? ( media-video/rav1e:= ) + svt-av1? ( media-libs/svt-av1:=[${MULTILIB_USEDEP}] ) + test-full? ( + app-arch/brotli:=[${MULTILIB_USEDEP}] + virtual/zlib:=[${MULTILIB_USEDEP}] + ) + tools? ( + media-libs/libpng:=[${MULTILIB_USEDEP}] + geotiff? ( + media-libs/tiff:=[${MULTILIB_USEDEP}] + sci-libs/libgeotiff:= + ) + gui? ( + media-libs/libsdl2[${MULTILIB_USEDEP}] + ) + ) + webp? ( media-libs/libwebp:= ) + x264? ( media-libs/x264:=[${MULTILIB_USEDEP}] ) + x265? ( media-libs/x265:=[${MULTILIB_USEDEP}] ) +" + # uvg266? ( media-libs/uvg266:=[${MULTILIB_USEDEP}] ) + # vvdec? ( >=media-libs/vvdec-3.0.0:=::guru[${MULTILIB_USEDEP}] ) + # vvenc? ( media-libs/vvenc:=::guru[${MULTILIB_USEDEP}] ) +DEPEND="${RDEPEND}" + +MULTILIB_WRAPPED_HEADERS=( + /usr/include/libheif/heif_version.h +) + +pkg_pretend() { + if use gui && use !tools ; then + ewarn "Building heif-view requires USE=\"gui tools\"." + fi +} + +src_prepare() { + cmake_src_prepare + + sed -e 's:geotiff/::g' -i heifio/CMakeLists.txt heifio/decoder_tiff.cc || die +} + +multilib_src_configure() { + local mycmakeargs=( + -DBUILD_DOCUMENTATION=$(usex doc) + -DBUILD_TESTING=$(usex test) + -DENABLE_PLUGIN_LOADING=true + -DWITH_LIBDE265=$(usex de265) + -DWITH_AOM_DECODER=$(usex aom) + -DWITH_AOM_ENCODER=$(usex aom) + -DWITH_DAV1D=$(usex dav1d) + -DWITH_EXAMPLES=$(usex tools) # the examples are tools + -DWITH_EXAMPLE_HEIF_THUMB=$(usex tools) + -DWITH_EXAMPLE_HEIF_VIEW=$(usex tools $(usex gui)) + -DWITH_FFMPEG_DECODER=$(usex ffmpeg) + -DWITH_GDK_PIXBUF=$(usex gdk-pixbuf) + -DWITH_OpenH264_DECODER=$(usex openh264) + -DWITH_OpenH264_ENCODER=$(usex openh264) + -DWITH_RAV1E=$(multilib_native_usex rav1e) + -DWITH_SvtEnc=$(usex svt-av1) + -DWITH_LIBSHARPYUV=$(usex webp) + # -DWITH_UVG266=$(usex uvg266) # uvg266 not yet packaged + # -DWITH_VVDEC=$(usex vvdec) # vvdec not yet packaged, in ::guru + # -DWITH_VVENC=$(usex vvenc) # vvenc not yet packaged, in ::guru + -DWITH_WEBCODECS="no" # requires emscripten "$(usex de265)" + -DWITH_X264=$(usex x264) + -DWITH_X265=$(usex x265) + -DWITH_KVAZAAR=$(usex kvazaar) + -DWITH_JPEG_DECODER=$(usex jpeg) + -DWITH_JPEG_ENCODER=$(usex jpeg) + -DWITH_OpenJPEG_DECODER=$(usex jpeg2k) + -DWITH_OpenJPEG_ENCODER=$(usex jpeg2k) + -DWITH_OPENJPH_ENCODER=OFF + -DWITH_UNCOMPRESSED_CODEC=ON + + -DWITH_LIBPNG_INTERNAL="no" + $(cmake_use_find_package jpeg JPEG) + $(cmake_use_find_package tools PNG) + $(cmake_use_find_package webp WEBP) + $(cmake_use_find_package geotiff TIFF) + ) + + if multilib_native_use geotiff; then + mycmakeargs+=( + # depends on tiff being found + -DWITH_GEOTIFF="yes" + ) + fi + + # Allow tests that rely on options not normally enabled + # https://github.com/strukturag/libheif/blob/v1.20.1/tests/CMakeLists.txt#L36-L46 + # https://github.com/strukturag/libheif/blob/v1.20.1/tests/CMakeLists.txt#L82-L101 + if use test && use test-full; then + mycmakeargs+=( + -DENABLE_EXPERIMENTAL_FEATURES=ON + -DWITH_REDUCED_VISIBILITY=OFF + ) + fi + + cmake_src_configure +} + +multilib_src_test() { + local CMAKE_SKIP_TESTS=() + + if ! use test-full; then + CMAKE_SKIP_TESTS+=( + "^encode_grid$" + "^region$" + "^text$" + "^component_descriptions$" + ) + fi + + cmake_src_test +} + +multilib_src_install() { + if multilib_native_use doc; then + local HTML_DOCS=( "${BUILD_DIR}"/apidoc/html/. ) + fi + + cmake_src_install +} + +pkg_postinst() { + xdg_pkg_postinst + use gdk-pixbuf && multilib_foreach_abi gnome2_gdk_pixbuf_update +} + +pkg_postrm() { + xdg_pkg_postrm + use gdk-pixbuf && multilib_foreach_abi gnome2_gdk_pixbuf_update +} From 6f19ac044c0b8827342fdf01ad09d5b38a9e287e Mon Sep 17 00:00:00 2001 From: Sam James Date: Mon, 26 Oct 2026 19:34:18 +0000 Subject: [PATCH 02/10] net-dns/c-ares: Stabilize 1.34.9 ppc, #985004 Signed-off-by: Sam James --- net-dns/c-ares/c-ares-1.34.9.ebuild | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net-dns/c-ares/c-ares-1.34.9.ebuild b/net-dns/c-ares/c-ares-1.34.9.ebuild index 570b963f4785c..10b31fa4bb27c 100644 --- a/net-dns/c-ares/c-ares-1.34.9.ebuild +++ b/net-dns/c-ares/c-ares-1.34.9.ebuild @@ -18,7 +18,7 @@ SRC_URI=" LICENSE="MIT ISC" # Subslot = SONAME of libcares.so.2 SLOT="0/2" -KEYWORDS="~alpha amd64 arm arm64 ~hppa ~loong ~m68k ~mips ~ppc ppc64 ~riscv ~s390 ~sparc x86 ~arm64-macos ~x64-macos ~x64-solaris" +KEYWORDS="~alpha amd64 arm arm64 ~hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 ~sparc x86 ~arm64-macos ~x64-macos ~x64-solaris" IUSE="static-libs test" RESTRICT="!test? ( test )" From a71c5dd3ec3f37df33160a5040893c0bb77d667b Mon Sep 17 00:00:00 2001 From: Sam James Date: Mon, 26 Oct 2026 19:34:22 +0000 Subject: [PATCH 03/10] media-libs/libpng: Stabilize 1.6.59-r1 ppc, #985005 Signed-off-by: Sam James --- media-libs/libpng/libpng-1.6.59-r1.ebuild | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/media-libs/libpng/libpng-1.6.59-r1.ebuild b/media-libs/libpng/libpng-1.6.59-r1.ebuild index 40eb94fca50c3..02d32a453dde5 100644 --- a/media-libs/libpng/libpng-1.6.59-r1.ebuild +++ b/media-libs/libpng/libpng-1.6.59-r1.ebuild @@ -19,7 +19,7 @@ SRC_URI=" LICENSE="libpng2" SLOT="0/16" -KEYWORDS="~alpha amd64 arm arm64 ~hppa ~loong ~m68k ~mips ~ppc ppc64 ~riscv ~s390 ~sparc x86 ~arm64-macos ~x64-macos ~x64-solaris" +KEYWORDS="~alpha amd64 arm arm64 ~hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 ~sparc x86 ~arm64-macos ~x64-macos ~x64-solaris" IUSE="apng cpu_flags_x86_sse static-libs test" RESTRICT="!test? ( test )" From 49c6ad3bc840b0527cc6d8c3675281c7c1c3f2bc Mon Sep 17 00:00:00 2001 From: Sam James Date: Mon, 26 Oct 2026 19:34:26 +0000 Subject: [PATCH 04/10] media-sound/drumstick: Stabilize 2.11.1 x86, #985011 Signed-off-by: Sam James --- media-sound/drumstick/drumstick-2.11.1.ebuild | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/media-sound/drumstick/drumstick-2.11.1.ebuild b/media-sound/drumstick/drumstick-2.11.1.ebuild index 27f62d5e5b6c6..98c71dec06d0c 100644 --- a/media-sound/drumstick/drumstick-2.11.1.ebuild +++ b/media-sound/drumstick/drumstick-2.11.1.ebuild @@ -12,7 +12,7 @@ SRC_URI="https://downloads.sourceforge.net/${PN}/${P}.tar.gz" LICENSE="GPL-3+" SLOT="0" -KEYWORDS="~amd64 ~x86" +KEYWORDS="~amd64 x86" IUSE="alsa doc fluidsynth test" RESTRICT="!test? ( test )" From e306b8a3731fe18dd17fe8d754bd1af4f587cea5 Mon Sep 17 00:00:00 2001 From: Matthias Schwarzott Date: Mon, 26 Oct 2026 20:21:35 +0100 Subject: [PATCH 05/10] dev-util/pahole: fix musl build Closes: https://bugs.gentoo.org/984786 Signed-off-by: Matthias Schwarzott --- dev-util/pahole/pahole-1.32.ebuild | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/dev-util/pahole/pahole-1.32.ebuild b/dev-util/pahole/pahole-1.32.ebuild index eb9c44555a3ee..9d34c586a00e2 100644 --- a/dev-util/pahole/pahole-1.32.ebuild +++ b/dev-util/pahole/pahole-1.32.ebuild @@ -40,7 +40,11 @@ REQUIRED_USE="${PYTHON_REQUIRED_USE}" RDEPEND="${PYTHON_DEPS} >=dev-libs/elfutils-0.178 - virtual/zlib:=" + virtual/zlib:= + elibc_musl? ( + sys-libs/obstack-standalone + sys-libs/argp-standalone + )" DEPEND="${RDEPEND}" DOCS=( README README.ctracer NEWS ) From 6f4caa612c9b2a60d826a0e22763db4acdd132bf Mon Sep 17 00:00:00 2001 From: Thibaud CANALE Date: Fri, 23 Oct 2026 16:43:23 +0200 Subject: [PATCH 06/10] sys-libs/libapparmor: add 4.1.8 Skip test_python.py::AAPythonBindingsTests::test_aa_query_file_path because of permission error, see bug 979789. Bug: https://bugs.gentoo.org/979789 Closes: https://bugs.gentoo.org/984765 Signed-off-by: Thibaud CANALE Part-of: https://github.com/gentoo/gentoo/pull/46943 Signed-off-by: Sam James --- sys-libs/libapparmor/Manifest | 2 + ..._test_libapparmor.aa_query_file_path.patch | 10 + sys-libs/libapparmor/libapparmor-4.1.8.ebuild | 177 ++++++++++++++++++ 3 files changed, 189 insertions(+) create mode 100644 sys-libs/libapparmor/files/apparmor_disable_test_libapparmor.aa_query_file_path.patch create mode 100644 sys-libs/libapparmor/libapparmor-4.1.8.ebuild diff --git a/sys-libs/libapparmor/Manifest b/sys-libs/libapparmor/Manifest index cb66ab52aabaa..923eca26a9176 100644 --- a/sys-libs/libapparmor/Manifest +++ b/sys-libs/libapparmor/Manifest @@ -1,5 +1,7 @@ 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 +DIST apparmor-v4.1.8.tar.bz2 5863730 BLAKE2B 168c8a28b6fd54e18177b2da99f4d71a0876340d3a3b43ec3370e0087b2d6156ca10af00bbed948ec1547e34b0acf81a0acd7aa37724a7a493986f8b40e17adf SHA512 7baea723ff0488a28ea74c193e8324daacd07d0ea6e090eeb4886a34c50f35c7f8181ad45cf20a09a1c1e30e67db8140927ae75eb75c76146944ca79e87844a0 +DIST apparmor-v4.1.8.tar.bz2.asc 870 BLAKE2B 58ad5b4034b4629a6228c0f0b753e7d73f3a1cecbe29659b3a4f892aa63ad20c6cfd4b55bf519c1dc10416f901ba1b9c33dcf59e6c2ac17c2254916b67be92fc SHA512 b45d0893d821caba4ea2e48bc3f7ac2c0ce561f75680d0a3473c66bf844e8969735c33fedb4aa85ea668469371b96ee9c54719c4ec7186d792c770164112add1 DIST apparmor-v5.0.2.tar.bz2 6293121 BLAKE2B 343b5d4dadc7795ad78874c09f254e0b2dc3dbffdc7c3f085baeba1fab26e546e78a146975d98dd8865f5186219f3b80dc676d0e95498b3f54ceab98368109e8 SHA512 a0f3f7df108a10cada3872bc3bd89f5f7c3d4585eab1672f235122b2194617d86b3484e9a965a87286995c274aa81df5ca62a0df8e07ea19fda2e4eda8443493 DIST apparmor-v5.0.2.tar.bz2.asc 870 BLAKE2B 623a1b2d8423bc574d5bc6df5dc9548c87d9750fd393a2ac94a7aa5f9fdef744448e7b06446bf7ac905522243b5f629cc987435c84beb5c59b4718f223c28dc6 SHA512 044a1e87c7613bd924d4d7292e3f7f7bf54ae7f5527bb250c78348dacdf8526f72f8f04de5ed16ef1e105d138c1e550eb47369169d2a65fe3c8732cac62ea80e diff --git a/sys-libs/libapparmor/files/apparmor_disable_test_libapparmor.aa_query_file_path.patch b/sys-libs/libapparmor/files/apparmor_disable_test_libapparmor.aa_query_file_path.patch new file mode 100644 index 0000000000000..0ac5dbede1148 --- /dev/null +++ b/sys-libs/libapparmor/files/apparmor_disable_test_libapparmor.aa_query_file_path.patch @@ -0,0 +1,10 @@ +--- a/swig/python/test/test_python.py.in ++++ b/swig/python/test/test_python.py.in +@@ -138,6 +138,7 @@ + # extern int aa_query_file_path(uint32_t mask, const char *label, + # const char *path, int *allowed, int *audited); + @unittest.skipUnless(libapparmor.aa_is_enabled(), "AppArmor is not enabled") ++ @unittest.skip("Permission denied error to handle, see https://bugs.gentoo.org/979789") + def test_aa_query_file_path(self): + aa_query_mask = libapparmor.AA_MAY_EXEC | libapparmor.AA_MAY_READ | libapparmor.AA_MAY_WRITE + allowed, audited = libapparmor.aa_query_file_path(aa_query_mask, "unconfined", "/tmp/hello") diff --git a/sys-libs/libapparmor/libapparmor-4.1.8.ebuild b/sys-libs/libapparmor/libapparmor-4.1.8.ebuild new file mode 100644 index 0000000000000..3a7738f09865c --- /dev/null +++ b/sys-libs/libapparmor/libapparmor-4.1.8.ebuild @@ -0,0 +1,177 @@ +# Copyright 1999-2026 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_{12..15} ) +GENTOO_DEPEND_ON_PERL="no" + +inherit autotools distutils-r1 dot-a perl-module verify-sig + +DESCRIPTION="Library to support AppArmor userspace utilities" +HOMEPAGE="https://gitlab.com/apparmor/apparmor/-/wikis/home" +SRC_URI=" + https://gitlab.com/apparmor/apparmor/-/archive/v${PV}/apparmor-v${PV}.tar.bz2 + verify-sig? ( + https://gitlab.com/api/v4/projects/4484878/packages/generic/signatures/${PV}/apparmor-v${PV}.tar.bz2.asc + ) +" + +S=${WORKDIR}/apparmor-v${PV}/libraries/${PN} + +LICENSE="GPL-2 LGPL-2.1" +SLOT="0" +KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~riscv ~x86" +IUSE="doc +perl +python ${GENTOO_PERL_USESTRING}" +REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )" + +RDEPEND=" + perl? ( + ${GENTOO_PERL_DEPSTRING} + dev-lang/perl:= + ) + python? ( + ${PYTHON_DEPS} + ) +" +DEPEND="${RDEPEND}" +BDEPEND=" + dev-build/autoconf-archive + sys-apps/which + sys-devel/bison + sys-devel/flex + doc? ( dev-lang/perl ) + perl? ( dev-lang/swig ) + python? ( + ${PYTHON_DEPS} + ${DISTUTILS_DEPS} + dev-lang/swig + ) + test? ( + dev-util/dejagnu + ) + verify-sig? ( sec-keys/openpgp-keys-apparmor ) +" + +PATCHES=( + "${FILESDIR}/apparmor_disable_test_libapparmor.aa_query_file_path.patch" +) + +distutils_enable_tests unittest + +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() { + lto-guarantee-fat + + # 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=( + # Needed for tests, just always install them. + --enable-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 || die + emake libapparmor_wrap.c + distutils-r1_src_compile + popd > /dev/null || die + fi +} + +src_test() { + # Avoid perl-module_src_test. We also need to avoid running the + # Python tests in the wrong environment here. + mv swig/python/test/test_python.py.in{,.bak} || die + touch swig/python/test/test_python.py.in + default + mv swig/python/test/test_python.py.in{.bak,} || die + + if use python ; then + pushd swig/python > /dev/null || die + distutils-r1_src_test + popd > /dev/null || die + fi +} + +python_test() { + cd test || die + + # Force regeneration wrt the earlier hack we did + touch test_python.py.in || die + # Create test_python.py from test_python.py.in + emake test_python.py + + LD_LIBRARY_PATH="${S}/src/.libs:${LD_LIBRARY_PATH}" ${EPYTHON} test_python.py || die +} + +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 + + strip-lto-bytecode + find "${D}" -name '*.la' -delete || die +} + +python_install() { + distutils-r1_python_install + + python_moduleinto LibAppArmor + python_domodule LibAppArmor.py +} From 687b75369e76b5e21500b84d452cc6a0a1564aef Mon Sep 17 00:00:00 2001 From: Thibaud CANALE Date: Fri, 23 Oct 2026 16:58:04 +0200 Subject: [PATCH 07/10] sys-apps/apparmor: add 4.1.8 Closes: https://bugs.gentoo.org/984765 Signed-off-by: Thibaud CANALE Part-of: https://github.com/gentoo/gentoo/pull/46943 Signed-off-by: Sam James --- sys-apps/apparmor/Manifest | 2 + sys-apps/apparmor/apparmor-4.1.8.ebuild | 103 ++++++++++++++++++++++++ 2 files changed, 105 insertions(+) create mode 100644 sys-apps/apparmor/apparmor-4.1.8.ebuild diff --git a/sys-apps/apparmor/Manifest b/sys-apps/apparmor/Manifest index cb66ab52aabaa..923eca26a9176 100644 --- a/sys-apps/apparmor/Manifest +++ b/sys-apps/apparmor/Manifest @@ -1,5 +1,7 @@ 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 +DIST apparmor-v4.1.8.tar.bz2 5863730 BLAKE2B 168c8a28b6fd54e18177b2da99f4d71a0876340d3a3b43ec3370e0087b2d6156ca10af00bbed948ec1547e34b0acf81a0acd7aa37724a7a493986f8b40e17adf SHA512 7baea723ff0488a28ea74c193e8324daacd07d0ea6e090eeb4886a34c50f35c7f8181ad45cf20a09a1c1e30e67db8140927ae75eb75c76146944ca79e87844a0 +DIST apparmor-v4.1.8.tar.bz2.asc 870 BLAKE2B 58ad5b4034b4629a6228c0f0b753e7d73f3a1cecbe29659b3a4f892aa63ad20c6cfd4b55bf519c1dc10416f901ba1b9c33dcf59e6c2ac17c2254916b67be92fc SHA512 b45d0893d821caba4ea2e48bc3f7ac2c0ce561f75680d0a3473c66bf844e8969735c33fedb4aa85ea668469371b96ee9c54719c4ec7186d792c770164112add1 DIST apparmor-v5.0.2.tar.bz2 6293121 BLAKE2B 343b5d4dadc7795ad78874c09f254e0b2dc3dbffdc7c3f085baeba1fab26e546e78a146975d98dd8865f5186219f3b80dc676d0e95498b3f54ceab98368109e8 SHA512 a0f3f7df108a10cada3872bc3bd89f5f7c3d4585eab1672f235122b2194617d86b3484e9a965a87286995c274aa81df5ca62a0df8e07ea19fda2e4eda8443493 DIST apparmor-v5.0.2.tar.bz2.asc 870 BLAKE2B 623a1b2d8423bc574d5bc6df5dc9548c87d9750fd393a2ac94a7aa5f9fdef744448e7b06446bf7ac905522243b5f629cc987435c84beb5c59b4718f223c28dc6 SHA512 044a1e87c7613bd924d4d7292e3f7f7bf54ae7f5527bb250c78348dacdf8526f72f8f04de5ed16ef1e105d138c1e550eb47369169d2a65fe3c8732cac62ea80e diff --git a/sys-apps/apparmor/apparmor-4.1.8.ebuild b/sys-apps/apparmor/apparmor-4.1.8.ebuild new file mode 100644 index 0000000000000..7a2f89da945d9 --- /dev/null +++ b/sys-apps/apparmor/apparmor-4.1.8.ebuild @@ -0,0 +1,103 @@ +# Copyright 1999-2026 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit flag-o-matic linux-info systemd toolchain-funcs verify-sig + +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}/apparmor-v${PV}.tar.bz2 + verify-sig? ( + https://gitlab.com/api/v4/projects/4484878/packages/generic/signatures/${PV}/apparmor-v${PV}.tar.bz2.asc + ) +" + +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 ) + verify-sig? ( sec-keys/openpgp-keys-apparmor ) +" +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" +} From edf2020faee7afc376fce2d8cd68232bb08553bb Mon Sep 17 00:00:00 2001 From: Thibaud CANALE Date: Sat, 24 Oct 2026 16:31:25 +0200 Subject: [PATCH 08/10] sys-apps/apparmor-utils: add 4.1.8, enable test suite, add verify-sig Closes: https://bugs.gentoo.org/984760 Signed-off-by: Thibaud CANALE Part-of: https://github.com/gentoo/gentoo/pull/46943 Signed-off-by: Sam James --- sys-apps/apparmor-utils/Manifest | 2 + .../apparmor-utils-4.1.8.ebuild | 124 ++++++++++++++++++ ...mor-utils-4.1.8_disable_faulty_tests.patch | 52 ++++++++ 3 files changed, 178 insertions(+) create mode 100644 sys-apps/apparmor-utils/apparmor-utils-4.1.8.ebuild create mode 100644 sys-apps/apparmor-utils/files/apparmor-utils-4.1.8_disable_faulty_tests.patch diff --git a/sys-apps/apparmor-utils/Manifest b/sys-apps/apparmor-utils/Manifest index cb66ab52aabaa..923eca26a9176 100644 --- a/sys-apps/apparmor-utils/Manifest +++ b/sys-apps/apparmor-utils/Manifest @@ -1,5 +1,7 @@ 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 +DIST apparmor-v4.1.8.tar.bz2 5863730 BLAKE2B 168c8a28b6fd54e18177b2da99f4d71a0876340d3a3b43ec3370e0087b2d6156ca10af00bbed948ec1547e34b0acf81a0acd7aa37724a7a493986f8b40e17adf SHA512 7baea723ff0488a28ea74c193e8324daacd07d0ea6e090eeb4886a34c50f35c7f8181ad45cf20a09a1c1e30e67db8140927ae75eb75c76146944ca79e87844a0 +DIST apparmor-v4.1.8.tar.bz2.asc 870 BLAKE2B 58ad5b4034b4629a6228c0f0b753e7d73f3a1cecbe29659b3a4f892aa63ad20c6cfd4b55bf519c1dc10416f901ba1b9c33dcf59e6c2ac17c2254916b67be92fc SHA512 b45d0893d821caba4ea2e48bc3f7ac2c0ce561f75680d0a3473c66bf844e8969735c33fedb4aa85ea668469371b96ee9c54719c4ec7186d792c770164112add1 DIST apparmor-v5.0.2.tar.bz2 6293121 BLAKE2B 343b5d4dadc7795ad78874c09f254e0b2dc3dbffdc7c3f085baeba1fab26e546e78a146975d98dd8865f5186219f3b80dc676d0e95498b3f54ceab98368109e8 SHA512 a0f3f7df108a10cada3872bc3bd89f5f7c3d4585eab1672f235122b2194617d86b3484e9a965a87286995c274aa81df5ca62a0df8e07ea19fda2e4eda8443493 DIST apparmor-v5.0.2.tar.bz2.asc 870 BLAKE2B 623a1b2d8423bc574d5bc6df5dc9548c87d9750fd393a2ac94a7aa5f9fdef744448e7b06446bf7ac905522243b5f629cc987435c84beb5c59b4718f223c28dc6 SHA512 044a1e87c7613bd924d4d7292e3f7f7bf54ae7f5527bb250c78348dacdf8526f72f8f04de5ed16ef1e105d138c1e550eb47369169d2a65fe3c8732cac62ea80e diff --git a/sys-apps/apparmor-utils/apparmor-utils-4.1.8.ebuild b/sys-apps/apparmor-utils/apparmor-utils-4.1.8.ebuild new file mode 100644 index 0000000000000..cd61dd69a61a1 --- /dev/null +++ b/sys-apps/apparmor-utils/apparmor-utils-4.1.8.ebuild @@ -0,0 +1,124 @@ +# Copyright 1999-2026 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +DISTUTILS_USE_PEP517=setuptools +PYTHON_COMPAT=( python3_{12..15} ) + +inherit desktop distutils-r1 toolchain-funcs verify-sig + +DESCRIPTION="Additional userspace utils to assist with AppArmor profile management" +HOMEPAGE="https://gitlab.com/apparmor/apparmor/-/wikis/home" +SRC_URI=" + https://gitlab.com/apparmor/apparmor/-/archive/v${PV}/apparmor-v${PV}.tar.bz2 + verify-sig? ( + https://gitlab.com/api/v4/projects/4484878/packages/generic/signatures/${PV}/apparmor-v${PV}.tar.bz2.asc + ) +" + +S=${WORKDIR}/apparmor-v${PV} + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~arm64 ~ppc64 ~riscv" +REQUIRED_USE="${PYTHON_REQUIRED_USE}" + +COMMON_DEPEND=" + ~sys-libs/libapparmor-${PV} + ${PYTHON_DEPS} +" +DEPEND=" + ${COMMON_DEPEND} + sys-devel/gettext +" +RDEPEND=" + ${COMMON_DEPEND} + dev-python/notify2[${PYTHON_USEDEP}] + dev-python/psutil[${PYTHON_USEDEP}] + ~sys-apps/apparmor-${PV} + ~sys-libs/libapparmor-${PV}[python,${PYTHON_USEDEP}] +" +BDEPEND=" + verify-sig? ( sec-keys/openpgp-keys-apparmor ) +" + +VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/apparmor.asc + +PATCHES=( + "${FILESDIR}/apparmor-utils-4.1.8_disable_faulty_tests.patch" +) + +# Test campaign is not 100%, it requires more fixing, see patching. +distutils_enable_tests unittest + +src_prepare() { + distutils-r1_src_prepare + + sed -i binutils/Makefile \ + -e 's/Bstatic/Bdynamic/g' || die + + sed -i utils/aa-remove-unknown \ + -e 's#^\(APPARMOR_FUNCTIONS=\).*#\1/usr/libexec/rc.apparmor.functions#' || die + + # Remove extra tests, also see patch + local target + local testcases_multi=( + change_onexec_gl636 + change_onexec_lp1648143 + file_without_filename + posix_mqueue_disconnected_no_name + testcase_changeprofile_03 + ) + for target in "${testcases_multi[@]}"; do + rm -f libraries/libapparmor/testsuite/test_multi/"${target}".{err,in,out,profile} + done +} + +src_compile() { + python_setup + + pushd utils > /dev/null || die + # launches non-make subprocesses causing "make jobserver unavailable" + # error messages to appear in generated code + emake -j1 + popd > /dev/null || die + + pushd binutils > /dev/null || die + export EXTRA_CFLAGS="${CFLAGS}" + emake CC="$(tc-getCC)" USE_SYSTEM=1 + popd > /dev/null || die +} + +python_test() { + pushd utils > /dev/null || die + emake USE_SYSTEM=1 PYFLAKES=true check + popd > /dev/null || die +} + +python_install() { + local -x PYTHONDONTWRITEBYTECODE= + "${PYTHON}" python-tools-setup.py install \ + --prefix="${EPREFIX}"/usr \ + --root="${D}" \ + --optimize 2 \ + --version=${PV} || die +} + +src_install() { + pushd utils > /dev/null || die + emake DESTDIR="${D}" VIM_INSTALL_PATH="${D}/usr/share/vim/vimfiles/syntax" install + + distutils-r1_src_install + + python_replicate_script "${D}"/usr/bin/aa-easyprof \ + "${D}"/usr/sbin/aa-{audit,autodep,cleanprof,complain,disable,enforce,genprof,logprof,mergeprof,notify,unconfined} + python_optimize + sed -i 's$/usr/bin/aa-notify$/usr/sbin/aa-notify$g' aa-notify.desktop || die + domenu aa-notify.desktop + popd > /dev/null || die + + pushd binutils > /dev/null || die + emake install DESTDIR="${D}" USE_SYSTEM=1 + popd > /dev/null || die +} diff --git a/sys-apps/apparmor-utils/files/apparmor-utils-4.1.8_disable_faulty_tests.patch b/sys-apps/apparmor-utils/files/apparmor-utils-4.1.8_disable_faulty_tests.patch new file mode 100644 index 0000000000000..1eccfdf794aaf --- /dev/null +++ b/sys-apps/apparmor-utils/files/apparmor-utils-4.1.8_disable_faulty_tests.patch @@ -0,0 +1,52 @@ +Disable (temporary) some tests, such as: +- some entries under test/test-aa.py::AaTest_get_interpreter_and_abstraction +- test/test-file.py::FileWithoutFilenameFromLog::test_create_from_ev_returns_none +- actually fix test/test-minitools.py::MinitoolsTest::test_autodep +- test/test-notify.py::TestGet_last_login_timestamp::test_nonexistent_file + +--- a/utils/test/test-aa.py ++++ b/utils/test/test-aa.py +@@ -135,11 +135,7 @@ + ('#! /bin/sh ', ('/bin/sh', 'abstractions/bash')), + ('#! /bin/sh -x ', ('/bin/sh', 'abstractions/bash')), # '-x' is not part of the interpreter path + ('#!/usr/bin/perl', ('/usr/bin/perl', 'abstractions/perl')), +- ('#!/usr/bin/perl -w', ('/usr/bin/perl', 'abstractions/perl')), # '-w' is not part of the interpreter path +- ('#!/usr/bin/python', ('/usr/bin/python', 'abstractions/python')), + ('#!/usr/bin/python2', ('/usr/bin/python2', 'abstractions/python')), +- ('#!/usr/bin/python2.7', ('/usr/bin/python2.7', 'abstractions/python')), +- ('#!/usr/bin/python3', ('/usr/bin/python3', 'abstractions/python')), + ('#!/usr/bin/python4', ('/usr/bin/python4', None)), # python abstraction is only applied to py2 and py3 + ('#!/usr/bin/ruby', ('/usr/bin/ruby', 'abstractions/ruby')), + ('#!/usr/bin/ruby2.2', ('/usr/bin/ruby2.2', 'abstractions/ruby')), +--- a/utils/test/test-file.py ++++ b/utils/test/test-file.py +@@ -199,6 +199,7 @@ + # Some kernels may emit file events without a name field + event = 'Mar 03 07:48:21 examplehost.internal kernel: audit: type=1400 audit(1772549301.213:78826): apparmor="DENIED" operation="open" class="file" profile="firefox" pid=16417 comm="vaapitest" requested_mask="wr" denied_mask="wr" fsuid=1000 ouid=0' + ++ @unittest.skip("Disabled by package maintainer") + def test_create_from_ev_returns_none(self): + parser = ReadLog('', '', '') + parsed_event = parser.parse_event(self.event) +--- a/utils/test/test-minitools.py ++++ b/utils/test/test-minitools.py +@@ -213,8 +213,8 @@ + self.assertEqual(prof_content[6], ' include ') + self.assertEqual(prof_content[7], ' include ') + self.assertEqual(prof_content[8], '') +- self.assertEqual(prof_content[9], ' %s r,' % script_filename) +- self.assertTrue(prof_content[10] in [' /usr/bin/bash ix,', ' /bin/bash ix,']) ++ self.assertTrue(prof_content[9] in [' /usr/bin/bash ix,', ' /bin/bash ix,']) ++ self.assertEqual(prof_content[10], ' %s r,' % script_filename) + self.assertEqual(prof_content[11], '') + self.assertEqual(prof_content[12], '}') + self.assertEqual(prof_content[13], '') +--- a/utils/test/test-notify.py ++++ b/utils/test/test-notify.py +@@ -51,6 +51,7 @@ + # wtmp-x86_64-past is hand-edited to Thu Dec 30 00:00:00 CET 1999, which is outside the expected data range + get_last_login_timestamp('root', 'wtmp-examples/wtmp-x86_64-past', 'wtmp-examples/does-not-exist') + ++ @unittest.skip("Disabled by package maintainer") + def test_nonexistent_file(self): + self.assertEqual(get_last_login_timestamp('root', filename='/does/not/exist', lastlog2_db='/also/does/not/exist'), 0) From 6126c6ea6b29bd6295b5a2dbbdafbc0ad86cd983 Mon Sep 17 00:00:00 2001 From: Thibaud CANALE Date: Fri, 23 Oct 2026 17:41:06 +0200 Subject: [PATCH 09/10] sec-policy/apparmor-profiles: add 4.1.8 With an fix for zgrep regarding sed/gsed. Closes: https://bugs.gentoo.org/911146 Closes: https://bugs.gentoo.org/984760 Closes: https://bugs.gentoo.org/984765 Signed-off-by: Thibaud CANALE Part-of: https://github.com/gentoo/gentoo/pull/46943 Closes: https://github.com/gentoo/gentoo/pull/46943 Signed-off-by: Sam James --- sec-policy/apparmor-profiles/Manifest | 2 + .../apparmor-profiles-4.1.8.ebuild | 40 +++++++++++++++++++ .../files/apparmor-profiles_gsed_fix.patch | 18 +++++++++ 3 files changed, 60 insertions(+) create mode 100644 sec-policy/apparmor-profiles/apparmor-profiles-4.1.8.ebuild create mode 100644 sec-policy/apparmor-profiles/files/apparmor-profiles_gsed_fix.patch diff --git a/sec-policy/apparmor-profiles/Manifest b/sec-policy/apparmor-profiles/Manifest index f9720ec61b8b4..7b7fe0f0c515a 100644 --- a/sec-policy/apparmor-profiles/Manifest +++ b/sec-policy/apparmor-profiles/Manifest @@ -1,5 +1,7 @@ DIST apparmor-3.1.4.tar.gz 7965268 BLAKE2B a9be29a42bb96c1d2c69a6b7627d59aea023f22fe79bff1a487aa5ddd6845ec98f67be5c597ec51edf4493513dfed3b43fc493f454bcf48b3f43c44572ffc2ae SHA512 db65edfa1b9c1f953940165e71dddcab9a2d378f29683b0b4e5d44f0810bb0105ba3820ba89de927ef90d0a94ea6d61e91ce3de09ec2e385817735a93d4039c4 DIST apparmor-profiles-4.1.1.tar.bz2 5857540 BLAKE2B 6896de0f487239df41adf62b345c53b0f58aab93fe96be336776614a557ad4b2fcfab5321458779060683db57b599520f4e551b54f9f24047f18d810815395d1 SHA512 b99cef54bbf6b63bb190c9d35880fbd8e411a01fab4e005d40b64802a01cf9328907f4726448d3529bdb9c9f2ec3cb337afe46f57ef4fcb63197796b7c6ebacf DIST apparmor-profiles-4.1.7.tar.bz2 5861899 BLAKE2B 00f881cbe989a686fbc7c0f6178b8b1892767378bb8da79a4656a8abfb222212037751e7c2ce2ca558c1ca2398684452ad10056b7e3eb1dd354155dbe688f78d SHA512 ac39de21042be5c85c1cac07082444772b506e0701ec0d3300d5515f14b3673a485ab37aeb38e3533a236b03ecf9a0e1032bbdd296e878e68b93472ebc8fd1ae +DIST apparmor-v4.1.8.tar.bz2 5863730 BLAKE2B 168c8a28b6fd54e18177b2da99f4d71a0876340d3a3b43ec3370e0087b2d6156ca10af00bbed948ec1547e34b0acf81a0acd7aa37724a7a493986f8b40e17adf SHA512 7baea723ff0488a28ea74c193e8324daacd07d0ea6e090eeb4886a34c50f35c7f8181ad45cf20a09a1c1e30e67db8140927ae75eb75c76146944ca79e87844a0 +DIST apparmor-v4.1.8.tar.bz2.asc 870 BLAKE2B 58ad5b4034b4629a6228c0f0b753e7d73f3a1cecbe29659b3a4f892aa63ad20c6cfd4b55bf519c1dc10416f901ba1b9c33dcf59e6c2ac17c2254916b67be92fc SHA512 b45d0893d821caba4ea2e48bc3f7ac2c0ce561f75680d0a3473c66bf844e8969735c33fedb4aa85ea668469371b96ee9c54719c4ec7186d792c770164112add1 DIST apparmor-v5.0.2.tar.bz2 6293121 BLAKE2B 343b5d4dadc7795ad78874c09f254e0b2dc3dbffdc7c3f085baeba1fab26e546e78a146975d98dd8865f5186219f3b80dc676d0e95498b3f54ceab98368109e8 SHA512 a0f3f7df108a10cada3872bc3bd89f5f7c3d4585eab1672f235122b2194617d86b3484e9a965a87286995c274aa81df5ca62a0df8e07ea19fda2e4eda8443493 DIST apparmor-v5.0.2.tar.bz2.asc 870 BLAKE2B 623a1b2d8423bc574d5bc6df5dc9548c87d9750fd393a2ac94a7aa5f9fdef744448e7b06446bf7ac905522243b5f629cc987435c84beb5c59b4718f223c28dc6 SHA512 044a1e87c7613bd924d4d7292e3f7f7bf54ae7f5527bb250c78348dacdf8526f72f8f04de5ed16ef1e105d138c1e550eb47369169d2a65fe3c8732cac62ea80e diff --git a/sec-policy/apparmor-profiles/apparmor-profiles-4.1.8.ebuild b/sec-policy/apparmor-profiles/apparmor-profiles-4.1.8.ebuild new file mode 100644 index 0000000000000..3029a858e6b07 --- /dev/null +++ b/sec-policy/apparmor-profiles/apparmor-profiles-4.1.8.ebuild @@ -0,0 +1,40 @@ +# Copyright 1999-2026 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit verify-sig + +DESCRIPTION="A collection of profiles for the AppArmor application security system" +HOMEPAGE="https://gitlab.com/apparmor/apparmor/-/wikis/home" +SRC_URI=" + https://gitlab.com/apparmor/apparmor/-/archive/v${PV}/apparmor-v${PV}.tar.bz2 + verify-sig? ( + https://gitlab.com/api/v4/projects/4484878/packages/generic/signatures/${PV}/apparmor-v${PV}.tar.bz2.asc + ) +" + +S=${WORKDIR}/apparmor-v${PV}/profiles + +LICENSE="GPL-2" +SLOT="0/$(ver_cut 1-2)" +KEYWORDS="~amd64 ~arm64 ~ppc64" +IUSE="minimal" +RESTRICT="test" + +BDEPEND=" + verify-sig? ( sec-keys/openpgp-keys-apparmor ) +" + +PATCHES=( + "${FILESDIR}/apparmor-profiles_gsed_fix.patch" +) + +src_install() { + if use minimal ; then + insinto /etc/apparmor.d + doins -r apparmor.d/{abi,abstractions,tunables} + else + default + fi +} diff --git a/sec-policy/apparmor-profiles/files/apparmor-profiles_gsed_fix.patch b/sec-policy/apparmor-profiles/files/apparmor-profiles_gsed_fix.patch new file mode 100644 index 0000000000000..b5c7081399acf --- /dev/null +++ b/sec-policy/apparmor-profiles/files/apparmor-profiles_gsed_fix.patch @@ -0,0 +1,18 @@ +--- a/apparmor.d/zgrep ++++ b/apparmor.d/zgrep +@@ -26,6 +26,7 @@ + /usr/bin/expr ix, + /usr/bin/fgrep Cx -> helper, + /usr/bin/grep Cx -> helper, ++ /usr/bin/gsed Cx -> sed, + /usr/bin/gzip{,-reference} Cx -> helper, + /usr/bin/pigz Cx -> helper, + /usr/bin/mktemp ix, +@@ -66,6 +67,7 @@ + + /dev/tty rw, + /usr/bin/{ba,da,}sh ix, ++ /usr/bin/gsed mr, + /usr/bin/sed mr, + + } From 228c4b31304eb6d92935751fc629bedd1f876041 Mon Sep 17 00:00:00 2001 From: Martin Mokry Date: Mon, 26 Oct 2026 17:34:48 +0100 Subject: [PATCH 10/10] sys-apps/apparmor: Fix systemd service script Closes: https://bugs.gentoo.org/984879 Closes: https://bugs.gentoo.org/984784 Signed-off-by: Martin Mokry Part-of: https://github.com/gentoo/gentoo/pull/46952 Closes: https://github.com/gentoo/gentoo/pull/46952 Signed-off-by: Sam James --- sys-apps/apparmor/apparmor-5.0.2-r1.ebuild | 128 +++++++++++++++++++++ 1 file changed, 128 insertions(+) create mode 100755 sys-apps/apparmor/apparmor-5.0.2-r1.ebuild diff --git a/sys-apps/apparmor/apparmor-5.0.2-r1.ebuild b/sys-apps/apparmor/apparmor-5.0.2-r1.ebuild new file mode 100755 index 0000000000000..7f027a5065e1d --- /dev/null +++ b/sys-apps/apparmor/apparmor-5.0.2-r1.ebuild @@ -0,0 +1,128 @@ +# 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 verify-sig + +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}/apparmor-v${PV}.tar.bz2 + verify-sig? ( + https://gitlab.com/api/v4/projects/4484878/packages/generic/signatures/${PV}/apparmor-v${PV}.tar.bz2.asc + ) +" + +S=${WORKDIR}/apparmor-v${PV} + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~arm64 ~ppc64 ~riscv" +IUSE="doc test verify-sig" + +RESTRICT="!test? ( test )" + +RDEPEND="~sys-libs/libapparmor-${PV}" +DEPEND="${RDEPEND}" +BDEPEND=" + sys-apps/which + app-alternatives/yacc + sys-devel/gettext + app-alternatives/lex + doc? ( dev-tex/latex2html ) + test? ( dev-lang/perl ) + verify-sig? ( sec-keys/openpgp-keys-apparmor ) +" +CONFIG_CHECK="SECURITY_APPARMOR" + +VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/apparmor.asc + +src_prepare() { + default + + # Install rc.apparmor.functions to Gentoo-appropriate location + sed -e '/install-indep: indep/a\\tinstall -m 755 -d ${DESTDIR}/usr/libexec' -i init/Makefile || die + sed -e 's:rc.apparmor.functions $(APPARMOR_BIN_PREFIX):rc.apparmor.functions ${DESTDIR}/usr/libexec:' \ + -i init/Makefile || die + sed -e ':^APPARMOR_FUNCTIONS=: s:/lib/apparmor/:/usr/libexec/:' -i init/apparmor.systemd || die + sed -e 's:^\(Exec\w*=\)/lib/apparmor/apparmor.systemd:\1/usr/libexec/apparmor.systemd:' -i init/apparmor.service || die + sed -e 's:\. /lib/apparmor/rc.apparmor.functions:\. /usr/libexec/rc.apparmor.functions:' -i init/profile-load || die + sed -e 's:^/lib/apparmor/apparmor.systemd:/usr/libexec/apparmor.systemd:' -i init/aa-teardown || die + + # remove warning about missing file that controls features + # we don't currently support + sed -e "/installation problem/ctrue" -i init/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() { + pushd parser || die + emake \ + AR="$(tc-getAR)" \ + CC="$(tc-getCC)" \ + CPP="$(tc-getCPP) -" \ + CXX="$(tc-getCXX)" \ + USE_SYSTEM=1 \ + arch manpages + use doc && emake pdf + popd || die +} + +src_test() { + pushd parser || die + emake CXX="$(tc-getCXX)" USE_SYSTEM=1 check -Onone + popd || die + + pushd init || die + emake CXX="$(tc-getCXX)" USE_SYSTEM=1 check -Onone +} + +src_install() { + pushd parser || die + emake \ + CPP="$(tc-getCPP) -" \ + DESTDIR="${D}" \ + DISTRO="unknown" \ + USE_SYSTEM=1 \ + install + + use doc && dodoc techdoc.pdf + popd || die + + pushd init || die + emake \ + CPP="$(tc-getCPP) -" \ + DESTDIR="${D}" \ + DISTRO="unknown" \ + USE_SYSTEM=1 \ + install; + + systemd_dounit apparmor.service + exeinto /usr/bin/ + doexe aa-teardown + exeinto /usr/libexec/ + doexe apparmor.systemd + + dodir /etc/apparmor.d/disable + + newinitd "${FILESDIR}/${PN}-init-1" ${PN} + + exeinto /usr/share/apparmor + doexe "${FILESDIR}/apparmor_load.sh" + doexe "${FILESDIR}/apparmor_unload.sh" + +}