* [PATCH 0/6] base-files: add /run directory from FHS 3 draft specification
@ 2013-05-26 11:13 Jonathan Liu
2013-05-26 11:13 ` [PATCH 1/6] " Jonathan Liu
` (5 more replies)
0 siblings, 6 replies; 7+ messages in thread
From: Jonathan Liu @ 2013-05-26 11:13 UTC (permalink / raw)
To: openembedded-core
This is an updated and split up version of the original monolithic
patch to add /run directory from FHS 3 draft specification.
For reference, my previously submitted patches (6):
systemd: fix ordering for machineid and run-postinsts services
resolvconf: remove /var/volatile/run/resolvconf/interface from package
boot-directdisk: mount root by MBR disk signature for Linux 3.8+
bind: remove empty /var/run directory
cups: remove /var/run from package as cupsd will populate it on startup
consolekit: remove /var/run from package
Jonathan Liu (6):
base-files: add /run directory from FHS 3 draft specification
systemd: do not create /var/volatile/run and /var/volatile/lock
systemd: do not create symbolic link from /run to /var/run
systemd: remove old /var/run workarounds
udev: do not create /var/volatile/run in init script
udev: do not create symbolic link from /run to /var/run
meta/files/fs-perms.txt | 5 ++---
meta/recipes-core/base-files/base-files/fstab | 1 +
meta/recipes-core/base-files/base-files_3.0.14.bb | 10 +++++-----
meta/recipes-core/initscripts/initscripts-1.0/volatiles | 7 +++----
meta/recipes-core/systemd/systemd/00-create-volatile.conf | 2 --
meta/recipes-core/systemd/systemd/init | 4 ----
meta/recipes-core/systemd/systemd/var-run.conf | 4 ----
meta/recipes-core/systemd/systemd_204.bb | 3 ---
meta/recipes-core/udev/udev.inc | 6 +-----
meta/recipes-core/udev/udev/init | 1 -
meta/recipes-core/udev/udev/volatiles | 1 -
11 files changed, 12 insertions(+), 32 deletions(-)
delete mode 100644 meta/recipes-core/systemd/systemd/var-run.conf
delete mode 100644 meta/recipes-core/udev/udev/volatiles
--
1.8.2.3
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH 1/6] base-files: add /run directory from FHS 3 draft specification
2013-05-26 11:13 [PATCH 0/6] base-files: add /run directory from FHS 3 draft specification Jonathan Liu
@ 2013-05-26 11:13 ` Jonathan Liu
2013-05-26 11:13 ` [PATCH 2/6] systemd: do not create /var/volatile/run and /var/volatile/lock Jonathan Liu
` (4 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: Jonathan Liu @ 2013-05-26 11:13 UTC (permalink / raw)
To: openembedded-core
This adds the /run directory from the Filesystem Hierarchy Standard 3.0
Draft [1] and refactors the filesystem as follows:
- Remove creation of /var/volatile/run
- Remove creation of /var/volatile/lock
- Remove symbolic link from /var/run to /var/volatile/run
- Remove symbolic link from /var/lock to /var/volatile/lock
- Add symbolic link from /var/run to /run
- Add symbolic link from /var/lock -> /run/lock
- Add /run to /etc/fstab for sysvinit compatibility
[1] http://www.linuxbase.org/betaspecs/fhs/fhs.html#runRuntimeVariableData
Signed-off-by: Jonathan Liu <net147@gmail.com>
---
meta/files/fs-perms.txt | 5 ++---
meta/recipes-core/base-files/base-files/fstab | 1 +
meta/recipes-core/base-files/base-files_3.0.14.bb | 10 +++++-----
meta/recipes-core/initscripts/initscripts-1.0/volatiles | 7 +++----
4 files changed, 11 insertions(+), 12 deletions(-)
diff --git a/meta/files/fs-perms.txt b/meta/files/fs-perms.txt
index becb85c..c829bec 100644
--- a/meta/files/fs-perms.txt
+++ b/meta/files/fs-perms.txt
@@ -45,15 +45,14 @@ ${oldincludedir} 0755 root root true 0644 root root
# Items from base-files
# Links
-${localstatedir}/run link volatile/run
+${localstatedir}/run link /run
${localstatedir}/log link volatile/log
-${localstatedir}/lock link volatile/lock
+${localstatedir}/lock link /run/lock
${localstatedir}/tmp link volatile/tmp
# Special permissions from base-files
# Set 1777
/tmp 01777 root root false - - -
-${localstatedir}/volatile/lock 01777 root root false - - -
${localstatedir}/volatile/tmp 01777 root root false - - -
# Set 2775
diff --git a/meta/recipes-core/base-files/base-files/fstab b/meta/recipes-core/base-files/base-files/fstab
index f0eed36..dd613a1 100644
--- a/meta/recipes-core/base-files/base-files/fstab
+++ b/meta/recipes-core/base-files/base-files/fstab
@@ -4,6 +4,7 @@ rootfs / auto defaults 1 1
proc /proc proc defaults 0 0
devpts /dev/pts devpts mode=0620,gid=5 0 0
usbdevfs /proc/bus/usb usbdevfs noauto 0 0
+tmpfs /run tmpfs mode=0755,nodev,nosuid,strictatime 0 0
tmpfs /var/volatile tmpfs defaults 0 0
tmpfs /media/ram tmpfs defaults 0 0
diff --git a/meta/recipes-core/base-files/base-files_3.0.14.bb b/meta/recipes-core/base-files/base-files_3.0.14.bb
index a56450d..ac85ed9 100644
--- a/meta/recipes-core/base-files/base-files_3.0.14.bb
+++ b/meta/recipes-core/base-files/base-files_3.0.14.bb
@@ -31,10 +31,10 @@ S = "${WORKDIR}"
INHIBIT_DEFAULT_DEPS = "1"
docdir_append = "/${P}"
-dirs1777 = "/tmp ${localstatedir}/volatile/lock ${localstatedir}/volatile/tmp"
+dirs1777 = "/tmp ${localstatedir}/volatile/tmp"
dirs2775 = "/home ${prefix}/src ${localstatedir}/local"
dirs755 = "/bin /boot /dev ${sysconfdir} ${sysconfdir}/default \
- ${sysconfdir}/skel /lib /mnt /proc ${ROOT_HOME} /sbin \
+ ${sysconfdir}/skel /lib /mnt /proc ${ROOT_HOME} /run /sbin \
${prefix} ${bindir} ${docdir} /usr/games ${includedir} \
${libdir} ${sbindir} ${datadir} \
${datadir}/common-licenses ${datadir}/dict ${infodir} \
@@ -42,9 +42,7 @@ dirs755 = "/bin /boot /dev ${sysconfdir} ${sysconfdir}/default \
${localstatedir}/backups ${localstatedir}/lib \
/sys ${localstatedir}/lib/misc ${localstatedir}/spool \
${localstatedir}/volatile \
- ${localstatedir}/volatile/lock/subsys \
${localstatedir}/volatile/log \
- ${localstatedir}/volatile/run \
/mnt /media /media/card /media/cf /media/net /media/ram \
/media/union /media/realroot /media/hdd \
/media/mmc1"
@@ -54,7 +52,7 @@ dirs3755 = "/srv \
${prefix}/local/share ${prefix}/local/src"
dirs4775 = "/var/mail"
-volatiles = "run log lock tmp"
+volatiles = "log tmp"
conffiles = "${sysconfdir}/debian_version ${sysconfdir}/host.conf \
${sysconfdir}/inputrc ${sysconfdir}/issue /${sysconfdir}/issue.net \
${sysconfdir}/nsswitch.conf ${sysconfdir}/profile \
@@ -83,6 +81,8 @@ do_install () {
for d in card cf net ram; do
ln -sf /media/$d ${D}/mnt/$d
done
+ ln -snf ../run ${D}${localstatedir}/run
+ ln -snf ../run/lock ${D}${localstatedir}/lock
${BASEFILESISSUEINSTALL}
diff --git a/meta/recipes-core/initscripts/initscripts-1.0/volatiles b/meta/recipes-core/initscripts/initscripts-1.0/volatiles
index 270f128..297245d 100644
--- a/meta/recipes-core/initscripts/initscripts-1.0/volatiles
+++ b/meta/recipes-core/initscripts/initscripts-1.0/volatiles
@@ -21,13 +21,12 @@
# This explains the order of "link before object" as in the example above, where
# a link will be created at /var/test pointing to /tmp/testfile and due to this
# link the file defined as /var/test will actually be created as /tmp/testfile.
-d root root 1777 /var/volatile/lock none
+d root root 1777 /run/lock none
d root root 0755 /var/volatile/log none
-d root root 0755 /var/volatile/run none
d root root 1777 /var/volatile/tmp none
-l root root 1777 /var/lock /var/volatile/lock
+l root root 1777 /var/lock /run/lock
l root root 0755 /var/log /var/volatile/log
-l root root 0755 /var/run /var/volatile/run
+l root root 0755 /var/run /run
l root root 1777 /var/tmp /var/volatile/tmp
l root root 1777 /tmp /var/tmp
d root root 0755 /var/lock/subsys none
--
1.8.2.3
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH 2/6] systemd: do not create /var/volatile/run and /var/volatile/lock
2013-05-26 11:13 [PATCH 0/6] base-files: add /run directory from FHS 3 draft specification Jonathan Liu
2013-05-26 11:13 ` [PATCH 1/6] " Jonathan Liu
@ 2013-05-26 11:13 ` Jonathan Liu
2013-05-26 11:13 ` [PATCH 3/6] systemd: do not create symbolic link from /run to /var/run Jonathan Liu
` (3 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: Jonathan Liu @ 2013-05-26 11:13 UTC (permalink / raw)
To: openembedded-core
The directories are not needed anymore.
Previously:
/var/run -> /var/volatile/run
/var/lock -> /var/volatile/lock
Now:
/var/run -> /run
/var/lock -> /run/lock
Signed-off-by: Jonathan Liu <net147@gmail.com>
---
meta/recipes-core/systemd/systemd/00-create-volatile.conf | 2 --
meta/recipes-core/systemd/systemd/init | 1 -
2 files changed, 3 deletions(-)
diff --git a/meta/recipes-core/systemd/systemd/00-create-volatile.conf b/meta/recipes-core/systemd/systemd/00-create-volatile.conf
index 6163a9c..9ffa88e 100644
--- a/meta/recipes-core/systemd/systemd/00-create-volatile.conf
+++ b/meta/recipes-core/systemd/systemd/00-create-volatile.conf
@@ -4,6 +4,4 @@
d /var/volatile/log - - - -
-d /var/volatile/lock - - - -
-d /var/volatile/run - - - -
d /var/volatile/tmp - - - -
diff --git a/meta/recipes-core/systemd/systemd/init b/meta/recipes-core/systemd/systemd/init
index ac56cca..a42e732 100644
--- a/meta/recipes-core/systemd/systemd/init
+++ b/meta/recipes-core/systemd/systemd/init
@@ -42,7 +42,6 @@ case "$1" in
[ -e /dev/pts ] || mkdir -m 0755 /dev/pts
[ -e /dev/shm ] || mkdir -m 1777 /dev/shm
mount -a -t tmpfs 2>/dev/null
- mkdir -p /var/volatile/run
if [ ! -e /run ]; then
ln -s /var/run /run
fi
--
1.8.2.3
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH 3/6] systemd: do not create symbolic link from /run to /var/run
2013-05-26 11:13 [PATCH 0/6] base-files: add /run directory from FHS 3 draft specification Jonathan Liu
2013-05-26 11:13 ` [PATCH 1/6] " Jonathan Liu
2013-05-26 11:13 ` [PATCH 2/6] systemd: do not create /var/volatile/run and /var/volatile/lock Jonathan Liu
@ 2013-05-26 11:13 ` Jonathan Liu
2013-05-26 11:13 ` [PATCH 4/6] systemd: remove old /var/run workarounds Jonathan Liu
` (2 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: Jonathan Liu @ 2013-05-26 11:13 UTC (permalink / raw)
To: openembedded-core
The /run directory already exists as a tmpfs with /var/run as a symbolic
link pointing to /run.
Signed-off-by: Jonathan Liu <net147@gmail.com>
---
meta/recipes-core/systemd/systemd/init | 3 ---
1 file changed, 3 deletions(-)
diff --git a/meta/recipes-core/systemd/systemd/init b/meta/recipes-core/systemd/systemd/init
index a42e732..7e67a50 100644
--- a/meta/recipes-core/systemd/systemd/init
+++ b/meta/recipes-core/systemd/systemd/init
@@ -42,9 +42,6 @@ case "$1" in
[ -e /dev/pts ] || mkdir -m 0755 /dev/pts
[ -e /dev/shm ] || mkdir -m 1777 /dev/shm
mount -a -t tmpfs 2>/dev/null
- if [ ! -e /run ]; then
- ln -s /var/run /run
- fi
# cache handling
if [ "$DEVCACHE" != "" ]; then
--
1.8.2.3
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH 4/6] systemd: remove old /var/run workarounds
2013-05-26 11:13 [PATCH 0/6] base-files: add /run directory from FHS 3 draft specification Jonathan Liu
` (2 preceding siblings ...)
2013-05-26 11:13 ` [PATCH 3/6] systemd: do not create symbolic link from /run to /var/run Jonathan Liu
@ 2013-05-26 11:13 ` Jonathan Liu
2013-05-26 11:13 ` [PATCH 5/6] udev: do not create /var/volatile/run in init script Jonathan Liu
2013-05-26 11:13 ` [PATCH 6/6] udev: do not create symbolic link from /run to /var/run Jonathan Liu
5 siblings, 0 replies; 7+ messages in thread
From: Jonathan Liu @ 2013-05-26 11:13 UTC (permalink / raw)
To: openembedded-core
Do not clear /var/run on startup as it is a tmpfs.
Do not create empty /var/run/utmp on startup as it no longer seems
needed for systemd-update-utmp-runlevel.service to start properly.
Signed-off-by: Jonathan Liu <net147@gmail.com>
---
meta/recipes-core/systemd/systemd/var-run.conf | 4 ----
meta/recipes-core/systemd/systemd_204.bb | 3 ---
2 files changed, 7 deletions(-)
delete mode 100644 meta/recipes-core/systemd/systemd/var-run.conf
diff --git a/meta/recipes-core/systemd/systemd/var-run.conf b/meta/recipes-core/systemd/systemd/var-run.conf
deleted file mode 100644
index c2c18e2..0000000
--- a/meta/recipes-core/systemd/systemd/var-run.conf
+++ /dev/null
@@ -1,4 +0,0 @@
-# empty /var/run
-R /var/run/* - - - - -
-# systemd-update-utmp-runlevel.service fails to start without this
-f /var/run/utmp 0644 root root - -
diff --git a/meta/recipes-core/systemd/systemd_204.bb b/meta/recipes-core/systemd/systemd_204.bb
index ec5be1f..9664e04 100644
--- a/meta/recipes-core/systemd/systemd_204.bb
+++ b/meta/recipes-core/systemd/systemd_204.bb
@@ -20,7 +20,6 @@ inherit gtk-doc useradd pkgconfig autotools perlnative update-rc.d update-altern
SRC_URI = "http://www.freedesktop.org/software/systemd/systemd-${PV}.tar.xz \
file://touchscreen.rules \
file://modprobe.rules \
- file://var-run.conf \
${UCLIBCPATCHES} \
file://0001-utmp-turn-systemd-update-utmp-shutdown.service-into-.patch \
file://00-create-volatile.conf \
@@ -105,8 +104,6 @@ do_install() {
install -m 0644 ${WORKDIR}/*.rules ${D}${sysconfdir}/udev/rules.d/
- install -m 0644 ${WORKDIR}/var-run.conf ${D}${sysconfdir}/tmpfiles.d/
-
install -m 0644 ${WORKDIR}/00-create-volatile.conf ${D}${sysconfdir}/tmpfiles.d/
if ${@base_contains('DISTRO_FEATURES','sysvinit','true','false',d)}; then
--
1.8.2.3
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH 5/6] udev: do not create /var/volatile/run in init script
2013-05-26 11:13 [PATCH 0/6] base-files: add /run directory from FHS 3 draft specification Jonathan Liu
` (3 preceding siblings ...)
2013-05-26 11:13 ` [PATCH 4/6] systemd: remove old /var/run workarounds Jonathan Liu
@ 2013-05-26 11:13 ` Jonathan Liu
2013-05-26 11:13 ` [PATCH 6/6] udev: do not create symbolic link from /run to /var/run Jonathan Liu
5 siblings, 0 replies; 7+ messages in thread
From: Jonathan Liu @ 2013-05-26 11:13 UTC (permalink / raw)
To: openembedded-core
Previously in udev init, /var/volatile/run had to be created after
mounting all tmpfs filesystems so that udevd can write to /var/run
(a symbolic link to /var/volatile/run). This is because udev is
started before populate-volatile.sh.
Now that /var/run is a symbolic link to /run (a tmpfs filesystem),
/var/volatile/run doesn't need to be created anymore.
Signed-off-by: Jonathan Liu <net147@gmail.com>
---
meta/recipes-core/udev/udev/init | 1 -
1 file changed, 1 deletion(-)
diff --git a/meta/recipes-core/udev/udev/init b/meta/recipes-core/udev/udev/init
index cd87f50..95f9c03 100644
--- a/meta/recipes-core/udev/udev/init
+++ b/meta/recipes-core/udev/udev/init
@@ -50,7 +50,6 @@ case "$1" in
[ -e /dev/pts ] || mkdir -m 0755 /dev/pts
[ -e /dev/shm ] || mkdir -m 1777 /dev/shm
mount -a -t tmpfs 2>/dev/null
- mkdir -p /var/volatile/run
mkdir -p /var/volatile/tmp
# cache handling
--
1.8.2.3
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH 6/6] udev: do not create symbolic link from /run to /var/run
2013-05-26 11:13 [PATCH 0/6] base-files: add /run directory from FHS 3 draft specification Jonathan Liu
` (4 preceding siblings ...)
2013-05-26 11:13 ` [PATCH 5/6] udev: do not create /var/volatile/run in init script Jonathan Liu
@ 2013-05-26 11:13 ` Jonathan Liu
5 siblings, 0 replies; 7+ messages in thread
From: Jonathan Liu @ 2013-05-26 11:13 UTC (permalink / raw)
To: openembedded-core
The /run directory is now a tmpfs with /var/run as a symbolic link
pointing to /run.
Signed-off-by: Jonathan Liu <net147@gmail.com>
---
meta/recipes-core/udev/udev.inc | 6 +-----
meta/recipes-core/udev/udev/volatiles | 1 -
2 files changed, 1 insertion(+), 6 deletions(-)
delete mode 100644 meta/recipes-core/udev/udev/volatiles
diff --git a/meta/recipes-core/udev/udev.inc b/meta/recipes-core/udev/udev.inc
index 769d861..92485f5 100644
--- a/meta/recipes-core/udev/udev.inc
+++ b/meta/recipes-core/udev/udev.inc
@@ -26,8 +26,7 @@ SRC_URI = "${KERNELORG_MIRROR}/linux/utils/kernel/hotplug/udev-${PV}.tar.gz \
file://local.rules \
file://udev-cache \
file://udev-cache.default \
- file://init \
- file://volatiles"
+ file://init"
inherit autotools pkgconfig update-rc.d
@@ -85,9 +84,6 @@ do_install_append () {
install -d ${D}${sysconfdir}/default
install -m 0755 ${WORKDIR}/udev-cache.default ${D}${sysconfdir}/default/udev-cache
- install -d ${D}${sysconfdir}/default/volatiles
- install -m 0644 ${WORKDIR}/volatiles ${D}${sysconfdir}/default/volatiles/00_udev
-
touch ${D}${sysconfdir}/udev/cache.data
install -d ${D}${sysconfdir}/udev/rules.d/
diff --git a/meta/recipes-core/udev/udev/volatiles b/meta/recipes-core/udev/udev/volatiles
deleted file mode 100644
index e33561b..0000000
--- a/meta/recipes-core/udev/udev/volatiles
+++ /dev/null
@@ -1 +0,0 @@
-l root root 0755 /run /var/run
--
1.8.2.3
^ permalink raw reply related [flat|nested] 7+ messages in thread
end of thread, other threads:[~2013-05-26 10:59 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-05-26 11:13 [PATCH 0/6] base-files: add /run directory from FHS 3 draft specification Jonathan Liu
2013-05-26 11:13 ` [PATCH 1/6] " Jonathan Liu
2013-05-26 11:13 ` [PATCH 2/6] systemd: do not create /var/volatile/run and /var/volatile/lock Jonathan Liu
2013-05-26 11:13 ` [PATCH 3/6] systemd: do not create symbolic link from /run to /var/run Jonathan Liu
2013-05-26 11:13 ` [PATCH 4/6] systemd: remove old /var/run workarounds Jonathan Liu
2013-05-26 11:13 ` [PATCH 5/6] udev: do not create /var/volatile/run in init script Jonathan Liu
2013-05-26 11:13 ` [PATCH 6/6] udev: do not create symbolic link from /run to /var/run Jonathan Liu
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox