diff options
author | Sam James <sam@gentoo.org> | 2021-08-13 02:39:02 +0100 |
---|---|---|
committer | Sam James <sam@gentoo.org> | 2021-08-16 03:12:07 +0100 |
commit | 27e725ed6e7991b4267e5002376f497781f8c224 (patch) | |
tree | e98b29a29d8a61afe774c70638ca2709864db6ed /metadata/install-qa-check.d | |
parent | metadata/install-qa-check.d: add 60tmpfiles-path QA check (diff) | |
download | gentoo-27e725ed6e7991b4267e5002376f497781f8c224.tar.gz gentoo-27e725ed6e7991b4267e5002376f497781f8c224.tar.bz2 gentoo-27e725ed6e7991b4267e5002376f497781f8c224.zip |
metadata/install-qa-check.d: only trigger on tmpfiles in forbidden location
It's okay to use "keepdir" on /etc/tmpfiles.d.
See: https://archives.gentoo.org/gentoo-dev/message/50558b55dc34f37b238807fc4759640d
Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'metadata/install-qa-check.d')
-rw-r--r-- | metadata/install-qa-check.d/60tmpfiles-paths | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/metadata/install-qa-check.d/60tmpfiles-paths b/metadata/install-qa-check.d/60tmpfiles-paths index ed0bdbff8cd5..5ef56885ebe7 100644 --- a/metadata/install-qa-check.d/60tmpfiles-paths +++ b/metadata/install-qa-check.d/60tmpfiles-paths @@ -11,7 +11,12 @@ tmpfiles_check() { # Check 1 # Scan image for files in /etc/tmpfiles.d which is a forbidden location - if [[ -d "${ED}"/etc/tmpfiles.d/ ]] ; then + # (We use this glob to avoid triggering on keepdir) + shopt -s nullglob + local files=( "${ED}"/etc/tmpfiles.d/*.conf ) + shopt -u nullglob + + if [[ ${#files[@]} -gt 0 ]]; then eqawarn "QA Notice: files installed to /etc/tmpfiles.d" eqawarn "tmpfiles configuration files must be installed by ebuilds /usr/lib/tmpfiles.d!" fi |