]> rtime.felk.cvut.cz Git - coffee/buildroot.git/commitdiff
package/skeleton: drop dependency on host-mkpasswd
authorYann E. MORIN <yann.morin.1998@free.fr>
Tue, 25 Jul 2017 21:14:23 +0000 (23:14 +0200)
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Mon, 31 Jul 2017 21:56:57 +0000 (23:56 +0200)
Setting the root pasword is done in a target-finalize hook, so we do not
need to enforce a dependency from the skeleton onto host-mkpasswd.

Dropping that dependency will simplify making skeleton a virtual
package (in up-coming changes).

Instead, it is now selected as any other package. As such, it is
guaranteed to be built before target-finalize.

This however introduces a slight change in behaviour: previously,
host-mkpasswd would only be built if we needed to hash the root password
from its plain-text value. Now, host-mkpasswd is always built as soon as
the root password is non-empty, even if already pre-hashed.

Since host-mkpasswd is a really tiny weeny package bundled in Buildroot,
with only two C files, built as a single unit with a single gcc call,
the overhead is really minimal. Compared to the simplifications this
will allow in the skeleton packages (plural: common, sysv, systemd,
custom) to come, this overhead is acceptable.

Yet another simplification, even if small, to ease providing multiple
skeletons.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Reviewed-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
package/skeleton/skeleton.mk
system/Config.in

index f5106f744964e2be9dc81133b244e1041c5389c0..41da1778a6fb0899a2058d990c87df69c9536322 100644 (file)
@@ -120,7 +120,6 @@ SKELETON_ROOT_PASSWORD =
 else ifneq ($(filter $$1$$% $$5$$% $$6$$%,$(SKELETON_TARGET_GENERIC_ROOT_PASSWD)),)
 SKELETON_ROOT_PASSWORD = '$(SKELETON_TARGET_GENERIC_ROOT_PASSWD)'
 else
-SKELETON_DEPENDENCIES += host-mkpasswd
 # This variable will only be evaluated in the finalize stage, so we can
 # be sure that host-mkpasswd will have already been built by that time.
 SKELETON_ROOT_PASSWORD = "`$(MKPASSWD) -m "$(SKELETON_TARGET_GENERIC_PASSWD_METHOD)" "$(SKELETON_TARGET_GENERIC_ROOT_PASSWD)"`"
index 828df4217ef1c27550ee95bd8037d539900d0ddb..1ee76e8e472493a0f70ed986c41e52a445304e3f 100644 (file)
@@ -218,6 +218,7 @@ config BR2_ROOTFS_MERGED_USR
 config BR2_TARGET_ENABLE_ROOT_LOGIN
        bool "Enable root login with password"
        default y
+       select BR2_PACKAGE_HOST_MKPASSWD if BR2_TARGET_GENERIC_ROOT_PASSWD != ""
        help
          Allow root to log in with a password.