skeleton: Rename skeleton-systemd to skeleton-init-systemd
authorCam Hutchison <camh@xdna.net>
Sun, 13 Aug 2017 21:21:10 +0000 (07:21 +1000)
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Mon, 14 Aug 2017 19:52:44 +0000 (21:52 +0200)
The skeletons are based on the selection of BR2_INIT_*, so add init- to
the package name to make this clearer. While skeleton-systemd is
relatively clear, skeleton-common and skeleton-none are less clear on
their relationship to BR2_INIT_*. So rename skeleton-systemd to conform
to clearer pattern.

Signed-off-by: Cam Hutchison <camh@xdna.net>
Acked-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
package/Config.in
package/skeleton-init-systemd/Config.in [new file with mode: 0644]
package/skeleton-init-systemd/skeleton-init-systemd.mk [new file with mode: 0644]
package/skeleton-systemd/Config.in [deleted file]
package/skeleton-systemd/skeleton-systemd.mk [deleted file]
system/Config.in

index b48eac65cab6134ce16a03669ab242ddba7d2784..4bdfeeaedda51bbe368ff461b14a508a479ec37d 100644 (file)
@@ -5,7 +5,7 @@ menu "Target packages"
        source "package/skeleton-common/Config.in"
        source "package/skeleton-custom/Config.in"
        source "package/skeleton-init-none/Config.in"
-       source "package/skeleton-systemd/Config.in"
+       source "package/skeleton-init-systemd/Config.in"
        source "package/skeleton-sysv/Config.in"
 
 menu "Audio and video applications"
diff --git a/package/skeleton-init-systemd/Config.in b/package/skeleton-init-systemd/Config.in
new file mode 100644 (file)
index 0000000..2d8845c
--- /dev/null
@@ -0,0 +1,7 @@
+config BR2_PACKAGE_SKELETON_INIT_SYSTEMD
+       bool
+       select BR2_PACKAGE_HAS_SKELETON
+       select BR2_PACKAGE_SKELETON_COMMON
+
+config BR2_PACKAGE_PROVIDES_SKELETON
+       default "skeleton-init-systemd" if BR2_PACKAGE_SKELETON_INIT_SYSTEMD
diff --git a/package/skeleton-init-systemd/skeleton-init-systemd.mk b/package/skeleton-init-systemd/skeleton-init-systemd.mk
new file mode 100644 (file)
index 0000000..b2a6e26
--- /dev/null
@@ -0,0 +1,71 @@
+################################################################################
+#
+# skeleton-init-systemd
+#
+################################################################################
+
+# The skeleton can't depend on the toolchain, since all packages depends on the
+# skeleton and the toolchain is a target package, as is skeleton.
+# Hence, skeleton would depends on the toolchain and the toolchain would depend
+# on skeleton.
+SKELETON_INIT_SYSTEMD_ADD_TOOLCHAIN_DEPENDENCY = NO
+SKELETON_INIT_SYSTEMD_ADD_SKELETON_DEPENDENCY = NO
+
+SKELETON_INIT_SYSTEMD_DEPENDENCIES = skeleton-common
+
+SKELETON_INIT_SYSTEMD_PROVIDES = skeleton
+
+ifeq ($(BR2_TARGET_GENERIC_REMOUNT_ROOTFS_RW),y)
+
+define SKELETON_INIT_SYSTEMD_ROOT_RO_OR_RW
+       echo "/dev/root / auto rw 0 1" >$(TARGET_DIR)/etc/fstab
+       mkdir -p $(TARGET_DIR)/var
+endef
+
+else
+
+# On a R/O rootfs, /var is a tmpfs filesystem. So, at build time, we
+# redirect /var to the "factory settings" location. Just before the
+# filesystem gets created, the /var symlink will be replaced with
+# a real (but empty) directory, and the "factory files" will be copied
+# back there by the tmpfiles.d mechanism.
+define SKELETON_INIT_SYSTEMD_ROOT_RO_OR_RW
+       mkdir -p $(TARGET_DIR)/etc/systemd/tmpfiles.d
+       mkdir -p $(TARGET_DIR)/usr/share/factory/var
+       ln -s usr/share/factory/var $(TARGET_DIR)/var
+       echo "/dev/root / auto ro 0 1" >$(TARGET_DIR)/etc/fstab
+       echo "tmpfs /var tmpfs mode=1777 0 0" >>$(TARGET_DIR)/etc/fstab
+endef
+
+define SKELETON_INIT_SYSTEMD_PRE_ROOTFS_VAR
+       rm -f $(TARGET_DIR)/var
+       mkdir $(TARGET_DIR)/var
+       for i in $(TARGET_DIR)/usr/share/factory/var/*; do \
+               j="$${i#$(TARGET_DIR)/usr/share/factory}"; \
+               if [ -L "$${i}" ]; then \
+                       printf "L+! %s - - - - %s\n" \
+                               "$${j}" "../usr/share/factory/$${j}" \
+                       || exit 1; \
+               else \
+                       printf "C! %s - - - -\n" "$${j}" \
+                       || exit 1; \
+               fi; \
+       done >$(TARGET_DIR)/etc/tmpfiles.d/var-factory.conf
+endef
+SKELETON_INIT_SYSTEMD_ROOTFS_PRE_CMD_HOOKS += SKELETON_INIT_SYSTEMD_PRE_ROOTFS_VAR
+
+define SKELETON_INIT_SYSTEMD_POST_ROOTFS_VAR
+       rm -rf $(TARGET_DIR)/var
+       ln -s usr/share/factory/var $(TARGET_DIR)/var
+endef
+SKELETON_INIT_SYSTEMD_ROOTFS_POST_CMD_HOOKS += SKELETON_INIT_SYSTEMD_POST_ROOTFS_VAR
+
+endif
+
+define SKELETON_INIT_SYSTEMD_INSTALL_TARGET_CMDS
+       mkdir -p $(TARGET_DIR)/home
+       mkdir -p $(TARGET_DIR)/srv
+       $(SKELETON_INIT_SYSTEMD_ROOT_RO_OR_RW)
+endef
+
+$(eval $(generic-package))
diff --git a/package/skeleton-systemd/Config.in b/package/skeleton-systemd/Config.in
deleted file mode 100644 (file)
index c507264..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-config BR2_PACKAGE_SKELETON_SYSTEMD
-       bool
-       select BR2_PACKAGE_HAS_SKELETON
-       select BR2_PACKAGE_SKELETON_COMMON
-
-config BR2_PACKAGE_PROVIDES_SKELETON
-       default "skeleton-systemd" if BR2_PACKAGE_SKELETON_SYSTEMD
diff --git a/package/skeleton-systemd/skeleton-systemd.mk b/package/skeleton-systemd/skeleton-systemd.mk
deleted file mode 100644 (file)
index 860ebea..0000000
+++ /dev/null
@@ -1,71 +0,0 @@
-################################################################################
-#
-# skeleton-systemd
-#
-################################################################################
-
-# The skeleton can't depend on the toolchain, since all packages depends on the
-# skeleton and the toolchain is a target package, as is skeleton.
-# Hence, skeleton would depends on the toolchain and the toolchain would depend
-# on skeleton.
-SKELETON_SYSTEMD_ADD_TOOLCHAIN_DEPENDENCY = NO
-SKELETON_SYSTEMD_ADD_SKELETON_DEPENDENCY = NO
-
-SKELETON_SYSTEMD_DEPENDENCIES = skeleton-common
-
-SKELETON_SYSTEMD_PROVIDES = skeleton
-
-ifeq ($(BR2_TARGET_GENERIC_REMOUNT_ROOTFS_RW),y)
-
-define SKELETON_SYSTEMD_ROOT_RO_OR_RW
-       echo "/dev/root / auto rw 0 1" >$(TARGET_DIR)/etc/fstab
-       mkdir -p $(TARGET_DIR)/var
-endef
-
-else
-
-# On a R/O rootfs, /var is a tmpfs filesystem. So, at build time, we
-# redirect /var to the "factory settings" location. Just before the
-# filesystem gets created, the /var symlink will be replaced with
-# a real (but empty) directory, and the "factory files" will be copied
-# back there by the tmpfiles.d mechanism.
-define SKELETON_SYSTEMD_ROOT_RO_OR_RW
-       mkdir -p $(TARGET_DIR)/etc/systemd/tmpfiles.d
-       mkdir -p $(TARGET_DIR)/usr/share/factory/var
-       ln -s usr/share/factory/var $(TARGET_DIR)/var
-       echo "/dev/root / auto ro 0 1" >$(TARGET_DIR)/etc/fstab
-       echo "tmpfs /var tmpfs mode=1777 0 0" >>$(TARGET_DIR)/etc/fstab
-endef
-
-define SKELETON_SYSTEMD_PRE_ROOTFS_VAR
-       rm -f $(TARGET_DIR)/var
-       mkdir $(TARGET_DIR)/var
-       for i in $(TARGET_DIR)/usr/share/factory/var/*; do \
-               j="$${i#$(TARGET_DIR)/usr/share/factory}"; \
-               if [ -L "$${i}" ]; then \
-                       printf "L+! %s - - - - %s\n" \
-                               "$${j}" "../usr/share/factory/$${j}" \
-                       || exit 1; \
-               else \
-                       printf "C! %s - - - -\n" "$${j}" \
-                       || exit 1; \
-               fi; \
-       done >$(TARGET_DIR)/etc/tmpfiles.d/var-factory.conf
-endef
-SKELETON_SYSTEMD_ROOTFS_PRE_CMD_HOOKS += SKELETON_SYSTEMD_PRE_ROOTFS_VAR
-
-define SKELETON_SYSTEMD_POST_ROOTFS_VAR
-       rm -rf $(TARGET_DIR)/var
-       ln -s usr/share/factory/var $(TARGET_DIR)/var
-endef
-SKELETON_SYSTEMD_ROOTFS_POST_CMD_HOOKS += SKELETON_SYSTEMD_POST_ROOTFS_VAR
-
-endif
-
-define SKELETON_SYSTEMD_INSTALL_TARGET_CMDS
-       mkdir -p $(TARGET_DIR)/home
-       mkdir -p $(TARGET_DIR)/srv
-       $(SKELETON_SYSTEMD_ROOT_RO_OR_RW)
-endef
-
-$(eval $(generic-package))
index 45326f09859af28184b8e7d6b38ad939c85f57a2..cbde4118956a927070e2401311ef6ce8b5e0e471 100644 (file)
@@ -11,7 +11,7 @@ config BR2_ROOTFS_SKELETON_DEFAULT
        bool "default target skeleton"
        select BR2_PACKAGE_SKELETON_SYSV if BR2_INIT_SYSV
        select BR2_PACKAGE_SKELETON_SYSV if BR2_INIT_BUSYBOX
-       select BR2_PACKAGE_SKELETON_SYSTEMD if BR2_INIT_SYSTEMD
+       select BR2_PACKAGE_SKELETON_INIT_SYSTEMD if BR2_INIT_SYSTEMD
        select BR2_PACKAGE_SKELETON_INIT_NONE if BR2_INIT_NONE
        help
          Use default target skeleton