Am Montag, 18. April 2022 schrieb Tim Hammer : > On Wed, Jan 12, 2022 at 11:10:20AM +0100, Norbert Lange wrote: > > We changed the skeletons in bf01e51f3c, so that var/lock > > points to run/lock. This resulted in build failures as > > some packages want to work with these paths. > > > > - Create run/lock, the run directory will be purged > > later anyway (since 5e78e7e97d). > > Yes, run/lock is removed later (see > https://lore.kernel.org/buildroot/20200605224858. > 12870-2-nolange79@gmail.com/ > and > https://lore.kernel.org/buildroot/20220319190531. > 975B183CB8@busybox.osuosl.org/). > > However, the soft link in var/ is not. It ends up in the rootfs for the > target > and can cause problems later. > > Is there a reason the link created by skeleton was not cleaned up? > > Yeah, it's supposed to be there in the final roots. The run/lock directory is just *in the skeleton* so you don't have a broken symlink *during building with buildroot*. I will be honest, I do not understand the full process and why the items > created by > the skeleton package are not just left in place... The running system will mount a tmpfs onto /run (and most likely /tmp) and will create /run/lock anew each bootup Means all content on you image is - irrelevant - prone to leaking info from the system where you built the rootfs. Norbert > .Tim > Tim D. Hammer > tim.hammer@orolia.com > > > > - for init == systemd, create the var/lock symlink early > > to prevent packages creating this path as directory. > > > > Signed-off-by: Norbert Lange > > --- > > package/skeleton-init-systemd/skeleton-init-systemd.mk | 2 ++ > > system/skeleton/run/{ => lock}/.empty | 0 > > 2 files changed, 2 insertions(+) > > rename system/skeleton/run/{ => lock}/.empty (100%) > > > > diff --git a/package/skeleton-init-systemd/skeleton-init-systemd.mk > b/package/skeleton-init-systemd/skeleton-init-sys>> index > 1e212cc2f7..795a171809 100644 > > --- a/package/skeleton-init-systemd/skeleton-init-systemd.mk > > +++ b/package/skeleton-init-systemd/skeleton-init-systemd.mk > > @@ -62,6 +62,8 @@ define SKELETON_INIT_SYSTEMD_INSTALL_TARGET_CMDS > > mkdir -p $(TARGET_DIR)/srv > > mkdir -p $(TARGET_DIR)/var > > ln -s ../run $(TARGET_DIR)/var/run > > + # prevent install scripts to create var/lock as directory > > + ln -s ../run/lock $(TARGET_DIR)/var/lock > > install -D -m644 $(SKELETON_INIT_SYSTEMD_PKGDIR)/legacy.conf > $(TARGET_DIR)/usr/lib/tmpfiles.d/legacy.conf > > $(SKELETON_INIT_SYSTEMD_ROOT_RO_OR_RW) > > endef > > diff --git a/system/skeleton/run/.empty b/system/skeleton/run/lock/. > empty > > similarity index 100% > > rename from system/skeleton/run/.empty > > rename to system/skeleton/run/lock/.empty > > -- > > 2.34.1 > > > > _______________________________________________ > > buildroot mailing list > > buildroot@buildroot.org > > https://lists.buildroot.org/mailman/listinfo/buildroot > >