Go to file
Trent Piepho 7e811708f3 package/skeleton-init-systemd: work around for /var/lib not populating
When using a RO root with systemd, it is intended that /var/lib should be
populated at boot time by tmpfiles system mirroring it from
/usr/share/factory/var/lib.

However, this will only happen if /var/lib does not already exist at the
time systemd-tmpfiles runs.  If it does exist, then tmpfiles will
(silently) skip it and do nothing.

It turns out /var/lib will exist, because some part of systemd creates
/var/lib/systemd/catalog on boot before tmpfiles runs.

The fix used here is to also create tmpfiles entries for the contents of
/var/lib/* and /var/lib/systemd/*.  This way, when those directories
already exist, the entire tree is not skipped and instead the
not-yet-existing contents of /var/lib and /var/lib/systemd will be still
be mirrored from the factory dir.

And if /var/lib/systemd, or a prefix of that, stops getting created and
does not exist, it'll still mirror properly.

It does cause some warnings from systemd:
systemd[1]: Starting Create Volatile Files and Directories...
systemd-tmpfiles[148]: [/etc/tmpfiles.d/var-factory.conf:7] Duplicate line for path "/var/lib/systemd", ignoring.
systemd-tmpfiles[148]: [/etc/tmpfiles.d/var-factory.conf:8] Duplicate line for path "/var/lib/systemd/coredump", ignoring.

But they can be ignored.

IMHO, I think a better solution would be for systemd-tmpfiles to gain a
"merge tree" operation that is like "C" but doesn't abort if the
destination exists, but rather merges the source into it.

Signed-off-by: Trent Piepho <tpiepho@impinj.com>
[yann.morin.1998@free.fr: slight rework of commit title]
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
Tested-by: Adam Duskett <aduskett@gmail.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2018-03-04 20:34:10 +01:00
arch arch: add Atom CPUs as Silvermont Architecture target 2018-01-01 13:05:16 +01:00
board board/qemu/ppc64le-pseries: make Qemu command similar to ppc64-pseries 2018-03-03 17:20:16 +01:00
boot uboot: ensure host includes are searched before system default includes 2018-03-02 00:12:43 +01:00
configs qemu_x86_64_defconfig: fix kernel header version after bump to 4.15 2018-03-03 08:48:14 +01:00
docs Update for 2018.02-rc3 2018-02-27 22:58:57 +01:00
fs fs/cpio/init: preserve arguments 2018-02-26 20:49:40 +01:00
linux linux: bump default to version 4.15.7 2018-02-28 14:54:10 +01:00
package package/skeleton-init-systemd: work around for /var/lib not populating 2018-03-04 20:34:10 +01:00
support core: drop no-longer used C.UTF-8 locale option 2018-03-04 11:59:16 +01:00
system system: only expose getty options for busybox and sysvinit 2018-01-12 22:07:59 +01:00
toolchain toolchain: add 4.15.x choice for headers 2018-01-28 23:48:21 +01:00
utils utils/scanpypi: fix 'downloas' typo in error message 2018-03-01 17:14:01 +01:00
.defconfig arch: remove support for sh64 2016-09-08 22:15:15 +02:00
.flake8 .flake8: add config file for Python code style 2017-10-06 19:05:18 +02:00
.gitignore
.gitlab-ci.yml support/testing: fix job check-gitlab-ci.yml 2018-02-13 23:12:00 +01:00
.gitlab-ci.yml.in gitlab-ci: use new, tagged image 2018-02-05 22:38:30 +01:00
CHANGES Update for 2018.02-rc3 2018-02-27 22:58:57 +01:00
Config.in core: drop no-longer used C.UTF-8 locale option 2018-03-04 11:59:16 +01:00
Config.in.legacy linux-headers: drop old unsupported 3.x versions 2018-02-04 00:02:35 +01:00
COPYING
DEVELOPERS DEVELOPERS: Update email address 2018-02-27 20:16:33 +01:00
Makefile core: find a host UTF-8 locale 2018-03-04 11:59:03 +01:00
Makefile.legacy Remove BR2_DEPRECATED 2016-10-15 23:14:45 +02:00
README

Buildroot is a simple, efficient and easy-to-use tool to generate embedded
Linux systems through cross-compilation.

The documentation can be found in docs/manual. You can generate a text
document with 'make manual-text' and read output/docs/manual/manual.text.
Online documentation can be found at http://buildroot.org/docs.html

To build and use the buildroot stuff, do the following:

1) run 'make menuconfig'
2) select the target architecture and the packages you wish to compile
3) run 'make'
4) wait while it compiles
5) find the kernel, bootloader, root filesystem, etc. in output/images

You do not need to be root to build or run buildroot.  Have fun!

Buildroot comes with a basic configuration for a number of boards. Run
'make list-defconfigs' to view the list of provided configurations.

Please feed suggestions, bug reports, insults, and bribes back to the
buildroot mailing list: buildroot@buildroot.org
You can also find us on #buildroot on Freenode IRC.

If you would like to contribute patches, please read
https://buildroot.org/manual.html#submitting-patches