Re: [gentoo-dev] keepdir /var/run/package/?
On Fri, 13 Aug 2010, Mike Frysinger wrote: Why not checkpath -d -o fowner:fgroup -m 0755 /var/run/foo? i thought there was something. that was the whole point of Bug 192682. if we dont get openrc out the door, i'll have to add to baselayout-1. I thought you already had backported checkpath? http://sources.gentoo.org/cgi-bin/viewvc.cgi/baselayout/branches/baselayout-1_12/bin/checkpath?view=log Ulrich
Re: [gentoo-dev] keepdir /var/run/package/?
On Sat, Aug 14, 2010 at 3:39 PM, Ulrich Mueller wrote: On Fri, 13 Aug 2010, Mike Frysinger wrote: Why not checkpath -d -o fowner:fgroup -m 0755 /var/run/foo? i thought there was something. that was the whole point of Bug 192682. if we dont get openrc out the door, i'll have to add to baselayout-1. I thought you already had backported checkpath? http://sources.gentoo.org/cgi-bin/viewvc.cgi/baselayout/branches/baselayout-1_12/bin/checkpath?view=log clearly i cant remember anything anymore. checkpath is indeed in stable baselayout. -mike
Re: [gentoo-dev] keepdir /var/run/package/?
On Thu, Aug 12, 2010 at 3:40 PM, Mike Frysinger wrote: On Thu, Aug 12, 2010 at 3:33 PM, Eray Aslan wrote: It will be somewhat more work but instead of the above, we can say tmpfs might be used for /var/run and /var/lock and the init scripts should handle this correctly. It feels (for want of a better word) better. i certainly use a tmpfs on /var/run to minimize disk writes. packages that break i file bugs for and/or fix myself. it isnt that hard. plus, it's just good behavior. if /var/run gets removed for whatever reason, people have to re-emerge a bunch of packages to simply create a subdir ? that's silly. for people who do wish to improve their init.d scripts, recreating a dir is easy if your init.d runs after localmount: [ ! -d /var/run/foo ] install -d -m 755 -o fowner -g fgroup /var/run/foo if your init.d runs before localmount, you'll have to resort to normal mkdir/chown/chmod, but i dont think there are many (any?) scripts that'll hit this set of requirements -mike
Re: [gentoo-dev] keepdir /var/run/package/?
On Fri, Aug 13, 2010 at 12:17 PM, Mike Frysinger wrote: for people who do wish to improve their init.d scripts, recreating a dir is easy if your init.d runs after localmount: [ ! -d /var/run/foo ] install -d -m 755 -o fowner -g fgroup /var/run/foo oh, and for the very few cases that need to create a file with specific ownership ahead of time (because their daemon sucks and doesnt drop root properly), then you can do: install -m 644 -o fowner -g fgroup /dev/null /var/run/foo-file -mike
Re: [gentoo-dev] keepdir /var/run/package/?
On Thu, 12 Aug 2010 15:40:31 -0400 Mike Frysinger vap...@gentoo.org wrote: On Thu, Aug 12, 2010 at 3:33 PM, Eray Aslan wrote: On 08/12/2010 09:48 PM, Samuli Suominen wrote: It says Files under this directory, not Files and directories under this directory. Fair enough. So our policy basically is tmpfs is not supported for /var/run (and also for /var/lock I suppose). it may have been in the past, but it's best to move forward and not sit in the past It will be somewhat more work but instead of the above, we can say tmpfs might be used for /var/run and /var/lock and the init scripts should handle this correctly. It feels (for want of a better word) better. i certainly use a tmpfs on /var/run to minimize disk writes. packages that break i file bugs for and/or fix myself. it isnt that hard. plus, it's just good behavior. if /var/run gets removed for whatever reason, people have to re-emerge a bunch of packages to simply create a subdir ? that's silly. Bug #332633 tracks ebuilds (284) and eclasses (currently none) that run keepdir /var/run*. https://bugs.gentoo.org/show_bug.cgi?id=332633 jer
Re: [gentoo-dev] keepdir /var/run/package/?
On Fri, 13 Aug 2010, Mike Frysinger wrote: for people who do wish to improve their init.d scripts, recreating a dir is easy if your init.d runs after localmount: [ ! -d /var/run/foo ] install -d -m 755 -o fowner -g fgroup /var/run/foo Why not checkpath -d -o fowner:fgroup -m 0755 /var/run/foo? This also corrects wrong owner and permissions for an existing dir. Ulrich
Re: [gentoo-dev] keepdir /var/run/package/?
On Fri, Aug 13, 2010 at 1:04 PM, Ulrich Mueller wrote: On Fri, 13 Aug 2010, Mike Frysinger wrote: for people who do wish to improve their init.d scripts, recreating a dir is easy if your init.d runs after localmount: [ ! -d /var/run/foo ] install -d -m 755 -o fowner -g fgroup /var/run/foo Why not checkpath -d -o fowner:fgroup -m 0755 /var/run/foo? i thought there was something. that was the whole point of Bug 192682. if we dont get openrc out the door, i'll have to add to baselayout-1. -mike
Re: [gentoo-dev] keepdir /var/run/package/?
On 8/12/10 11:29 AM, Eray Aslan wrote: It is perfectly legal to clear /var/run across reboots. Below is a bug from a user that ran into some trouble because an init script assumes that /var/run/package/ exists for its PID file: Can we add a repoman check for that? signature.asc Description: OpenPGP digital signature
Re: [gentoo-dev] keepdir /var/run/package/?
What you're saying doesn't agree with http://www.pathname.com/fhs/pub/fhs-2.3.html#VARRUNRUNTIMEVARIABLEDATA On Thu, Aug 12, 2010 at 2:29 PM, Eray Aslan eray.as...@caf.com.tr wrote: It is perfectly legal to clear /var/run across reboots. Below is a bug from a user that ran into some trouble because an init script assumes that /var/run/package/ exists for its PID file:
Re: [gentoo-dev] keepdir /var/run/package/?
On Thu, Aug 12, 2010 at 02:36:40PM -0400, Michael Sterrett wrote: What you're saying doesn't agree with http://www.pathname.com/fhs/pub/fhs-2.3.html#VARRUNRUNTIMEVARIABLEDATA I do not understand. In the above link, it says: /var/run: [...]Files under this directory must be cleared (removed or truncated as appropriate) at the beginning of the boot process. So we cannot assume that a directory exists under /var/run during boot. Hence, keepdiring a dir that will most probably be cleared during boot is pointless. Am I missing something? -- Eray
Re: [gentoo-dev] keepdir /var/run/package/?
On 08/12/2010 09:42 PM, Eray Aslan wrote: On Thu, Aug 12, 2010 at 02:36:40PM -0400, Michael Sterrett wrote: What you're saying doesn't agree with http://www.pathname.com/fhs/pub/fhs-2.3.html#VARRUNRUNTIMEVARIABLEDATA I do not understand. In the above link, it says: /var/run: [...]Files under this directory must be cleared (removed or truncated as appropriate) at the beginning of the boot process. So we cannot assume that a directory exists under /var/run during boot. Hence, keepdiring a dir that will most probably be cleared during boot is pointless. Am I missing something? It says Files under this directory, not Files and directories under this directory. Futhermore is continues with, Programs may have a subdirectory of /var/run; this is encouraged for programs that use more than one run-time file. So I'd say keepdir is legal here...
Re: [gentoo-dev] keepdir /var/run/package/?
On Thu, 12 Aug 2010 21:48:04 +0300, Samuli Suominen ssuomi...@gentoo.org wrote: It says Files under this directory, not Files and directories under this directory. Oh, cmon. If you are going to selectively quote, then I'll give you this: This directory contains system information data describing the system since it was booted. So in my opinion, it is fine to rm -rf /var/run/* on system shutdown... Futhermore is continues with, Programs may have a subdirectory of /var/run; this is encouraged for programs that use more than one run-time file. So I'd say keepdir is legal here... Then the app in question can (and should) make the directory, not the ebuild. -Jeremy
Re: [gentoo-dev] keepdir /var/run/package/?
On 08/12/2010 09:48 PM, Samuli Suominen wrote: It says Files under this directory, not Files and directories under this directory. Fair enough. So our policy basically is tmpfs is not supported for /var/run (and also for /var/lock I suppose). It will be somewhat more work but instead of the above, we can say tmpfs might be used for /var/run and /var/lock and the init scripts should handle this correctly. It feels (for want of a better word) better. -- Eray
Re: [gentoo-dev] keepdir /var/run/package/?
On Thu, Aug 12, 2010 at 3:33 PM, Eray Aslan wrote: On 08/12/2010 09:48 PM, Samuli Suominen wrote: It says Files under this directory, not Files and directories under this directory. Fair enough. So our policy basically is tmpfs is not supported for /var/run (and also for /var/lock I suppose). it may have been in the past, but it's best to move forward and not sit in the past It will be somewhat more work but instead of the above, we can say tmpfs might be used for /var/run and /var/lock and the init scripts should handle this correctly. It feels (for want of a better word) better. i certainly use a tmpfs on /var/run to minimize disk writes. packages that break i file bugs for and/or fix myself. it isnt that hard. plus, it's just good behavior. if /var/run gets removed for whatever reason, people have to re-emerge a bunch of packages to simply create a subdir ? that's silly. -mike