1 |
On Sun, Aug 1, 2021 at 1:24 PM Sam James <sam@g.o> wrote: |
2 |
> |
3 |
> |
4 |
> |
5 |
> > On 1 Aug 2021, at 17:42, Mike Gilbert <floppym@g.o> wrote: |
6 |
> > |
7 |
> > On Sat, Jul 31, 2021 at 7:56 PM Sam James <sam@g.o> wrote: |
8 |
> >> |
9 |
> >> This adds two tmpfiles related QA checks: |
10 |
> >> 1) Verify packages don't install tmpfiles to /etc/tmpfiles.d, which |
11 |
> >> is a deprecated location; |
12 |
> > |
13 |
> > sys-apps/systemd calls keepdir /etc/tmpfiles.d so that users don't get |
14 |
> > confused by a missing directory. |
15 |
> > |
16 |
> > How would you suggest I avoid this QA warning? |
17 |
> |
18 |
> We can change the check to be for installing files within the directory? |
19 |
|
20 |
Works for me. Note that keepdir actually installs a dotfile, |
21 |
(.keep-${CATEGORY}_${PN}-${SLOT}), so we would want to exclude that. |
22 |
Also, systemd-tmpfiles looks for *.conf and ignores other files, so we |
23 |
could probably ignore them too. |
24 |
|
25 |
Maybe something like this: |
26 |
|
27 |
files=( "${ED}"/etc/tmpfiles.d/*.conf ) |
28 |
if [[ ${#files[@]} -gt 0 ]]; then |
29 |
... |
30 |
|
31 |
> > |
32 |
> >> 2) Check whether packages inherit tmpfiles.eclass if they're |
33 |
> >> installing files to /usr/lib/tmpfiles.d. |
34 |
> >> |
35 |
> >> (This helps to catch packages not calling tmpfiles_process |
36 |
> >> in pkg_postinst). |
37 |
> > |
38 |
> > sys-apps/systemd installs many files in /usr/lib/tmpfiles.d, but |
39 |
> > calling tmpfiles_process would probably not make much sense. |
40 |
> > |
41 |
> > How would you suggest I avoid this QA warning? |
42 |
> > |
43 |
> |
44 |
> We'll probably hardcode a list of folks who need to do this: |
45 |
> - sys-libs/pam |
46 |
> - sys-apps/systemd |
47 |
> (I'll check for any others, but I don't believe there are any now). |
48 |
> |
49 |
> How about that? |
50 |
|
51 |
I'm not crazy about hard-coding package names inside a QA check. |
52 |
Personally, I would prefer a magic variable I could set to disable the |
53 |
check from the ebuild side. |