commit:     cba7f8228328b339b8f6090406c26fc14d4e39d9
Author:     Michael Orlitzky <mjo <AT> gentoo <DOT> org>
AuthorDate: Thu Jul 15 19:06:24 2021 +0000
Commit:     Michael Orlitzky <mjo <AT> gentoo <DOT> org>
CommitDate: Thu Jul 15 20:21:52 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=cba7f822

dev-lang/php: support USE=apparmor in php-8.x.

Earlier versions of dev-lang/php[fpm] have an "automagic" dependency
on libapparmor when the latter is installed. The 8.x versions of PHP,
however support a --with-fpm-apparmor flag that determines whether or
not php-fpm makes use of libapparmor. This commit adds USE=apparmor to
the php-8.x series to control that behavior.

When USE=fpm is unset, the new USE=apparmor flag is a no-op. That seems
slightly less annoying for users than forcing them to make the "fpm"
and "apparmor" USE flags consistent.

Closes: https://bugs.gentoo.org/637402
Package-Manager: Portage-3.0.20, Repoman-3.0.2
Signed-off-by: Michael Orlitzky <mjo <AT> gentoo.org>

 dev-lang/php/metadata.xml                                 | 1 +
 dev-lang/php/{php-8.0.8-r1.ebuild => php-8.0.8-r2.ebuild} | 5 +++--
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/dev-lang/php/metadata.xml b/dev-lang/php/metadata.xml
index 7f13fad9d81..cd64929baa6 100644
--- a/dev-lang/php/metadata.xml
+++ b/dev-lang/php/metadata.xml
@@ -10,6 +10,7 @@
     <name>Michael Orlitzky</name>
   </maintainer>
   <use>
+    <flag name="apparmor">Support FPM application confinement through 
<pkg>sys-libs/libapparmor</pkg></flag>
     <flag name="argon2">Enable password hashing algorithm from 
<pkg>app-crypt/argon2</pkg></flag>
     <flag name="bcmath">Add support for libbcmath</flag>
     <flag name="cli">Enable CLI SAPI</flag>

diff --git a/dev-lang/php/php-8.0.8-r1.ebuild b/dev-lang/php/php-8.0.8-r2.ebuild
similarity index 99%
rename from dev-lang/php/php-8.0.8-r1.ebuild
rename to dev-lang/php/php-8.0.8-r2.ebuild
index c0414dd262a..b602cca1312 100644
--- a/dev-lang/php/php-8.0.8-r1.ebuild
+++ b/dev-lang/php/php-8.0.8-r2.ebuild
@@ -33,7 +33,7 @@ IUSE="${IUSE}
        ${SAPIS/cli/+cli}
        threads"
 
-IUSE="${IUSE} acl argon2 bcmath berkdb bzip2 calendar cdb cjk
+IUSE="${IUSE} acl apparmor argon2 bcmath berkdb bzip2 calendar cdb cjk
        coverage +ctype curl debug
        enchant exif ffi +fileinfo +filter firebird
        +flatfile ftp gd gdbm gmp +iconv imap inifile
@@ -79,7 +79,7 @@ RESTRICT="!test? ( test )"
 COMMON_DEPEND="
        >=app-eselect/eselect-php-0.9.7[apache2?,fpm?]
        >=dev-libs/libpcre2-10.30[jit?,unicode]
-       fpm? ( acl? ( sys-apps/acl ) )
+       fpm? ( acl? ( sys-apps/acl ) apparmor? ( sys-libs/libapparmor ) )
        apache2? ( www-servers/apache[apache2_modules_unixd(+),threads=] )
        argon2? ( app-crypt/argon2:= )
        berkdb? ( || (  sys-libs/db:5.3
@@ -248,6 +248,7 @@ src_configure() {
        )
 
        our_conf+=(
+               $(use_with apparmor fpm-apparmor)
                $(use_with argon2 password-argon2 "${EPREFIX}/usr")
                $(use_enable bcmath)
                $(use_with bzip2 bz2 "${EPREFIX}/usr")

Reply via email to