* [oe-core][PATCH] Remove usage of /var/volatile/tmp
@ 2023-03-17 6:02 Markus Volk
2023-03-17 6:04 ` Markus Volk
` (2 more replies)
0 siblings, 3 replies; 17+ messages in thread
From: Markus Volk @ 2023-03-17 6:02 UTC (permalink / raw)
To: openembedded-core; +Cc: Markus Volk
Currently /tmp is a link to /var/tmp which breaks glib-2.0 ptest
Systemd documentation describes tmpdir usage as follows:
/tmp/ and /var/tmp/ are two world-writable directories Linux systems provide for temporary files. The former is
typically on tmpfs and thus backed by RAM/swap, and flushed out on each reboot. The latter is typically a proper,
persistent file system, and thus backed by physical storage.
By default, systemd-tmpfiles will apply a concept of “ageing” to all files and directories stored in /tmp/ and
/var/tmp/. This means that files that have neither been changed nor read within a specific time frame are auto-
matically removed in regular intervals.
(This concept is not new to systemd-tmpfiles btw, it’s inherited from previous subsystems such as tmpwatch.)
By default files in /tmp/ are cleaned up after 10 days, and those in /var/tmp after 30 days.
This commit tries to align tmpdir to what systemd expects.
Signed-off-by: Markus Volk <f_l_k@t-online.de>
---
meta/conf/bitbake.conf | 4 ---
meta/files/fs-perms-persistent-log.txt | 2 --
meta/files/fs-perms.txt | 2 --
.../lib/oeqa/files/buildhistory_filelist1.txt | 1 -
.../lib/oeqa/files/buildhistory_filelist2.txt | 1 -
meta/recipes-core/base-files/base-files/fstab | 1 +
.../base-files/base-files_3.0.14.bb | 4 +--
.../initscripts-1.0/populate-volatile.sh | 2 +-
.../initscripts/initscripts-1.0/volatiles | 5 ++-
.../initscripts/initscripts_1.0.bb | 3 --
.../systemd/systemd/00-create-volatile.conf | 4 +--
meta/recipes-core/systemd/systemd_253.1.bb | 7 ----
meta/recipes-core/udev/eudev/init | 4 ---
.../e2fsprogs/e2fsprogs/run-ptest | 2 +-
...eak_cmsg.stderr.exp-adjust-tmp-paths.patch | 34 -------------------
.../valgrind/valgrind_3.20.0.bb | 1 -
16 files changed, 8 insertions(+), 69 deletions(-)
delete mode 100644 meta/recipes-devtools/valgrind/valgrind/0001-none-tests-fdleak_cmsg.stderr.exp-adjust-tmp-paths.patch
diff --git a/meta/conf/bitbake.conf b/meta/conf/bitbake.conf
index afd9e2f552..dcf6ce99d1 100644
--- a/meta/conf/bitbake.conf
+++ b/meta/conf/bitbake.conf
@@ -90,10 +90,6 @@ ROOT_HOME ??= "/home/root"
# If set to boolean false ('no', 'n', 'false', 'f', '0'), /var/log is on persistent storage.
VOLATILE_LOG_DIR ?= "yes"
-# if set to 'yes': /tmp links to /var/tmp which links to /var/volatile/tmp
-# otherwise: /tmp is on persistent storage
-VOLATILE_TMP_DIR ?= "yes"
-
BB_RENAMED_VARIABLES[PNBLACKLIST] = "SKIP_RECIPE"
BB_RENAMED_VARIABLES[CVE_CHECK_PN_WHITELIST] = "CVE_CHECK_SKIP_RECIPE"
BB_RENAMED_VARIABLES[CVE_CHECK_WHITELIST] = "CVE_CHECK_IGNORE"
diff --git a/meta/files/fs-perms-persistent-log.txt b/meta/files/fs-perms-persistent-log.txt
index 518c1be3c9..326c0ed092 100644
--- a/meta/files/fs-perms-persistent-log.txt
+++ b/meta/files/fs-perms-persistent-log.txt
@@ -47,7 +47,6 @@ ${oldincludedir} 0755 root root true 0644 root root
# Links
${localstatedir}/run link /run
${localstatedir}/lock link /run/lock
-${localstatedir}/tmp link volatile/tmp
/home 0755 root root false - - -
/srv 0755 root root false - - -
@@ -57,7 +56,6 @@ ${localstatedir}/local 0755 root root false - - -
# Special permissions from base-files
# Set 1777
/tmp 01777 root root false - - -
-${localstatedir}/volatile/tmp 01777 root root false - - -
# Set 0700
${ROOT_HOME} 0700 root root false - - -
diff --git a/meta/files/fs-perms.txt b/meta/files/fs-perms.txt
index daa4aed840..ed59311035 100644
--- a/meta/files/fs-perms.txt
+++ b/meta/files/fs-perms.txt
@@ -48,7 +48,6 @@ ${oldincludedir} 0755 root root true 0644 root root
${localstatedir}/run link /run
${localstatedir}/log link volatile/log
${localstatedir}/lock link /run/lock
-${localstatedir}/tmp link volatile/tmp
/home 0755 root root false - - -
/srv 0755 root root false - - -
@@ -58,7 +57,6 @@ ${localstatedir}/local 0755 root root false - - -
# Special permissions from base-files
# Set 1777
/tmp 01777 root root false - - -
-${localstatedir}/volatile/tmp 01777 root root false - - -
# Set 0700
${ROOT_HOME} 0700 root root false - - -
diff --git a/meta/lib/oeqa/files/buildhistory_filelist1.txt b/meta/lib/oeqa/files/buildhistory_filelist1.txt
index 8d882895ad..ec50017383 100644
--- a/meta/lib/oeqa/files/buildhistory_filelist1.txt
+++ b/meta/lib/oeqa/files/buildhistory_filelist1.txt
@@ -9210,5 +9210,4 @@ lrwxrwxrwx root root 12 ./var/log -> volatile/log
lrwxrwxrwx root root 6 ./var/run -> ../run
drwxr-xr-x root root 4096 ./var/spool
drwxrwxr-x root mail 4096 ./var/spool/mail
-lrwxrwxrwx root root 12 ./var/tmp -> volatile/tmp
drwxr-xr-x root root 4096 ./var/volatile
diff --git a/meta/lib/oeqa/files/buildhistory_filelist2.txt b/meta/lib/oeqa/files/buildhistory_filelist2.txt
index ac6307060d..cedec51c38 100644
--- a/meta/lib/oeqa/files/buildhistory_filelist2.txt
+++ b/meta/lib/oeqa/files/buildhistory_filelist2.txt
@@ -9213,5 +9213,4 @@ lrwxrwxrwx root root 12 ./var/log -> volatile/log
lrwxrwxrwx root root 6 ./var/run -> ../run
drwxr-xr-x root root 4096 ./var/spool
drwxrwxr-x root mail 4096 ./var/spool/mail
-lrwxrwxrwx root root 12 ./var/tmp -> volatile/tmp
drwxr-xr-x root root 4096 ./var/volatile
diff --git a/meta/recipes-core/base-files/base-files/fstab b/meta/recipes-core/base-files/base-files/fstab
index 70e400f567..7064573130 100644
--- a/meta/recipes-core/base-files/base-files/fstab
+++ b/meta/recipes-core/base-files/base-files/fstab
@@ -5,6 +5,7 @@ proc /proc proc defaults 0 0
devpts /dev/pts devpts mode=0620,ptmxmode=0666,gid=5 0 0
tmpfs /run tmpfs mode=0755,nodev,nosuid,strictatime 0 0
tmpfs /var/volatile tmpfs defaults 0 0
+tmpfs /tmp tmpfs defaults 0 0
# uncomment this if your device has a SD/MMC/Transflash slot
#/dev/mmcblk0p1 /media/card auto defaults,sync,noauto 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 ff83567bd9..c2ecea0a25 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
@@ -29,7 +29,7 @@ S = "${WORKDIR}"
INHIBIT_DEFAULT_DEPS = "1"
docdir:append = "/${P}"
-dirs1777 = "/tmp ${localstatedir}/volatile/tmp"
+dirs1777 = "/tmp /var/tmp"
dirs2775 = ""
dirs555 = "/sys /proc"
dirs755 = "/boot /dev ${base_bindir} ${base_sbindir} ${base_libdir} \
@@ -53,7 +53,7 @@ dirs755-lsb = "/srv \
${prefix}/lib/locale"
dirs2775-lsb = "/var/mail"
-volatiles = "${@'log' if oe.types.boolean('${VOLATILE_LOG_DIR}') else ''} tmp"
+volatiles = "${@'log' if oe.types.boolean('${VOLATILE_LOG_DIR}') else ''}"
conffiles = "${sysconfdir}/debian_version ${sysconfdir}/host.conf \
${sysconfdir}/issue /${sysconfdir}/issue.net \
${sysconfdir}/nsswitch.conf ${sysconfdir}/profile \
diff --git a/meta/recipes-core/initscripts/initscripts-1.0/populate-volatile.sh b/meta/recipes-core/initscripts/initscripts-1.0/populate-volatile.sh
index bc630e871c..ecfb6fdc2b 100755
--- a/meta/recipes-core/initscripts/initscripts-1.0/populate-volatile.sh
+++ b/meta/recipes-core/initscripts/initscripts-1.0/populate-volatile.sh
@@ -23,7 +23,7 @@ ROOT_DIR="$(echo "$DIRNAME" | sed -ne 's:/etc/.*::p')"
[ "$ROOTFS_READ_ONLY" = "yes" ] && VOLATILE_ENABLE_CACHE=no
CFGDIR="${ROOT_DIR}/etc/default/volatiles"
-TMPROOT="${ROOT_DIR}/var/volatile/tmp"
+TMPROOT="${ROOT_DIR}/tmp"
COREDEF="00_core"
[ "${VERBOSE}" != "no" ] && echo "Populating volatile Filesystems."
diff --git a/meta/recipes-core/initscripts/initscripts-1.0/volatiles b/meta/recipes-core/initscripts/initscripts-1.0/volatiles
index cd8a4be05f..7232a8ef90 100644
--- a/meta/recipes-core/initscripts/initscripts-1.0/volatiles
+++ b/meta/recipes-core/initscripts/initscripts-1.0/volatiles
@@ -25,11 +25,10 @@
# link the file defined as /var/test will actually be created as /tmp/testfile.
d root root 1777 /run/lock none
d root root 0755 /var/volatile/log none
-d root root 1777 /var/volatile/tmp none
l root root 1777 /var/lock /run/lock
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 1777 /tmp
+d root root 1777 /var/tmp
d root root 0755 /var/lock/subsys none
f root root 0664 /var/log/wtmp none
f root root 0664 /var/run/utmp none
diff --git a/meta/recipes-core/initscripts/initscripts_1.0.bb b/meta/recipes-core/initscripts/initscripts_1.0.bb
index 4dc477bb8d..7c9d9ca4f1 100644
--- a/meta/recipes-core/initscripts/initscripts_1.0.bb
+++ b/meta/recipes-core/initscripts/initscripts_1.0.bb
@@ -108,9 +108,6 @@ do_install () {
sed -i -e '\@^d root root 0755 /var/volatile/log none$@ a\l root root 0755 /var/log /var/volatile/log' \
${D}${sysconfdir}/default/volatiles/00_core
fi
- if [ "${VOLATILE_TMP_DIR}" != "yes" ]; then
- sed -i -e "/\<tmp\>/d" ${D}${sysconfdir}/default/volatiles/00_core
- fi
install -m 0755 ${WORKDIR}/dmesg.sh ${D}${sysconfdir}/init.d
install -m 0644 ${WORKDIR}/logrotate-dmesg.conf ${D}${sysconfdir}/
diff --git a/meta/recipes-core/systemd/systemd/00-create-volatile.conf b/meta/recipes-core/systemd/systemd/00-create-volatile.conf
index c4277221a2..1ba9b836cf 100644
--- a/meta/recipes-core/systemd/systemd/00-create-volatile.conf
+++ b/meta/recipes-core/systemd/systemd/00-create-volatile.conf
@@ -1,8 +1,6 @@
#This goes hand-in-hand with the base-files of OE-Core. The file must
-# be sorted before 'systemd.conf' becuase this attempts to create a file
+# be sorted before 'systemd.conf' because this attempts to create a file
# inside /var/log.
-
d /run/lock 1777 - - -
d /var/volatile/log - - - -
-d /var/volatile/tmp 1777 - -
diff --git a/meta/recipes-core/systemd/systemd_253.1.bb b/meta/recipes-core/systemd/systemd_253.1.bb
index 4a0bb18254..1084040a25 100644
--- a/meta/recipes-core/systemd/systemd_253.1.bb
+++ b/meta/recipes-core/systemd/systemd_253.1.bb
@@ -289,13 +289,6 @@ do_install() {
rm -rf ${D}${localstatedir}/log/journal/remote
fi
- # if the user requests /tmp be on persistent storage (i.e. not volatile)
- # then don't use a tmpfs for /tmp
- if [ "${VOLATILE_TMP_DIR}" != "yes" ]; then
- rm -f ${D}${rootlibdir}/systemd/system/tmp.mount
- rm -f ${D}${rootlibdir}/systemd/system/local-fs.target.wants/tmp.mount
- fi
-
install -d ${D}${systemd_system_unitdir}/graphical.target.wants
install -d ${D}${systemd_system_unitdir}/multi-user.target.wants
install -d ${D}${systemd_system_unitdir}/poweroff.target.wants
diff --git a/meta/recipes-core/udev/eudev/init b/meta/recipes-core/udev/eudev/init
index 477a525b21..2084de83ae 100644
--- a/meta/recipes-core/udev/eudev/init
+++ b/meta/recipes-core/udev/eudev/init
@@ -79,10 +79,6 @@ case "$1" in
}
[ -e /dev/pts ] || mkdir -m 0755 /dev/pts
[ -e /dev/shm ] || mkdir -m 1777 /dev/shm
- # the automount rule for udev needs /tmp directory available, as /tmp is a symlink
- # to /var/tmp which in turn is a symlink to /var/volatile/tmp, we need to make sure
- # /var/volatile/tmp directory to be available.
- mkdir -m 1777 -p /var/volatile/tmp
# make_extra_nodes
kill_udevd > "/dev/null" 2>&1
diff --git a/meta/recipes-devtools/e2fsprogs/e2fsprogs/run-ptest b/meta/recipes-devtools/e2fsprogs/e2fsprogs/run-ptest
index c97c0377e9..1f873b055e 100644
--- a/meta/recipes-devtools/e2fsprogs/e2fsprogs/run-ptest
+++ b/meta/recipes-devtools/e2fsprogs/e2fsprogs/run-ptest
@@ -2,7 +2,7 @@
cd ./test
SKIP_SLOW_TESTS=yes ./test_script | sed -u -e '/:[[:space:]]ok/s/^/PASS: /' -e '/:[[:space:]]failed/s/^/FAIL: /' -e '/:[[:space:]]skipped/s/^/SKIP: /'
-rm -rf /var/volatile/tmp/*e2fsprogs*
+rm -rf /tmp/*e2fsprogs*
rm -f tmp-*
rm -f *.tmp
rm -f *.ok
diff --git a/meta/recipes-devtools/valgrind/valgrind/0001-none-tests-fdleak_cmsg.stderr.exp-adjust-tmp-paths.patch b/meta/recipes-devtools/valgrind/valgrind/0001-none-tests-fdleak_cmsg.stderr.exp-adjust-tmp-paths.patch
deleted file mode 100644
index e421ac6c80..0000000000
--- a/meta/recipes-devtools/valgrind/valgrind/0001-none-tests-fdleak_cmsg.stderr.exp-adjust-tmp-paths.patch
+++ /dev/null
@@ -1,34 +0,0 @@
-From f405297d3382cd98391d02f397e2387da1f42879 Mon Sep 17 00:00:00 2001
-From: Alexander Kanavin <alex.kanavin@gmail.com>
-Date: Fri, 24 Jan 2020 17:55:39 +0100
-Subject: [PATCH] none/tests/fdleak_cmsg.stderr.exp: adjust /tmp paths
-
-In oe-core, /tmp is linked to /var/volatile/tmp and
-valgrind output changes accordingly
-
-Upstream-Status: Inappropriate [oe-core specific]
-Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
----
- none/tests/fdleak_cmsg.stderr.exp | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/none/tests/fdleak_cmsg.stderr.exp b/none/tests/fdleak_cmsg.stderr.exp
-index 6e5a797b9..0ede1ab18 100644
---- a/none/tests/fdleak_cmsg.stderr.exp
-+++ b/none/tests/fdleak_cmsg.stderr.exp
-@@ -25,10 +25,10 @@ Open file descriptor ...: /dev/null
-
-
- FILE DESCRIPTORS: 6 open (3 std) at exit.
--Open file descriptor ...: /tmp/data2
-+Open file descriptor ...: ...
- ...
-
--Open file descriptor ...: /tmp/data1
-+Open file descriptor ...: ...
- ...
-
- Open AF_UNIX socket ...: <unknown>
---
-2.17.1
-
diff --git a/meta/recipes-devtools/valgrind/valgrind_3.20.0.bb b/meta/recipes-devtools/valgrind/valgrind_3.20.0.bb
index 07e50426e4..4ea173ba80 100644
--- a/meta/recipes-devtools/valgrind/valgrind_3.20.0.bb
+++ b/meta/recipes-devtools/valgrind/valgrind_3.20.0.bb
@@ -36,7 +36,6 @@ SRC_URI = "https://sourceware.org/pub/valgrind/valgrind-${PV}.tar.bz2 \
file://0001-valgrind-filter_xml_frames-do-not-filter-usr.patch \
file://0001-memcheck-vgtests-remove-fullpath-after-flags.patch \
file://s390x_vec_op_t.patch \
- file://0001-none-tests-fdleak_cmsg.stderr.exp-adjust-tmp-paths.patch \
file://0001-memcheck-tests-Fix-timerfd-syscall-test.patch \
file://0001-docs-Disable-manual-validation.patch \
file://0001-drd-tests-Include-missing-cstdint.patch \
--
2.34.1
^ permalink raw reply related [flat|nested] 17+ messages in thread
* Re: [oe-core][PATCH] Remove usage of /var/volatile/tmp
2023-03-17 6:02 [oe-core][PATCH] Remove usage of /var/volatile/tmp Markus Volk
@ 2023-03-17 6:04 ` Markus Volk
2023-03-17 7:34 ` Alexander Kanavin
2023-03-17 8:00 ` Richard Purdie
2 siblings, 0 replies; 17+ messages in thread
From: Markus Volk @ 2023-03-17 6:04 UTC (permalink / raw)
To: openembedded-core
[-- Attachment #1: Type: text/plain, Size: 16355 bytes --]
sorry, I forgot to mark this one RFC
Am Fr, 17. Mär 2023 um 07:02:02 +0100 schrieb Markus Volk
<f_l_k@t-online.de>:
> Currently /tmp is a link to /var/tmp which breaks glib-2.0 ptest
> Systemd documentation describes tmpdir usage as follows:
>
> /tmp/ and /var/tmp/ are two world-writable directories Linux systems
> provide for temporary files. The former is
> typically on tmpfs and thus backed by RAM/swap, and flushed out on
> each reboot. The latter is typically a proper,
> persistent file system, and thus backed by physical storage.
>
> By default, systemd-tmpfiles will apply a concept of “ageing” to
> all files and directories stored in /tmp/ and
> /var/tmp/. This means that files that have neither been changed nor
> read within a specific time frame are auto-
> matically removed in regular intervals.
> (This concept is not new to systemd-tmpfiles btw, it’s inherited
> from previous subsystems such as tmpwatch.)
> By default files in /tmp/ are cleaned up after 10 days, and those in
> /var/tmp after 30 days.
>
> This commit tries to align tmpdir to what systemd expects.
>
> Signed-off-by: Markus Volk <f_l_k@t-online.de
> <mailto:f_l_k@t-online.de>>
> ---
> meta/conf/bitbake.conf | 4 ---
> meta/files/fs-perms-persistent-log.txt | 2 --
> meta/files/fs-perms.txt | 2 --
> .../lib/oeqa/files/buildhistory_filelist1.txt | 1 -
> .../lib/oeqa/files/buildhistory_filelist2.txt | 1 -
> meta/recipes-core/base-files/base-files/fstab | 1 +
> .../base-files/base-files_3.0.14.bb | 4 +--
> .../initscripts-1.0/populate-volatile.sh | 2 +-
> .../initscripts/initscripts-1.0/volatiles | 5 ++-
> .../initscripts/initscripts_1.0.bb | 3 --
> .../systemd/systemd/00-create-volatile.conf | 4 +--
> meta/recipes-core/systemd/systemd_253.1.bb | 7 ----
> meta/recipes-core/udev/eudev/init | 4 ---
> .../e2fsprogs/e2fsprogs/run-ptest | 2 +-
> ...eak_cmsg.stderr.exp-adjust-tmp-paths.patch | 34
> -------------------
> .../valgrind/valgrind_3.20.0.bb | 1 -
> 16 files changed, 8 insertions(+), 69 deletions(-)
> delete mode 100644
> meta/recipes-devtools/valgrind/valgrind/0001-none-tests-fdleak_cmsg.stderr.exp-adjust-tmp-paths.patch
>
> diff --git a/meta/conf/bitbake.conf b/meta/conf/bitbake.conf
> index afd9e2f552..dcf6ce99d1 100644
> --- a/meta/conf/bitbake.conf
> +++ b/meta/conf/bitbake.conf
> @@ -90,10 +90,6 @@ ROOT_HOME ??= "/home/root"
> # If set to boolean false ('no', 'n', 'false', 'f', '0'), /var/log
> is on persistent storage.
> VOLATILE_LOG_DIR ?= "yes"
>
> -# if set to 'yes': /tmp links to /var/tmp which links to
> /var/volatile/tmp
> -# otherwise: /tmp is on persistent storage
> -VOLATILE_TMP_DIR ?= "yes"
> -
> BB_RENAMED_VARIABLES[PNBLACKLIST] = "SKIP_RECIPE"
> BB_RENAMED_VARIABLES[CVE_CHECK_PN_WHITELIST] =
> "CVE_CHECK_SKIP_RECIPE"
> BB_RENAMED_VARIABLES[CVE_CHECK_WHITELIST] = "CVE_CHECK_IGNORE"
> diff --git a/meta/files/fs-perms-persistent-log.txt
> b/meta/files/fs-perms-persistent-log.txt
> index 518c1be3c9..326c0ed092 100644
> --- a/meta/files/fs-perms-persistent-log.txt
> +++ b/meta/files/fs-perms-persistent-log.txt
> @@ -47,7 +47,6 @@ ${oldincludedir} 0755 root root true 0644 root root
> # Links
> ${localstatedir}/run link /run
> ${localstatedir}/lock link /run/lock
> -${localstatedir}/tmp link volatile/tmp
>
> /home 0755 root root false - - -
> /srv 0755 root root false - - -
> @@ -57,7 +56,6 @@ ${localstatedir}/local 0755 root root false - - -
> # Special permissions from base-files
> # Set 1777
> /tmp 01777 root root false - - -
> -${localstatedir}/volatile/tmp 01777 root root false - - -
>
> # Set 0700
> ${ROOT_HOME} 0700 root root false - - -
> diff --git a/meta/files/fs-perms.txt b/meta/files/fs-perms.txt
> index daa4aed840..ed59311035 100644
> --- a/meta/files/fs-perms.txt
> +++ b/meta/files/fs-perms.txt
> @@ -48,7 +48,6 @@ ${oldincludedir} 0755 root root true 0644 root root
> ${localstatedir}/run link /run
> ${localstatedir}/log link volatile/log
> ${localstatedir}/lock link /run/lock
> -${localstatedir}/tmp link volatile/tmp
>
> /home 0755 root root false - - -
> /srv 0755 root root false - - -
> @@ -58,7 +57,6 @@ ${localstatedir}/local 0755 root root false - - -
> # Special permissions from base-files
> # Set 1777
> /tmp 01777 root root false - - -
> -${localstatedir}/volatile/tmp 01777 root root false - - -
>
> # Set 0700
> ${ROOT_HOME} 0700 root root false - - -
> diff --git a/meta/lib/oeqa/files/buildhistory_filelist1.txt
> b/meta/lib/oeqa/files/buildhistory_filelist1.txt
> index 8d882895ad..ec50017383 100644
> --- a/meta/lib/oeqa/files/buildhistory_filelist1.txt
> +++ b/meta/lib/oeqa/files/buildhistory_filelist1.txt
> @@ -9210,5 +9210,4 @@ lrwxrwxrwx root root 12
> ./var/log -> volatile/log
> lrwxrwxrwx root root 6 ./var/run -> ../run
> drwxr-xr-x root root 4096 ./var/spool
> drwxrwxr-x root mail 4096 ./var/spool/mail
> -lrwxrwxrwx root root 12 ./var/tmp -> volatile/tmp
> drwxr-xr-x root root 4096 ./var/volatile
> diff --git a/meta/lib/oeqa/files/buildhistory_filelist2.txt
> b/meta/lib/oeqa/files/buildhistory_filelist2.txt
> index ac6307060d..cedec51c38 100644
> --- a/meta/lib/oeqa/files/buildhistory_filelist2.txt
> +++ b/meta/lib/oeqa/files/buildhistory_filelist2.txt
> @@ -9213,5 +9213,4 @@ lrwxrwxrwx root root 12
> ./var/log -> volatile/log
> lrwxrwxrwx root root 6 ./var/run -> ../run
> drwxr-xr-x root root 4096 ./var/spool
> drwxrwxr-x root mail 4096 ./var/spool/mail
> -lrwxrwxrwx root root 12 ./var/tmp -> volatile/tmp
> drwxr-xr-x root root 4096 ./var/volatile
> diff --git a/meta/recipes-core/base-files/base-files/fstab
> b/meta/recipes-core/base-files/base-files/fstab
> index 70e400f567..7064573130 100644
> --- a/meta/recipes-core/base-files/base-files/fstab
> +++ b/meta/recipes-core/base-files/base-files/fstab
> @@ -5,6 +5,7 @@ proc /proc proc
> defaults 0 0
> devpts /dev/pts devpts
> mode=0620,ptmxmode=0666,gid=5 0 0
> tmpfs /run tmpfs
> mode=0755,nodev,nosuid,strictatime 0 0
> tmpfs /var/volatile tmpfs defaults
> 0 0
> +tmpfs /tmp tmpfs defaults
> 0 0
>
> # uncomment this if your device has a SD/MMC/Transflash slot
> #/dev/mmcblk0p1 /media/card auto
> defaults,sync,noauto 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 ff83567bd9..c2ecea0a25 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
> @@ -29,7 +29,7 @@ S = "${WORKDIR}"
> INHIBIT_DEFAULT_DEPS = "1"
>
> docdir:append = "/${P}"
> -dirs1777 = "/tmp ${localstatedir}/volatile/tmp"
> +dirs1777 = "/tmp /var/tmp"
> dirs2775 = ""
> dirs555 = "/sys /proc"
> dirs755 = "/boot /dev ${base_bindir} ${base_sbindir} ${base_libdir} \
> @@ -53,7 +53,7 @@ dirs755-lsb = "/srv \
> ${prefix}/lib/locale"
> dirs2775-lsb = "/var/mail"
>
> -volatiles = "${@'log' if oe.types.boolean('${VOLATILE_LOG_DIR}')
> else ''} tmp"
> +volatiles = "${@'log' if oe.types.boolean('${VOLATILE_LOG_DIR}')
> else ''}"
> conffiles = "${sysconfdir}/debian_version ${sysconfdir}/host.conf \
> ${sysconfdir}/issue /${sysconfdir}/issue.net \
> ${sysconfdir}/nsswitch.conf ${sysconfdir}/profile \
> diff --git
> a/meta/recipes-core/initscripts/initscripts-1.0/populate-volatile.sh
> b/meta/recipes-core/initscripts/initscripts-1.0/populate-volatile.sh
> index bc630e871c..ecfb6fdc2b 100755
> ---
> a/meta/recipes-core/initscripts/initscripts-1.0/populate-volatile.sh
> +++
> b/meta/recipes-core/initscripts/initscripts-1.0/populate-volatile.sh
> @@ -23,7 +23,7 @@ ROOT_DIR="$(echo "$DIRNAME" | sed -ne
> 's:/etc/.*::p')"
> [ "$ROOTFS_READ_ONLY" = "yes" ] && VOLATILE_ENABLE_CACHE=no
>
> CFGDIR="${ROOT_DIR}/etc/default/volatiles"
> -TMPROOT="${ROOT_DIR}/var/volatile/tmp"
> +TMPROOT="${ROOT_DIR}/tmp"
> COREDEF="00_core"
>
> [ "${VERBOSE}" != "no" ] && echo "Populating volatile Filesystems."
> diff --git a/meta/recipes-core/initscripts/initscripts-1.0/volatiles
> b/meta/recipes-core/initscripts/initscripts-1.0/volatiles
> index cd8a4be05f..7232a8ef90 100644
> --- a/meta/recipes-core/initscripts/initscripts-1.0/volatiles
> +++ b/meta/recipes-core/initscripts/initscripts-1.0/volatiles
> @@ -25,11 +25,10 @@
> # link the file defined as /var/test will actually be created as
> /tmp/testfile.
> d root root 1777 /run/lock none
> d root root 0755 /var/volatile/log none
> -d root root 1777 /var/volatile/tmp none
> l root root 1777 /var/lock /run/lock
> 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 1777 /tmp
> +d root root 1777 /var/tmp
> d root root 0755 /var/lock/subsys none
> f root root 0664 /var/log/wtmp none
> f root root 0664 /var/run/utmp none
> diff --git a/meta/recipes-core/initscripts/initscripts_1.0.bb
> b/meta/recipes-core/initscripts/initscripts_1.0.bb
> index 4dc477bb8d..7c9d9ca4f1 100644
> --- a/meta/recipes-core/initscripts/initscripts_1.0.bb
> +++ b/meta/recipes-core/initscripts/initscripts_1.0.bb
> @@ -108,9 +108,6 @@ do_install () {
> sed -i -e '\@^d root root 0755 /var/volatile/log none$@ a\l root
> root 0755 /var/log /var/volatile/log' \
> ${D}${sysconfdir}/default/volatiles/00_core
> fi
> - if [ "${VOLATILE_TMP_DIR}" != "yes" ]; then
> - sed -i -e "/\<tmp\>/d" ${D}${sysconfdir}/default/volatiles/00_core
> - fi
> install -m 0755 ${WORKDIR}/dmesg.sh ${D}${sysconfdir}/init.d
> install -m 0644 ${WORKDIR}/logrotate-dmesg.conf
> ${D}${sysconfdir}/
>
> diff --git
> a/meta/recipes-core/systemd/systemd/00-create-volatile.conf
> b/meta/recipes-core/systemd/systemd/00-create-volatile.conf
> index c4277221a2..1ba9b836cf 100644
> --- a/meta/recipes-core/systemd/systemd/00-create-volatile.conf
> +++ b/meta/recipes-core/systemd/systemd/00-create-volatile.conf
> @@ -1,8 +1,6 @@
> #This goes hand-in-hand with the base-files of OE-Core. The file must
> -# be sorted before 'systemd.conf' becuase this attempts to create a
> file
> +# be sorted before 'systemd.conf' because this attempts to create a
> file
> # inside /var/log.
>
> -
> d /run/lock 1777 - - -
> d /var/volatile/log - - - -
> -d /var/volatile/tmp 1777 - -
> diff --git a/meta/recipes-core/systemd/systemd_253.1.bb
> b/meta/recipes-core/systemd/systemd_253.1.bb
> index 4a0bb18254..1084040a25 100644
> --- a/meta/recipes-core/systemd/systemd_253.1.bb
> +++ b/meta/recipes-core/systemd/systemd_253.1.bb
> @@ -289,13 +289,6 @@ do_install() {
> rm -rf ${D}${localstatedir}/log/journal/remote
> fi
>
> - # if the user requests /tmp be on persistent storage (i.e. not
> volatile)
> - # then don't use a tmpfs for /tmp
> - if [ "${VOLATILE_TMP_DIR}" != "yes" ]; then
> - rm -f ${D}${rootlibdir}/systemd/system/tmp.mount
> - rm -f
> ${D}${rootlibdir}/systemd/system/local-fs.target.wants/tmp.mount
> - fi
> -
> install -d ${D}${systemd_system_unitdir}/graphical.target.wants
> install -d ${D}${systemd_system_unitdir}/multi-user.target.wants
> install -d ${D}${systemd_system_unitdir}/poweroff.target.wants
> diff --git a/meta/recipes-core/udev/eudev/init
> b/meta/recipes-core/udev/eudev/init
> index 477a525b21..2084de83ae 100644
> --- a/meta/recipes-core/udev/eudev/init
> +++ b/meta/recipes-core/udev/eudev/init
> @@ -79,10 +79,6 @@ case "$1" in
> }
> [ -e /dev/pts ] || mkdir -m 0755 /dev/pts
> [ -e /dev/shm ] || mkdir -m 1777 /dev/shm
> - # the automount rule for udev needs /tmp directory available, as
> /tmp is a symlink
> - # to /var/tmp which in turn is a symlink to /var/volatile/tmp,
> we need to make sure
> - # /var/volatile/tmp directory to be available.
> - mkdir -m 1777 -p /var/volatile/tmp
>
> # make_extra_nodes
> kill_udevd > "/dev/null" 2>&1
> diff --git a/meta/recipes-devtools/e2fsprogs/e2fsprogs/run-ptest
> b/meta/recipes-devtools/e2fsprogs/e2fsprogs/run-ptest
> index c97c0377e9..1f873b055e 100644
> --- a/meta/recipes-devtools/e2fsprogs/e2fsprogs/run-ptest
> +++ b/meta/recipes-devtools/e2fsprogs/e2fsprogs/run-ptest
> @@ -2,7 +2,7 @@
>
> cd ./test
> SKIP_SLOW_TESTS=yes ./test_script | sed -u -e
> '/:[[:space:]]ok/s/^/PASS: /' -e '/:[[:space:]]failed/s/^/FAIL: /' -e
> '/:[[:space:]]skipped/s/^/SKIP: /'
> -rm -rf /var/volatile/tmp/*e2fsprogs*
> +rm -rf /tmp/*e2fsprogs*
> rm -f tmp-*
> rm -f *.tmp
> rm -f *.ok
> diff --git
> a/meta/recipes-devtools/valgrind/valgrind/0001-none-tests-fdleak_cmsg.stderr.exp-adjust-tmp-paths.patch
> b/meta/recipes-devtools/valgrind/valgrind/0001-none-tests-fdleak_cmsg.stderr.exp-adjust-tmp-paths.patch
> deleted file mode 100644
> index e421ac6c80..0000000000
> ---
> a/meta/recipes-devtools/valgrind/valgrind/0001-none-tests-fdleak_cmsg.stderr.exp-adjust-tmp-paths.patch
> +++ /dev/null
> @@ -1,34 +0,0 @@
> -From f405297d3382cd98391d02f397e2387da1f42879 Mon Sep 17 00:00:00
> 2001
> -From: Alexander Kanavin <alex.kanavin@gmail.com
> <mailto:alex.kanavin@gmail.com>>
> -Date: Fri, 24 Jan 2020 17:55:39 +0100
> -Subject: [PATCH] none/tests/fdleak_cmsg.stderr.exp: adjust /tmp paths
> -
> -In oe-core, /tmp is linked to /var/volatile/tmp and
> -valgrind output changes accordingly
> -
> -Upstream-Status: Inappropriate [oe-core specific]
> -Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com
> <mailto:alex.kanavin@gmail.com>>
> ----
> - none/tests/fdleak_cmsg.stderr.exp | 4 ++--
> - 1 file changed, 2 insertions(+), 2 deletions(-)
> -
> -diff --git a/none/tests/fdleak_cmsg.stderr.exp
> b/none/tests/fdleak_cmsg.stderr.exp
> -index 6e5a797b9..0ede1ab18 100644
> ---- a/none/tests/fdleak_cmsg.stderr.exp
> -+++ b/none/tests/fdleak_cmsg.stderr.exp
> -@@ -25,10 +25,10 @@ Open file descriptor ...: /dev/null
> -
> -
> - FILE DESCRIPTORS: 6 open (3 std) at exit.
> --Open file descriptor ...: /tmp/data2
> -+Open file descriptor ...: ...
> - ...
> -
> --Open file descriptor ...: /tmp/data1
> -+Open file descriptor ...: ...
> - ...
> -
> - Open AF_UNIX socket ...: <unknown>
> ---
> -2.17.1
> -
> diff --git a/meta/recipes-devtools/valgrind/valgrind_3.20.0.bb
> b/meta/recipes-devtools/valgrind/valgrind_3.20.0.bb
> index 07e50426e4..4ea173ba80 100644
> --- a/meta/recipes-devtools/valgrind/valgrind_3.20.0.bb
> +++ b/meta/recipes-devtools/valgrind/valgrind_3.20.0.bb
> @@ -36,7 +36,6 @@ SRC_URI =
> "https://sourceware.org/pub/valgrind/valgrind-${PV}.tar.bz2 \
>
> file://0001-valgrind-filter_xml_frames-do-not-filter-usr.patch
> <file://0001-valgrind-filter_xml_frames-do-not-filter-usr.patch/> \
>
> file://0001-memcheck-vgtests-remove-fullpath-after-flags.patch
> <file://0001-memcheck-vgtests-remove-fullpath-after-flags.patch/> \
> file://s390x_vec_op_t.patch
> <file://s390x_vec_op_t.patch/> \
> -
> file://0001-none-tests-fdleak_cmsg.stderr.exp-adjust-tmp-paths.patch
> <file://0001-none-tests-fdleak_cmsg.stderr.exp-adjust-tmp-paths.patch/>
> \
> file://0001-memcheck-tests-Fix-timerfd-syscall-test.patch
> <file://0001-memcheck-tests-fix-timerfd-syscall-test.patch/> \
> file://0001-docs-Disable-manual-validation.patch
> <file://0001-docs-disable-manual-validation.patch/> \
> file://0001-drd-tests-Include-missing-cstdint.patch
> <file://0001-drd-tests-include-missing-cstdint.patch/> \
> --
> 2.34.1
>
[-- Attachment #2: Type: text/html, Size: 15877 bytes --]
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [oe-core][PATCH] Remove usage of /var/volatile/tmp
2023-03-17 6:02 [oe-core][PATCH] Remove usage of /var/volatile/tmp Markus Volk
2023-03-17 6:04 ` Markus Volk
@ 2023-03-17 7:34 ` Alexander Kanavin
2023-03-17 8:00 ` Richard Purdie
2 siblings, 0 replies; 17+ messages in thread
From: Alexander Kanavin @ 2023-03-17 7:34 UTC (permalink / raw)
To: Markus Volk; +Cc: openembedded-core
[-- Attachment #1: Type: text/plain, Size: 16869 bytes --]
This patch on the other hand looks fine, but needs to go through the test
matrix. It’s most likely post mickledore material.
Alex
On Fri 17. Mar 2023 at 7.02, Markus Volk <f_l_k@t-online.de> wrote:
> Currently /tmp is a link to /var/tmp which breaks glib-2.0 ptest
> Systemd documentation describes tmpdir usage as follows:
>
> /tmp/ and /var/tmp/ are two world-writable directories Linux systems
> provide for temporary files. The former is
> typically on tmpfs and thus backed by RAM/swap, and flushed out on each
> reboot. The latter is typically a proper,
> persistent file system, and thus backed by physical storage.
>
> By default, systemd-tmpfiles will apply a concept of “ageing” to all files
> and directories stored in /tmp/ and
> /var/tmp/. This means that files that have neither been changed nor read
> within a specific time frame are auto-
> matically removed in regular intervals.
> (This concept is not new to systemd-tmpfiles btw, it’s inherited from
> previous subsystems such as tmpwatch.)
> By default files in /tmp/ are cleaned up after 10 days, and those in
> /var/tmp after 30 days.
>
> This commit tries to align tmpdir to what systemd expects.
>
> Signed-off-by: Markus Volk <f_l_k@t-online.de>
> ---
> meta/conf/bitbake.conf | 4 ---
> meta/files/fs-perms-persistent-log.txt | 2 --
> meta/files/fs-perms.txt | 2 --
> .../lib/oeqa/files/buildhistory_filelist1.txt | 1 -
> .../lib/oeqa/files/buildhistory_filelist2.txt | 1 -
> meta/recipes-core/base-files/base-files/fstab | 1 +
> .../base-files/base-files_3.0.14.bb | 4 +--
> .../initscripts-1.0/populate-volatile.sh | 2 +-
> .../initscripts/initscripts-1.0/volatiles | 5 ++-
> .../initscripts/initscripts_1.0.bb | 3 --
> .../systemd/systemd/00-create-volatile.conf | 4 +--
> meta/recipes-core/systemd/systemd_253.1.bb | 7 ----
> meta/recipes-core/udev/eudev/init | 4 ---
> .../e2fsprogs/e2fsprogs/run-ptest | 2 +-
> ...eak_cmsg.stderr.exp-adjust-tmp-paths.patch | 34 -------------------
> .../valgrind/valgrind_3.20.0.bb | 1 -
> 16 files changed, 8 insertions(+), 69 deletions(-)
> delete mode 100644
> meta/recipes-devtools/valgrind/valgrind/0001-none-tests-fdleak_cmsg.stderr.exp-adjust-tmp-paths.patch
>
> diff --git a/meta/conf/bitbake.conf b/meta/conf/bitbake.conf
> index afd9e2f552..dcf6ce99d1 100644
> --- a/meta/conf/bitbake.conf
> +++ b/meta/conf/bitbake.conf
> @@ -90,10 +90,6 @@ ROOT_HOME ??= "/home/root"
> # If set to boolean false ('no', 'n', 'false', 'f', '0'), /var/log is on
> persistent storage.
> VOLATILE_LOG_DIR ?= "yes"
>
> -# if set to 'yes': /tmp links to /var/tmp which links to /var/volatile/tmp
> -# otherwise: /tmp is on persistent storage
> -VOLATILE_TMP_DIR ?= "yes"
> -
> BB_RENAMED_VARIABLES[PNBLACKLIST] = "SKIP_RECIPE"
> BB_RENAMED_VARIABLES[CVE_CHECK_PN_WHITELIST] = "CVE_CHECK_SKIP_RECIPE"
> BB_RENAMED_VARIABLES[CVE_CHECK_WHITELIST] = "CVE_CHECK_IGNORE"
> diff --git a/meta/files/fs-perms-persistent-log.txt
> b/meta/files/fs-perms-persistent-log.txt
> index 518c1be3c9..326c0ed092 100644
> --- a/meta/files/fs-perms-persistent-log.txt
> +++ b/meta/files/fs-perms-persistent-log.txt
> @@ -47,7 +47,6 @@ ${oldincludedir} 0755 root root true
> 0644 root root
> # Links
> ${localstatedir}/run link /run
> ${localstatedir}/lock link /run/lock
> -${localstatedir}/tmp link volatile/tmp
>
> /home 0755 root root false - - -
> /srv 0755 root root false - - -
> @@ -57,7 +56,6 @@ ${localstatedir}/local 0755 root
> root false - - -
> # Special permissions from base-files
> # Set 1777
> /tmp 01777 root root false - - -
> -${localstatedir}/volatile/tmp 01777 root root false - - -
>
> # Set 0700
> ${ROOT_HOME} 0700 root root false - - -
> diff --git a/meta/files/fs-perms.txt b/meta/files/fs-perms.txt
> index daa4aed840..ed59311035 100644
> --- a/meta/files/fs-perms.txt
> +++ b/meta/files/fs-perms.txt
> @@ -48,7 +48,6 @@ ${oldincludedir} 0755 root root true
> 0644 root root
> ${localstatedir}/run link /run
> ${localstatedir}/log link volatile/log
> ${localstatedir}/lock link /run/lock
> -${localstatedir}/tmp link volatile/tmp
>
> /home 0755 root root false - - -
> /srv 0755 root root false - - -
> @@ -58,7 +57,6 @@ ${localstatedir}/local 0755 root
> root false - - -
> # Special permissions from base-files
> # Set 1777
> /tmp 01777 root root false - - -
> -${localstatedir}/volatile/tmp 01777 root root false - - -
>
> # Set 0700
> ${ROOT_HOME} 0700 root root false - - -
> diff --git a/meta/lib/oeqa/files/buildhistory_filelist1.txt
> b/meta/lib/oeqa/files/buildhistory_filelist1.txt
> index 8d882895ad..ec50017383 100644
> --- a/meta/lib/oeqa/files/buildhistory_filelist1.txt
> +++ b/meta/lib/oeqa/files/buildhistory_filelist1.txt
> @@ -9210,5 +9210,4 @@ lrwxrwxrwx root root 12
> ./var/log -> volatile/log
> lrwxrwxrwx root root 6 ./var/run -> ../run
> drwxr-xr-x root root 4096 ./var/spool
> drwxrwxr-x root mail 4096 ./var/spool/mail
> -lrwxrwxrwx root root 12 ./var/tmp -> volatile/tmp
> drwxr-xr-x root root 4096 ./var/volatile
> diff --git a/meta/lib/oeqa/files/buildhistory_filelist2.txt
> b/meta/lib/oeqa/files/buildhistory_filelist2.txt
> index ac6307060d..cedec51c38 100644
> --- a/meta/lib/oeqa/files/buildhistory_filelist2.txt
> +++ b/meta/lib/oeqa/files/buildhistory_filelist2.txt
> @@ -9213,5 +9213,4 @@ lrwxrwxrwx root root 12
> ./var/log -> volatile/log
> lrwxrwxrwx root root 6 ./var/run -> ../run
> drwxr-xr-x root root 4096 ./var/spool
> drwxrwxr-x root mail 4096 ./var/spool/mail
> -lrwxrwxrwx root root 12 ./var/tmp -> volatile/tmp
> drwxr-xr-x root root 4096 ./var/volatile
> diff --git a/meta/recipes-core/base-files/base-files/fstab
> b/meta/recipes-core/base-files/base-files/fstab
> index 70e400f567..7064573130 100644
> --- a/meta/recipes-core/base-files/base-files/fstab
> +++ b/meta/recipes-core/base-files/base-files/fstab
> @@ -5,6 +5,7 @@ proc /proc proc
> defaults 0 0
> devpts /dev/pts devpts
> mode=0620,ptmxmode=0666,gid=5 0 0
> tmpfs /run tmpfs
> mode=0755,nodev,nosuid,strictatime 0 0
> tmpfs /var/volatile tmpfs defaults
> 0 0
> +tmpfs /tmp tmpfs defaults
> 0 0
>
> # uncomment this if your device has a SD/MMC/Transflash slot
> #/dev/mmcblk0p1 /media/card auto
> defaults,sync,noauto 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 ff83567bd9..c2ecea0a25 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
> @@ -29,7 +29,7 @@ S = "${WORKDIR}"
> INHIBIT_DEFAULT_DEPS = "1"
>
> docdir:append = "/${P}"
> -dirs1777 = "/tmp ${localstatedir}/volatile/tmp"
> +dirs1777 = "/tmp /var/tmp"
> dirs2775 = ""
> dirs555 = "/sys /proc"
> dirs755 = "/boot /dev ${base_bindir} ${base_sbindir} ${base_libdir} \
> @@ -53,7 +53,7 @@ dirs755-lsb = "/srv \
> ${prefix}/lib/locale"
> dirs2775-lsb = "/var/mail"
>
> -volatiles = "${@'log' if oe.types.boolean('${VOLATILE_LOG_DIR}') else ''}
> tmp"
> +volatiles = "${@'log' if oe.types.boolean('${VOLATILE_LOG_DIR}') else ''}"
> conffiles = "${sysconfdir}/debian_version ${sysconfdir}/host.conf \
> ${sysconfdir}/issue /${sysconfdir}/issue.net \
> ${sysconfdir}/nsswitch.conf ${sysconfdir}/profile \
> diff --git
> a/meta/recipes-core/initscripts/initscripts-1.0/populate-volatile.sh
> b/meta/recipes-core/initscripts/initscripts-1.0/populate-volatile.sh
> index bc630e871c..ecfb6fdc2b 100755
> --- a/meta/recipes-core/initscripts/initscripts-1.0/populate-volatile.sh
> +++ b/meta/recipes-core/initscripts/initscripts-1.0/populate-volatile.sh
> @@ -23,7 +23,7 @@ ROOT_DIR="$(echo "$DIRNAME" | sed -ne 's:/etc/.*::p')"
> [ "$ROOTFS_READ_ONLY" = "yes" ] && VOLATILE_ENABLE_CACHE=no
>
> CFGDIR="${ROOT_DIR}/etc/default/volatiles"
> -TMPROOT="${ROOT_DIR}/var/volatile/tmp"
> +TMPROOT="${ROOT_DIR}/tmp"
> COREDEF="00_core"
>
> [ "${VERBOSE}" != "no" ] && echo "Populating volatile Filesystems."
> diff --git a/meta/recipes-core/initscripts/initscripts-1.0/volatiles
> b/meta/recipes-core/initscripts/initscripts-1.0/volatiles
> index cd8a4be05f..7232a8ef90 100644
> --- a/meta/recipes-core/initscripts/initscripts-1.0/volatiles
> +++ b/meta/recipes-core/initscripts/initscripts-1.0/volatiles
> @@ -25,11 +25,10 @@
> # link the file defined as /var/test will actually be created as
> /tmp/testfile.
> d root root 1777 /run/lock none
> d root root 0755 /var/volatile/log none
> -d root root 1777 /var/volatile/tmp none
> l root root 1777 /var/lock /run/lock
> 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 1777 /tmp
> +d root root 1777 /var/tmp
> d root root 0755 /var/lock/subsys none
> f root root 0664 /var/log/wtmp none
> f root root 0664 /var/run/utmp none
> diff --git a/meta/recipes-core/initscripts/initscripts_1.0.bb
> b/meta/recipes-core/initscripts/initscripts_1.0.bb
> index 4dc477bb8d..7c9d9ca4f1 100644
> --- a/meta/recipes-core/initscripts/initscripts_1.0.bb
> +++ b/meta/recipes-core/initscripts/initscripts_1.0.bb
> @@ -108,9 +108,6 @@ do_install () {
> sed -i -e '\@^d root root 0755 /var/volatile/log none$@
> a\l root root 0755 /var/log /var/volatile/log' \
> ${D}${sysconfdir}/default/volatiles/00_core
> fi
> - if [ "${VOLATILE_TMP_DIR}" != "yes" ]; then
> - sed -i -e "/\<tmp\>/d"
> ${D}${sysconfdir}/default/volatiles/00_core
> - fi
> install -m 0755 ${WORKDIR}/dmesg.sh
> ${D}${sysconfdir}/init.d
> install -m 0644 ${WORKDIR}/logrotate-dmesg.conf
> ${D}${sysconfdir}/
>
> diff --git a/meta/recipes-core/systemd/systemd/00-create-volatile.conf
> b/meta/recipes-core/systemd/systemd/00-create-volatile.conf
> index c4277221a2..1ba9b836cf 100644
> --- a/meta/recipes-core/systemd/systemd/00-create-volatile.conf
> +++ b/meta/recipes-core/systemd/systemd/00-create-volatile.conf
> @@ -1,8 +1,6 @@
> #This goes hand-in-hand with the base-files of OE-Core. The file must
> -# be sorted before 'systemd.conf' becuase this attempts to create a file
> +# be sorted before 'systemd.conf' because this attempts to create a file
> # inside /var/log.
>
> -
> d /run/lock 1777 - - -
> d /var/volatile/log - - - -
> -d /var/volatile/tmp 1777 - -
> diff --git a/meta/recipes-core/systemd/systemd_253.1.bb
> b/meta/recipes-core/systemd/systemd_253.1.bb
> index 4a0bb18254..1084040a25 100644
> --- a/meta/recipes-core/systemd/systemd_253.1.bb
> +++ b/meta/recipes-core/systemd/systemd_253.1.bb
> @@ -289,13 +289,6 @@ do_install() {
> rm -rf ${D}${localstatedir}/log/journal/remote
> fi
>
> - # if the user requests /tmp be on persistent storage (i.e. not
> volatile)
> - # then don't use a tmpfs for /tmp
> - if [ "${VOLATILE_TMP_DIR}" != "yes" ]; then
> - rm -f ${D}${rootlibdir}/systemd/system/tmp.mount
> - rm -f
> ${D}${rootlibdir}/systemd/system/local-fs.target.wants/tmp.mount
> - fi
> -
> install -d ${D}${systemd_system_unitdir}/graphical.target.wants
> install -d ${D}${systemd_system_unitdir}/multi-user.target.wants
> install -d ${D}${systemd_system_unitdir}/poweroff.target.wants
> diff --git a/meta/recipes-core/udev/eudev/init
> b/meta/recipes-core/udev/eudev/init
> index 477a525b21..2084de83ae 100644
> --- a/meta/recipes-core/udev/eudev/init
> +++ b/meta/recipes-core/udev/eudev/init
> @@ -79,10 +79,6 @@ case "$1" in
> }
> [ -e /dev/pts ] || mkdir -m 0755 /dev/pts
> [ -e /dev/shm ] || mkdir -m 1777 /dev/shm
> - # the automount rule for udev needs /tmp directory available, as /tmp
> is a symlink
> - # to /var/tmp which in turn is a symlink to /var/volatile/tmp, we
> need to make sure
> - # /var/volatile/tmp directory to be available.
> - mkdir -m 1777 -p /var/volatile/tmp
>
> # make_extra_nodes
> kill_udevd > "/dev/null" 2>&1
> diff --git a/meta/recipes-devtools/e2fsprogs/e2fsprogs/run-ptest
> b/meta/recipes-devtools/e2fsprogs/e2fsprogs/run-ptest
> index c97c0377e9..1f873b055e 100644
> --- a/meta/recipes-devtools/e2fsprogs/e2fsprogs/run-ptest
> +++ b/meta/recipes-devtools/e2fsprogs/e2fsprogs/run-ptest
> @@ -2,7 +2,7 @@
>
> cd ./test
> SKIP_SLOW_TESTS=yes ./test_script | sed -u -e '/:[[:space:]]ok/s/^/PASS:
> /' -e '/:[[:space:]]failed/s/^/FAIL: /' -e '/:[[:space:]]skipped/s/^/SKIP:
> /'
> -rm -rf /var/volatile/tmp/*e2fsprogs*
> +rm -rf /tmp/*e2fsprogs*
> rm -f tmp-*
> rm -f *.tmp
> rm -f *.ok
> diff --git
> a/meta/recipes-devtools/valgrind/valgrind/0001-none-tests-fdleak_cmsg.stderr.exp-adjust-tmp-paths.patch
> b/meta/recipes-devtools/valgrind/valgrind/0001-none-tests-fdleak_cmsg.stderr.exp-adjust-tmp-paths.patch
> deleted file mode 100644
> index e421ac6c80..0000000000
> ---
> a/meta/recipes-devtools/valgrind/valgrind/0001-none-tests-fdleak_cmsg.stderr.exp-adjust-tmp-paths.patch
> +++ /dev/null
> @@ -1,34 +0,0 @@
> -From f405297d3382cd98391d02f397e2387da1f42879 Mon Sep 17 00:00:00 2001
> -From: Alexander Kanavin <alex.kanavin@gmail.com>
> -Date: Fri, 24 Jan 2020 17:55:39 +0100
> -Subject: [PATCH] none/tests/fdleak_cmsg.stderr.exp: adjust /tmp paths
> -
> -In oe-core, /tmp is linked to /var/volatile/tmp and
> -valgrind output changes accordingly
> -
> -Upstream-Status: Inappropriate [oe-core specific]
> -Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
> ----
> - none/tests/fdleak_cmsg.stderr.exp | 4 ++--
> - 1 file changed, 2 insertions(+), 2 deletions(-)
> -
> -diff --git a/none/tests/fdleak_cmsg.stderr.exp
> b/none/tests/fdleak_cmsg.stderr.exp
> -index 6e5a797b9..0ede1ab18 100644
> ---- a/none/tests/fdleak_cmsg.stderr.exp
> -+++ b/none/tests/fdleak_cmsg.stderr.exp
> -@@ -25,10 +25,10 @@ Open file descriptor ...: /dev/null
> -
> -
> - FILE DESCRIPTORS: 6 open (3 std) at exit.
> --Open file descriptor ...: /tmp/data2
> -+Open file descriptor ...: ...
> - ...
> -
> --Open file descriptor ...: /tmp/data1
> -+Open file descriptor ...: ...
> - ...
> -
> - Open AF_UNIX socket ...: <unknown>
> ---
> -2.17.1
> -
> diff --git a/meta/recipes-devtools/valgrind/valgrind_3.20.0.bb
> b/meta/recipes-devtools/valgrind/valgrind_3.20.0.bb
> index 07e50426e4..4ea173ba80 100644
> --- a/meta/recipes-devtools/valgrind/valgrind_3.20.0.bb
> +++ b/meta/recipes-devtools/valgrind/valgrind_3.20.0.bb
> @@ -36,7 +36,6 @@ SRC_URI = "
> https://sourceware.org/pub/valgrind/valgrind-${PV}.tar.bz2 \
> file://0001-valgrind-filter_xml_frames-do-not-filter-usr.patch
> \
> file://0001-memcheck-vgtests-remove-fullpath-after-flags.patch
> \
> file://s390x_vec_op_t.patch \
> -
> file://0001-none-tests-fdleak_cmsg.stderr.exp-adjust-tmp-paths.patch \
> file://0001-memcheck-tests-Fix-timerfd-syscall-test.patch \
> file://0001-docs-Disable-manual-validation.patch \
> file://0001-drd-tests-Include-missing-cstdint.patch \
> --
> 2.34.1
>
>
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#178738):
> https://lists.openembedded.org/g/openembedded-core/message/178738
> Mute This Topic: https://lists.openembedded.org/mt/97667591/1686489
> Group Owner: openembedded-core+owner@lists.openembedded.org
> Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [
> alex.kanavin@gmail.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>
>
[-- Attachment #2: Type: text/html, Size: 21635 bytes --]
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [oe-core][PATCH] Remove usage of /var/volatile/tmp
2023-03-17 6:02 [oe-core][PATCH] Remove usage of /var/volatile/tmp Markus Volk
2023-03-17 6:04 ` Markus Volk
2023-03-17 7:34 ` Alexander Kanavin
@ 2023-03-17 8:00 ` Richard Purdie
2023-03-17 8:18 ` Markus Volk
2 siblings, 1 reply; 17+ messages in thread
From: Richard Purdie @ 2023-03-17 8:00 UTC (permalink / raw)
To: Markus Volk, openembedded-core
On Fri, 2023-03-17 at 07:02 +0100, Markus Volk wrote:
> Currently /tmp is a link to /var/tmp which breaks glib-2.0 ptest
> Systemd documentation describes tmpdir usage as follows:
>
> /tmp/ and /var/tmp/ are two world-writable directories Linux systems provide for temporary files. The former is
> typically on tmpfs and thus backed by RAM/swap, and flushed out on each reboot. The latter is typically a proper,
> persistent file system, and thus backed by physical storage.
>
> By default, systemd-tmpfiles will apply a concept of “ageing” to all files and directories stored in /tmp/ and
> /var/tmp/. This means that files that have neither been changed nor read within a specific time frame are auto-
> matically removed in regular intervals.
> (This concept is not new to systemd-tmpfiles btw, it’s inherited from previous subsystems such as tmpwatch.)
> By default files in /tmp/ are cleaned up after 10 days, and those in /var/tmp after 30 days.
>
> This commit tries to align tmpdir to what systemd expects.
This changes the system layout to what systemd wants but what happens
to sysvinit or anything else though? Some systems won't have systemd-
tmpfiles and so on present. The commit message above makes it sound
like systemd is the only thing that exists/matters.
Cheers,
Richard
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [oe-core][PATCH] Remove usage of /var/volatile/tmp
2023-03-17 8:00 ` Richard Purdie
@ 2023-03-17 8:18 ` Markus Volk
2023-03-17 11:53 ` Richard Purdie
0 siblings, 1 reply; 17+ messages in thread
From: Markus Volk @ 2023-03-17 8:18 UTC (permalink / raw)
To: Richard Purdie; +Cc: openembedded-core
[-- Attachment #1: Type: text/plain, Size: 620 bytes --]
Am Fr, 17. Mär 2023 um 08:00:37 +0000 schrieb Richard Purdie
<richard.purdie@linuxfoundation.org>:
> This changes the system layout to what systemd wants but what happens
> to sysvinit or anything else though? Some systems won't have systemd-
> tmpfiles and so on present. The commit message above makes it sound
> like systemd is the only thing that exists/matters.
I like systemd and I like that it standardizes a lot of things, but I
really don't care about politics. That's why I also sent a patch for a
different way. But the commit message is right, that would clearly be a
step towards systemd.
[-- Attachment #2: Type: text/html, Size: 769 bytes --]
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [oe-core][PATCH] Remove usage of /var/volatile/tmp
2023-03-17 8:18 ` Markus Volk
@ 2023-03-17 11:53 ` Richard Purdie
2023-03-17 17:31 ` Markus Volk
0 siblings, 1 reply; 17+ messages in thread
From: Richard Purdie @ 2023-03-17 11:53 UTC (permalink / raw)
To: Markus Volk; +Cc: openembedded-core
On Fri, 2023-03-17 at 09:18 +0100, Markus Volk wrote:
> Am Fr, 17. Mär 2023 um 08:00:37 +0000 schrieb Richard Purdie
> <richard.purdie@linuxfoundation.org>:
> > This changes the system layout to what systemd wants but what
> > happens
> > to sysvinit or anything else though? Some systems won't have
> > systemd-
> > tmpfiles and so on present. The commit message above makes it sound
> > like systemd is the only thing that exists/matters.
>
>
> I like systemd and I like that it standardizes a lot of things, but I
> really don't care about politics. That's why I also sent a patch for
> a different way. But the commit message is right, that would clearly
> be a step towards systemd.
Regardless of what anyone thinks of systemd, I can't take patches which
change existing behaviours if that change isn't explained, justified
and documented.
As such there is no way I could ever take a patch with the commit
message in the current form since it doesn't mention anything about the
impact on sysvinit, how to mitigate it (if needed) and what users
should expect.
I appreciate you likely don't care about sysvinit and don't want to
spend any time on that. That is fine, I do understand. Equally, as the
maintainer for OE-Core, I do have to care and I just can't take a patch
like this. I just want to make it clear why it isn't something I can
even consider in the current form and to make any change like this,
we'd need more insight into the other impacts (e.g. busybox init too).
It would help me if adverse effects are mentioned in commit messages.
In this case I can spot it easily enough but I don't always know/spot
all the issues.
Cheers,
Richard
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [oe-core][PATCH] Remove usage of /var/volatile/tmp
2023-03-17 11:53 ` Richard Purdie
@ 2023-03-17 17:31 ` Markus Volk
2023-03-17 19:10 ` Alexander Kanavin
0 siblings, 1 reply; 17+ messages in thread
From: Markus Volk @ 2023-03-17 17:31 UTC (permalink / raw)
To: Richard Purdie; +Cc: openembedded-core
[-- Attachment #1: Type: text/plain, Size: 928 bytes --]
Am Fr, 17. Mär 2023 um 11:53:17 +0000 schrieb Richard Purdie
<richard.purdie@linuxfoundation.org>:
> It would help me if adverse effects are mentioned in commit messages.
> In this case I can spot it easily enough but I don't always know/spot
> all the issues.
It would be too harsh to say that I don't care about sysvinit. Of
course, if something breaks as a result of this commit, I'm willing to
take care of it if I can help. It's just that I don't personally use
it, so I haven't identified any other issues that might be relevant to
sysvinit. Other than the obvious that anything that would write
directly to '/var/volatile/tmp' would break.
At least I checked that sysvinit images could still boot. I have
successfully run core-image-ptest-glib-2.0 with this patch applied. If
I knew of any problems with sysvinit I would have pointed them out, but
unfortunately I have no further findings yet
[-- Attachment #2: Type: text/html, Size: 1095 bytes --]
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [oe-core][PATCH] Remove usage of /var/volatile/tmp
2023-03-17 17:31 ` Markus Volk
@ 2023-03-17 19:10 ` Alexander Kanavin
2023-03-22 19:00 ` f_l_k
0 siblings, 1 reply; 17+ messages in thread
From: Alexander Kanavin @ 2023-03-17 19:10 UTC (permalink / raw)
To: Markus Volk; +Cc: Richard Purdie, openembedded-core
[-- Attachment #1: Type: text/plain, Size: 1977 bytes --]
I think it would help to at least take this through a-full so we have a
higher degree of knowledge in what breaks and what doesn’t.
I didn’t look at the patch in detail and won’t be able to for a few more
days. We definitely need to understand how it affects other init systems,
but it is totally doable, there is only a limited number of them and how
they handle tmp directories and what they expect from them is tractable
research. As long as no one expects RP to do that.
Alex
On Fri 17. Mar 2023 at 17.31, Markus Volk <f_l_k@t-online.de> wrote:
> Am Fr, 17. Mär 2023 um 11:53:17 +0000 schrieb Richard Purdie <
> richard.purdie@linuxfoundation.org>:
>
> It would help me if adverse effects are mentioned in commit messages. In
> this case I can spot it easily enough but I don't always know/spot all the
> issues.
>
>
> It would be too harsh to say that I don't care about sysvinit. Of course,
> if something breaks as a result of this commit, I'm willing to take care of
> it if I can help. It's just that I don't personally use it, so I haven't
> identified any other issues that might be relevant to sysvinit. Other than
> the obvious that anything that would write directly to '/var/volatile/tmp'
> would break.
> At least I checked that sysvinit images could still boot. I have
> successfully run core-image-ptest-glib-2.0 with this patch applied. If I
> knew of any problems with sysvinit I would have pointed them out, but
> unfortunately I have no further findings yet
>
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#178758):
> https://lists.openembedded.org/g/openembedded-core/message/178758
> Mute This Topic: https://lists.openembedded.org/mt/97667591/1686489
> Group Owner: openembedded-core+owner@lists.openembedded.org
> Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [
> alex.kanavin@gmail.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>
>
[-- Attachment #2: Type: text/html, Size: 3182 bytes --]
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [oe-core][PATCH] Remove usage of /var/volatile/tmp
2023-03-17 19:10 ` Alexander Kanavin
@ 2023-03-22 19:00 ` f_l_k
2023-03-22 19:11 ` Alexander Kanavin
0 siblings, 1 reply; 17+ messages in thread
From: f_l_k @ 2023-03-22 19:00 UTC (permalink / raw)
To: Alexander Kanavin; +Cc: Richard Purdie, openembedded-core
[-- Attachment #1: Type: text/plain, Size: 4110 bytes --]
After a turbulent week I finally have some time for the hobby again.
However, there is a hardware problem with my build machine. The CPU fan
failed and for some reason the warning for it was disabled in the bios.
I didn't notice it until the machine just crashed with an overheated
CPU while compiling. Cost me some sstate cache and I have to get a
replacement for the fan. I had done some tests with sysvinit and this
commit before. So far it looks like busybox/sysvinit has no major
problems with the change. However, it is of course possible that such
an invasive change could affect workflows that I didn't think of or
overlooked to change one or the other line.
In case the commit message gave the wrong impression, I would like to
explain that it was not my intention to push a change here just because
I like systemd. My logic was something like this:
Glib-2.0 uses ptest to ensure that /tmp is not a symlink. I am inclined
to believe that this is intended and not a bug in the test. Based on
this assumption, there are not many options. You could either make sure
that no symlink is created for ptests, which I don't think is a good
idea. Strictly speaking, this would undermine the test by creating a
different environment for it than exists on the target. It would be
more honest to simply ignore the test for that case.
So I thought it would be best to fulfill glibs needs and remove the
/tmp symlink everywhere. That's when systemd came into play because I
thought if you have to make such an invasive change anyway, you should
first see how systemd would expect it. That would be correct if you
agree that systemd should set the default.
If not, I could also send a variant where only the /tmp symlink is
replaced by a directory that has a mounted tmpfs but doesn't remove
/var/volatile/tmp. That might be a bit less invasive, but we would have
the problem that directory structure under sysvinit is fundamentally
different from that under systemd. In any case, even with this
approach, I couldn't 100% rule out that it could affect
sysvinit/busybox or even systemd based images or one or the other
workflow. But at least I tried my best not to break sysvinit.
If I need to run any specific tests I can do that as soon as my CPU
cools down again
On Fri, Mar 17 2023 at 07:10:36 PM +0000, Alexander Kanavin
<alex.kanavin@gmail.com> wrote:
> I think it would help to at least take this through a-full so we have
> a higher degree of knowledge in what breaks and what doesn’t.
>
> I didn’t look at the patch in detail and won’t be able to for a
> few more days. We definitely need to understand how it affects other
> init systems, but it is totally doable, there is only a limited
> number of them and how they handle tmp directories and what they
> expect from them is tractable research. As long as no one expects RP
> to do that.
>
> Alex
>
> On Fri 17. Mar 2023 at 17.31, Markus Volk <f_l_k@t-online.de
> <mailto:f_l_k@t-online.de>> wrote:
>> Am Fr, 17. Mär 2023 um 11:53:17 +0000 schrieb Richard Purdie
>> <richard.purdie@linuxfoundation.org
>> <mailto:richard.purdie@linuxfoundation.org>>:
>>> It would help me if adverse effects are mentioned in commit
>>> messages.
>>> In this case I can spot it easily enough but I don't always
>>> know/spot
>>> all the issues.
>>
>> It would be too harsh to say that I don't care about sysvinit. Of
>> course, if something breaks as a result of this commit, I'm willing
>> to take care of it if I can help. It's just that I don't personally
>> use it, so I haven't identified any other issues that might be
>> relevant to sysvinit. Other than the obvious that anything that
>> would write directly to '/var/volatile/tmp' would break.
>> At least I checked that sysvinit images could still boot. I have
>> successfully run core-image-ptest-glib-2.0 with this patch applied.
>> If I knew of any problems with sysvinit I would have pointed them
>> out, but unfortunately I have no further findings yet
>>
>>
>>
[-- Attachment #2: Type: text/html, Size: 4890 bytes --]
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [oe-core][PATCH] Remove usage of /var/volatile/tmp
2023-03-22 19:00 ` f_l_k
@ 2023-03-22 19:11 ` Alexander Kanavin
[not found] ` <9VVZRR.NLXPW4ISUM5R2@t-online.de>
` (2 more replies)
0 siblings, 3 replies; 17+ messages in thread
From: Alexander Kanavin @ 2023-03-22 19:11 UTC (permalink / raw)
To: f_l_k; +Cc: Richard Purdie, openembedded-core
I would suggest that you build core-image-sato-sdk with this change,
but with three different options for INIT_MANAGER:
INIT_MANAGER = "sysvinit"
INIT_MANAGER = "systemd"
INIT_MANAGER = "mdev-busybox"
Then run bitbake -c testimage for each of them.
If it does not fail, then submit the patch again with a revised commit
message, and then someone could take it through the full test matrix.
I can do it.
Systemd nowadays sets the de facto standards in these matters in
mainstream distros, and other upstreams (e.g. glib) will make
assumptions based on that, because most people develop on a mainstream
distro, and all of them are using systemd. I'd say that in itself is a
reason to align other init systems to match - if they aren't
opinionated about it.
Alex
On Wed, 22 Mar 2023 at 20:00, <f_l_k@t-online.de> wrote:
>
> After a turbulent week I finally have some time for the hobby again. However, there is a hardware problem with my build machine. The CPU fan failed and for some reason the warning for it was disabled in the bios. I didn't notice it until the machine just crashed with an overheated CPU while compiling. Cost me some sstate cache and I have to get a replacement for the fan. I had done some tests with sysvinit and this commit before. So far it looks like busybox/sysvinit has no major problems with the change. However, it is of course possible that such an invasive change could affect workflows that I didn't think of or overlooked to change one or the other line.
>
> In case the commit message gave the wrong impression, I would like to explain that it was not my intention to push a change here just because I like systemd. My logic was something like this:
>
> Glib-2.0 uses ptest to ensure that /tmp is not a symlink. I am inclined to believe that this is intended and not a bug in the test. Based on this assumption, there are not many options. You could either make sure that no symlink is created for ptests, which I don't think is a good idea. Strictly speaking, this would undermine the test by creating a different environment for it than exists on the target. It would be more honest to simply ignore the test for that case.
>
> So I thought it would be best to fulfill glibs needs and remove the /tmp symlink everywhere. That's when systemd came into play because I thought if you have to make such an invasive change anyway, you should first see how systemd would expect it. That would be correct if you agree that systemd should set the default.
>
> If not, I could also send a variant where only the /tmp symlink is replaced by a directory that has a mounted tmpfs but doesn't remove /var/volatile/tmp. That might be a bit less invasive, but we would have the problem that directory structure under sysvinit is fundamentally different from that under systemd. In any case, even with this approach, I couldn't 100% rule out that it could affect sysvinit/busybox or even systemd based images or one or the other workflow. But at least I tried my best not to break sysvinit.
>
> If I need to run any specific tests I can do that as soon as my CPU cools down again
>
> On Fri, Mar 17 2023 at 07:10:36 PM +0000, Alexander Kanavin <alex.kanavin@gmail.com> wrote:
>
> I think it would help to at least take this through a-full so we have a higher degree of knowledge in what breaks and what doesn’t.
>
> I didn’t look at the patch in detail and won’t be able to for a few more days. We definitely need to understand how it affects other init systems, but it is totally doable, there is only a limited number of them and how they handle tmp directories and what they expect from them is tractable research. As long as no one expects RP to do that.
>
> Alex
>
> On Fri 17. Mar 2023 at 17.31, Markus Volk <f_l_k@t-online.de> wrote:
>>
>> Am Fr, 17. Mär 2023 um 11:53:17 +0000 schrieb Richard Purdie <richard.purdie@linuxfoundation.org>:
>>
>> It would help me if adverse effects are mentioned in commit messages. In this case I can spot it easily enough but I don't always know/spot all the issues.
>>
>>
>> It would be too harsh to say that I don't care about sysvinit. Of course, if something breaks as a result of this commit, I'm willing to take care of it if I can help. It's just that I don't personally use it, so I haven't identified any other issues that might be relevant to sysvinit. Other than the obvious that anything that would write directly to '/var/volatile/tmp' would break.
>> At least I checked that sysvinit images could still boot. I have successfully run core-image-ptest-glib-2.0 with this patch applied. If I knew of any problems with sysvinit I would have pointed them out, but unfortunately I have no further findings yet
>>
>>
>>
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [oe-core][PATCH] Remove usage of /var/volatile/tmp
[not found] ` <9VVZRR.NLXPW4ISUM5R2@t-online.de>
@ 2023-03-23 22:34 ` Richard Purdie
0 siblings, 0 replies; 17+ messages in thread
From: Richard Purdie @ 2023-03-23 22:34 UTC (permalink / raw)
To: Markus Volk, Alexander Kanavin; +Cc: openembedded-core
On Thu, 2023-03-23 at 23:30 +0100, Markus Volk wrote:
> Am Mi, 22. Mär 2023 um 20:11:34 +0100 schrieb Alexander Kanavin
> <alex.kanavin@gmail.com>:
> > Then run bitbake -c testimage for each of them.
>
>
> I built all the images but get an error here:
>
> bitbake -c testimage core-image-sato-sdk
>
> ERROR: Task do_testimage does not exist for target core-image-sato-
> sdk (/home/flk/poky/meta/recipes-sato/images/core-image-sato-
> sdk.bb:do_testimage). Close matches:
> do_image
> ERROR: Command execution failed: 1
>
> What am I missing?
IMAGE_CLASSES += "testimage testsdk"
Cheers,
Richard
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [oe-core][PATCH] Remove usage of /var/volatile/tmp
2023-03-22 19:11 ` Alexander Kanavin
[not found] ` <9VVZRR.NLXPW4ISUM5R2@t-online.de>
@ 2023-03-24 17:34 ` Markus Volk
2023-03-24 19:53 ` Alexander Kanavin
[not found] ` <174F6B63D17BDF87.25304@lists.openembedded.org>
2 siblings, 1 reply; 17+ messages in thread
From: Markus Volk @ 2023-03-24 17:34 UTC (permalink / raw)
To: Alexander Kanavin; +Cc: Richard Purdie, openembedded-core
[-- Attachment #1: Type: text/plain, Size: 5363 bytes --]
Am Mi, 22. Mär 2023 um 20:11:34 +0100 schrieb Alexander Kanavin
<alex.kanavin@gmail.com>:
> If it does not fail, then submit the patch again with a revised commit
> message
It fails, but in the same way even without this patch being applied. It
looks like the tmpfs runs full and from then on the rest of the tests
are unsuccessful
file write error: No space left on device
RESULTS:
RESULTS - buildcpio.BuildCpioTest.test_cpio: PASSED (29.67s)
RESULTS - buildlzip.BuildLzipTest.test_lzip: PASSED (5.53s)
RESULTS - connman.ConnmanTest.test_connmand_help: PASSED (0.51s)
RESULTS - connman.ConnmanTest.test_connmand_running: PASSED (0.52s)
RESULTS - date.DateTest.test_date: PASSED (2.06s)
RESULTS - df.DfTest.test_df: PASSED (0.52s)
RESULTS - dnf.DnfBasicTest.test_dnf_help: PASSED (0.83s)
RESULTS - dnf.DnfBasicTest.test_dnf_history: PASSED (0.72s)
RESULTS - dnf.DnfBasicTest.test_dnf_info: PASSED (0.68s)
RESULTS - dnf.DnfBasicTest.test_dnf_search: PASSED (0.68s)
RESULTS - dnf.DnfBasicTest.test_dnf_version: PASSED (0.66s)
RESULTS - dnf.DnfRepoTest.test_dnf_exclude: PASSED (1.92s)
RESULTS - dnf.DnfRepoTest.test_dnf_install: PASSED (1.22s)
RESULTS - dnf.DnfRepoTest.test_dnf_install_dependency: PASSED (1.86s)
RESULTS - dnf.DnfRepoTest.test_dnf_install_from_disk: PASSED (2.33s)
RESULTS - dnf.DnfRepoTest.test_dnf_install_from_http: PASSED (1.24s)
RESULTS - dnf.DnfRepoTest.test_dnf_installroot: PASSED (7.57s)
RESULTS - dnf.DnfRepoTest.test_dnf_makecache: PASSED (0.57s)
RESULTS - dnf.DnfRepoTest.test_dnf_reinstall: PASSED (0.62s)
RESULTS - dnf.DnfRepoTest.test_dnf_repoinfo: PASSED (0.61s)
RESULTS - gcc.GccCompileTest.test_gcc_compile: PASSED (1.75s)
RESULTS - gcc.GccCompileTest.test_gpp2_compile: PASSED (1.58s)
RESULTS - gcc.GccCompileTest.test_gpp_compile: PASSED (1.81s)
RESULTS - gcc.GccCompileTest.test_make: PASSED (1.18s)
RESULTS - gi.GObjectIntrospectionTest.test_python: PASSED (0.59s)
RESULTS - go.GoHelloworldTest.test_gohelloworld: PASSED (0.54s)
RESULTS - kernelmodule.KernelModuleTest.test_kernel_module: PASSED
(10.96s)
RESULTS - ldd.LddTest.test_ldd: PASSED (1.45s)
RESULTS - logrotate.LogrotateTest.test_logrotate_newlog: PASSED (2.29s)
RESULTS - logrotate.LogrotateTest.test_logrotate_wtmp: PASSED (1.97s)
RESULTS - oe_syslog.SyslogTest.test_syslog_running: PASSED (0.52s)
RESULTS - oe_syslog.SyslogTestConfig.test_syslog_logger: PASSED (1.83s)
RESULTS - oe_syslog.SyslogTestConfig.test_syslog_restart: PASSED (4.25s)
RESULTS - oe_syslog.SyslogTestConfig.test_syslog_startup_config: PASSED
(9.98s)
RESULTS - parselogs.ParseLogsTest.test_parselogs: PASSED (4.97s)
RESULTS - perl.PerlTest.test_perl_works: PASSED (0.52s)
RESULTS - ping.PingTest.test_ping: PASSED (0.01s)
RESULTS - python.PythonTest.test_python3: PASSED (0.53s)
RESULTS - rpm.RpmBasicTest.test_rpm_help: PASSED (0.52s)
RESULTS - rpm.RpmBasicTest.test_rpm_query: PASSED (1.05s)
RESULTS - rust.RustHelloworldTest.test_rusthelloworld: PASSED (0.51s)
RESULTS - ssh.SSHTest.test_ssh: PASSED (1.02s)
RESULTS - stap.StapTest.test_stap: PASSED (1.62s)
RESULTS - apt.AptRepoTest.test_apt_install_from_repo: SKIPPED (0.00s)
RESULTS - buildgalculator.GalculatorTest.test_galculator: SKIPPED
(0.00s)
RESULTS - dnf.DnfRepoTest.test_dnf_installroot_usrmerge: SKIPPED (0.00s)
RESULTS - opkg.OpkgRepoTest.test_opkg_install_from_repo: SKIPPED (0.00s)
RESULTS - pam.PamBasicTest.test_pam: SKIPPED (0.00s)
RESULTS - ptest.PtestRunnerTest.test_ptestrunner_expectfail: SKIPPED
(0.00s)
RESULTS -
rpm.RpmInstallRemoveTest.test_check_rpm_install_removal_log_file_size:
SKIPPED (0.00s)
RESULTS - rpm.RpmInstallRemoveTest.test_rpm_remove: SKIPPED (0.00s)
RESULTS - rust.RustCompileTest.test_cargo_compile: SKIPPED (0.00s)
RESULTS - rust.RustCompileTest.test_rust_compile: SKIPPED (0.00s)
RESULTS - systemd.SystemdBasicTests.test_systemd_basic: SKIPPED (0.00s)
RESULTS - systemd.SystemdBasicTests.test_systemd_failed: SKIPPED (0.00s)
RESULTS - systemd.SystemdBasicTests.test_systemd_list: SKIPPED (0.00s)
RESULTS - systemd.SystemdJournalTests.test_systemd_boot_time: SKIPPED
(0.00s)
RESULTS - systemd.SystemdJournalTests.test_systemd_journal: SKIPPED
(0.00s)
RESULTS - systemd.SystemdServiceTests.test_systemd_disable_enable:
SKIPPED (0.00s)
RESULTS - systemd.SystemdServiceTests.test_systemd_disable_enable_ro:
SKIPPED (0.00s)
RESULTS - systemd.SystemdServiceTests.test_systemd_status: SKIPPED
(0.00s)
RESULTS - systemd.SystemdServiceTests.test_systemd_stop_start: SKIPPED
(0.00s)
RESULTS - weston.WestonTest.test_wayland_info: SKIPPED (0.00s)
RESULTS -
weston.WestonTest.test_weston_can_initialize_new_wayland_compositor:
SKIPPED (0.00s)
RESULTS - weston.WestonTest.test_weston_running: SKIPPED (0.00s)
RESULTS - weston.WestonTest.test_weston_supports_xwayland: SKIPPED
(0.00s)
RESULTS - ptest.PtestRunnerTest.test_ptestrunner_expectsuccess: FAILED
(8407.07s)
RESULTS - rpm.RpmBasicTest.test_rpm_query_nonroot: FAILED (2.09s)
RESULTS - rpm.RpmInstallRemoveTest.test_rpm_install: FAILED (0.13s)
RESULTS - scp.ScpTest.test_scp_file: FAILED (0.19s)
RESULTS - xorg.XorgTest.test_xorg_running: FAILED (0.83s)
SUMMARY:
core-image-sato-sdk () - Ran 71 tests in 8524.357s
core-image-sato-sdk - FAIL - Required tests failed (successes=43,
skipped=23, failures=5, errors=0)
[-- Attachment #2: Type: text/html, Size: 6255 bytes --]
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [oe-core][PATCH] Remove usage of /var/volatile/tmp
[not found] ` <174F6B63D17BDF87.25304@lists.openembedded.org>
@ 2023-03-24 17:58 ` Markus Volk
0 siblings, 0 replies; 17+ messages in thread
From: Markus Volk @ 2023-03-24 17:58 UTC (permalink / raw)
To: Alexander Kanavin; +Cc: Richard Purdie, openembedded-core
[-- Attachment #1: Type: text/plain, Size: 298 bytes --]
Am Fr, 24. Mär 2023 um 18:34:13 +0100 schrieb Markus Volk
<f_l_k@t-online.de>:
> It fails, but in the same way even without this patch being applied
Meanwhile I edited
'core-image-sato-sdk-qemux86-64-20230324174311.qemuboot.conf' and
increased qb_mem = -m 2048
Lets see if this helps
[-- Attachment #2: Type: text/html, Size: 405 bytes --]
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [oe-core][PATCH] Remove usage of /var/volatile/tmp
2023-03-24 17:34 ` Markus Volk
@ 2023-03-24 19:53 ` Alexander Kanavin
2023-03-24 23:13 ` Markus Volk
0 siblings, 1 reply; 17+ messages in thread
From: Alexander Kanavin @ 2023-03-24 19:53 UTC (permalink / raw)
To: Markus Volk; +Cc: Richard Purdie, openembedded-core
On Fri, 24 Mar 2023 at 18:34, Markus Volk <f_l_k@t-online.de> wrote:
> RESULTS - ptest.PtestRunnerTest.test_ptestrunner_expectsuccess: FAILED (8407.07s)
This test is executed only if the image includes ptest-runner package,
and requires special setup. Do you have something in your local setup
that pulls it in? core-image-sato-sdk does not by default add it.
Alex
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [oe-core][PATCH] Remove usage of /var/volatile/tmp
2023-03-24 19:53 ` Alexander Kanavin
@ 2023-03-24 23:13 ` Markus Volk
2023-03-25 18:38 ` Alexander Kanavin
0 siblings, 1 reply; 17+ messages in thread
From: Markus Volk @ 2023-03-24 23:13 UTC (permalink / raw)
To: Alexander Kanavin; +Cc: Richard Purdie, openembedded-core
[-- Attachment #1: Type: text/plain, Size: 1545 bytes --]
Am Fr, 24. Mär 2023 um 20:53:22 +0100 schrieb Alexander Kanavin
<alex.kanavin@gmail.com>:
> Do you have something in your local setup
> that pulls it in? core-image-sato-sdk does not by default add it.
True, thanks for the hint. I still had this lines in local.conf because
of the glib ptest issue.
DISTRO_FEATURES:append = " ptest"
EXTRA_IMAGE_FEATURES += "ptest-pkgs"
That shortens the test duration by far
sysvinit:
SUMMARY:
core-image-sato-sdk () - Ran 71 tests in 129.937s
core-image-sato-sdk - OK - All required tests passed (successes=49,
skipped=22, failures=0, errors=0)
NOTE: Tasks Summary: Attempted 1159 tasks of which 1158 didn't need to
be rerun and all succeeded.
systemd:
SUMMARY:
core-image-sato-sdk () - Ran 71 tests in 129.812s
core-image-sato-sdk - OK - All required tests passed (successes=56,
skipped=15, failures=0, errors=0)
NOTE: Tasks Summary: Attempted 1159 tasks of which 1158 didn't need to
be rerun and all succeeded.
busybox:
File "/home/flk/poky/meta/lib/oeqa/runtime/cases/ssh.py", line 17, in
test_ssh
self.assertEqual(status, 0, msg='SSH Test failed: %s' % output)
AssertionError: 255 != 0 : SSH Test failed: ssh: connect to host
xxx.xxx.xxx.xxx port 22: Connection refused
RESULTS - ssh.SSHTest.test_ssh: FAILED (8.09s)
SUMMARY:
core-image-sato-sdk () - Ran 71 tests in 43.593s
core-image-sato-sdk - FAIL - Required tests failed (successes=2,
skipped=68, failures=1, errors=0)
There is an issue with mdev-busybox but i guess it is not related?
[-- Attachment #2: Type: text/html, Size: 2034 bytes --]
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [oe-core][PATCH] Remove usage of /var/volatile/tmp
2023-03-24 23:13 ` Markus Volk
@ 2023-03-25 18:38 ` Alexander Kanavin
2023-03-25 19:19 ` Markus Volk
0 siblings, 1 reply; 17+ messages in thread
From: Alexander Kanavin @ 2023-03-25 18:38 UTC (permalink / raw)
To: Markus Volk; +Cc: Richard Purdie, openembedded-core
On Sat, 25 Mar 2023 at 00:13, Markus Volk <f_l_k@t-online.de> wrote:
> busybox:
> File "/home/flk/poky/meta/lib/oeqa/runtime/cases/ssh.py", line 17, in test_ssh
> self.assertEqual(status, 0, msg='SSH Test failed: %s' % output)
> AssertionError: 255 != 0 : SSH Test failed: ssh: connect to host xxx.xxx.xxx.xxx port 22: Connection refused
> RESULTS - ssh.SSHTest.test_ssh: FAILED (8.09s)
> SUMMARY:
> core-image-sato-sdk () - Ran 71 tests in 43.593s
> core-image-sato-sdk - FAIL - Required tests failed (successes=2, skipped=68, failures=1, errors=0)
>
> There is an issue with mdev-busybox but i guess it is not related?
Thanks for testing this. mdev-busybox is actually tested only with
poky-tiny distro and core-image-minimal image (where it is used by
default), so if it doesn't regress there, it's fine.
Alex
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [oe-core][PATCH] Remove usage of /var/volatile/tmp
2023-03-25 18:38 ` Alexander Kanavin
@ 2023-03-25 19:19 ` Markus Volk
0 siblings, 0 replies; 17+ messages in thread
From: Markus Volk @ 2023-03-25 19:19 UTC (permalink / raw)
To: Alexander Kanavin; +Cc: Richard Purdie, openembedded-core
[-- Attachment #1: Type: text/plain, Size: 399 bytes --]
Am Sa, 25. Mär 2023 um 19:38:56 +0100 schrieb Alexander Kanavin
<alex.kanavin@gmail.com>:
> so if it doesn't regress there, it's fine.
core-image-minimal () - Ran 71 tests in 38.845s
core-image-minimal - OK - All required tests passed (successes=1,
skipped=70, failures=0, errors=0)
NOTE: Tasks Summary: Attempted 1159 tasks of which 1158 didn't need to
be rerun and all succeeded.
[-- Attachment #2: Type: text/html, Size: 598 bytes --]
^ permalink raw reply [flat|nested] 17+ messages in thread
end of thread, other threads:[~2023-03-26 0:43 UTC | newest]
Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-17 6:02 [oe-core][PATCH] Remove usage of /var/volatile/tmp Markus Volk
2023-03-17 6:04 ` Markus Volk
2023-03-17 7:34 ` Alexander Kanavin
2023-03-17 8:00 ` Richard Purdie
2023-03-17 8:18 ` Markus Volk
2023-03-17 11:53 ` Richard Purdie
2023-03-17 17:31 ` Markus Volk
2023-03-17 19:10 ` Alexander Kanavin
2023-03-22 19:00 ` f_l_k
2023-03-22 19:11 ` Alexander Kanavin
[not found] ` <9VVZRR.NLXPW4ISUM5R2@t-online.de>
2023-03-23 22:34 ` Richard Purdie
2023-03-24 17:34 ` Markus Volk
2023-03-24 19:53 ` Alexander Kanavin
2023-03-24 23:13 ` Markus Volk
2023-03-25 18:38 ` Alexander Kanavin
2023-03-25 19:19 ` Markus Volk
[not found] ` <174F6B63D17BDF87.25304@lists.openembedded.org>
2023-03-24 17:58 ` Markus Volk
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.