On Sun, Aug 1, 2021 at 1:24 PM Sam James <s...@gentoo.org> wrote: > > > > > On 1 Aug 2021, at 17:42, Mike Gilbert <flop...@gentoo.org> wrote: > > > > On Sat, Jul 31, 2021 at 7:56 PM Sam James <s...@gentoo.org> wrote: > >> > >> This adds two tmpfiles related QA checks: > >> 1) Verify packages don't install tmpfiles to /etc/tmpfiles.d, which > >> is a deprecated location; > > > > sys-apps/systemd calls keepdir /etc/tmpfiles.d so that users don't get > > confused by a missing directory. > > > > How would you suggest I avoid this QA warning? > > We can change the check to be for installing files within the directory?
Works for me. Note that keepdir actually installs a dotfile, (.keep-${CATEGORY}_${PN}-${SLOT}), so we would want to exclude that. Also, systemd-tmpfiles looks for *.conf and ignores other files, so we could probably ignore them too. Maybe something like this: files=( "${ED}"/etc/tmpfiles.d/*.conf ) if [[ ${#files[@]} -gt 0 ]]; then ... > > > >> 2) Check whether packages inherit tmpfiles.eclass if they're > >> installing files to /usr/lib/tmpfiles.d. > >> > >> (This helps to catch packages not calling tmpfiles_process > >> in pkg_postinst). > > > > sys-apps/systemd installs many files in /usr/lib/tmpfiles.d, but > > calling tmpfiles_process would probably not make much sense. > > > > How would you suggest I avoid this QA warning? > > > > We'll probably hardcode a list of folks who need to do this: > - sys-libs/pam > - sys-apps/systemd > (I'll check for any others, but I don't believe there are any now). > > How about that? I'm not crazy about hard-coding package names inside a QA check. Personally, I would prefer a magic variable I could set to disable the check from the ebuild side.