All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/2] skeleton: make /run a directory
@ 2014-11-27 16:48 Gustavo Zacarias
  2014-11-27 16:48 ` [Buildroot] [PATCH 2/2] skeleton/fstab: add /run entry Gustavo Zacarias
  2014-12-01 20:39 ` [Buildroot] [PATCH 1/2] skeleton: make /run a directory André Erdmann
  0 siblings, 2 replies; 8+ messages in thread
From: Gustavo Zacarias @ 2014-11-27 16:48 UTC (permalink / raw)
  To: buildroot

Using a /tmp symlink makes it racy (mode 1777 for /tmp proper) and ugly.
While at it also point /var/run to /run until everything is moved there like
it should be.

Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
---
 system/skeleton/run        | 1 -
 system/skeleton/run/.empty | 0
 system/skeleton/var/run    | 2 +-
 3 files changed, 1 insertion(+), 2 deletions(-)
 delete mode 120000 system/skeleton/run
 create mode 100644 system/skeleton/run/.empty

diff --git a/system/skeleton/run b/system/skeleton/run
deleted file mode 120000
index 1c2f433..0000000
--- a/system/skeleton/run
+++ /dev/null
@@ -1 +0,0 @@
-tmp
\ No newline at end of file
diff --git a/system/skeleton/run/.empty b/system/skeleton/run/.empty
new file mode 100644
index 0000000..e69de29
diff --git a/system/skeleton/var/run b/system/skeleton/var/run
index 1431b0e..84ba55b 120000
--- a/system/skeleton/var/run
+++ b/system/skeleton/var/run
@@ -1 +1 @@
-../tmp
\ No newline at end of file
+../run
\ No newline at end of file
-- 
2.0.4

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [Buildroot] [PATCH 2/2] skeleton/fstab: add /run entry
  2014-11-27 16:48 [Buildroot] [PATCH 1/2] skeleton: make /run a directory Gustavo Zacarias
@ 2014-11-27 16:48 ` Gustavo Zacarias
  2014-12-01 20:39 ` [Buildroot] [PATCH 1/2] skeleton: make /run a directory André Erdmann
  1 sibling, 0 replies; 8+ messages in thread
From: Gustavo Zacarias @ 2014-11-27 16:48 UTC (permalink / raw)
  To: buildroot

Now that /run is a proper directory (or mountpoint) let's mount a tmpfs
filesystem there to avoid breaking things when the root filesystem
isn't writable.

While at it fix non-consitent spacing by using tabs, and drop the
"static file system information" header whatever that means.

Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
---
 system/skeleton/etc/fstab | 15 ++++++++-------
 1 file changed, 8 insertions(+), 7 deletions(-)

diff --git a/system/skeleton/etc/fstab b/system/skeleton/etc/fstab
index e000aad..2ee4787 100644
--- a/system/skeleton/etc/fstab
+++ b/system/skeleton/etc/fstab
@@ -1,9 +1,10 @@
 # /etc/fstab: static file system information.
 #
-# <file system> <mount pt>     <type>	<options>         <dump> <pass>
-/dev/root       /              ext2	rw,noauto         0      1
-proc		/proc	       proc     defaults	  0	 0
-devpts		/dev/pts       devpts   defaults,gid=5,mode=620	  0	 0
-tmpfs           /dev/shm       tmpfs    mode=0777         0      0
-tmpfs           /tmp           tmpfs    mode=1777         0      0
-sysfs		/sys	       sysfs    defaults	  0	 0
+# <file system>	<mount pt>	<type>	<options>	<dump>	<pass>
+/dev/root	/		ext2	rw,noauto	0	1
+proc		/proc		proc	defaults	0	0
+devpts		/dev/pts	devpts	defaults,gid=5,mode=620	0	0
+tmpfs		/dev/shm	tmpfs	mode=0777	0	0
+tmpfs		/tmp		tmpfs	mode=1777	0	0
+tmpfs		/run		tmpfs	mode=0777,nosuid,nodev	0	0
+sysfs		/sys		sysfs	defaults	0	0
-- 
2.0.4

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [Buildroot] [PATCH 1/2] skeleton: make /run a directory
  2014-11-27 16:48 [Buildroot] [PATCH 1/2] skeleton: make /run a directory Gustavo Zacarias
  2014-11-27 16:48 ` [Buildroot] [PATCH 2/2] skeleton/fstab: add /run entry Gustavo Zacarias
@ 2014-12-01 20:39 ` André Erdmann
  2014-12-01 21:01   ` Samuel Martin
  1 sibling, 1 reply; 8+ messages in thread
From: André Erdmann @ 2014-12-01 20:39 UTC (permalink / raw)
  To: buildroot

Hi,

2014-11-27 17:48 GMT+01:00 Gustavo Zacarias <gustavo@zacarias.com.ar>:
> Using a /tmp symlink makes it racy (mode 1777 for /tmp proper) and ugly.
> While at it also point /var/run to /run until everything is moved there like
> it should be.
>
> Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
> ---
>  system/skeleton/run        | 1 -
>  system/skeleton/run/.empty | 0
>  system/skeleton/var/run    | 2 +-
>  3 files changed, 1 insertion(+), 2 deletions(-)
>  delete mode 120000 system/skeleton/run
>  create mode 100644 system/skeleton/run/.empty
>

Shouldn't we link /var/lock to (../)run/lock then?

-- 
Andr?

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Buildroot] [PATCH 1/2] skeleton: make /run a directory
  2014-12-01 20:39 ` [Buildroot] [PATCH 1/2] skeleton: make /run a directory André Erdmann
@ 2014-12-01 21:01   ` Samuel Martin
  2014-12-01 21:12     ` Gustavo Zacarias
  0 siblings, 1 reply; 8+ messages in thread
From: Samuel Martin @ 2014-12-01 21:01 UTC (permalink / raw)
  To: buildroot

On Mon, Dec 1, 2014 at 9:39 PM, Andr? Erdmann <dywi@mailerd.de> wrote:
> Hi,
>
> 2014-11-27 17:48 GMT+01:00 Gustavo Zacarias <gustavo@zacarias.com.ar>:
>> Using a /tmp symlink makes it racy (mode 1777 for /tmp proper) and ugly.
>> While at it also point /var/run to /run until everything is moved there like
>> it should be.
>>
>> Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
>> ---
>>  system/skeleton/run        | 1 -
>>  system/skeleton/run/.empty | 0
>>  system/skeleton/var/run    | 2 +-
>>  3 files changed, 1 insertion(+), 2 deletions(-)
>>  delete mode 120000 system/skeleton/run
>>  create mode 100644 system/skeleton/run/.empty
>>
>
> Shouldn't we link /var/lock to (../)run/lock then?

I think we shuould.

Regards,


-- 
Samuel

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Buildroot] [PATCH 1/2] skeleton: make /run a directory
  2014-12-01 21:01   ` Samuel Martin
@ 2014-12-01 21:12     ` Gustavo Zacarias
  2014-12-01 21:19       ` André Erdmann
  0 siblings, 1 reply; 8+ messages in thread
From: Gustavo Zacarias @ 2014-12-01 21:12 UTC (permalink / raw)
  To: buildroot

On 12/01/2014 06:01 PM, Samuel Martin wrote:

>> Shouldn't we link /var/lock to (../)run/lock then?
> 
> I think we shuould.

It's not a prerequisite for this patch to get applied.
And that would fail badly for the systemd scenario, you want to use
tmpfiles.d for that since /run will be empty and no inittab/script will
fill that up.
Regards.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Buildroot] [PATCH 1/2] skeleton: make /run a directory
  2014-12-01 21:12     ` Gustavo Zacarias
@ 2014-12-01 21:19       ` André Erdmann
  2014-12-01 21:32         ` Gustavo Zacarias
  0 siblings, 1 reply; 8+ messages in thread
From: André Erdmann @ 2014-12-01 21:19 UTC (permalink / raw)
  To: buildroot

2014-12-01 22:12 GMT+01:00 Gustavo Zacarias <gustavo@zacarias.com.ar>:
> On 12/01/2014 06:01 PM, Samuel Martin wrote:
>
>>> Shouldn't we link /var/lock to (../)run/lock then?
>>
>> I think we shuould.
>
> It's not a prerequisite for this patch to get applied.
> And that would fail badly for the systemd scenario, you want to use
> tmpfiles.d for that since /run will be empty and no inittab/script will
> fill that up.
> Regards.
>

There are already tmpfiles.d rules for that, /usr/lib/tmpfiles.d/legacy.conf:

d /run/lock 0755 root root -
L /var/lock - - - - ../run/lock

To make it work properly for systemd, /var/lock needs to be removed
from the skeleton or point to /run/lock (or replace the "L" with "L+"
in the tmpfiles.d rule).


-- 
Andr?

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Buildroot] [PATCH 1/2] skeleton: make /run a directory
  2014-12-01 21:19       ` André Erdmann
@ 2014-12-01 21:32         ` Gustavo Zacarias
  2014-12-01 21:59           ` André Erdmann
  0 siblings, 1 reply; 8+ messages in thread
From: Gustavo Zacarias @ 2014-12-01 21:32 UTC (permalink / raw)
  To: buildroot

On 12/01/2014 06:19 PM, Andr? Erdmann wrote:

> There are already tmpfiles.d rules for that, /usr/lib/tmpfiles.d/legacy.conf:
> 
> d /run/lock 0755 root root -
> L /var/lock - - - - ../run/lock
> 
> To make it work properly for systemd, /var/lock needs to be removed
> from the skeleton or point to /run/lock (or replace the "L" with "L+"
> in the tmpfiles.d rule).

Sure, but as i explained to Samuel on IRC this is just the tip of a
general cleanup regarding the base files.
Even though systemd ships that doing more symlinks won't help the
sysv-aspect of the cleanup since /run/lock won't exist whereas now lock
is still /tmp hence no breakage until the other patches are sent/applied.
The idea is to make a script to handle something similar to tmpfiles.d
for sysv-style so we can drop all the symlink hackery which is pointless
for systemd but necessary for sysv, we just stick is as S01basefiles or
some other preferred name.
And also to really move out all of the remaining files that make no
sense for systemd and/or sysv into a basefiles (or other nifty name)
package to avoid noise.
Regards.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Buildroot] [PATCH 1/2] skeleton: make /run a directory
  2014-12-01 21:32         ` Gustavo Zacarias
@ 2014-12-01 21:59           ` André Erdmann
  0 siblings, 0 replies; 8+ messages in thread
From: André Erdmann @ 2014-12-01 21:59 UTC (permalink / raw)
  To: buildroot

2014-12-01 22:32 GMT+01:00 Gustavo Zacarias <gustavo@zacarias.com.ar>:
> On 12/01/2014 06:19 PM, Andr? Erdmann wrote:
>
>> There are already tmpfiles.d rules for that, /usr/lib/tmpfiles.d/legacy.conf:
>>
>> d /run/lock 0755 root root -
>> L /var/lock - - - - ../run/lock
>>
>> To make it work properly for systemd, /var/lock needs to be removed
>> from the skeleton or point to /run/lock (or replace the "L" with "L+"
>> in the tmpfiles.d rule).
>
> Sure, but as i explained to Samuel on IRC this is just the tip of a
> general cleanup regarding the base files.
> Even though systemd ships that doing more symlinks won't help the
> sysv-aspect of the cleanup since /run/lock won't exist whereas now lock
> is still /tmp hence no breakage until the other patches are sent/applied.
> The idea is to make a script to handle something similar to tmpfiles.d
> for sysv-style so we can drop all the symlink hackery which is pointless
> for systemd but necessary for sysv, we just stick is as S01basefiles or
> some other preferred name.

The symlinks might still be required for readonly rootfs (but this
requires other changes anyway). Apart from that, I agree with the
basefiles approach and keeping /var/lock untouched in this patch
series.

> And also to really move out all of the remaining files that make no
> sense for systemd and/or sysv into a basefiles (or other nifty name)
> package to avoid noise.
> Regards.

-- 
Andr?

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2014-12-01 21:59 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-11-27 16:48 [Buildroot] [PATCH 1/2] skeleton: make /run a directory Gustavo Zacarias
2014-11-27 16:48 ` [Buildroot] [PATCH 2/2] skeleton/fstab: add /run entry Gustavo Zacarias
2014-12-01 20:39 ` [Buildroot] [PATCH 1/2] skeleton: make /run a directory André Erdmann
2014-12-01 21:01   ` Samuel Martin
2014-12-01 21:12     ` Gustavo Zacarias
2014-12-01 21:19       ` André Erdmann
2014-12-01 21:32         ` Gustavo Zacarias
2014-12-01 21:59           ` André Erdmann

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.