From 15c151833a1477d95dfbf0fbea34652089bf0876 Mon Sep 17 00:00:00 2001 From: Hugo Villeneuve Date: Sat, 10 Aug 2013 21:35:05 -0400 Subject: [PATCH] Add shadow to stage1 for login command --- TODO | 2 ++ stage1/hv-install-2 | 7 ++++++- stage1/packages-update | 1 + stage1/pkg/shadow | 17 +++++++++++++++++ stage2/packages-update | 3 ++- 5 files changed, 28 insertions(+), 2 deletions(-) create mode 100644 stage1/pkg/shadow diff --git a/TODO b/TODO index 2654d09..a3b2360 100644 --- a/TODO +++ b/TODO @@ -1,6 +1,8 @@ TODO +-Create patch for shadow to disable group program and its man page + -Dans le fichier packages-list, utiliser un array pour définir le nom du module et l'hyperlien pour le télécharger: BASH[0]=bash-3.0.2 diff --git a/stage1/hv-install-2 b/stage1/hv-install-2 index dace5fb..8a4da91 100755 --- a/stage1/hv-install-2 +++ b/stage1/hv-install-2 @@ -60,8 +60,13 @@ ipkg ${NANO} "--enable-color --enable-multibuffer" PKG_CONFIG=true \ ipkg ${UTIL_LINUX} "\ --exec-prefix=/tools \ - --enable-login-utils \ + --disable-login \ + --disable-sulogin \ + --disable-su \ --disable-makeinstall-chown" +ipkg ${SHADOW} "\ + --sysconfdir=/etc \ + --cache-file=config.cache" ipkg ${E2FSPROGS} ipkg -m noac ${SYSVINIT} ipkg ${KMOD} diff --git a/stage1/packages-update b/stage1/packages-update index 0556f22..f562539 100755 --- a/stage1/packages-update +++ b/stage1/packages-update @@ -50,6 +50,7 @@ fpkg ${XZ_UTILS} "http://tukaani.org/xz" # Chapter 7 fpkg -s "linux/utils/util-linux/v$(get_pkg_ver2 ${UTIL_LINUX})" \ ${UTIL_LINUX} ${KERNEL_URL} +fpkg -m hv ${SHADOW} fpkg -m sf ${E2FSPROGS} fpkg ${SYSVINIT} "http://download.savannah.gnu.org/releases/sysvinit" fpkg -e "tar.xz" -s "linux/utils/kernel/kmod" ${KMOD} ${KERNEL_URL} diff --git a/stage1/pkg/shadow b/stage1/pkg/shadow new file mode 100644 index 0000000..7678874 --- /dev/null +++ b/stage1/pkg/shadow @@ -0,0 +1,17 @@ +#!/bin/bash + +hvconfig_pre() +{ + cd ${LFS_TMP}/${PACKAGE} + + # Disable the installation of the groups program and its man page, as + # Coreutils provides a better version. + sed -i 's/groups$(EXEEXT) //' src/Makefile.in + find man -name Makefile.in -exec sed -i 's/groups\.1 / /' {} \; +} + +hvbuild() +{ + ${HVMAKE} + ${HVMAKE} DESTDIR=${CLFS} install +} diff --git a/stage2/packages-update b/stage2/packages-update index c16504f..f08cc2e 100755 --- a/stage2/packages-update +++ b/stage2/packages-update @@ -27,6 +27,7 @@ lpkg 1 ${NANO} lpkg 1 ${ZLIB} lpkg 1 ${SED} lpkg 1 ${UTIL_LINUX} +lpkg 1 ${SHADOW} lpkg 1 ${E2FSPROGS} lpkg 1 ${COREUTILS} lpkg 1 ${MFOUR} @@ -86,7 +87,7 @@ fpkg -e "tar.gz" -s "libpipeline" ${LIBPIPELINE} \ "http://download.savannah.gnu.org/releases" fpkg -e "tar.gz" ${MAN_DB} "http://download.savannah.gnu.org/releases/man-db" fpkg -m sf ${PSMISC} -fpkg -m hv ${SHADOW} + fpkg -e "tar.gz" ${SYSKLOGD} \ "http://www.infodrom.org/projects/sysklogd/download" fpkg -m gnu ${GRUB} -- 2.20.1