<div dir="ltr">Note that I have rebased the patch so it depends on:<div>- [PATCH v4] systemd: update to 204</div><div><br></div><div style>Regards,</div><div style>Jonathan</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">
On 23 May 2013 14:02, Jonathan Liu <span dir="ltr"><<a href="mailto:net147@gmail.com" target="_blank">net147@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="im">This adds the /run directory from the Filesystem Hierarchy Standard 3.0<br>
Draft [1] and refactors the filesystem as follows:<br>
</div><div class="im">- Remove creation of /var/volatile/run<br>
- Remove creation of /var/volatile/lock<br>
- Remove symbolic link from /var/run to /var/volatile/run<br>
- Remove symbolic link from /var/lock to /var/volatile/lock<br>
- Add symbolic link from /var/run to /run<br>
- Add symbolic link from /var/lock -> /run/lock<br>
- Add /run to /etc/fstab for sysvinit compatibility<br>
<br>
The systemd init script has been modified as follows:<br>
- Do not create /var/volatile/run<br>
- Do not create symbolic link from /run to /var/run if /run doesn't<br>
exist<br>
<br>
A few things have also been cleaned up:<br>
- Remove udev workaround to ensure /run exists<br>
- Remove clearing of /var/run as it points to a tmpfs anyway<br>
- Remove permissions workaround for /var/run/utmp as<br>
systemd-update-utmp-runlevel.service starts correctly without it<br>
<br>
</div><div class="im">[1] <a href="http://www.linuxbase.org/betaspecs/fhs/fhs.html#runRuntimeVariableData" target="_blank">http://www.linuxbase.org/betaspecs/fhs/fhs.html#runRuntimeVariableData</a><br>
<br>
Signed-off-by: Jonathan Liu <<a href="mailto:net147@gmail.com">net147@gmail.com</a>><br>
---<br>
meta/files/fs-perms.txt | 5 ++---<br>
</div> meta/recipes-core/base-files/base-files/fstab | 1 +<br>
meta/recipes-core/base-files/<a href="http://base-files_3.0.14.bb" target="_blank">base-files_3.0.14.bb</a> | 10 +++++-----<br>
meta/recipes-core/initscripts/initscripts-1.0/volatiles | 7 +++----<br>
<div class="im"> meta/recipes-core/systemd/systemd/00-create-volatile.conf | 2 --<br>
meta/recipes-core/systemd/systemd/init | 4 ----<br>
meta/recipes-core/systemd/systemd/var-run.conf | 4 ----<br>
</div> meta/recipes-core/systemd/<a href="http://systemd_204.bb" target="_blank">systemd_204.bb</a> | 3 ---<br>
<div class="im"> meta/recipes-core/udev/udev.inc | 6 +-----<br>
meta/recipes-core/udev/udev/init | 1 -<br>
meta/recipes-core/udev/udev/volatiles | 1 -<br>
</div> 11 files changed, 12 insertions(+), 32 deletions(-)<br>
<div class="im"> delete mode 100644 meta/recipes-core/systemd/systemd/var-run.conf<br>
delete mode 100644 meta/recipes-core/udev/udev/volatiles<br>
<br>
</div><div class="im">diff --git a/meta/files/fs-perms.txt b/meta/files/fs-perms.txt<br>
index becb85c..c829bec 100644<br>
--- a/meta/files/fs-perms.txt<br>
+++ b/meta/files/fs-perms.txt<br>
@@ -45,15 +45,14 @@ ${oldincludedir} 0755 root root true 0644 root root<br>
<br>
# Items from base-files<br>
# Links<br>
-${localstatedir}/run link volatile/run<br>
+${localstatedir}/run link /run<br>
${localstatedir}/log link volatile/log<br>
-${localstatedir}/lock link volatile/lock<br>
+${localstatedir}/lock link /run/lock<br>
${localstatedir}/tmp link volatile/tmp<br>
<br>
# Special permissions from base-files<br>
# Set 1777<br>
/tmp 01777 root root false - - -<br>
-${localstatedir}/volatile/lock 01777 root root false - - -<br>
${localstatedir}/volatile/tmp 01777 root root false - - -<br>
<br>
</div> # Set 2775<br>
<div class="im">diff --git a/meta/recipes-core/base-files/base-files/fstab b/meta/recipes-core/base-files/base-files/fstab<br>
index f0eed36..dd613a1 100644<br>
--- a/meta/recipes-core/base-files/base-files/fstab<br>
+++ b/meta/recipes-core/base-files/base-files/fstab<br>
@@ -4,6 +4,7 @@ rootfs / auto defaults 1 1<br>
proc /proc proc defaults 0 0<br>
devpts /dev/pts devpts mode=0620,gid=5 0 0<br>
usbdevfs /proc/bus/usb usbdevfs noauto 0 0<br>
+tmpfs /run tmpfs mode=0755,nodev,nosuid,strictatime 0 0<br>
tmpfs /var/volatile tmpfs defaults 0 0<br>
tmpfs /media/ram tmpfs defaults 0 0<br>
<br>
diff --git a/meta/recipes-core/base-files/<a href="http://base-files_3.0.14.bb" target="_blank">base-files_3.0.14.bb</a> b/meta/recipes-core/base-files/<a href="http://base-files_3.0.14.bb" target="_blank">base-files_3.0.14.bb</a><br>
</div>index a56450d..60185e1 100644<br>
--- a/meta/recipes-core/base-files/<a href="http://base-files_3.0.14.bb" target="_blank">base-files_3.0.14.bb</a><br>
+++ b/meta/recipes-core/base-files/<a href="http://base-files_3.0.14.bb" target="_blank">base-files_3.0.14.bb</a><br>
<div><div class="h5">@@ -31,10 +31,10 @@ S = "${WORKDIR}"<br>
INHIBIT_DEFAULT_DEPS = "1"<br>
<br>
docdir_append = "/${P}"<br>
-dirs1777 = "/tmp ${localstatedir}/volatile/lock ${localstatedir}/volatile/tmp"<br>
+dirs1777 = "/tmp ${localstatedir}/volatile/tmp"<br>
dirs2775 = "/home ${prefix}/src ${localstatedir}/local"<br>
dirs755 = "/bin /boot /dev ${sysconfdir} ${sysconfdir}/default \<br>
- ${sysconfdir}/skel /lib /mnt /proc ${ROOT_HOME} /sbin \<br>
+ ${sysconfdir}/skel /lib /mnt /proc ${ROOT_HOME} /run /sbin \<br>
${prefix} ${bindir} ${docdir} /usr/games ${includedir} \<br>
${libdir} ${sbindir} ${datadir} \<br>
${datadir}/common-licenses ${datadir}/dict ${infodir} \<br>
@@ -42,9 +42,7 @@ dirs755 = "/bin /boot /dev ${sysconfdir} ${sysconfdir}/default \<br>
${localstatedir}/backups ${localstatedir}/lib \<br>
/sys ${localstatedir}/lib/misc ${localstatedir}/spool \<br>
${localstatedir}/volatile \<br>
- ${localstatedir}/volatile/lock/subsys \<br>
${localstatedir}/volatile/log \<br>
- ${localstatedir}/volatile/run \<br>
/mnt /media /media/card /media/cf /media/net /media/ram \<br>
/media/union /media/realroot /media/hdd \<br>
/media/mmc1"<br>
@@ -54,7 +52,7 @@ dirs3755 = "/srv \<br>
${prefix}/local/share ${prefix}/local/src"<br>
dirs4775 = "/var/mail"<br>
<br>
-volatiles = "run log lock tmp"<br>
+volatiles = "log tmp"<br>
conffiles = "${sysconfdir}/debian_version ${sysconfdir}/host.conf \<br>
${sysconfdir}/inputrc ${sysconfdir}/issue /${sysconfdir}/<a href="http://issue.net" target="_blank">issue.net</a> \<br>
${sysconfdir}/nsswitch.conf ${sysconfdir}/profile \<br>
@@ -83,6 +81,8 @@ do_install () {<br>
for d in card cf net ram; do<br>
ln -sf /media/$d ${D}/mnt/$d<br>
done<br>
+ ln -sf /run ${D}${localstatedir}/run<br>
+ ln -sf /run/lock ${D}${localstatedir}/lock<br>
<br>
${BASEFILESISSUEINSTALL}<br>
<br>
</div></div><div class="im">diff --git a/meta/recipes-core/initscripts/initscripts-1.0/volatiles b/meta/recipes-core/initscripts/initscripts-1.0/volatiles<br>
index 270f128..297245d 100644<br>
--- a/meta/recipes-core/initscripts/initscripts-1.0/volatiles<br>
+++ b/meta/recipes-core/initscripts/initscripts-1.0/volatiles<br>
@@ -21,13 +21,12 @@<br>
# This explains the order of "link before object" as in the example above, where<br>
# a link will be created at /var/test pointing to /tmp/testfile and due to this<br>
# link the file defined as /var/test will actually be created as /tmp/testfile.<br>
-d root root 1777 /var/volatile/lock none<br>
+d root root 1777 /run/lock none<br>
d root root 0755 /var/volatile/log none<br>
-d root root 0755 /var/volatile/run none<br>
d root root 1777 /var/volatile/tmp none<br>
-l root root 1777 /var/lock /var/volatile/lock<br>
+l root root 1777 /var/lock /run/lock<br>
l root root 0755 /var/log /var/volatile/log<br>
-l root root 0755 /var/run /var/volatile/run<br>
+l root root 0755 /var/run /run<br>
l root root 1777 /var/tmp /var/volatile/tmp<br>
l root root 1777 /tmp /var/tmp<br>
d root root 0755 /var/lock/subsys none<br>
</div><div><div class="h5">diff --git a/meta/recipes-core/systemd/systemd/00-create-volatile.conf b/meta/recipes-core/systemd/systemd/00-create-volatile.conf<br>
index 6163a9c..9ffa88e 100644<br>
--- a/meta/recipes-core/systemd/systemd/00-create-volatile.conf<br>
+++ b/meta/recipes-core/systemd/systemd/00-create-volatile.conf<br>
@@ -4,6 +4,4 @@<br>
<br>
<br>
d /var/volatile/log - - - -<br>
-d /var/volatile/lock - - - -<br>
-d /var/volatile/run - - - -<br>
d /var/volatile/tmp - - - -<br>
diff --git a/meta/recipes-core/systemd/systemd/init b/meta/recipes-core/systemd/systemd/init<br>
index ac56cca..7e67a50 100644<br>
--- a/meta/recipes-core/systemd/systemd/init<br>
+++ b/meta/recipes-core/systemd/systemd/init<br>
@@ -42,10 +42,6 @@ case "$1" in<br>
[ -e /dev/pts ] || mkdir -m 0755 /dev/pts<br>
[ -e /dev/shm ] || mkdir -m 1777 /dev/shm<br>
mount -a -t tmpfs 2>/dev/null<br>
- mkdir -p /var/volatile/run<br>
- if [ ! -e /run ]; then<br>
- ln -s /var/run /run<br>
- fi<br>
<br>
# cache handling<br>
if [ "$DEVCACHE" != "" ]; then<br>
diff --git a/meta/recipes-core/systemd/systemd/var-run.conf b/meta/recipes-core/systemd/systemd/var-run.conf<br>
deleted file mode 100644<br>
index c2c18e2..0000000<br>
--- a/meta/recipes-core/systemd/systemd/var-run.conf<br>
+++ /dev/null<br>
@@ -1,4 +0,0 @@<br>
-# empty /var/run<br>
-R /var/run/* - - - - -<br>
-# systemd-update-utmp-runlevel.service fails to start without this<br>
-f /var/run/utmp 0644 root root - -<br>
</div></div>diff --git a/meta/recipes-core/systemd/<a href="http://systemd_204.bb" target="_blank">systemd_204.bb</a> b/meta/recipes-core/systemd/<a href="http://systemd_204.bb" target="_blank">systemd_204.bb</a><br>
index 8536b2b..74cd3c8 100644<br>
--- a/meta/recipes-core/systemd/<a href="http://systemd_204.bb" target="_blank">systemd_204.bb</a><br>
+++ b/meta/recipes-core/systemd/<a href="http://systemd_204.bb" target="_blank">systemd_204.bb</a><br>
@@ -20,7 +20,6 @@ inherit gtk-doc useradd pkgconfig autotools perlnative update-rc.d update-altern<br>
<div class="im"> SRC_URI = "<a href="http://www.freedesktop.org/software/systemd/systemd-${PV}.tar.xz" target="_blank">http://www.freedesktop.org/software/systemd/systemd-${PV}.tar.xz</a> \<br>
file://touchscreen.rules \<br>
file://modprobe.rules \<br>
- file://var-run.conf \<br>
${UCLIBCPATCHES} \<br>
</div> file://0001-utmp-turn-systemd-update-utmp-shutdown.service-into-.patch \<br>
file://00-create-volatile.conf \<br>
@@ -105,8 +104,6 @@ do_install() {<br>
<div class="HOEnZb"><div class="h5"><br>
install -m 0644 ${WORKDIR}/*.rules ${D}${sysconfdir}/udev/rules.d/<br>
<br>
- install -m 0644 ${WORKDIR}/var-run.conf ${D}${sysconfdir}/tmpfiles.d/<br>
-<br>
install -m 0644 ${WORKDIR}/00-create-volatile.conf ${D}${sysconfdir}/tmpfiles.d/<br>
<br>
if ${@base_contains('DISTRO_FEATURES','sysvinit','true','false',d)}; then<br>
diff --git a/meta/recipes-core/udev/udev.inc b/meta/recipes-core/udev/udev.inc<br>
index 769d861..92485f5 100644<br>
--- a/meta/recipes-core/udev/udev.inc<br>
+++ b/meta/recipes-core/udev/udev.inc<br>
@@ -26,8 +26,7 @@ SRC_URI = "${KERNELORG_MIRROR}/linux/utils/kernel/hotplug/udev-${PV}.tar.gz \<br>
file://local.rules \<br>
file://udev-cache \<br>
file://udev-cache.default \<br>
- file://init \<br>
- file://volatiles"<br>
+ file://init"<br>
<br>
inherit autotools pkgconfig update-rc.d<br>
<br>
@@ -85,9 +84,6 @@ do_install_append () {<br>
install -d ${D}${sysconfdir}/default<br>
install -m 0755 ${WORKDIR}/udev-cache.default ${D}${sysconfdir}/default/udev-cache<br>
<br>
- install -d ${D}${sysconfdir}/default/volatiles<br>
- install -m 0644 ${WORKDIR}/volatiles ${D}${sysconfdir}/default/volatiles/00_udev<br>
-<br>
touch ${D}${sysconfdir}/udev/cache.data<br>
<br>
install -d ${D}${sysconfdir}/udev/rules.d/<br>
diff --git a/meta/recipes-core/udev/udev/init b/meta/recipes-core/udev/udev/init<br>
index cd87f50..95f9c03 100644<br>
--- a/meta/recipes-core/udev/udev/init<br>
+++ b/meta/recipes-core/udev/udev/init<br>
@@ -50,7 +50,6 @@ case "$1" in<br>
[ -e /dev/pts ] || mkdir -m 0755 /dev/pts<br>
[ -e /dev/shm ] || mkdir -m 1777 /dev/shm<br>
mount -a -t tmpfs 2>/dev/null<br>
- mkdir -p /var/volatile/run<br>
mkdir -p /var/volatile/tmp<br>
<br>
# cache handling<br>
diff --git a/meta/recipes-core/udev/udev/volatiles b/meta/recipes-core/udev/udev/volatiles<br>
deleted file mode 100644<br>
index e33561b..0000000<br>
--- a/meta/recipes-core/udev/udev/volatiles<br>
+++ /dev/null<br>
@@ -1 +0,0 @@<br>
-l root root 0755 /run /var/run<br>
</div></div><span class="HOEnZb"><font color="#888888">--<br>
1.8.2.3<br>
<br>
</font></span></blockquote></div><br></div>