commit:     5024958128b2e6dba12345b58fb53f5e84d55249
Author:     Alfred Wingate <parona <AT> protonmail <DOT> com>
AuthorDate: Tue Nov  4 11:50:54 2025 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Tue Nov  4 20:15:46 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=50249581

gnome-base/gnome-keyring: disable automagic libcap-ng

Closes: https://bugs.gentoo.org/964549
Signed-off-by: Alfred Wingate <parona <AT> protonmail.com>
Part-of: https://github.com/gentoo/gentoo/pull/44472
Signed-off-by: Sam James <sam <AT> gentoo.org>

 ...-keyring-48.0-disable-libcap-ng-automagic.patch | 36 ++++++++++++++++++++++
 ...ng-48.0.ebuild => gnome-keyring-48.0-r1.ebuild} |  8 ++++-
 2 files changed, 43 insertions(+), 1 deletion(-)

diff --git 
a/gnome-base/gnome-keyring/files/gnome-keyring-48.0-disable-libcap-ng-automagic.patch
 
b/gnome-base/gnome-keyring/files/gnome-keyring-48.0-disable-libcap-ng-automagic.patch
new file mode 100644
index 000000000000..617bd7ea9a79
--- /dev/null
+++ 
b/gnome-base/gnome-keyring/files/gnome-keyring-48.0-disable-libcap-ng-automagic.patch
@@ -0,0 +1,36 @@
+https://bugs.gentoo.org/964549
+https://gitlab.gnome.org/GNOME/gnome-keyring/-/merge_requests/101
+
+From 5ebf419ce10d100049d961c13fd5e63d0a62fcfe Mon Sep 17 00:00:00 2001
+From: Alfred Wingate <[email protected]>
+Date: Tue, 4 Nov 2025 13:33:31 +0200
+Subject: [PATCH] meson: allow disabling libcap-ng explicitly
+
+Bug: https://bugs.gentoo.org/964549
+Signed-off-by: Alfred Wingate <[email protected]>
+--- a/meson.build
++++ b/meson.build
+@@ -37,7 +37,7 @@ threads_dep = dependency('threads')
+ gck_dep = dependency('gck-1', version: '>= 3.3.4')
+ gcr_base_dep = dependency('gcr-base-3', version: '>= 3.27.90')
+ libgcrypt_dep = dependency('libgcrypt', version: '>= 1.2.2')
+-libcap_ng_dep = dependency('libcap-ng', required: false)
++libcap_ng_dep = dependency('libcap-ng', required: get_option('libcap-ng'))
+ p11_kit_dep = dependency('p11-kit-1')
+ 
+ libselinux_dep = dependency('libselinux', required: get_option('selinux'))
+--- a/meson_options.txt
++++ b/meson_options.txt
+@@ -1,3 +1,9 @@
++option('libcap-ng',
++  type: 'feature',
++  value: 'auto',
++  description: 'Add support for Linux capabilities',
++)
++
+ option('ssh-agent',
+   type: 'boolean',
+   value: false,
+-- 
+2.51.2
+

diff --git a/gnome-base/gnome-keyring/gnome-keyring-48.0.ebuild 
b/gnome-base/gnome-keyring/gnome-keyring-48.0-r1.ebuild
similarity index 89%
rename from gnome-base/gnome-keyring/gnome-keyring-48.0.ebuild
rename to gnome-base/gnome-keyring/gnome-keyring-48.0-r1.ebuild
index 43d1fa88451f..5f5f1972fd87 100644
--- a/gnome-base/gnome-keyring/gnome-keyring-48.0.ebuild
+++ b/gnome-base/gnome-keyring/gnome-keyring-48.0-r1.ebuild
@@ -12,7 +12,7 @@ HOMEPAGE="https://gitlab.gnome.org/GNOME/gnome-keyring";
 LICENSE="GPL-2+ LGPL-2+"
 SLOT="0"
 KEYWORDS="~alpha amd64 arm arm64 ~loong ~mips ppc ppc64 ~riscv ~sparc x86 
~amd64-linux ~x86-linux"
-IUSE="pam selinux ssh-agent systemd test"
+IUSE="caps pam selinux ssh-agent systemd test"
 RESTRICT="!test? ( test )"
 
 RDEPEND="
@@ -24,6 +24,7 @@ RDEPEND="
        >=app-eselect/eselect-pinentry-0.5
        app-misc/ca-certificates
 
+       caps? ( sys-libs/libcap-ng )
        selinux? ( sec-policy/selinux-gnome )
        systemd? ( sys-apps/systemd )
        ssh-agent? ( virtual/openssh )
@@ -46,6 +47,10 @@ PATCHES=(
 
        #https://gitlab.gnome.org/GNOME/gnome-keyring/-/issues/151
        "${FILESDIR}/${PN}-48.0-gkm_marshal-header.patch"
+
+       # bug #964549
+       # https://gitlab.gnome.org/GNOME/gnome-keyring/-/merge_requests/101
+       "${FILESDIR}/gnome-keyring-48.0-disable-libcap-ng-automagic.patch"
 )
 
 pkg_setup() {
@@ -54,6 +59,7 @@ pkg_setup() {
 
 src_configure() {
        local emesonargs=(
+               $(meson_feature caps libcap-ng)
                $(meson_use ssh-agent)
                $(meson_feature selinux)
                $(meson_feature systemd)

Reply via email to