host-mkpasswd: new package

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>
This commit is contained in:
Thomas De Schampheleire
2013-08-07 20:01:51 +02:00
committed by Thomas Petazzoni
parent d1808f9037
commit 59e0692095
7 changed files with 734 additions and 12 deletions

View File

@@ -173,14 +173,6 @@ if grep -q ^BR2_PACKAGE_CLASSPATH=y $BUILDROOT_CONFIG ; then
done
fi
if grep -E '^BR2_TARGET_GENERIC_ROOT_PASSWD=".+"$' $BUILDROOT_CONFIG > /dev/null 2>&1; then
if ! which mkpasswd > /dev/null 2>&1; then
/bin/echo -e "\nYou need the 'mkpasswd' utility to set the root password\n"
/bin/echo -e "(in Debian/ubuntu, 'mkpasswd' provided by the whois package)\n"
exit 1
fi
fi
if grep -q ^BR2_HOSTARCH_NEEDS_IA32_LIBS=y $BUILDROOT_CONFIG ; then
if test ! -f /lib/ld-linux.so.2 ; then
/bin/echo -e "\nYour Buildroot configuration uses pre-built tools for the x86 architecture,"