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.morph | 77 +++++++++++++++++++++++++++++++++------ 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 ++- strata/coreutils-common/tar.morph | 3 +- strata/foundation.morph | 30 --------------- strata/foundation/acl.morph | 6 --- strata/foundation/attr.morph | 18 --------- strata/foundation/libcap2.morph | 6 --- strata/foundation/linux-pam.morph | 15 -------- 13 files changed, 147 insertions(+), 89 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 delete mode 100644 strata/foundation/acl.morph delete mode 100644 strata/foundation/attr.morph delete mode 100644 strata/foundation/libcap2.morph delete mode 100644 strata/foundation/linux-pam.morph diff --git a/strata/core.morph b/strata/core.morph index 56cdd925..7f30de1c 100644 --- a/strata/core.morph +++ b/strata/core.morph @@ -234,25 +234,55 @@ chunks: - autoconf-tarball - automake - libtool-tarball -- name: util-linux - morph: strata/core/util-linux.morph - repo: upstream:util-linux - ref: 34760e62e0d5a25262a6aa801b2f1df61216363f - unpetrify-ref: v2.26.1 +- name: attr + morph: strata/core/attr.morph + repo: upstream:attr + ref: 4b005410f865895d4dcd56e2c135278a7a315877 + unpetrify-ref: baserock/morph + build-depends: + - autoconf-tarball + - automake + - gettext-tarball + - libtool-tarball +- name: acl + morph: strata/core/acl.morph + repo: upstream:acl + ref: f13e09bd54fd4a501c4952f002ed2752bdd9f93b + unpetrify-ref: v2.2.52 + build-depends: + - autoconf-tarball + - automake + - gettext-tarball + - libtool-tarball + - attr +- name: linux-pam + morph: strata/core/linux-pam.morph + repo: upstream:linux-pam + ref: b1521c97e73b10469f7b34c0571d51c647eca83c + unpetrify-ref: Linux-PAM-1.1.8 build-depends: - autoconf-tarball - automake - gettext-tarball - - git - libtool-tarball - pkg-config -- name: bc - repo: upstream:bc-tarball - ref: 0956d119432ff6a2e85bae1fa336df799cad70b0 + - flex + - attr + - acl +- name: libcap2 + morph: strata/core/libcap2.morph + repo: upstream:libcap2 + ref: 4f7cca1bc9c2a274edb39d351b65747010d3ba7b unpetrify-ref: baserock/morph build-depends: - - flex - - texinfo-tarball + - autoconf-tarball + - automake + - gettext-tarball + - libtool-tarball + - pkg-config + - attr + - acl + - linux-pam - name: shadow morph: strata/core/shadow.morph repo: upstream:shadow @@ -264,6 +294,31 @@ chunks: - gettext-tarball - libtool-tarball - bison + - attr + - acl + - linux-pam + - libcap2 +- name: util-linux + morph: strata/core/util-linux.morph + repo: upstream:util-linux + ref: 34760e62e0d5a25262a6aa801b2f1df61216363f + unpetrify-ref: v2.26.1 + build-depends: + - autoconf-tarball + - automake + - gettext-tarball + - git + - libtool-tarball + - pkg-config + - linux-pam + - shadow +- name: bc + repo: upstream:bc-tarball + ref: 0956d119432ff6a2e85bae1fa336df799cad70b0 + unpetrify-ref: baserock/morph + build-depends: + - flex + - texinfo-tarball - name: patch morph: strata/core/patch.morph repo: upstream:patch 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 diff --git a/strata/coreutils-common/tar.morph b/strata/coreutils-common/tar.morph index d9ee3a36..17d6a597 100644 --- a/strata/coreutils-common/tar.morph +++ b/strata/coreutils-common/tar.morph @@ -2,7 +2,8 @@ name: tar kind: chunk build-system: autotools pre-configure-commands: -- bash bootstrap --skip-po +- rm .gitmodules +- bash bootstrap --skip-po --gnulib-srcdir="$(pwd)/gnulib" --paxutils-srcdir="$(pwd)/paxutils" configure-commands: # Configure flag notes: # 1. Needed to run configure as root diff --git a/strata/foundation.morph b/strata/foundation.morph index c352ef1e..95652fb0 100644 --- a/strata/foundation.morph +++ b/strata/foundation.morph @@ -8,11 +8,6 @@ chunks: repo: upstream:bash-completion ref: 3085c7e12179817a02a611016606391295c69942 unpetrify-ref: 2.1 -- name: attr - morph: strata/foundation/attr.morph - repo: upstream:attr - ref: 4b005410f865895d4dcd56e2c135278a7a315877 - unpetrify-ref: baserock/morph - name: groff morph: strata/foundation/groff.morph repo: upstream:groff-git @@ -28,13 +23,6 @@ chunks: repo: upstream:tz ref: a0782484f101ac55c916568bc1c490d7761fc904 unpetrify-ref: 2015a -- name: libcap2 - morph: strata/foundation/libcap2.morph - repo: upstream:libcap2 - ref: 4f7cca1bc9c2a274edb39d351b65747010d3ba7b - unpetrify-ref: baserock/morph - build-depends: - - attr - name: pciutils morph: strata/foundation/pciutils.morph repo: upstream:pciutils @@ -53,11 +41,6 @@ chunks: ref: 412eed473b557ed2172d81d76fa1e1f53c973a67 build-depends: - libgpg-error -- name: linux-pam - morph: strata/foundation/linux-pam.morph - repo: upstream:linux-pam - ref: b1521c97e73b10469f7b34c0571d51c647eca83c - unpetrify-ref: Linux-PAM-1.1.8 - name: systemd morph: strata/foundation/systemd.morph repo: upstream:systemd @@ -66,9 +49,7 @@ chunks: build-depends: - dbus-pre - kmod - - libcap2 - libgcrypt - - linux-pam - name: libusb repo: upstream:libusb ref: e11525c66c7dd2db466c8f5785ff0b37d6a99ec9 @@ -91,13 +72,6 @@ chunks: repo: upstream:fuse ref: d69e627e79862e2df4ff9ff1ddb0363c4520d8a8 unpetrify-ref: baserock/morph -- name: acl - morph: strata/foundation/acl.morph - repo: upstream:acl - ref: f13e09bd54fd4a501c4952f002ed2752bdd9f93b - unpetrify-ref: v2.2.52 - build-depends: - - attr - name: e2fsprogs morph: strata/foundation/e2fsprogs.morph repo: upstream:e2fsprogs @@ -109,8 +83,6 @@ chunks: ref: 563ff3b07d85517e3589a1f2e6f45a8265e3f071 unpetrify-ref: v3.18.2 build-depends: - - attr - - acl - lzo - e2fsprogs - name: dbus @@ -132,8 +104,6 @@ chunks: repo: baserock:baserock/tbdiff ref: 47fb728f2432929868666afc915dbc5a64836c08 unpetrify-ref: master - build-depends: - - attr - name: dbus-glib repo: upstream:dbus-glib ref: 397e8297d433547c9bf4150ddd2b9e0b4c39628c diff --git a/strata/foundation/acl.morph b/strata/foundation/acl.morph deleted file mode 100644 index c742d8ae..00000000 --- a/strata/foundation/acl.morph +++ /dev/null @@ -1,6 +0,0 @@ -name: acl -kind: chunk -build-commands: -- make -install-commands: -- make DESTDIR="$DESTDIR" install-dev diff --git a/strata/foundation/attr.morph b/strata/foundation/attr.morph deleted file mode 100644 index 46d0b9c0..00000000 --- a/strata/foundation/attr.morph +++ /dev/null @@ -1,18 +0,0 @@ -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/foundation/libcap2.morph b/strata/foundation/libcap2.morph deleted file mode 100644 index 3e4f205e..00000000 --- a/strata/foundation/libcap2.morph +++ /dev/null @@ -1,6 +0,0 @@ -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/foundation/linux-pam.morph b/strata/foundation/linux-pam.morph deleted file mode 100644 index 0dfbe759..00000000 --- a/strata/foundation/linux-pam.morph +++ /dev/null @@ -1,15 +0,0 @@ -name: linux-pam -kind: chunk -build-system: autotools -pre-configure-commands: -- autoreconf -ivf -post-install-commands: -# sudo command is expecting this file. -- | - install -D -m 0644 /proc/self/fd/0 <<'EOF' "$DESTDIR"/etc/pam.d/other - #%PAM-1.0 - auth required pam_unix.so - account required pam_unix.so - password required pam_unix.so - session required pam_unix.so - EOF -- cgit v1.2.1