* [PATCH] meta-systemd: Introduce a create-volatile to create tmp directories
@ 2012-09-14 16:59 Holger Hans Peter Freyther
2012-09-15 9:26 ` Koen Kooi
2013-01-22 15:02 ` Peter A. Bigot
0 siblings, 2 replies; 5+ messages in thread
From: Holger Hans Peter Freyther @ 2012-09-14 16:59 UTC (permalink / raw)
To: openembedded-devel; +Cc: Holger Hans Peter Freyther
From: Holger Hans Peter Freyther <zecke@selfish.org>
The base-files create symlinks from /var/{log,tmp,lock,cache,run} to
the /var/volatile. The directories are created by sysv initscripts.
Use the systemd-tmpfiles to create the directories. One needs to be
careful with the naming of the file as systemd first collects all
*.conf files, sorts them by name and is parsing them then. Make sure
the new file is parsed before the systemd.conf.
---
.../systemd/systemd/create-volatile.conf | 11 +++++++++++
meta-systemd/recipes-core/systemd/systemd_git.bb | 4 +++-
2 files changed, 14 insertions(+), 1 deletion(-)
create mode 100644 meta-systemd/recipes-core/systemd/systemd/create-volatile.conf
diff --git a/meta-systemd/recipes-core/systemd/systemd/create-volatile.conf b/meta-systemd/recipes-core/systemd/systemd/create-volatile.conf
new file mode 100644
index 0000000..afcf8c3
--- /dev/null
+++ b/meta-systemd/recipes-core/systemd/systemd/create-volatile.conf
@@ -0,0 +1,11 @@
+# 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
+# inside /var/log.
+
+
+d /var/volatile/cache - - - -
+d /var/volatile/log - - - -
+d /var/volatile/lock - - - -
+d /var/volatile/run - - - -
+d /var/volatile/tmp - - - -
+
diff --git a/meta-systemd/recipes-core/systemd/systemd_git.bb b/meta-systemd/recipes-core/systemd/systemd_git.bb
index 09bc635..2b245c0 100644
--- a/meta-systemd/recipes-core/systemd/systemd_git.bb
+++ b/meta-systemd/recipes-core/systemd/systemd_git.bb
@@ -19,7 +19,7 @@ inherit gitpkgv
PKGV = "v${GITPKGVTAG}"
PV = "git"
-PR = "r6"
+PR = "r7"
inherit useradd pkgconfig autotools perlnative
@@ -31,6 +31,7 @@ SRC_URI = "git://anongit.freedesktop.org/systemd/systemd;protocol=git \
file://touchscreen.rules \
file://modprobe.rules \
file://var-run.conf \
+ file://create-volatile.conf \
${UCLIBCPATCHES} \
"
UCLIBCPATCHES = ""
@@ -97,6 +98,7 @@ 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}/create-volatile.conf ${D}${sysconfdir}/tmpfiles.d/
}
python populate_packages_prepend (){
--
1.7.9.5
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] meta-systemd: Introduce a create-volatile to create tmp directories
2012-09-14 16:59 [PATCH] meta-systemd: Introduce a create-volatile to create tmp directories Holger Hans Peter Freyther
@ 2012-09-15 9:26 ` Koen Kooi
2012-09-15 13:20 ` Holger Hans Peter Freyther
2013-01-22 15:02 ` Peter A. Bigot
1 sibling, 1 reply; 5+ messages in thread
From: Koen Kooi @ 2012-09-15 9:26 UTC (permalink / raw)
To: openembedded-devel
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Op 14-09-12 18:59, Holger Hans Peter Freyther schreef:
> From: Holger Hans Peter Freyther <zecke@selfish.org>
>
> The base-files create symlinks from /var/{log,tmp,lock,cache,run} to the
> /var/volatile. The directories are created by sysv initscripts. Use the
> systemd-tmpfiles to create the directories. One needs to be careful with
> the naming of the file as systemd first collects all *.conf files, sorts
> them by name and is parsing them then. Make sure the new file is parsed
> before the systemd.conf.
I'm not sure this is the right place to fix it, I'd prefer a base files
bbappend and an fs-perms.txt for this. You know, like angstrom does :)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (Darwin)
Comment: GPGTools - http://gpgtools.org
iD8DBQFQVEnLMkyGM64RGpERAnhuAJ9jXlRDx9WddJ1zMaByOElCh2dUPQCgqedT
E1bm2zqcw4woino/cCXtQfM=
=CAHE
-----END PGP SIGNATURE-----
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] meta-systemd: Introduce a create-volatile to create tmp directories
2012-09-15 9:26 ` Koen Kooi
@ 2012-09-15 13:20 ` Holger Hans Peter Freyther
0 siblings, 0 replies; 5+ messages in thread
From: Holger Hans Peter Freyther @ 2012-09-15 13:20 UTC (permalink / raw)
To: openembedded-devel
On Sat, Sep 15, 2012 at 11:26:35AM +0200, Koen Kooi wrote:
> Op 14-09-12 18:59, Holger Hans Peter Freyther schreef:
> > From: Holger Hans Peter Freyther <zecke@selfish.org>
> >
>
> I'm not sure this is the right place to fix it, I'd prefer a base files
> bbappend and an fs-perms.txt for this. You know, like angstrom does :)
Hi,
I will have to read about about fs-perms.txt but at least recent oe-core
started to assume to that /var/log is volatile storage and changed the syslog
configuration. The other option is to change the syslog*.conf of oe-core
to revert to using a in-memory storage.
The other issue is that with a modified base-file it is impossible to build
sysvinit and systemd images from the same build directory.
holger
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: meta-systemd: Introduce a create-volatile to create tmp directories
2012-09-14 16:59 [PATCH] meta-systemd: Introduce a create-volatile to create tmp directories Holger Hans Peter Freyther
2012-09-15 9:26 ` Koen Kooi
@ 2013-01-22 15:02 ` Peter A. Bigot
[not found] ` <20130123195059.GG2634@xiaoyu.lan>
1 sibling, 1 reply; 5+ messages in thread
From: Peter A. Bigot @ 2013-01-22 15:02 UTC (permalink / raw)
To: Holger Freyther; +Cc: openembedded-devel, Holger Hans Peter Freyther
On 09/14/2012 11:59 AM, Holger Freyther wrote:
> From: Holger Hans Peter Freyther <zecke@selfish.org>
>
> The base-files create symlinks from /var/{log,tmp,lock,cache,run} to
> the /var/volatile. The directories are created by sysv initscripts.
> Use the systemd-tmpfiles to create the directories. One needs to be
> careful with the naming of the file as systemd first collects all
> *.conf files, sorts them by name and is parsing them then. Make sure
> the new file is parsed before the systemd.conf.
(This is http://patches.openembedded.org/patch/36551/ which has been
archived, but AFAIK I can't reply to the full context because I was
unsubscribed when the discussion occurred:)
Apologies if my recursive grep skills have failed, but it appears this
is still not globally resolved for images that use systemd as the init
manager.
meta-gumstix has this patch and it caused problems with attempts to use
systemd_v189 in denzil since it's hidden inside a bbappend to
systemd_git. So I'm hoping to identify a more forward-looking
solution. Is there a plan to fix this issue globally? Koen preferred
using base_files+fs_perms as in Angstrom, but Holger was concerned this
would prevent sharing base_files between sysvinit and systemd builds.
Peter
>
> ---
> .../systemd/systemd/create-volatile.conf | 11 +++++++++++
> meta-systemd/recipes-core/systemd/systemd_git.bb | 4 +++-
> 2 files changed, 14 insertions(+), 1 deletion(-)
> create mode 100644 meta-systemd/recipes-core/systemd/systemd/create-volatile.conf
>
> diff --git a/meta-systemd/recipes-core/systemd/systemd/create-volatile.conf b/meta-systemd/recipes-core/systemd/systemd/create-volatile.conf
> new file mode 100644
> index 0000000..afcf8c3
> --- /dev/null
> +++ b/meta-systemd/recipes-core/systemd/systemd/create-volatile.conf
> @@ -0,0 +1,11 @@
> +# 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
> +# inside /var/log.
> +
> +
> +d /var/volatile/cache - - - -
> +d /var/volatile/log - - - -
> +d /var/volatile/lock - - - -
> +d /var/volatile/run - - - -
> +d /var/volatile/tmp - - - -
> +
> diff --git a/meta-systemd/recipes-core/systemd/systemd_git.bb b/meta-systemd/recipes-core/systemd/systemd_git.bb
> index 09bc635..2b245c0 100644
> --- a/meta-systemd/recipes-core/systemd/systemd_git.bb
> +++ b/meta-systemd/recipes-core/systemd/systemd_git.bb
> @@ -19,7 +19,7 @@ inherit gitpkgv
> PKGV = "v${GITPKGVTAG}"
>
> PV = "git"
> -PR = "r6"
> +PR = "r7"
>
> inherit useradd pkgconfig autotools perlnative
>
> @@ -31,6 +31,7 @@ SRC_URI = "git://anongit.freedesktop.org/systemd/systemd;protocol=git \
> file://touchscreen.rules \
> file://modprobe.rules \
> file://var-run.conf \
> + file://create-volatile.conf \
> ${UCLIBCPATCHES} \
> "
> UCLIBCPATCHES = ""
> @@ -97,6 +98,7 @@ 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}/create-volatile.conf ${D}${sysconfdir}/tmpfiles.d/
> }
>
> python populate_packages_prepend (){
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: meta-systemd: Introduce a create-volatile to create tmp directories
[not found] ` <20130123195059.GG2634@xiaoyu.lan>
@ 2013-01-23 20:44 ` Peter A. Bigot
0 siblings, 0 replies; 5+ messages in thread
From: Peter A. Bigot @ 2013-01-23 20:44 UTC (permalink / raw)
To: Holger Hans Peter Freyther; +Cc: openembedded-devel
On 01/23/2013 01:50 PM, Holger Hans Peter Freyther wrote:
> On Tue, Jan 22, 2013 at 09:02:12AM -0600, Peter A. Bigot wrote:
>
>> meta-gumstix has this patch and it caused problems with attempts to
>> use systemd_v189 in denzil since it's hidden inside a bbappend to
>> systemd_git. So I'm hoping to identify a more forward-looking
>> solution. Is there a plan to fix this issue globally? Koen
>> preferred using base_files+fs_perms as in Angstrom, but Holger was
>> concerned this would prevent sharing base_files between sysvinit and
>> systemd builds.
> My concern is still there but my approach has some downsides as well. The
> presence of /var/log on tmpfs is fooling the journald to use more memory
> than is healthy. I solved this by disabling the auto-detect in the journald
> configuration.
>
> What is the issue you have with meta-gumstix?
Mostly that I wasn't aware of the patch it added to systemd_git that was
responsible for creating such a critical part of a functioning Poky
installation. I'd had things working with systemd_git in the denzil
branch as of 21Dec, but when that recipe got reverted around 24Dec I
switched to systemd_v189 assuming it was compatible. But things broke
in a very unexpected way because I lost the meta-gumstix systemd_git
bbappend that created the volatile hierarchy.
I now understand that it was natural to copy it into systemd because
sysvinit is responsible for this functionality when it's the init
manager. Having to put a bbappend in every variant systemd recipe in
every distro/BSP/vendor image layer seems cumbersome. Since my email
I'm seeing discussion on oe-core on how to integrate systemd in
Yocto/Poky that touches on managing volatiles, so I'll wait, or
follow-up there if necessary.
Peter
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2013-01-23 21:02 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-09-14 16:59 [PATCH] meta-systemd: Introduce a create-volatile to create tmp directories Holger Hans Peter Freyther
2012-09-15 9:26 ` Koen Kooi
2012-09-15 13:20 ` Holger Hans Peter Freyther
2013-01-22 15:02 ` Peter A. Bigot
[not found] ` <20130123195059.GG2634@xiaoyu.lan>
2013-01-23 20:44 ` Peter A. Bigot
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.