From aae1e3dec176ebc40cd233a29cf48c04d856fac5 Mon Sep 17 00:00:00 2001 From: Jonathan Maw Date: Wed, 22 Apr 2015 15:22:09 +0000 Subject: Fix linux-pam This involves: * Reordering the chunks linux-pam, acl, attr and libcap2 - this means moving them into the 'core' stratum, and fixing errors that occur because of the move. * Configuring pam correctly. * Fix acl failing to build in core. * Fix shadow to build against pam and reconfigure shadow to not do things covered by pam. * Fix tar not building - I am not sure what caused this to fail to build, but fixing it involved stopping it from trying to init submodules that were already checked out. Change-Id: I1b00ca0158c31ce5f31c11fe60816434508a05a1 --- strata/core/acl.morph | 6 ++++++ strata/core/attr.morph | 18 ++++++++++++++++++ strata/core/libcap2.morph | 6 ++++++ strata/core/linux-pam.morph | 9 +++++++++ strata/core/shadow.morph | 36 +++++++++++++++++++++++++++++++++++- strata/core/util-linux.morph | 6 +++++- 6 files changed, 79 insertions(+), 2 deletions(-) create mode 100644 strata/core/acl.morph create mode 100644 strata/core/attr.morph create mode 100644 strata/core/libcap2.morph create mode 100644 strata/core/linux-pam.morph (limited to 'strata/core') diff --git a/strata/core/acl.morph b/strata/core/acl.morph new file mode 100644 index 00000000..23f08c1f --- /dev/null +++ b/strata/core/acl.morph @@ -0,0 +1,6 @@ +name: acl +kind: chunk +build-commands: +- make +install-commands: +- make DESTDIR="$DESTDIR" install-lib install-dev diff --git a/strata/core/attr.morph b/strata/core/attr.morph new file mode 100644 index 00000000..46d0b9c0 --- /dev/null +++ b/strata/core/attr.morph @@ -0,0 +1,18 @@ +name: attr +kind: chunk +build-system: autotools +configure-commands: +- make configure +- | + ./configure --prefix="$PREFIX" \ + --exec-prefix="$PREFIX" \ + --sbindir="$PREFIX"/sbin \ + --bindir="$PREFIX"/bin \ + --libdir="$PREFIX"/lib \ + --libexecdir="$PREFIX"/lib \ + --enable-lib64=yes \ + --includedir="$PREFIX"/include \ + --mandir="$PREFIX"/share/man \ + --datadir="$PREFIX"/share +install-commands: +- make DESTDIR="$DESTDIR" install-lib install-dev diff --git a/strata/core/libcap2.morph b/strata/core/libcap2.morph new file mode 100644 index 00000000..3e4f205e --- /dev/null +++ b/strata/core/libcap2.morph @@ -0,0 +1,6 @@ +name: libcap2 +kind: chunk +build-commands: +- make prefix="$PREFIX" +install-commands: +- make prefix="$PREFIX" DESTDIR="$DESTDIR" RAISE_SETFCAP=no install lib=lib diff --git a/strata/core/linux-pam.morph b/strata/core/linux-pam.morph new file mode 100644 index 00000000..71ad98e9 --- /dev/null +++ b/strata/core/linux-pam.morph @@ -0,0 +1,9 @@ +name: linux-pam +kind: chunk +build-system: autotools +pre-configure-commands: +- autoreconf -ivf +configure-commands: +# libdir has to be specified or it'll go into lib64. It has to be /lib because +# systemd installs its pam library into /lib/security. +- ./configure --prefix="$PREFIX" --libdir="/lib" diff --git a/strata/core/shadow.morph b/strata/core/shadow.morph index 6887a6b3..d709ddcb 100644 --- a/strata/core/shadow.morph +++ b/strata/core/shadow.morph @@ -2,4 +2,38 @@ name: shadow kind: chunk build-system: autotools configure-commands: -- ./autogen.sh --with-selinux=no --sysconfdir=/etc +# Installing to /bin so that they overwrite busybox login. +- | + ./autogen.sh --with-selinux=no \ + --sysconfdir=/etc \ + --with-pam=yes \ + --prefix="$PREFIX" \ + --bindir=/bin +post-install-commands: +# Disable things handled by pam instead +- rm "$DESTDIR/etc/limits" +- rm "$DESTDIR/etc/login.access" +- | + for OPTION in FAIL_DELAY \ + FAILLOG_ENAB \ + LASTLOG_ENAB \ + MAIL_CHECK_ENAB \ + OBSCURE_CHECKS_ENAB \ + PORTTIME_CHECKS_ENAB \ + QUOTAS_ENAB \ + CONSOLE MOTD_FILE \ + FTMP_FILE \ + NOLOGINS_FILE \ + ENV_HZ \ + PASS_MIN_LEN \ + SU_WHEEL_ONLY \ + CRACKLIB_DICTPATH \ + PASS_CHANGE_TRIES \ + PASS_ALWAYS_WARN \ + CHFN_AUTH \ + ENCRYPT_METHOD \ + ENVIRON_FILE + do + sed -i "s/^${OPTION}.*/# & #This option is handled by PAM instead./" \ + "$DESTDIR/etc/login.defs" + done diff --git a/strata/core/util-linux.morph b/strata/core/util-linux.morph index 22f19529..eebba6f6 100644 --- a/strata/core/util-linux.morph +++ b/strata/core/util-linux.morph @@ -3,4 +3,8 @@ kind: chunk build-system: autotools configure-commands: - ./autogen.sh -- ./configure --prefix="$PREFIX" --disable-use-tty-group +# Installing to /bin so that they overwrite busybox login. +- | + ./configure --prefix="$PREFIX" \ + --disable-use-tty-group \ + --bindir=/bin -- cgit v1.2.1