* [gentoo-dev] rfc: use of the /run directory
@ 2011-05-17 16:57 William Hubbs
2011-05-17 18:11 ` Peter Volkov
` (2 more replies)
0 siblings, 3 replies; 44+ messages in thread
From: William Hubbs @ 2011-05-17 16:57 UTC (permalink / raw
To: gentoo development
[-- Attachment #1: Type: text/plain, Size: 720 bytes --]
All,
I think we should support the /run directory [1] [2]. The issue is
that there are at least two packages, udev and dracut, in gentoo, which
support the use of this directory. Support for it is being worked on in
openrc, and systemd will use it once it comes into the tree.
For now, it is optionally supported in udev, but udev upstream plans to
make this mandatory at some point in the future.
I, as well as several others, believe we should proactively create this
directory in a new release of baselayout, so that we will avoid bugs in
the future when packages start requiring it.
What does everyone else think?
William
[1] https://lwn.net/Articles/436012/
[2] http://bugs.gentoo.org/show_bug.cgi?id=361349
[-- Attachment #2: Type: application/pgp-signature, Size: 198 bytes --]
^ permalink raw reply [flat|nested] 44+ messages in thread
* Re: [gentoo-dev] rfc: use of the /run directory
2011-05-17 16:57 [gentoo-dev] rfc: use of the /run directory William Hubbs
@ 2011-05-17 18:11 ` Peter Volkov
2011-05-17 18:28 ` Nirbheek Chauhan
2011-05-17 22:50 ` Ciaran McCreesh
2011-05-20 8:58 ` Luca Barbato
2 siblings, 1 reply; 44+ messages in thread
From: Peter Volkov @ 2011-05-17 18:11 UTC (permalink / raw
To: gentoo-dev
В Втр, 17/05/2011 в 11:57 -0500, William Hubbs пишет:
> I think we should support the /run directory [1] [2].
> I, as well as several others, believe we should proactively create this
> directory ... What does everyone else think?
I've read https://lwn.net/Articles/436012/ and that convinced me. Until
there is better solution, please, do it. Also I think it's good idea if
it'll be on tmpfs, as it should, from the very beginning.
--
Peter.
^ permalink raw reply [flat|nested] 44+ messages in thread
* Re: [gentoo-dev] rfc: use of the /run directory
2011-05-17 18:11 ` Peter Volkov
@ 2011-05-17 18:28 ` Nirbheek Chauhan
2011-05-17 18:43 ` Ângelo Arrifano
` (2 more replies)
0 siblings, 3 replies; 44+ messages in thread
From: Nirbheek Chauhan @ 2011-05-17 18:28 UTC (permalink / raw
To: gentoo-dev
On Tue, May 17, 2011 at 11:41 PM, Peter Volkov <pva@gentoo.org> wrote:
> В Втр, 17/05/2011 в 11:57 -0500, William Hubbs пишет:
>> I think we should support the /run directory [1] [2].
>
>> I, as well as several others, believe we should proactively create this
>> directory ... What does everyone else think?
>
> I've read https://lwn.net/Articles/436012/ and that convinced me. Until
> there is better solution, please, do it. Also I think it's good idea if
> it'll be on tmpfs, as it should, from the very beginning.
>
I'd add that if we want /run to be on tmpfs, /var/run and /tmp should
both be on tmpfs by default. I've been doing this manually for a year,
and so have other distributions.
--
~Nirbheek Chauhan
Gentoo GNOME+Mozilla Team
^ permalink raw reply [flat|nested] 44+ messages in thread
* Re: [gentoo-dev] rfc: use of the /run directory
2011-05-17 18:28 ` Nirbheek Chauhan
@ 2011-05-17 18:43 ` Ângelo Arrifano
2011-05-17 18:50 ` Nirbheek Chauhan
2011-05-17 19:11 ` Peter Volkov
2011-05-17 19:07 ` William Hubbs
2011-05-17 19:20 ` Panagiotis Christopoulos
2 siblings, 2 replies; 44+ messages in thread
From: Ângelo Arrifano @ 2011-05-17 18:43 UTC (permalink / raw
To: gentoo-dev
On Tuesday 17 May 2011 20:28:56 Nirbheek Chauhan wrote:
> On Tue, May 17, 2011 at 11:41 PM, Peter Volkov <pva@gentoo.org> wrote:
> > В Втр, 17/05/2011 в 11:57 -0500, William Hubbs пишет:
> >> I think we should support the /run directory [1] [2].
> >>
> >> I, as well as several others, believe we should proactively create this
> >> directory ... What does everyone else think?
> >
> > I've read https://lwn.net/Articles/436012/ and that convinced me. Until
> > there is better solution, please, do it. Also I think it's good idea if
> > it'll be on tmpfs, as it should, from the very beginning.
>
> I'd add that if we want /run to be on tmpfs, /var/run and /tmp should
> both be on tmpfs by default. I've been doing this manually for a year,
> and so have other distributions.
The lwn article is definitely interesting to read, I welcome the new /run. I
wouldn't make /tmp as tmpfs though, there are some packages (wireshask I'm
looking at you) that can fill the directory fairly easy.
Regards,
--
Angelo Arrifano AKA MiKNiX
Gentoo Embedded developer
GPE maintainer
http://www.gentoo.org/~miknix
http://miknix.homelinux.com
^ permalink raw reply [flat|nested] 44+ messages in thread
* Re: [gentoo-dev] rfc: use of the /run directory
2011-05-17 18:43 ` Ângelo Arrifano
@ 2011-05-17 18:50 ` Nirbheek Chauhan
2011-05-17 19:11 ` Peter Volkov
1 sibling, 0 replies; 44+ messages in thread
From: Nirbheek Chauhan @ 2011-05-17 18:50 UTC (permalink / raw
To: gentoo-dev
On Wed, May 18, 2011 at 12:13 AM, Ângelo Arrifano <miknix@gentoo.org> wrote:
> On Tuesday 17 May 2011 20:28:56 Nirbheek Chauhan wrote:
>> I'd add that if we want /run to be on tmpfs, /var/run and /tmp should
>> both be on tmpfs by default. I've been doing this manually for a year,
>> and so have other distributions.
>
> The lwn article is definitely interesting to read, I welcome the new /run. I
> wouldn't make /tmp as tmpfs though, there are some packages (wireshask I'm
> looking at you) that can fill the directory fairly easy.
>
I wonder what Fedora and Ubuntnu do to fix that. Maybe we should do
the same thing.
--
~Nirbheek Chauhan
Gentoo GNOME+Mozilla Team
^ permalink raw reply [flat|nested] 44+ messages in thread
* Re: [gentoo-dev] rfc: use of the /run directory
2011-05-17 18:28 ` Nirbheek Chauhan
2011-05-17 18:43 ` Ângelo Arrifano
@ 2011-05-17 19:07 ` William Hubbs
2011-05-17 20:35 ` James Cloos
2011-05-17 19:20 ` Panagiotis Christopoulos
2 siblings, 1 reply; 44+ messages in thread
From: William Hubbs @ 2011-05-17 19:07 UTC (permalink / raw
To: gentoo-dev
[-- Attachment #1: Type: text/plain, Size: 986 bytes --]
On Tue, May 17, 2011 at 11:58:56PM +0530, Nirbheek Chauhan wrote:
> On Tue, May 17, 2011 at 11:41 PM, Peter Volkov <pva@gentoo.org> wrote:
> > В Втр, 17/05/2011 в 11:57 -0500, William Hubbs пишет:
> >> I think we should support the /run directory [1] [2].
> >
> >> I, as well as several others, believe we should proactively create this
> >> directory ... What does everyone else think?
> >
> > I've read https://lwn.net/Articles/436012/ and that convinced me. Until
> > there is better solution, please, do it. Also I think it's good idea if
> > it'll be on tmpfs, as it should, from the very beginning.
> >
>
> I'd add that if we want /run to be on tmpfs, /var/run and /tmp should
> both be on tmpfs by default. I've been doing this manually for a year,
> and so have other distributions.
Once /run is in place,
/var/run will be a symbolic link to /run and /var/lock will be a
symbolic link to /run/lock.
So that will cover /var/run.
William
[-- Attachment #2: Type: application/pgp-signature, Size: 198 bytes --]
^ permalink raw reply [flat|nested] 44+ messages in thread
* Re: [gentoo-dev] rfc: use of the /run directory
2011-05-17 18:43 ` Ângelo Arrifano
2011-05-17 18:50 ` Nirbheek Chauhan
@ 2011-05-17 19:11 ` Peter Volkov
2011-05-17 19:20 ` Ângelo Arrifano
1 sibling, 1 reply; 44+ messages in thread
From: Peter Volkov @ 2011-05-17 19:11 UTC (permalink / raw
To: gentoo-dev
В Втр, 17/05/2011 в 20:43 +0200, Ângelo Arrifano пишет:
> On Tuesday 17 May 2011 20:28:56 Nirbheek Chauhan wrote:
> > I'd add that if we want /run to be on tmpfs, /var/run and /tmp should
> > both be on tmpfs by default. I've been doing this manually for a year,
> > and so have other distributions.
>
> The lwn article is definitely interesting to read, I welcome the new /run. I
> wouldn't make /tmp as tmpfs though, there are some packages (wireshask I'm
> looking at you) that can fill the directory fairly easy.
Hm, may be I miss something... but how wireshark fills /run? As far as I
see dumps go into /tmp.
--
Peter.
^ permalink raw reply [flat|nested] 44+ messages in thread
* Re: [gentoo-dev] rfc: use of the /run directory
2011-05-17 19:11 ` Peter Volkov
@ 2011-05-17 19:20 ` Ângelo Arrifano
0 siblings, 0 replies; 44+ messages in thread
From: Ângelo Arrifano @ 2011-05-17 19:20 UTC (permalink / raw
To: gentoo-dev
On Tuesday 17 May 2011 21:11:12 Peter Volkov wrote:
> В Втр, 17/05/2011 в 20:43 +0200, Ângelo Arrifano пишет:
> > On Tuesday 17 May 2011 20:28:56 Nirbheek Chauhan wrote:
> > > I'd add that if we want /run to be on tmpfs, /var/run and /tmp should
> > > both be on tmpfs by default. I've been doing this manually for a year,
> > > and so have other distributions.
> >
> > The lwn article is definitely interesting to read, I welcome the new
> > /run. I wouldn't make /tmp as tmpfs though, there are some packages
> > (wireshask I'm looking at you) that can fill the directory fairly easy.
>
> Hm, may be I miss something... but how wireshark fills /run? As far as I
> see dumps go into /tmp.
>
> --
> Peter.
Either one of us is needing a break away from the computer to relax the eyes,
which one is it? :P
--
Angelo Arrifano AKA MiKNiX
Gentoo Embedded developer
GPE maintainer
http://www.gentoo.org/~miknix
http://miknix.homelinux.com
^ permalink raw reply [flat|nested] 44+ messages in thread
* Re: [gentoo-dev] rfc: use of the /run directory
2011-05-17 18:28 ` Nirbheek Chauhan
2011-05-17 18:43 ` Ângelo Arrifano
2011-05-17 19:07 ` William Hubbs
@ 2011-05-17 19:20 ` Panagiotis Christopoulos
2011-05-17 19:46 ` William Hubbs
2011-05-17 19:48 ` [gentoo-dev] " Nirbheek Chauhan
2 siblings, 2 replies; 44+ messages in thread
From: Panagiotis Christopoulos @ 2011-05-17 19:20 UTC (permalink / raw
To: gentoo-dev
[-- Attachment #1: Type: text/plain, Size: 831 bytes --]
On 23:58 Tue 17 May , Nirbheek Chauhan wrote:
> ...
> I'd add that if we want /run to be on tmpfs, /var/run and /tmp should
> both be on tmpfs by default. I've been doing this manually for a year,
> and so have other distributions.
>
Hi,
A quick look at the size of my desktop's /tmp is:
spirit@Vereniki ~ $ du -sh /tmp/
641M /tmp/
spirit@Vereniki ~ $
Maybe it's just me (cause of the way I'm using /tmp, eg. I use that dir
to unpack sources of packages I want to temporarily look inside and
for anything else *temporary*, also some programs (eg. browsers) use it
for temporary storage) but if there are others like me, I don't
think we'd like to do this in RAM space (tmpfs). For /run and /var/run
dirs it's ok I suppose.
--
Panagiotis Christopoulos ( pchrist )
( Gentoo Lisp Project )
[-- Attachment #2: Type: application/pgp-signature, Size: 197 bytes --]
^ permalink raw reply [flat|nested] 44+ messages in thread
* Re: [gentoo-dev] rfc: use of the /run directory
2011-05-17 19:20 ` Panagiotis Christopoulos
@ 2011-05-17 19:46 ` William Hubbs
2011-05-18 1:31 ` [gentoo-dev] " Duncan
2011-05-18 1:36 ` [gentoo-dev] " Jeroen Roovers
2011-05-17 19:48 ` [gentoo-dev] " Nirbheek Chauhan
1 sibling, 2 replies; 44+ messages in thread
From: William Hubbs @ 2011-05-17 19:46 UTC (permalink / raw
To: gentoo-dev
[-- Attachment #1: Type: text/plain, Size: 1276 bytes --]
On Tue, May 17, 2011 at 10:20:56PM +0300, Panagiotis Christopoulos wrote:
> On 23:58 Tue 17 May , Nirbheek Chauhan wrote:
> > ...
> > I'd add that if we want /run to be on tmpfs, /var/run and /tmp should
> > both be on tmpfs by default. I've been doing this manually for a year,
> > and so have other distributions.
> >
>
> Hi,
>
> A quick look at the size of my desktop's /tmp is:
>
> spirit@Vereniki ~ $ du -sh /tmp/
> 641M /tmp/
> spirit@Vereniki ~ $
>
> Maybe it's just me (cause of the way I'm using /tmp, eg. I use that dir
> to unpack sources of packages I want to temporarily look inside and
> for anything else *temporary*, also some programs (eg. browsers) use it
> for temporary storage) but if there are others like me, I don't
> think we'd like to do this in RAM space (tmpfs). For /run and /var/run
> dirs it's ok I suppose.
If you want /tmp to be a tmpfs, that is pretty easy to do through fstab
(I do that here actually). I'm not sure whether we want to force that on
a distribution level or not though.
The directories that would be affected by having /run on tmpfs would be
/var/run and /var/lock. The suggested way of doing this is to have
/var/run linked to /run and /var/lock linked to /run/lock.
William
[-- Attachment #2: Type: application/pgp-signature, Size: 198 bytes --]
^ permalink raw reply [flat|nested] 44+ messages in thread
* Re: [gentoo-dev] rfc: use of the /run directory
2011-05-17 19:20 ` Panagiotis Christopoulos
2011-05-17 19:46 ` William Hubbs
@ 2011-05-17 19:48 ` Nirbheek Chauhan
2011-05-17 20:00 ` Olivier Crête
2011-05-17 20:20 ` Panagiotis Christopoulos
1 sibling, 2 replies; 44+ messages in thread
From: Nirbheek Chauhan @ 2011-05-17 19:48 UTC (permalink / raw
To: gentoo-dev
On Wed, May 18, 2011 at 12:50 AM, Panagiotis Christopoulos
<pchrist@gentoo.org> wrote:
> On 23:58 Tue 17 May , Nirbheek Chauhan wrote:
>> ...
>> I'd add that if we want /run to be on tmpfs, /var/run and /tmp should
>> both be on tmpfs by default. I've been doing this manually for a year,
>> and so have other distributions.
>>
>
> Hi,
>
> A quick look at the size of my desktop's /tmp is:
>
> spirit@Vereniki ~ $ du -sh /tmp/
> 641M /tmp/
> spirit@Vereniki ~ $
>
> Maybe it's just me (cause of the way I'm using /tmp, eg. I use that dir
> to unpack sources of packages I want to temporarily look inside and
> for anything else *temporary*, also some programs (eg. browsers) use it
> for temporary storage) but if there are others like me, I don't
> think we'd like to do this in RAM space (tmpfs). For /run and /var/run
> dirs it's ok I suppose.
>
Maybe you should use /var/tmp for that? Or ~/tmp/ ?
OTOH, we could use an rc.conf configuration variable to control
whether /tmp is mounted as tmpfs.
--
~Nirbheek Chauhan
Gentoo GNOME+Mozilla Team
^ permalink raw reply [flat|nested] 44+ messages in thread
* Re: [gentoo-dev] rfc: use of the /run directory
2011-05-17 19:48 ` [gentoo-dev] " Nirbheek Chauhan
@ 2011-05-17 20:00 ` Olivier Crête
2011-05-17 20:07 ` Michał Górny
` (2 more replies)
2011-05-17 20:20 ` Panagiotis Christopoulos
1 sibling, 3 replies; 44+ messages in thread
From: Olivier Crête @ 2011-05-17 20:00 UTC (permalink / raw
To: gentoo-dev
[-- Attachment #1: Type: text/plain, Size: 401 bytes --]
On Wed, 2011-05-18 at 01:18 +0530, Nirbheek Chauhan wrote:
> Maybe you should use /var/tmp for that? Or ~/tmp/ ?
>
> OTOH, we could use an rc.conf configuration variable to control
> whether /tmp is mounted as tmpfs.
Having /tmp and /var/tmp as tmpfs sounds like a terrible idea.. I don't
think we should facilitate it in any way.
--
Olivier Crête
tester@gentoo.org
Gentoo Developer
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 198 bytes --]
^ permalink raw reply [flat|nested] 44+ messages in thread
* Re: [gentoo-dev] rfc: use of the /run directory
2011-05-17 20:00 ` Olivier Crête
@ 2011-05-17 20:07 ` Michał Górny
2011-05-17 20:11 ` Amadeusz Żołnowski
2011-05-17 20:23 ` Rich Freeman
2 siblings, 0 replies; 44+ messages in thread
From: Michał Górny @ 2011-05-17 20:07 UTC (permalink / raw
To: gentoo-dev; +Cc: tester
[-- Attachment #1: Type: text/plain, Size: 637 bytes --]
On Tue, 17 May 2011 16:00:41 -0400
Olivier Crête <tester@gentoo.org> wrote:
> On Wed, 2011-05-18 at 01:18 +0530, Nirbheek Chauhan wrote:
> > Maybe you should use /var/tmp for that? Or ~/tmp/ ?
> >
> > OTOH, we could use an rc.conf configuration variable to control
> > whether /tmp is mounted as tmpfs.
>
> Having /tmp and /var/tmp as tmpfs sounds like a terrible idea.. I
> don't think we should facilitate it in any way.
I always thought we're having two separate temporary directories
because /tmp is for small data (i.e. suitable for tmpfs) while /var/tmp
is for larger one.
--
Best regards,
Michał Górny
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 316 bytes --]
^ permalink raw reply [flat|nested] 44+ messages in thread
* Re: [gentoo-dev] rfc: use of the /run directory
2011-05-17 20:00 ` Olivier Crête
2011-05-17 20:07 ` Michał Górny
@ 2011-05-17 20:11 ` Amadeusz Żołnowski
2011-05-17 20:23 ` Rich Freeman
2 siblings, 0 replies; 44+ messages in thread
From: Amadeusz Żołnowski @ 2011-05-17 20:11 UTC (permalink / raw
To: gentoo-dev
[-- Attachment #1: Type: text/plain, Size: 791 bytes --]
Excerpts from Olivier Crête's message of Tue May 17 22:00:41 +0200 2011:
> On Wed, 2011-05-18 at 01:18 +0530, Nirbheek Chauhan wrote:
> > Maybe you should use /var/tmp for that? Or ~/tmp/ ?
> >
> > OTOH, we could use an rc.conf configuration variable to control
> > whether /tmp is mounted as tmpfs.
>
> Having /tmp and /var/tmp as tmpfs sounds like a terrible idea.. I
> don't think we should facilitate it in any way.
I think he just meant that /var/tmp should be used for bigger temporary
stuff. This how I use it. /tmp for tiny temporary stuff and /var/tmp/
for bigger which would be good to have preserved between reboots. And
this is somehow correct with FHS afaik.
--
Amadeusz Żołnowski
PGP key fpr: C700 CEDE 0C18 212E 49DA 4653 F013 4531 E1DB FAB5
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 490 bytes --]
^ permalink raw reply [flat|nested] 44+ messages in thread
* Re: [gentoo-dev] rfc: use of the /run directory
2011-05-17 19:48 ` [gentoo-dev] " Nirbheek Chauhan
2011-05-17 20:00 ` Olivier Crête
@ 2011-05-17 20:20 ` Panagiotis Christopoulos
2011-05-17 20:28 ` Michał Górny
2011-05-17 20:54 ` Olivier Crête
1 sibling, 2 replies; 44+ messages in thread
From: Panagiotis Christopoulos @ 2011-05-17 20:20 UTC (permalink / raw
To: gentoo-dev
[-- Attachment #1: Type: text/plain, Size: 971 bytes --]
On 01:18 Wed 18 May , Nirbheek Chauhan wrote:
> ...
> Maybe you should use /var/tmp for that? Or ~/tmp/ ?
>
Yes, I can do that. But the real question here, from my perspective, is
why we need /run, /var/run or /tmp on tmpfs. "Other distros do it" is
not an answer. Yes, I needed those dirs on tmpfs twice in my life, once
when I was building a cluster with diskless nodes (with / on readonly
NFS) and once more when I was working with an "LTSP" alike system,
but these were exceptions, at that time.
As I don't have the knowledge for this and I currently don't have the
time to google/search it myself, can someone explain why other linux
distibutions / Unix systems (wikipedia says that Solaris had /tmp on
tmpfs from 1994) started putting directories on tmpfs and technically
speaking what an average user would benefit from having /run, /tmp etc.
directories on tmpfs?
--
Panagiotis Christopoulos ( pchrist )
( Gentoo Lisp Project )
[-- Attachment #2: Type: application/pgp-signature, Size: 197 bytes --]
^ permalink raw reply [flat|nested] 44+ messages in thread
* Re: [gentoo-dev] rfc: use of the /run directory
2011-05-17 20:00 ` Olivier Crête
2011-05-17 20:07 ` Michał Górny
2011-05-17 20:11 ` Amadeusz Żołnowski
@ 2011-05-17 20:23 ` Rich Freeman
2 siblings, 0 replies; 44+ messages in thread
From: Rich Freeman @ 2011-05-17 20:23 UTC (permalink / raw
To: gentoo-dev
2011/5/17 Olivier Crête <tester@gentoo.org>:
> On Wed, 2011-05-18 at 01:18 +0530, Nirbheek Chauhan wrote:
>> Maybe you should use /var/tmp for that? Or ~/tmp/ ?
>>
>> OTOH, we could use an rc.conf configuration variable to control
>> whether /tmp is mounted as tmpfs.
>
> Having /tmp and /var/tmp as tmpfs sounds like a terrible idea.. I don't
> think we should facilitate it in any way.
I've run my system this way for ages - even back when I had 2GB of RAM
running kde, samba, mythtv, mysql, and apache. Usually not a problem.
Unfortunately the kernel swapping logic isn't perfect, which can
cause it to bog down if you're compiling something like chromium or
openoffice.
When you think about it tmpfs on swap should be no slower than ext3.
If anything it should be faster since it doesn't need to journal. In
practice it doesn't always work this way, but I'd consider this a bug.
With a filesystem, anything you write ends up on disk within 30
seconds or whatever. With a tmpfs, some of the stuff you write ends
up on disk, and the kernel has more freedom with how it goes about
doing this.
Then problem comes when the kernel decides to swap out mysql or
whatever in order to hang onto some pages full of .so files or
whatever from your latest build.
Rich
^ permalink raw reply [flat|nested] 44+ messages in thread
* Re: [gentoo-dev] rfc: use of the /run directory
2011-05-17 20:20 ` Panagiotis Christopoulos
@ 2011-05-17 20:28 ` Michał Górny
2011-05-17 20:54 ` Olivier Crête
1 sibling, 0 replies; 44+ messages in thread
From: Michał Górny @ 2011-05-17 20:28 UTC (permalink / raw
To: gentoo-dev; +Cc: pchrist
[-- Attachment #1: Type: text/plain, Size: 765 bytes --]
On Tue, 17 May 2011 23:20:59 +0300
Panagiotis Christopoulos <pchrist@gentoo.org> wrote:
> As I don't have the knowledge for this and I currently don't have the
> time to google/search it myself, can someone explain why other linux
> distibutions / Unix systems (wikipedia says that Solaris had /tmp on
> tmpfs from 1994) started putting directories on tmpfs and technically
> speaking what an average user would benefit from having /run, /tmp
> etc. directories on tmpfs?
For me, the most important advantage is that files get removed whenever
the system crashes for some reason. It's just simpler (and more error
prone) to have them gone automagically than to add services to remove
all of them on each boot.
--
Best regards,
Michał Górny
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 316 bytes --]
^ permalink raw reply [flat|nested] 44+ messages in thread
* Re: [gentoo-dev] rfc: use of the /run directory
2011-05-17 19:07 ` William Hubbs
@ 2011-05-17 20:35 ` James Cloos
2011-05-17 20:40 ` Markos Chandras
0 siblings, 1 reply; 44+ messages in thread
From: James Cloos @ 2011-05-17 20:35 UTC (permalink / raw
To: gentoo-dev
>>>>> "WH" == William Hubbs <williamh@gentoo.org> writes:
WH> Once /run is in place,
WH> /var/run will be a symbolic link to /run and /var/lock will
WH> be a symbolic link to /run/lock.
There are files which need to be in /var/lock and which should
survive a reboot, so it is not a good idea to make /var/lock
a symlink to /run/lock.
(And I don't just mean .keep files.)
-JimC
--
James Cloos <cloos@jhcloos.com> OpenPGP: 1024D/ED7DAEA6
^ permalink raw reply [flat|nested] 44+ messages in thread
* Re: [gentoo-dev] rfc: use of the /run directory
2011-05-17 20:35 ` James Cloos
@ 2011-05-17 20:40 ` Markos Chandras
2011-05-18 0:06 ` James Cloos
0 siblings, 1 reply; 44+ messages in thread
From: Markos Chandras @ 2011-05-17 20:40 UTC (permalink / raw
To: gentoo-dev
[-- Attachment #1: Type: text/plain, Size: 735 bytes --]
On Tue, May 17, 2011 at 04:35:00PM -0400, James Cloos wrote:
> >>>>> "WH" == William Hubbs <williamh@gentoo.org> writes:
>
> WH> Once /run is in place,
>
> WH> /var/run will be a symbolic link to /run and /var/lock will
> WH> be a symbolic link to /run/lock.
>
> There are files which need to be in /var/lock and which should
> survive a reboot, so it is not a good idea to make /var/lock
> a symlink to /run/lock.
>
> (And I don't just mean .keep files.)
>
> -JimC
> --
> James Cloos <cloos@jhcloos.com> OpenPGP: 1024D/ED7DAEA6
>
James,
Can you please provide some examples that require /var/lock to survive a
reboot?
Regards,
--
Markos Chandras / Gentoo Linux Developer / Key ID: B4AFF2C2
[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply [flat|nested] 44+ messages in thread
* Re: [gentoo-dev] rfc: use of the /run directory
2011-05-17 20:20 ` Panagiotis Christopoulos
2011-05-17 20:28 ` Michał Górny
@ 2011-05-17 20:54 ` Olivier Crête
2011-05-17 21:00 ` Nirbheek Chauhan
1 sibling, 1 reply; 44+ messages in thread
From: Olivier Crête @ 2011-05-17 20:54 UTC (permalink / raw
To: gentoo-dev
[-- Attachment #1: Type: text/plain, Size: 629 bytes --]
On Tue, 2011-05-17 at 23:20 +0300, Panagiotis Christopoulos wrote:
> Yes, I can do that. But the real question here, from my perspective, is
> why we need /run, /var/run or /tmp on tmpfs. "Other distros do it" is
> not an answer.
The main reason is that you want /run to be writable super early in the
boot process, before even / has been fscked and re-mounted. That means
you can do stuff like starting udevd in parallel with fsck of / which
means faster boot. This is one of the things required to get 1 second
boot.
See http://lwn.net/Articles/436012/
--
Olivier Crête
tester@gentoo.org
Gentoo Developer
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 198 bytes --]
^ permalink raw reply [flat|nested] 44+ messages in thread
* Re: [gentoo-dev] rfc: use of the /run directory
2011-05-17 20:54 ` Olivier Crête
@ 2011-05-17 21:00 ` Nirbheek Chauhan
2011-05-17 22:26 ` Drake Wyrm
0 siblings, 1 reply; 44+ messages in thread
From: Nirbheek Chauhan @ 2011-05-17 21:00 UTC (permalink / raw
To: gentoo-dev
2011/5/18 Olivier Crête <tester@gentoo.org>:
> On Tue, 2011-05-17 at 23:20 +0300, Panagiotis Christopoulos wrote:
>> Yes, I can do that. But the real question here, from my perspective, is
>> why we need /run, /var/run or /tmp on tmpfs. "Other distros do it" is
>> not an answer.
>
> The main reason is that you want /run to be writable super early in the
> boot process, before even / has been fscked and re-mounted. That means
> you can do stuff like starting udevd in parallel with fsck of / which
> means faster boot. This is one of the things required to get 1 second
> boot.
>
> See http://lwn.net/Articles/436012/
>
Related is that you don't need to manually wipe /tmp /var/run
/var/lock via a service. They're automatically wiped when you reboot.
This saves time during bootup.
--
~Nirbheek Chauhan
Gentoo GNOME+Mozilla Team
^ permalink raw reply [flat|nested] 44+ messages in thread
* Re: [gentoo-dev] rfc: use of the /run directory
2011-05-17 21:00 ` Nirbheek Chauhan
@ 2011-05-17 22:26 ` Drake Wyrm
2011-05-17 22:36 ` Marc Schiffbauer
` (2 more replies)
0 siblings, 3 replies; 44+ messages in thread
From: Drake Wyrm @ 2011-05-17 22:26 UTC (permalink / raw
To: gentoo-dev
Nirbheek Chauhan <nirbheek@gentoo.org> wrote:
> 2011/5/18 Olivier Cr??te <tester@gentoo.org>:
> > The main reason is that you want /run to be writable super early in the
> > boot process, before even / has been fscked and re-mounted. That means
> > you can do stuff like starting udevd in parallel with fsck of / which
> > means faster boot. This is one of the things required to get 1 second
> > boot.
> >
> > See http://lwn.net/Articles/436012/
> >
>
> Related is that you don't need to manually wipe /tmp /var/run
> /var/lock via a service. They're automatically wiped when you reboot.
> This saves time during bootup.
Even if you don't have to wipe them with a service, you're going to need
to mount them with a service. You'll need to mount /run as tmpfs, create
the /run/lock directory, and then mount /run/lock as tmpfs. Do you
really want to add that to localmount?
--
Confucius is inscrutable.
God is ineffable.
Beer is inevitable.
^ permalink raw reply [flat|nested] 44+ messages in thread
* Re: [gentoo-dev] rfc: use of the /run directory
2011-05-17 22:26 ` Drake Wyrm
@ 2011-05-17 22:36 ` Marc Schiffbauer
2011-05-17 22:46 ` Nirbheek Chauhan
2011-05-18 0:06 ` William Hubbs
2 siblings, 0 replies; 44+ messages in thread
From: Marc Schiffbauer @ 2011-05-17 22:36 UTC (permalink / raw
To: gentoo-dev
* Drake Wyrm schrieb am 18.05.11 um 00:26 Uhr:
> Nirbheek Chauhan <nirbheek@gentoo.org> wrote:
> > 2011/5/18 Olivier Cr??te <tester@gentoo.org>:
> > > The main reason is that you want /run to be writable super early in the
> > > boot process, before even / has been fscked and re-mounted. That means
> > > you can do stuff like starting udevd in parallel with fsck of / which
> > > means faster boot. This is one of the things required to get 1 second
> > > boot.
> > >
> > > See http://lwn.net/Articles/436012/
> > >
> >
> > Related is that you don't need to manually wipe /tmp /var/run
> > /var/lock via a service. They're automatically wiped when you reboot.
> > This saves time during bootup.
>
> Even if you don't have to wipe them with a service, you're going to need
> to mount them with a service. You'll need to mount /run as tmpfs, create
> the /run/lock directory, and then mount /run/lock as tmpfs. Do you
> really want to add that to localmount?
Why mount /run/lock as tmpfs? If its created within /run its already
tmpfs
-Marc
--
8AAC 5F46 83B4 DB70 8317 3723 296C 6CCA 35A6 4134
^ permalink raw reply [flat|nested] 44+ messages in thread
* Re: [gentoo-dev] rfc: use of the /run directory
2011-05-17 22:26 ` Drake Wyrm
2011-05-17 22:36 ` Marc Schiffbauer
@ 2011-05-17 22:46 ` Nirbheek Chauhan
2011-05-18 0:06 ` William Hubbs
2 siblings, 0 replies; 44+ messages in thread
From: Nirbheek Chauhan @ 2011-05-17 22:46 UTC (permalink / raw
To: gentoo-dev
On Wed, May 18, 2011 at 3:56 AM, Drake Wyrm <wyrm@haell.com> wrote:
> Nirbheek Chauhan <nirbheek@gentoo.org> wrote:
> Even if you don't have to wipe them with a service, you're going to need
> to mount them with a service. You'll need to mount /run as tmpfs, create
> the /run/lock directory, and then mount /run/lock as tmpfs. Do you
> really want to add that to localmount?
>
(a) You don't need to mount anything except /run
(b) Creating a directory in tmpfs takes so little time it's not even
worth measuring. The same cannot be said of rotating media.
--
~Nirbheek Chauhan
Gentoo GNOME+Mozilla Team
^ permalink raw reply [flat|nested] 44+ messages in thread
* Re: [gentoo-dev] rfc: use of the /run directory
2011-05-17 16:57 [gentoo-dev] rfc: use of the /run directory William Hubbs
2011-05-17 18:11 ` Peter Volkov
@ 2011-05-17 22:50 ` Ciaran McCreesh
2011-05-18 0:12 ` William Hubbs
2011-05-20 8:58 ` Luca Barbato
2 siblings, 1 reply; 44+ messages in thread
From: Ciaran McCreesh @ 2011-05-17 22:50 UTC (permalink / raw
To: gentoo-dev
[-- Attachment #1: Type: text/plain, Size: 284 bytes --]
On Tue, 17 May 2011 11:57:48 -0500
William Hubbs <williamh@gentoo.org> wrote:
> I think we should support the /run directory [1] [2].
I would be interested to hear how you plan to do the migration, given
that everyone else has managed to screw it up...
--
Ciaran McCreesh
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 198 bytes --]
^ permalink raw reply [flat|nested] 44+ messages in thread
* Re: [gentoo-dev] rfc: use of the /run directory
2011-05-17 20:40 ` Markos Chandras
@ 2011-05-18 0:06 ` James Cloos
2011-05-18 0:43 ` William Hubbs
0 siblings, 1 reply; 44+ messages in thread
From: James Cloos @ 2011-05-18 0:06 UTC (permalink / raw
To: gentoo-dev
>>>>> "MC" == Markos Chandras <hwoarang@gentoo.org> writes:
MC> Can you please provide some examples that require /var/lock to
MC> survive a reboot?
Not everything is part of the distribution.
The one which first comes to mind are lock files placed to prevent
certain cron-initiated jobs from running right after a reboot.
Or locks preventing certain daemons from accepting connections.
Such locks often are used to protect net bandwidth when it is needed
for real-time use. A reboot of some random box on the lan should not
break such locks.
And /var/lock is the standard place to put and look for lock files.
Got to run; can't contiue to write right now....
-JimC
--
James Cloos <cloos@jhcloos.com> OpenPGP: 1024D/ED7DAEA6
^ permalink raw reply [flat|nested] 44+ messages in thread
* Re: [gentoo-dev] rfc: use of the /run directory
2011-05-17 22:26 ` Drake Wyrm
2011-05-17 22:36 ` Marc Schiffbauer
2011-05-17 22:46 ` Nirbheek Chauhan
@ 2011-05-18 0:06 ` William Hubbs
2 siblings, 0 replies; 44+ messages in thread
From: William Hubbs @ 2011-05-18 0:06 UTC (permalink / raw
To: gentoo-dev
[-- Attachment #1: Type: text/plain, Size: 1186 bytes --]
On Tue, May 17, 2011 at 03:26:11PM -0700, Drake Wyrm wrote:
> Nirbheek Chauhan <nirbheek@gentoo.org> wrote:
> > 2011/5/18 Olivier Cr??te <tester@gentoo.org>:
> > > The main reason is that you want /run to be writable super early in the
> > > boot process, before even / has been fscked and re-mounted. That means
> > > you can do stuff like starting udevd in parallel with fsck of / which
> > > means faster boot. This is one of the things required to get 1 second
> > > boot.
> > >
> > > See http://lwn.net/Articles/436012/
> > >
> >
> > Related is that you don't need to manually wipe /tmp /var/run
> > /var/lock via a service. They're automatically wiped when you reboot.
> > This saves time during bootup.
>
> Even if you don't have to wipe them with a service, you're going to need
> to mount them with a service. You'll need to mount /run as tmpfs, create
> the /run/lock directory, and then mount /run/lock as tmpfs. Do you
> really want to add that to localmount?
Actually the code to do this is already in openrc git, and it is much
earlier than localmount. Also, you don't need a separate tmpfs for
/run/lock since /run is already tmpfs.
William
[-- Attachment #2: Type: application/pgp-signature, Size: 198 bytes --]
^ permalink raw reply [flat|nested] 44+ messages in thread
* Re: [gentoo-dev] rfc: use of the /run directory
2011-05-17 22:50 ` Ciaran McCreesh
@ 2011-05-18 0:12 ` William Hubbs
2011-05-23 6:30 ` Ciaran McCreesh
0 siblings, 1 reply; 44+ messages in thread
From: William Hubbs @ 2011-05-18 0:12 UTC (permalink / raw
To: gentoo-dev
[-- Attachment #1: Type: text/plain, Size: 741 bytes --]
On Tue, May 17, 2011 at 11:50:32PM +0100, Ciaran McCreesh wrote:
> On Tue, 17 May 2011 11:57:48 -0500
> William Hubbs <williamh@gentoo.org> wrote:
> > I think we should support the /run directory [1] [2].
>
> I would be interested to hear how you plan to do the migration, given
> that everyone else has managed to screw it up...
I'm not sure what you mean here. Openrc git will mount a tmpfs on /run
if it exists and create a lock directory inside the tmpfs.
To make it work, I just need a new release of baselayout to make the
/run directory. Then, I also need to figure out where in the boot
process to make the symbolic links from /var/lock to /run/lock and from
/var/run to /run.
what else am I missing?
William
[-- Attachment #2: Type: application/pgp-signature, Size: 198 bytes --]
^ permalink raw reply [flat|nested] 44+ messages in thread
* Re: [gentoo-dev] rfc: use of the /run directory
2011-05-18 0:06 ` James Cloos
@ 2011-05-18 0:43 ` William Hubbs
0 siblings, 0 replies; 44+ messages in thread
From: William Hubbs @ 2011-05-18 0:43 UTC (permalink / raw
To: gentoo-dev
[-- Attachment #1: Type: text/plain, Size: 1053 bytes --]
On Tue, May 17, 2011 at 08:06:46PM -0400, James Cloos wrote:
> >>>>> "MC" == Markos Chandras <hwoarang@gentoo.org> writes:
>
> MC> Can you please provide some examples that require /var/lock to
> MC> survive a reboot?
>
> Not everything is part of the distribution.
>
> The one which first comes to mind are lock files placed to prevent
> certain cron-initiated jobs from running right after a reboot.
>
> Or locks preventing certain daemons from accepting connections.
>
> Such locks often are used to protect net bandwidth when it is needed
> for real-time use. A reboot of some random box on the lan should not
> break such locks.
According to what I am reading in the fhs, /var/lock is not sharable
between multiple systems. Also, the contents of the lock file is
supposed to be the pid of the process that holds the lock [1].
Given that, a lock will automatically be invalid when you reboot, so it
should be forgotten about on a reboot.
William
[1] http://www.pathname.com/fhs/pub/fhs-2.3.html#VARLOCKLOCKFILES
[-- Attachment #2: Type: application/pgp-signature, Size: 198 bytes --]
^ permalink raw reply [flat|nested] 44+ messages in thread
* [gentoo-dev] Re: rfc: use of the /run directory
2011-05-17 19:46 ` William Hubbs
@ 2011-05-18 1:31 ` Duncan
2011-05-18 1:36 ` [gentoo-dev] " Jeroen Roovers
1 sibling, 0 replies; 44+ messages in thread
From: Duncan @ 2011-05-18 1:31 UTC (permalink / raw
To: gentoo-dev
William Hubbs posted on Tue, 17 May 2011 14:46:49 -0500 as excerpted:
> On Tue, May 17, 2011 at 10:20:56PM +0300, Panagiotis Christopoulos
> wrote:
>> On 23:58 Tue 17 May, Nirbheek Chauhan wrote:
>> > ...
>> > I'd add that if we want /run to be on tmpfs, /var/run and /tmp should
>> > both be on tmpfs by default. I've been doing this manually for a
>> > year, and so have other distributions.
> If you want /tmp to be a tmpfs, that is pretty easy to do through fstab
> (I do that here actually). I'm not sure whether we want to force that on
> a distribution level or not though.
>
> The directories that would be affected by having /run on tmpfs would be
> /var/run and /var/lock. The suggested way of doing this is to have
> /var/run linked to /run and /var/lock linked to /run/lock.
Absolutely true.
I've run /tmp on tmpfs (with /var/tmp a symlink to it tho that took a bit
of additional setup) for some time now and love it, but it's easy enough
to do for those that want it that way, and controversial enough for others
that IMO Gentoo doesn't need to get into that policy game, /especially/
not when it unnecessarily complicates the otherwise entirely separate
/run discussion.
So let's leave /tmp (and /var/tmp) well enough alone and concentrate on
the subject at hand, /run and the /var/run symlinks to it.
Since I'm posting, I'd personally prefer keeping things pretty much as
they are, or arguably creating a /dev/run for the same benefits without a
new root directory. But I'm resigned to the fact that what will be will
be, and /run seems to have enough momentum behind it that it will be.
Given that, we might as well get it over with and get /run in place now,
before our lack of it starts causing serious problems and we have to
develop workarounds that must then be undone when we finally /do/ break
down and go with /run.
So reluctantly... but I say go for it.
--
Duncan - List replies preferred. No HTML msgs.
"Every nonfree program has a lord, a master --
and if you use the program, he is your master." Richard Stallman
^ permalink raw reply [flat|nested] 44+ messages in thread
* Re: [gentoo-dev] rfc: use of the /run directory
2011-05-17 19:46 ` William Hubbs
2011-05-18 1:31 ` [gentoo-dev] " Duncan
@ 2011-05-18 1:36 ` Jeroen Roovers
2011-05-18 5:49 ` Eray Aslan
1 sibling, 1 reply; 44+ messages in thread
From: Jeroen Roovers @ 2011-05-18 1:36 UTC (permalink / raw
To: gentoo-dev
On Tue, 17 May 2011 14:46:49 -0500
William Hubbs <williamh@gentoo.org> wrote:
> The directories that would be affected by having /run on tmpfs would
> be /var/run and /var/lock. The suggested way of doing this is to have
> /var/run linked to /run and /var/lock linked to /run/lock.
wrt /var/run on tmpfs, I recall packages installing daemons that expect
their specific directories to be present in /var/run, and that do not
play nice when that directory turns out empty, but we should be able to
work around that by creating the directory in the init.d script before
we execute the daemon.
jer
^ permalink raw reply [flat|nested] 44+ messages in thread
* Re: [gentoo-dev] rfc: use of the /run directory
2011-05-18 1:36 ` [gentoo-dev] " Jeroen Roovers
@ 2011-05-18 5:49 ` Eray Aslan
2011-05-18 14:45 ` Henry Gebhardt
0 siblings, 1 reply; 44+ messages in thread
From: Eray Aslan @ 2011-05-18 5:49 UTC (permalink / raw
To: gentoo-dev
[-- Attachment #1: Type: text/plain, Size: 929 bytes --]
On Wed, May 18, 2011 at 03:36:48AM +0200, Jeroen Roovers wrote:
> wrt /var/run on tmpfs, I recall packages installing daemons that expect
> their specific directories to be present in /var/run, and that do not
> play nice when that directory turns out empty, but we should be able to
> work around that by creating the directory in the init.d script before
> we execute the daemon.
Yes. Some examples:
https://bugs.gentoo.org/show_bug.cgi?id=332633
https://bugs.gentoo.org/show_bug.cgi?id=334245
https://bugs.gentoo.org/show_bug.cgi?id=334437
https://bugs.gentoo.org/show_bug.cgi?id=342049
https://bugs.gentoo.org/show_bug.cgi?id=333783
Basically, if we are going to to do the move to /run, we should have a
policy of "/var/run and /var/lock can and will be on tmpfs and init
scripts should handle this correctly" or something similar.
--
Eray Aslan
Developer, Gentoo Linux eras <at> gentoo.org
[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply [flat|nested] 44+ messages in thread
* Re: [gentoo-dev] rfc: use of the /run directory
2011-05-18 5:49 ` Eray Aslan
@ 2011-05-18 14:45 ` Henry Gebhardt
2011-05-18 14:51 ` Samuli Suominen
0 siblings, 1 reply; 44+ messages in thread
From: Henry Gebhardt @ 2011-05-18 14:45 UTC (permalink / raw
To: gentoo-dev
On Wed, May 18, 2011 at 08:49:19AM +0300, Eray Aslan wrote:
> On Wed, May 18, 2011 at 03:36:48AM +0200, Jeroen Roovers wrote:
> > wrt /var/run on tmpfs, I recall packages installing daemons that expect
> > their specific directories to be present in /var/run, and that do not
> > play nice when that directory turns out empty, but we should be able to
> > work around that by creating the directory in the init.d script before
> > we execute the daemon.
>
> Yes. Some examples:
>
> https://bugs.gentoo.org/show_bug.cgi?id=332633
> https://bugs.gentoo.org/show_bug.cgi?id=334245
> https://bugs.gentoo.org/show_bug.cgi?id=334437
> https://bugs.gentoo.org/show_bug.cgi?id=342049
> https://bugs.gentoo.org/show_bug.cgi?id=333783
>
I thought I'd mention, the way systemd handles this is with an extra
service and configuration files in /etc/tmpfiles.d [1]. I am sure OpenRC
could use the same tool[2] for that.
[1] http://0pointer.de/public/systemd-man/tmpfiles.d.html
[2] http://0pointer.de/public/systemd-man/systemd-tmpfiles.html
Thanks,
Henry
^ permalink raw reply [flat|nested] 44+ messages in thread
* Re: [gentoo-dev] rfc: use of the /run directory
2011-05-18 14:45 ` Henry Gebhardt
@ 2011-05-18 14:51 ` Samuli Suominen
2011-05-18 15:02 ` [gentoo-dev] " Jonathan Callen
0 siblings, 1 reply; 44+ messages in thread
From: Samuli Suominen @ 2011-05-18 14:51 UTC (permalink / raw
To: gentoo-dev
On 05/18/2011 05:45 PM, Henry Gebhardt wrote:
> On Wed, May 18, 2011 at 08:49:19AM +0300, Eray Aslan wrote:
>> On Wed, May 18, 2011 at 03:36:48AM +0200, Jeroen Roovers wrote:
>>> wrt /var/run on tmpfs, I recall packages installing daemons that expect
>>> their specific directories to be present in /var/run, and that do not
>>> play nice when that directory turns out empty, but we should be able to
>>> work around that by creating the directory in the init.d script before
>>> we execute the daemon.
>>
>> Yes. Some examples:
>>
>> https://bugs.gentoo.org/show_bug.cgi?id=332633
>> https://bugs.gentoo.org/show_bug.cgi?id=334245
>> https://bugs.gentoo.org/show_bug.cgi?id=334437
>> https://bugs.gentoo.org/show_bug.cgi?id=342049
>> https://bugs.gentoo.org/show_bug.cgi?id=333783
>>
>
> I thought I'd mention, the way systemd handles this is with an extra
> service and configuration files in /etc/tmpfiles.d [1]. I am sure OpenRC
> could use the same tool[2] for that.
>
> [1] http://0pointer.de/public/systemd-man/tmpfiles.d.html
> [2] http://0pointer.de/public/systemd-man/systemd-tmpfiles.html
Not all packages using /var/run own a init script, nor need one. Take
sys-fs/udisks[1] for example. Then, we need something to create these
dirs in OpenRC (or fix the package, but that might take some time...)
[1] http://bugs.gentoo.org/333893
^ permalink raw reply [flat|nested] 44+ messages in thread
* [gentoo-dev] Re: rfc: use of the /run directory
2011-05-18 14:51 ` Samuli Suominen
@ 2011-05-18 15:02 ` Jonathan Callen
0 siblings, 0 replies; 44+ messages in thread
From: Jonathan Callen @ 2011-05-18 15:02 UTC (permalink / raw
To: gentoo-dev
Samuli Suominen wrote:
> On 05/18/2011 05:45 PM, Henry Gebhardt wrote:
>>
>> I thought I'd mention, the way systemd handles this is with an extra
>> service and configuration files in /etc/tmpfiles.d [1]. I am sure
>> OpenRC could use the same tool[2] for that.
>>
>> [1] http://0pointer.de/public/systemd-man/tmpfiles.d.html
>> [2] http://0pointer.de/public/systemd-man/systemd-tmpfiles.html
>
> Not all packages using /var/run own a init script, nor need one. Take
> sys-fs/udisks[1] for example. Then, we need something to create
> these dirs in OpenRC (or fix the package, but that might take some
> time...)
>
> [1] http://bugs.gentoo.org/333893
I belive the idea was to have a single service in openrc that would
create all the needed files by reading the configuration in
/etc/tmpfiles.d/. Then the various packages could just drop a single
file in tmpfiles.d, and everything would be created automagically.
--
Jonathan Callen
^ permalink raw reply [flat|nested] 44+ messages in thread
* Re: [gentoo-dev] rfc: use of the /run directory
2011-05-17 16:57 [gentoo-dev] rfc: use of the /run directory William Hubbs
2011-05-17 18:11 ` Peter Volkov
2011-05-17 22:50 ` Ciaran McCreesh
@ 2011-05-20 8:58 ` Luca Barbato
2011-05-20 16:54 ` Mike Pagano
2 siblings, 1 reply; 44+ messages in thread
From: Luca Barbato @ 2011-05-20 8:58 UTC (permalink / raw
To: gentoo-dev
On 5/17/11 6:57 PM, William Hubbs wrote:
> All,
>
> I think we should support the /run directory [1] [2]. The issue is
> that there are at least two packages, udev and dracut, in gentoo, which
> support the use of this directory. Support for it is being worked on in
> openrc, and systemd will use it once it comes into the tree.
> I, as well as several others, believe we should proactively create this
> directory in a new release of baselayout, so that we will avoid bugs in
> the future when packages start requiring it.
/run seems yet another directory cluttering the hierarchy to solve a
fringe issue, still I don't disagree it might be useful and is sort of
cleaner than /var/run.
That shouldn't be read as endorsing the peculiar and conceptually broken
init replacement called systemd.
lu
^ permalink raw reply [flat|nested] 44+ messages in thread
* Re: [gentoo-dev] rfc: use of the /run directory
2011-05-20 8:58 ` Luca Barbato
@ 2011-05-20 16:54 ` Mike Pagano
2011-05-22 19:13 ` Luca Barbato
0 siblings, 1 reply; 44+ messages in thread
From: Mike Pagano @ 2011-05-20 16:54 UTC (permalink / raw
To: gentoo-dev
[-- Attachment #1: Type: text/plain, Size: 305 bytes --]
On Friday 20 May 2011 04:58:12 Luca Barbato wrote:
> On 5/17/11 6:57 PM, William Hubbs wrote:
> That shouldn't be read as endorsing the peculiar and conceptually broken
> init replacement called systemd.
>
> lu
Just curious, would you mind elaborating on it's peculiarities and conceptual brokenness?
[-- Attachment #2: Type: text/html, Size: 2153 bytes --]
^ permalink raw reply [flat|nested] 44+ messages in thread
* Re: [gentoo-dev] rfc: use of the /run directory
2011-05-20 16:54 ` Mike Pagano
@ 2011-05-22 19:13 ` Luca Barbato
2011-05-22 21:12 ` Ondřej Súkup
0 siblings, 1 reply; 44+ messages in thread
From: Luca Barbato @ 2011-05-22 19:13 UTC (permalink / raw
To: gentoo-dev
On 5/20/11 6:54 PM, Mike Pagano wrote:
> On Friday 20 May 2011 04:58:12 Luca Barbato wrote:
>> On 5/17/11 6:57 PM, William Hubbs wrote:
>> That shouldn't be read as endorsing the peculiar and conceptually broken
>> init replacement called systemd.
>>
>> lu
>
> Just curious, would you mind elaborating on it's peculiarities and conceptual brokenness?
Having sockets managed by init instead of your daemon doesn't work quite
well. (see why xinetd isn't used in many real-life situations)
lu
^ permalink raw reply [flat|nested] 44+ messages in thread
* Re: [gentoo-dev] rfc: use of the /run directory
2011-05-22 19:13 ` Luca Barbato
@ 2011-05-22 21:12 ` Ondřej Súkup
0 siblings, 0 replies; 44+ messages in thread
From: Ondřej Súkup @ 2011-05-22 21:12 UTC (permalink / raw
To: gentoo-dev
[-- Attachment #1: Type: text/plain, Size: 58 bytes --]
>
> Hi ...
I think the best decision is wait to FHS 3.0
[-- Attachment #2: Type: text/html, Size: 1350 bytes --]
^ permalink raw reply [flat|nested] 44+ messages in thread
* Re: [gentoo-dev] rfc: use of the /run directory
2011-05-18 0:12 ` William Hubbs
@ 2011-05-23 6:30 ` Ciaran McCreesh
2011-05-23 7:05 ` Nirbheek Chauhan
0 siblings, 1 reply; 44+ messages in thread
From: Ciaran McCreesh @ 2011-05-23 6:30 UTC (permalink / raw
To: gentoo-dev
[-- Attachment #1: Type: text/plain, Size: 1058 bytes --]
On Tue, 17 May 2011 19:12:38 -0500
William Hubbs <williamh@gentoo.org> wrote:
> On Tue, May 17, 2011 at 11:50:32PM +0100, Ciaran McCreesh wrote:
> > I would be interested to hear how you plan to do the migration,
> > given that everyone else has managed to screw it up...
>
> I'm not sure what you mean here. Openrc git will mount a tmpfs on /run
> if it exists and create a lock directory inside the tmpfs.
>
> To make it work, I just need a new release of baselayout to make the
> /run directory. Then, I also need to figure out where in the boot
> process to make the symbolic links from /var/lock to /run/lock and
> from /var/run to /run.
> what else am I missing?
The problem is that packages that have things installed to the old
directories are going to get confused when upgraded if things have been
moved around behind their backs.
You may be better having both directories present, and not attempting
to rename or move things at all. Then start fixing packages that install
to the old directories.
--
Ciaran McCreesh
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 198 bytes --]
^ permalink raw reply [flat|nested] 44+ messages in thread
* Re: [gentoo-dev] rfc: use of the /run directory
2011-05-23 6:30 ` Ciaran McCreesh
@ 2011-05-23 7:05 ` Nirbheek Chauhan
2011-05-23 7:11 ` Ciaran McCreesh
2011-05-23 7:13 ` Michał Górny
0 siblings, 2 replies; 44+ messages in thread
From: Nirbheek Chauhan @ 2011-05-23 7:05 UTC (permalink / raw
To: gentoo-dev
On Mon, May 23, 2011 at 12:00 PM, Ciaran McCreesh
<ciaran.mccreesh@googlemail.com> wrote:
> On Tue, 17 May 2011 19:12:38 -0500
> William Hubbs <williamh@gentoo.org> wrote:
>> On Tue, May 17, 2011 at 11:50:32PM +0100, Ciaran McCreesh wrote:
>> > I would be interested to hear how you plan to do the migration,
>> > given that everyone else has managed to screw it up...
>>
>> I'm not sure what you mean here. Openrc git will mount a tmpfs on /run
>> if it exists and create a lock directory inside the tmpfs.
>>
>> To make it work, I just need a new release of baselayout to make the
>> /run directory. Then, I also need to figure out where in the boot
>> process to make the symbolic links from /var/lock to /run/lock and
>> from /var/run to /run.
>> what else am I missing?
>
> The problem is that packages that have things installed to the old
> directories are going to get confused when upgraded if things have been
> moved around behind their backs.
>
> You may be better having both directories present, and not attempting
> to rename or move things at all. Then start fixing packages that install
> to the old directories.
>
As I understand it, that's precisely what William's plan is.
$ ls -ld /var/{lock/run}
/var/lock -> /run/lock
/var/run -> /run/
This should work transparently for all existing applications.
The only way this would fail is if they do an incorrect stat() on
/var/run and error out if it's a symbolic link. OTOH, it's precisely
to iron out such kinks that we have ~arch.
The other problem of daemons needing pre-existing directories is being
handled in https://bugs.gentoo.org/show_bug.cgi?id=332633
Cheers,
--
~Nirbheek Chauhan
Gentoo GNOME+Mozilla Team
^ permalink raw reply [flat|nested] 44+ messages in thread
* Re: [gentoo-dev] rfc: use of the /run directory
2011-05-23 7:05 ` Nirbheek Chauhan
@ 2011-05-23 7:11 ` Ciaran McCreesh
2011-05-23 7:13 ` Michał Górny
1 sibling, 0 replies; 44+ messages in thread
From: Ciaran McCreesh @ 2011-05-23 7:11 UTC (permalink / raw
To: gentoo-dev
[-- Attachment #1: Type: text/plain, Size: 600 bytes --]
On Mon, 23 May 2011 12:35:12 +0530
Nirbheek Chauhan <nirbheek@gentoo.org> wrote:
> > You may be better having both directories present, and not
> > attempting to rename or move things at all. Then start fixing
> > packages that install to the old directories.
>
> As I understand it, that's precisely what William's plan is.
>
> $ ls -ld /var/{lock/run}
> /var/lock -> /run/lock
> /var/run -> /run/
No, not as symlinks. Having both directories present as proper,
unrelated directories, and explicitly migrating apps that install things
to the old directory.
--
Ciaran McCreesh
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 198 bytes --]
^ permalink raw reply [flat|nested] 44+ messages in thread
* Re: [gentoo-dev] rfc: use of the /run directory
2011-05-23 7:05 ` Nirbheek Chauhan
2011-05-23 7:11 ` Ciaran McCreesh
@ 2011-05-23 7:13 ` Michał Górny
2011-05-23 8:30 ` Nirbheek Chauhan
1 sibling, 1 reply; 44+ messages in thread
From: Michał Górny @ 2011-05-23 7:13 UTC (permalink / raw
To: gentoo-dev; +Cc: nirbheek
[-- Attachment #1: Type: text/plain, Size: 632 bytes --]
On Mon, 23 May 2011 12:35:12 +0530
Nirbheek Chauhan <nirbheek@gentoo.org> wrote:
> As I understand it, that's precisely what William's plan is.
>
> $ ls -ld /var/{lock/run}
> /var/lock -> /run/lock
> /var/run -> /run/
>
> This should work transparently for all existing applications.
>
> The only way this would fail is if they do an incorrect stat() on
> /var/run and error out if it's a symbolic link. OTOH, it's precisely
> to iron out such kinks that we have ~arch.
What if a daemon tries to do braindead compat attempt through creating
a pidfile in both directories?
--
Best regards,
Michał Górny
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 316 bytes --]
^ permalink raw reply [flat|nested] 44+ messages in thread
* Re: [gentoo-dev] rfc: use of the /run directory
2011-05-23 7:13 ` Michał Górny
@ 2011-05-23 8:30 ` Nirbheek Chauhan
0 siblings, 0 replies; 44+ messages in thread
From: Nirbheek Chauhan @ 2011-05-23 8:30 UTC (permalink / raw
To: Michał Górny; +Cc: gentoo-dev
On Mon, May 23, 2011 at 12:43 PM, Michał Górny <mgorny@gentoo.org> wrote:
> On Mon, 23 May 2011 12:35:12 +0530
> Nirbheek Chauhan <nirbheek@gentoo.org> wrote:
>
>> As I understand it, that's precisely what William's plan is.
>>
>> $ ls -ld /var/{lock/run}
>> /var/lock -> /run/lock
>> /var/run -> /run/
>>
>> This should work transparently for all existing applications.
>>
>> The only way this would fail is if they do an incorrect stat() on
>> /var/run and error out if it's a symbolic link. OTOH, it's precisely
>> to iron out such kinks that we have ~arch.
>
> What if a daemon tries to do braindead compat attempt through creating
> a pidfile in both directories?
>
I think the answer is obvious — we patch it to use /run/lock ...
--
~Nirbheek Chauhan
Gentoo GNOME+Mozilla Team
^ permalink raw reply [flat|nested] 44+ messages in thread
end of thread, other threads:[~2011-05-23 8:31 UTC | newest]
Thread overview: 44+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-05-17 16:57 [gentoo-dev] rfc: use of the /run directory William Hubbs
2011-05-17 18:11 ` Peter Volkov
2011-05-17 18:28 ` Nirbheek Chauhan
2011-05-17 18:43 ` Ângelo Arrifano
2011-05-17 18:50 ` Nirbheek Chauhan
2011-05-17 19:11 ` Peter Volkov
2011-05-17 19:20 ` Ângelo Arrifano
2011-05-17 19:07 ` William Hubbs
2011-05-17 20:35 ` James Cloos
2011-05-17 20:40 ` Markos Chandras
2011-05-18 0:06 ` James Cloos
2011-05-18 0:43 ` William Hubbs
2011-05-17 19:20 ` Panagiotis Christopoulos
2011-05-17 19:46 ` William Hubbs
2011-05-18 1:31 ` [gentoo-dev] " Duncan
2011-05-18 1:36 ` [gentoo-dev] " Jeroen Roovers
2011-05-18 5:49 ` Eray Aslan
2011-05-18 14:45 ` Henry Gebhardt
2011-05-18 14:51 ` Samuli Suominen
2011-05-18 15:02 ` [gentoo-dev] " Jonathan Callen
2011-05-17 19:48 ` [gentoo-dev] " Nirbheek Chauhan
2011-05-17 20:00 ` Olivier Crête
2011-05-17 20:07 ` Michał Górny
2011-05-17 20:11 ` Amadeusz Żołnowski
2011-05-17 20:23 ` Rich Freeman
2011-05-17 20:20 ` Panagiotis Christopoulos
2011-05-17 20:28 ` Michał Górny
2011-05-17 20:54 ` Olivier Crête
2011-05-17 21:00 ` Nirbheek Chauhan
2011-05-17 22:26 ` Drake Wyrm
2011-05-17 22:36 ` Marc Schiffbauer
2011-05-17 22:46 ` Nirbheek Chauhan
2011-05-18 0:06 ` William Hubbs
2011-05-17 22:50 ` Ciaran McCreesh
2011-05-18 0:12 ` William Hubbs
2011-05-23 6:30 ` Ciaran McCreesh
2011-05-23 7:05 ` Nirbheek Chauhan
2011-05-23 7:11 ` Ciaran McCreesh
2011-05-23 7:13 ` Michał Górny
2011-05-23 8:30 ` Nirbheek Chauhan
2011-05-20 8:58 ` Luca Barbato
2011-05-20 16:54 ` Mike Pagano
2011-05-22 19:13 ` Luca Barbato
2011-05-22 21:12 ` Ondřej Súkup
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox