Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 401027 - sys-apps/pcsc-lite-1.7.2-r2 creates /var/run/pcscd
Summary: sys-apps/pcsc-lite-1.7.2-r2 creates /var/run/pcscd
Status: RESOLVED WONTFIX
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Crypto team [DISABLED]
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: keepdir-var-run_lock
  Show dependency tree
 
Reported: 2012-01-27 13:45 UTC by Maxim Kammerer
Modified: 2012-01-27 17:50 UTC (History)
0 users

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 Maxim Kammerer 2012-01-27 13:45:36 UTC
I think the directory is created by

    enewuser pcscd -1 -1 /var/run/pcscd pcscd,openct

(also in newer ebuilds).

This conflicts with the policy of only creating stuff in /var/run on-demand.
Comment 1 Diego Elio Pettenò (RETIRED) gentoo-dev 2012-01-27 16:59:50 UTC
It's not "create on demand" but it's rather "make sure it's there". /var/run/pcscd is created when starting the init script that's what's important (it won't fail if it's not there), but of course the ebuild tries to create it the soonest.
Comment 2 Maxim Kammerer 2012-01-27 17:29:14 UTC
From bug #332633 (the one this bug blocks).

---
As discussed on the gentoo-dev mailing list, some ebuilds choose to create a
/var/run/${PN} directory at installation time instead of at runtime. Our init.d
scripts should check whether a subdirectory is present and create it if need
be, instead of using keepdir in the ebuilds.
---

This is pretty much contrary to what you wrote. There is no point to creating something in /var/run at build-time, since /var/run can (and will - see bug #361349) be a tmpfs.

Now, doing both (ebuild and init.d) might be ok, but I think that writing "of course the ebuild tries to create it the soonest" hints that you might not be aware of bug #332633.
Comment 3 Diego Elio Pettenò (RETIRED) gentoo-dev 2012-01-27 17:37:00 UTC
Okay, see, I'm the current QA lead (until proven otherwise) and I've been working _quite_ a bit about /var/run on tmpfs as I started using it way before /run became cool, so I know more or less everything about this kind of issues.

In this case, whether it's tmpfs or not, pcscd user should _really_ have /var/run/pcscd as home. And enewuser by default creates the directory in "${D}" if it's not there already. So that's where my "of course" comes from.

Since this is still not an issue (okay we create a directory that will be removed at boot, big deal... it'll be created by the init script anyway), this bug can stay closed, okay?
Comment 4 Maxim Kammerer 2012-01-27 17:50:37 UTC
Sure, maybe you can also add a clarification to bug #332633? I.e., about "remove explicit keepdir" vs. "don't try hard to keep /var/run clean". In the bunch of bugs I opened today about /var/run, one was about depending on directory in /var/run, some were about explicit keepdir, some about enewuser, some about directory created by make. Bug #332633 doesn't make enough distinction.

The reason I opened those bugs is that I regularly build Gentoo images, so I see the difference between directories created by ebuilds and directories created by services (init.d scripts or binaries themselves), by simply doing ls -l /var/run. So I thought I would contribute to /run migration (which is happening, cool or not).