mirror of
https://git.busybox.net/buildroot.git
synced 2024-12-14 07:43:32 +08:00
59e0692095
Since the addition of root password setting support in buildroot, there have been a few bug reports in this area ([1], [2]). In these cases, the system mkpasswd did either not work, or did not provide the options we expect, like -m <method>. This patch adds a mkpasswd host package, based on the sources from whois. When a non-empty root password is set, this package is used as a dependency. Signed-off-by: Thomas De Schampheleire <thomas.de.schampheleire@gmail.com> [1] http://lists.busybox.net/pipermail/buildroot/2013-July/075771.html [2] http://lists.busybox.net/pipermail/buildroot/2013-July/075869.html [Thomas P: use $(INSTALL) instead of install, put -lcrypt at the end of build command line to allow gcc to find the crypt() function in lcrypt.] Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
26 lines
727 B
Makefile
26 lines
727 B
Makefile
################################################################################
|
|
#
|
|
# mkpasswd
|
|
#
|
|
################################################################################
|
|
|
|
# source included in buildroot, taken from
|
|
# https://github.com/rfc1036/whois/blob/master/
|
|
# at revision 5a0f08500fa51608b6d3b73ee338be38c692eadb
|
|
HOST_MKPASSWD_SOURCE =
|
|
HOST_MKPASSWD_LICENSE = GPLv2+
|
|
|
|
define HOST_MKPASSWD_BUILD_CMDS
|
|
$(HOSTCC) $(HOST_CFLAGS) $(HOST_LDFLAGS) \
|
|
package/mkpasswd/mkpasswd.c package/mkpasswd/utils.c \
|
|
-o $(@D)/mkpasswd -lcrypt
|
|
endef
|
|
|
|
define HOST_MKPASSWD_INSTALL_CMDS
|
|
$(INSTALL) -D -m 755 $(@D)/mkpasswd $(HOST_DIR)/usr/bin/mkpasswd
|
|
endef
|
|
|
|
$(eval $(host-generic-package))
|
|
|
|
MKPASSWD = $(HOST_DIR)/usr/bin/mkpasswd
|