Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 513374 - =sys-apps/etckeeper-1.18 - QA Notice: This ebuild installs into paths that should be created at runtime.
Summary: =sys-apps/etckeeper-1.18 - QA Notice: This ebuild installs into paths that sh...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal QA with 1 vote (vote)
Assignee: Georgy Yakovlev
URL: https://github.com/gentoo/gentoo/pull...
Whiteboard:
Keywords: PullRequest
: 646914 (view as bug list)
Depends on:
Blocks: runtime-paths
  Show dependency tree
 
Reported: 2014-06-15 20:25 UTC by Coacher
Modified: 2021-11-20 07:31 UTC (History)
4 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
patch (patch,534 bytes, patch)
2015-04-14 09:23 UTC, Coacher
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Coacher 2014-06-15 20:25:39 UTC
Hello.

The following message is generated during etckeeper install:

 * QA Notice: This ebuild installs into paths that should be created at runtime.
 *  To fix, simply do not install into these directories.  Instead, your package
 *  should create dirs on the fly at runtime as needed via init scripts/etc...
 *
 *   var/cache
 *   var/cache/etckeeper

Please fix.

Reproducible: Always
Comment 1 Coacher 2014-10-24 16:23:57 UTC
Still reproducible with etckeeper-1.15. Please fix it.
Comment 2 Coacher 2015-04-14 09:23:17 UTC
Created attachment 401210 [details, diff]
patch

Here's the patch that fixes this problem.

/var/cache/etckeeper directory is used to store a list of installed packages. This list is needed when etckeeper is configured to automatically commit changes after the package installation via package manager.

This directory is created (if missing) from pre-install.d/10packagelist script before it is used. The second place where this directory is used is post-install.d/50vcs-commit script (do a `grep cache -R ./*` in sources), but it is called after pre-install.d/ scripts, so everything should run smoothly.
Comment 3 Coacher 2015-04-14 09:25:35 UTC
BTW etckeeper-1.18.1 was released though changes are cosmetical (docs only).
Comment 4 Manuel Rüger (RETIRED) gentoo-dev 2016-02-02 17:33:28 UTC
Please try to push your fix upstream, that would be really helpful.
Comment 5 Coacher 2016-02-03 09:06:58 UTC
(In reply to Manuel Rüger from comment #4)
> Please try to push your fix upstream, that would be really helpful.

What rationale should I put in it? This a Gentoo-only issue.
Comment 6 Coacher 2016-02-04 16:43:44 UTC
(In reply to Coacher from comment #5)
> (In reply to Manuel Rüger from comment #4)
> > Please try to push your fix upstream, that would be really helpful.
> 
> What rationale should I put in it? This a Gentoo-only issue.

Because for example it is common for programs to install docs in /usr/share/doc/${PN}, but we don't push changes upstream that make them install docs in /usr/share/doc/${PF} instead, which is the Gentoo way.
Comment 7 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2018-04-05 19:03:25 UTC
*** Bug 646914 has been marked as a duplicate of this bug. ***
Comment 8 Jonas Stein gentoo-dev 2018-04-22 15:35:19 UTC
What is the situation 4 years later? Any news?
Comment 9 Michael 'veremitz' Everitt 2018-04-22 20:09:57 UTC
I don't mind including the patch in a revbump, but I will try to contact upstream for comment anyway. I suspect as Coacher points out, it's a Gentoo-QA specific "issue" as such.

Thank you for the detailed information, @Coacher.
Comment 10 Benda Xu gentoo-dev 2018-09-24 12:46:29 UTC
Sorry, I don't understand why this is a QA issue.  Should /var/cache/etckeeper be treated any more specifically?
Comment 11 Benda Xu gentoo-dev 2018-09-24 14:58:02 UTC
(In reply to Benda Xu from comment #10)
> Sorry, I don't understand why this is a QA issue.  Should
> /var/cache/etckeeper be treated any more specifically?

Sorry, my mistake. Now I know what you mean.
Comment 12 Michael 'veremitz' Everitt 2019-06-05 21:44:55 UTC
(In reply to Michael 'veremitz' Everitt from comment #9)
> I don't mind including the patch in a revbump, but I will try to contact
> upstream for comment anyway. I suspect as Coacher points out, it's a
> Gentoo-QA specific "issue" as such.
> 
> Thank you for the detailed information, @Coacher.

Received the following from the maintainer:

"I guess this is a gentoo policy to not have the directory part of
packages, but it is not a FHS violation for etckeeper to create it at
installation time, which is done basically for informational purposes
(so eg listing the contents of the etckeeper packages includes this
directory that is part of it whenever it's created).

I suppose the best thing for you to do is to exclude the directory from
the package, which should work fine."

If nobody else does, I will add the patch in over the coming week, as I'm in the middle of a project right now, due at the weekend.
Comment 13 Michael Orlitzky gentoo-dev 2019-06-05 23:18:36 UTC
Upstream isn't really doing anything wrong: they're allowed to create that directory in "make install", although if I were them, I wouldn't count on it sticking around. The FHS is unclear about whether or not directories under /var/cache are permanent, so you have to plan for the worst.

In any case, instead of patching the Makefile, you can just remove ${D}/var/cache at the end of src_install in the ebuild, and then leave a comment as to why.
Comment 14 Michael 'veremitz' Everitt 2019-06-22 06:56:15 UTC
See: https://github.com/gentoo/gentoo/pull/12304
Comment 15 Georgy Yakovlev archtester gentoo-dev 2021-11-20 07:31:22 UTC
tmpfiles snipped was added in 1b8e6f6772146d6cd66af46f3bd5453850b5e71b