Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 161296 - sys-apps/pciutils-2.2.4 FHS violation (writes to /usr)
Summary: sys-apps/pciutils-2.2.4 FHS violation (writes to /usr)
Status: VERIFIED DUPLICATE of bug 156183
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: High normal
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-01-10 11:13 UTC by Ulrich Müller
Modified: 2007-02-10 00:30 UTC (History)
1 user (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 Ulrich Müller gentoo-dev 2007-01-10 11:13:26 UTC
pciutils-2.2.4 uses a cron job to update /usr/share/misc/pci.ids.gz. This does not work for a read-only /usr partition.

According to the FHS 2.3 (chpater 4):
| /usr is shareable, read-only data. That means that /usr should
| be shareable between various FHS-compliant hosts and must not be
| written to. Any information that is host-specific or varies with
| time is stored elsewhere.

pci.ids.gz should be moved to /var/lib/misc (probably with a symlink to its old location).

Another question is, if it is a good idea to unconditionally enable that periodic update.
Comment 1 Jakub Moc (RETIRED) gentoo-dev 2007-01-10 12:10:15 UTC
*** Bug 161298 has been marked as a duplicate of this bug. ***
Comment 2 Jakub Moc (RETIRED) gentoo-dev 2007-01-10 12:13:51 UTC
So remove the cronjob if you can't live with it or ask upstream to make pciutils search for the IDs in /var/lib. (And noone said that Gentoo is FHS compliant in cases when it doesn't make sense).

Comment 3 Ulrich Müller gentoo-dev 2007-01-10 13:35:55 UTC
This is _not_ an upstream issue. The cron file is a Gentoo addition.
Reopening.

(And yes, sometimes it does make sense to have /usr mounted read-only. If you have several client machines with NFS-mounted /usr you definitely don't want to have this automatic update feature. At least not per default.)
Comment 4 Jakub Moc (RETIRED) gentoo-dev 2007-01-10 13:47:30 UTC
(In reply to comment #3)
> This is _not_ an upstream issue. The cron file is a Gentoo addition.
> Reopening.

Huh? The pci.ids file location is a Gentoo issue? Has nothing to do w/ the cronjob in case you missed that.


Comment 5 Ulrich Müller gentoo-dev 2007-01-10 13:53:14 UTC
(In reply to comment #4)
> Huh? The pci.ids file location is a Gentoo issue?
> Has nothing to do w/ the cronjob in case you missed that.

The programs from the vanilla package will not write to /usr, only the Gentoo cronjob does that.
Comment 6 SpanKY gentoo-dev 2007-01-10 14:22:14 UTC
*** This bug has been marked as a duplicate of bug 156183 ***
Comment 7 Jakub Moc (RETIRED) gentoo-dev 2007-01-10 14:48:05 UTC
(In reply to comment #5)
> (In reply to comment #4)
> The programs from the vanilla package will not write to /usr, only the Gentoo
> cronjob does that.

WTH are you talking about?
 
# equery f pciutils | grep pci.ids.gz
/usr/share/misc/pci.ids.gz

Comment 8 Ulrich Müller gentoo-dev 2007-01-10 15:38:23 UTC
(In reply to comment #7)
> WTH are you talking about?
> 
> # equery f pciutils | grep pci.ids.gz
> /usr/share/misc/pci.ids.gz

The file belongs to the package, so what?

The point is that the vanilla/upstream package will install the file once, and then will happily function even with a readonly /usr partition.
The cron job will only work if /usr is mounted r/w.

Is it so difficult to understand?
Comment 9 SpanKY gentoo-dev 2007-01-10 16:56:47 UTC
we're tracking the user-opt-in aspect of cronjob in the duplicate bug
Comment 10 Jakub Moc (RETIRED) gentoo-dev 2007-01-10 18:24:00 UTC
(In reply to comment #8)
> Is it so difficult to understand?

Yeah, it's indeed difficult to understand why are you not trying to fix the *real* issue upstream and instead are bugging us w/ a cronjob.
Comment 11 SpanKY gentoo-dev 2007-01-10 22:08:59 UTC
will you just shut up

the issue is Gentoo's cronjob
Comment 12 Ulrich Müller gentoo-dev 2007-01-11 00:10:21 UTC
vapier: Thanks for the moral backing. ;)

Concerning /usr vs. /var, I'd like to point you to the following short thread in freestandards-fhs-discuss:
<http://sourceforge.net/mailarchive/message.php?msg_id=15170824>
Their conclusion is that having pci.ids in /usr/share is o.k. if update-pciids is invoked manually.

It looks like Debian has moved the file from /usr to /var and back to /usr again, see
<http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=278479>
They don't have a cronjob, though.
Comment 13 SpanKY gentoo-dev 2007-01-11 00:56:50 UTC
we're not moving the file from its current location ... we'll just be making the cronjob a USE flag
Comment 14 Radek Podgorny 2007-01-11 01:16:28 UTC
What about a symlink? Wouldn't that satisfy both of you (and me)? :-)
Comment 15 Ulrich Müller gentoo-dev 2007-01-11 02:01:04 UTC
> What about a symlink? Wouldn't that satisfy both of you (and me)? :-)

In most configurations where you have a readonly /usr (e.g. NFS mounted) you problably wouldn't want to have that auto-update feature at all.

I believe the USE flag is the better solution.
Comment 16 SpanKY gentoo-dev 2007-02-10 00:30:54 UTC
update-pciids now checks to see if the file is read-only and if so, skips updating the file