]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
libsecret: add pam support depending on DISTRO_FEATURES
authorMarkus Volk <f_l_k@t-online.de>
Thu, 5 Dec 2024 10:46:41 +0000 (11:46 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Mon, 9 Dec 2024 09:17:50 +0000 (09:17 +0000)
pam module has been ported from gnome-keyring to libsecret
[https://gitlab.gnome.org/GNOME/libsecret/-/commit/9a37dc839a9be1670afeb647d9f82b6ef1cd0893]

Add a PACKAGECONFIG for pam and enable it if pam is in DISTRO_FEATURES

Add a patch that adds an option to disables the pam test, because it would require
pam_wrapper recipe
[https://gitlab.com/cwrap/pam_wrapper]

Signed-off-by: Markus Volk <f_l_k@t-online.de>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/recipes-gnome/libsecret/libsecret/0001-meson-add-option-to-disable-pam-tests.patch [new file with mode: 0644]
meta/recipes-gnome/libsecret/libsecret_0.21.4.bb

diff --git a/meta/recipes-gnome/libsecret/libsecret/0001-meson-add-option-to-disable-pam-tests.patch b/meta/recipes-gnome/libsecret/libsecret/0001-meson-add-option-to-disable-pam-tests.patch
new file mode 100644 (file)
index 0000000..87ab8a3
--- /dev/null
@@ -0,0 +1,80 @@
+From b90ecbdb4b91961a77a7cbb3a9b6a57128e2194b Mon Sep 17 00:00:00 2001
+From: Markus Volk <f_l_k@t-online.de>
+Date: Tue, 3 Dec 2024 15:58:17 +0100
+Subject: [PATCH] meson: add option to disable pam tests
+
+Upstream-Status: Submitted [https://gitlab.gnome.org/GNOME/libsecret/-/merge_requests/151/commits]
+
+Signed-off-by: Markus Volk <f_l_k@t-online.de>
+---
+ meson_options.txt |  1 +
+ pam/meson.build   | 44 +++++++++++++++++++++++---------------------
+ 2 files changed, 24 insertions(+), 21 deletions(-)
+
+diff --git a/meson_options.txt b/meson_options.txt
+index 936eff8..8fa2a4e 100644
+--- a/meson_options.txt
++++ b/meson_options.txt
+@@ -8,3 +8,4 @@ option('bashcompdir', type: 'string', value: '', description: 'Override default
+ option('bash_completion', type: 'feature', value: 'auto', description: 'Install bash completion files')
+ option('tpm2', type: 'boolean', value: false, description: 'With TPM2 Software Stack')
+ option('pam', type: 'boolean', value: false, description: 'Build PAM module')
++option('pam-tests', type: 'boolean', value: true, description: 'Build PAM Tests')
+diff --git a/pam/meson.build b/pam/meson.build
+index 8413b58..5155329 100644
+--- a/pam/meson.build
++++ b/pam/meson.build
+@@ -19,27 +19,29 @@ pam_gnome_keyring = shared_library('pam_gnome_keyring',
+ )
+ # pam tests
+-pam_wrapper = dependency('pam_wrapper', required: true)
+-libpamtest = dependency('libpamtest', required: true)
++if get_option('pam-tests')
++  pam_wrapper = dependency('pam_wrapper', required: true)
++  libpamtest = dependency('libpamtest', required: true)
+-subdir('servicedir')
++  subdir('servicedir')
+-test_bin = executable('pam_test',
+-  sources: [
+-    'test-pam.c',
+-  ],
+-  dependencies: [
+-    libpamtest,
+-    glib_deps,
+-  ],
+-)
++  test_bin = executable('pam_test',
++    sources: [
++      'test-pam.c',
++    ],
++    dependencies: [
++      libpamtest,
++      glib_deps,
++    ],
++  )
+-test('pam-test',
+-  test_bin,
+-  env: {
+-    'LD_PRELOAD': 'libpam_wrapper.so',
+-    'PAM_WRAPPER': '1',
+-    'PAM_WRAPPER_DEBUGLEVEL': '5',
+-    'PAM_WRAPPER_SERVICE_DIR': meson.current_build_dir() + '/servicedir',
+-  },
+-)
++  test('pam-test',
++    test_bin,
++    env: {
++      'LD_PRELOAD': 'libpam_wrapper.so',
++      'PAM_WRAPPER': '1',
++      'PAM_WRAPPER_DEBUGLEVEL': '5',
++      'PAM_WRAPPER_SERVICE_DIR': meson.current_build_dir() + '/servicedir',
++    },
++  )
++endif
+-- 
+2.47.0
+
index 88c3c73510d58ee6389b349e11923f2229219006..d3566812523ea9c6ffb7f6314f5ff9491c91b329 100644 (file)
@@ -13,11 +13,16 @@ inherit gnomebase gi-docgen vala gobject-introspection manpages
 
 DEPENDS += "glib-2.0 libgcrypt gettext-native"
 
+SRC_URI += "file://0001-meson-add-option-to-disable-pam-tests.patch"
 SRC_URI[archive.sha256sum] = "163d08d783be6d4ab9a979ceb5a4fecbc1d9660d3c34168c581301cd53912b20"
 
+EXTRA_OEMESON += "-Dpam-tests=false"
+
 GTKDOC_MESON_OPTION = 'gtk_doc'
 
+PACKAGECONFIG ?= "${@bb.utils.filter('DISTRO_FEATURES', 'pam', d)}"
 PACKAGECONFIG[manpages] = "-Dmanpage=true,-Dmanpage=false,libxslt-native xmlto-native"
+PACKAGECONFIG[pam] = "-Dpam=true,-Dpam=false,libpam"
 
 # http://errors.yoctoproject.org/Errors/Details/20228/
 ARM_INSTRUCTION_SET:armv4 = "arm"