Skip to contentSkip to conversation

system/skeleton: provide run/lock directory

PATCH Applied Norbert Lange 2 participants 3 messages Jan 12, 2022

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 system/skeleton: provide run/lock directory

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).

- for init == systemd, create the var/lock symlink early
to prevent packages creating this path as directory.

---
 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%)
package/skeleton-init-systemd/skeleton-init-systemd.mk +2 -0
index 1e212cc2f7..795a171809 100644
@@ -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
system/skeleton/run/lock/.empty renamed from system/skeleton/run/.empty +0 -0
similarity index 100%
rename from system/skeleton/run/.empty
rename to system/skeleton/run/lock/.empty
Signature · 6 lines
2.34.1

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#1 lore raw

Am Mi., 12. Jan. 2022 um 11:10 Uhr schrieb Norbert Lange <[email protected]>:

Quoted 35 lines

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.

(quoted diff) +0 -2
-   Create run/lock, the run directory will be purged
    later anyway (since 5e78e7e97d).
-   for init == systemd, create the var/lock symlink early
    to prevent packages creating this path as directory.
---
 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%)
package/skeleton-init-systemd/skeleton-init-systemd.mk +2 -0
index 1e212cc2f7..795a171809 100644
@@ -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
system/skeleton/run/lock/.empty renamed from system/skeleton/run/.empty +0 -1
similarity index 100%
rename from system/skeleton/run/.empty
rename to system/skeleton/run/lock/.empty
--
Quoted 2 lines

2.34.1

Fixes: http://autobuild.buildroot.net/results/3ee/3ee8f9ee55e51af38e9dbe7b9840c9589d88a30f
(and alot more containing the vtun package)

For someone not fluent with mailing list workflows, and working with a couple projects,
it might help having a few example commit messages (-templates) in the docs. ie for respins, bug fixes, versioning (potentially of series)

Norbert
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot

#2 lore raw
Quoted 32 lines · Norbert Lange

Am Mi., 12. Jan. 2022 um 11:10 Uhr schrieb Norbert Lange <[email protected]>:

Quoted 31 lines

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.

(quoted diff) +0 -2
-   Create run/lock, the run directory will be purged
     later anyway (since 5e78e7e97d).
-   for init == systemd, create the var/lock symlink early
     to prevent packages creating this path as directory.
---
  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%)

package/skeleton-init-systemd/skeleton-init-systemd.mk +2 -0
index 1e212cc2f7..795a171809 100644
@@ -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
system/skeleton/run/lock/.empty renamed from system/skeleton/run/.empty +0 -0
Quoted 8 lines
Quoted 6 lines

similarity index 100%
rename from system/skeleton/run/.empty
rename to system/skeleton/run/lock/.empty
--
2.34.1

Applied to master with that added, thanks.

Quoted 6 lines

(and alot more containing the vtun package)

For someone not fluent with mailing list workflows, and working with a couple projects,
it might help having a few example commit messages (-templates) in the docs. ie for respins, bug fixes, versioning (potentially of series)

Absolutely! I'm waiting for a really nice example to turn up on the list and
steal that for the documentation.

Regards,
Arnout

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot