diff mbox series

[meta-oe] snapper: pass --pam-security=${libdir}/security

Message ID 20241107221410.462684-1-martin.jansa@gmail.com
State New
Headers show
Series [meta-oe] snapper: pass --pam-security=${libdir}/security | expand

Commit Message

Martin Jansa Nov. 7, 2024, 10:14 p.m. UTC
pam_snapper.so is installed in libdir as the default in configure.ac is:
PAM_SECURITY=${libdir}/security
https://github.com/openSUSE/snapper/blob/master/configure.ac#L66

and depending on multilib configuration this fails with:

ERROR: QA Issue: lib32-snapper: Files/directories were installed but not shipped in any package:
  /usr/lib32/security/pam_snapper.so
Please set FILES such that these items are packaged. Alternatively if they are unneeded, avoid installing them or delete them within do_install.
lib32-snapper: 1 installed and not shipped files. [installed-vs-shipped]

or

ERROR: QA Issue: snapper: Files/directories were installed but not shipped in any package:
  /usr/lib64/security/pam_snapper.so
Please set FILES such that these items are packaged. Alternatively if they are unneeded, avoid installing them or delete them within do_install.
snapper: 1 installed and not shipped files. [installed-vs-shipped]

when default libdir doesn't match with nonarch_libdir

Some recipes are using ${base_libdir}/security and some just
${libdir}/security with the usrmerge being the default and required
with systemd I'm not sure which one is better.

Now all files are packaged some in libdir some in nonarch_libdir:

snapper/0.11.2 $ find packages-split/snapper/usr/lib*
packages-split/snapper/usr/lib
packages-split/snapper/usr/lib/systemd
packages-split/snapper/usr/lib/systemd/system
packages-split/snapper/usr/lib/systemd/system/snapper-timeline.timer
packages-split/snapper/usr/lib/systemd/system/snapper-timeline.service
packages-split/snapper/usr/lib/systemd/system/snapper-boot.timer
packages-split/snapper/usr/lib/systemd/system/snapper-cleanup.timer
packages-split/snapper/usr/lib/systemd/system/snapperd.service
packages-split/snapper/usr/lib/systemd/system/snapper-boot.service
packages-split/snapper/usr/lib/systemd/system/snapper-cleanup.service
packages-split/snapper/usr/lib/snapper
packages-split/snapper/usr/lib/snapper/systemd-helper
packages-split/snapper/usr/lib/snapper/plugins
packages-split/snapper/usr/lib/snapper/installation-helper
packages-split/snapper/usr/lib/pam_snapper
packages-split/snapper/usr/lib/pam_snapper/pam_snapper_pamconfig.sh
packages-split/snapper/usr/lib/pam_snapper/pam_snapper_userdel.sh
packages-split/snapper/usr/lib/pam_snapper/pam_snapper_homeconvert.sh
packages-split/snapper/usr/lib/pam_snapper/pam_snapper_useradd.sh
packages-split/snapper/usr/lib64
packages-split/snapper/usr/lib64/libsnapper.so.7.4.3
packages-split/snapper/usr/lib64/security
packages-split/snapper/usr/lib64/security/pam_snapper.so
packages-split/snapper/usr/lib64/snapper
packages-split/snapper/usr/lib64/snapper/testsuite
packages-split/snapper/usr/lib64/snapper/testsuite/directory1
packages-split/snapper/usr/lib64/snapper/testsuite/permissions2
packages-split/snapper/usr/lib64/snapper/testsuite/error2
packages-split/snapper/usr/lib64/snapper/testsuite/simple1
packages-split/snapper/usr/lib64/snapper/testsuite/ug-tests
packages-split/snapper/usr/lib64/snapper/testsuite/xattrs1
packages-split/snapper/usr/lib64/snapper/testsuite/owner3
packages-split/snapper/usr/lib64/snapper/testsuite/run-all
packages-split/snapper/usr/lib64/snapper/testsuite/missing-directory1
packages-split/snapper/usr/lib64/snapper/testsuite/permissions1
packages-split/snapper/usr/lib64/snapper/testsuite/test-btrfsutils
packages-split/snapper/usr/lib64/snapper/testsuite/owner2
packages-split/snapper/usr/lib64/snapper/testsuite/xattrs3
packages-split/snapper/usr/lib64/snapper/testsuite/permissions3
packages-split/snapper/usr/lib64/snapper/testsuite/CAUTION
packages-split/snapper/usr/lib64/snapper/testsuite/xattrs4
packages-split/snapper/usr/lib64/snapper/testsuite/ascii-file
packages-split/snapper/usr/lib64/snapper/testsuite/setup-and-run-all
packages-split/snapper/usr/lib64/snapper/testsuite/owner1
packages-split/snapper/usr/lib64/snapper/testsuite/xattrs2
packages-split/snapper/usr/lib64/snapper/testsuite/error4
packages-split/snapper/usr/lib64/snapper/testsuite/error1
packages-split/snapper/usr/lib64/libsnapper.so.7

Signed-off-by: Martin Jansa <martin.jansa@gmail.com>
---
 meta-oe/recipes-support/snapper/snapper_0.11.2.bb | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/meta-oe/recipes-support/snapper/snapper_0.11.2.bb b/meta-oe/recipes-support/snapper/snapper_0.11.2.bb
index d8987eeadc..28fa104af0 100644
--- a/meta-oe/recipes-support/snapper/snapper_0.11.2.bb
+++ b/meta-oe/recipes-support/snapper/snapper_0.11.2.bb
@@ -17,7 +17,7 @@  SRCREV = "6c603565f36e9996d85045c8012cd04aba5f3708"
 
 S = "${WORKDIR}/git"
 
-EXTRA_OECONF += "--disable-zypp"
+EXTRA_OECONF += "--disable-zypp --with-pam-security=${libdir}/security"
 
 PACKAGECONFIG ?= "${@bb.utils.filter('DISTRO_FEATURES', 'api-documentation systemd pam', d)}"
 PACKAGECONFIG[pam] = "--enable-pam,--disable-pam,libpam"
@@ -35,7 +35,7 @@  do_install:append() {
 	install -m0644 ${S}/data/default-config ${D}${sysconfdir}/sysconfig/snapper
 }
 
-FILES:${PN} += "${nonarch_libdir} ${systemd_system_unitdir} ${datadir}"
+FILES:${PN} += "${libdir}/security ${nonarch_libdir} ${systemd_system_unitdir} ${datadir}"
 
 # bash is needed for the testsuite
 RDEPENDS:${PN} = "bash diffutils util-linux util-linux-mount"