From 9cb0b4381e0ed9c6e5d156405154adddf9974a51 Mon Sep 17 00:00:00 2001 From: Markus Volk Date: Thu, 5 Dec 2024 11:46:41 +0100 Subject: [PATCH] libsecret: add pam support depending on DISTRO_FEATURES 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 Signed-off-by: Richard Purdie --- ...eson-add-option-to-disable-pam-tests.patch | 80 +++++++++++++++++++ .../libsecret/libsecret_0.21.4.bb | 5 ++ 2 files changed, 85 insertions(+) create mode 100644 meta/recipes-gnome/libsecret/libsecret/0001-meson-add-option-to-disable-pam-tests.patch 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 index 00000000000..87ab8a32cd1 --- /dev/null +++ b/meta/recipes-gnome/libsecret/libsecret/0001-meson-add-option-to-disable-pam-tests.patch @@ -0,0 +1,80 @@ +From b90ecbdb4b91961a77a7cbb3a9b6a57128e2194b Mon Sep 17 00:00:00 2001 +From: Markus Volk +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 +--- + 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 + diff --git a/meta/recipes-gnome/libsecret/libsecret_0.21.4.bb b/meta/recipes-gnome/libsecret/libsecret_0.21.4.bb index 88c3c73510d..d3566812523 100644 --- a/meta/recipes-gnome/libsecret/libsecret_0.21.4.bb +++ b/meta/recipes-gnome/libsecret/libsecret_0.21.4.bb @@ -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" -- 2.47.3