From: Sam James <sam@gentoo.org>
To: gentoo-dev@lists.gentoo.org
Cc: qa@gentoo.org, Sam James <sam@gentoo.org>
Subject: [gentoo-dev] [PATCH v2 2/4] metadata/install-qa-check.d: only trigger on tmpfiles in forbidden location
Date: Fri, 13 Aug 2021 04:43:38 +0100 [thread overview]
Message-ID: <20210813034340.2835238-2-sam@gentoo.org> (raw)
In-Reply-To: <20210813034340.2835238-1-sam@gentoo.org>
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>
---
metadata/install-qa-check.d/60tmpfiles-paths | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
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
--
2.32.0
next prev parent reply other threads:[~2021-08-13 3:44 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-08-13 3:43 [gentoo-dev] [PATCH v2 1/4] metadata/install-qa-check.d: add 60tmpfiles-path QA check Sam James
2021-08-13 3:43 ` Sam James [this message]
2021-08-13 3:43 ` [gentoo-dev] [PATCH v2 3/4] metadata/install-qa-check.d: add exemptions for some packages wrt inherit Sam James
2021-08-13 3:43 ` [gentoo-dev] [PATCH v2 4/4] metadata/install-qa-check.d: add check for missing tmpfiles_process call Sam James
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210813034340.2835238-2-sam@gentoo.org \
--to=sam@gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
--cc=qa@gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox