Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 520460 - app-portage/eix installs into paths that should be created at runtime
Summary: app-portage/eix installs into paths that should be created at runtime
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Martin Väth
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: runtime-paths
  Show dependency tree
 
Reported: 2014-08-22 08:20 UTC by Agostino Sarubbo
Modified: 2014-11-16 16:58 UTC (History)
3 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Agostino Sarubbo gentoo-dev 2014-08-22 08:20:21 UTC
This is an auto-filled bug because this package should create some paths at runtime.

 * 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/eix
 *   var/cache/eix/.keep_app-portage_eix-0
Comment 1 Martin Väth 2014-08-22 10:42:11 UTC
This is a false positive.

eix installs corresponding "code" in /usr/lib/tmpfiles.d/eix.conf
but installs the directories *additionally*.

The latter should not change, since it has several advantages:

1. The directories are available immediately.
2. Users can locate the corresponding package with tools like qfile.
3. When uninstalling eix, the directories are removed (if empty).
Comment 2 Ian Stakenvicius (RETIRED) gentoo-dev 2014-08-22 13:44:48 UTC
(In reply to Agostino Sarubbo from comment #0)
>  *   var/cache/eix/.keep_app-portage_eix-0


I wonder if doing 'keepdir' on this path might be a bad thing, though..  

On a side note, does eix still create the dir itself if it doesn't exist, ie, if tmpfiles.d is not processed?
Comment 3 Martin Väth 2014-08-22 15:12:27 UTC
(In reply to Ian Stakenvicius from comment #2)
> >  *   var/cache/eix/.keep_app-portage_eix-0
> 
> I wonder if doing 'keepdir' on this path might be a bad thing, though..

With ancient portage versions, empty directories would not be installed.
Current portage versions install empty directories as well; actually,
I do not understand why "keepdir" still installs a dummy file.
Since we use current EAPI anyway, I think it is safe to replace
keepdir by dodir.

> On a side note, does eix still create the dir itself if it doesn't exist,
> ie, if tmpfiles.d is not processed?

No. It would be very problematic to do so due to eix running with permissions of portage (or possibly even lower permissions). eix would need to be very smart and create/change permissions of the parent directory before dropping permissions (in a rather configurable way to avoid issues with prefix or if the user wants a different configuration).

This does not seem right and is the reason why I "outsourced" the creation of the parent directories to tmpfiles.d and to the ebuild, respectively:

This is something which should be done during installation and during a reboot, and it should not cause complications or even raise security issues in the main program. If e.g. users change the eix path, they should not need hack around some "smart" behaviour of eix.
Comment 4 Martin Väth 2014-08-23 18:13:55 UTC
I just realized (I had completely forgotten about this):

In the eix-0.30.2 ebuild the 'keepdir' is already unused:
Creation/removal takes place in pkg_postinst and pkg_postrm, respectively, so >=eix-0.30.2 shouldn't even trigger the QA Notice anymore.

(Unfortunately, this also means that users are no longer able to apply qfile, but I guess it is not such a big deal to understand which package uses /var/cache/eix).

So it seems to me that this bug is actually fixed, already...
Comment 5 Agostino Sarubbo gentoo-dev 2014-08-23 19:59:03 UTC
feel free to close when the fixed version is stable
Comment 6 Martin Väth 2014-11-16 16:58:08 UTC
Closing to not hinder stabilization of eix-0.30.4