summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonathan Maw <jonathan.maw@codethink.co.uk>2015-04-22 15:22:09 (GMT)
committerBaserock Gerrit <gerrit@baserock.org>2015-04-29 14:59:42 (GMT)
commitaae1e3dec176ebc40cd233a29cf48c04d856fac5 (patch)
treefa645c68b7345dbfc073a83ff4c712cdfe0c1286
parent678a0e030366b5c33a44d8f5b42c12cdc3aa3f60 (diff)
downloaddefinitions-aae1e3dec176ebc40cd233a29cf48c04d856fac5.tar.gz
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
-rw-r--r--strata/core.morph77
-rw-r--r--strata/core/acl.morph (renamed from strata/foundation/acl.morph)2
-rw-r--r--strata/core/attr.morph (renamed from strata/foundation/attr.morph)0
-rw-r--r--strata/core/libcap2.morph (renamed from strata/foundation/libcap2.morph)0
-rw-r--r--strata/core/linux-pam.morph9
-rw-r--r--strata/core/shadow.morph36
-rw-r--r--strata/core/util-linux.morph6
-rw-r--r--strata/coreutils-common/tar.morph3
-rw-r--r--strata/foundation.morph30
-rw-r--r--strata/foundation/linux-pam.morph15
10 files changed, 118 insertions, 60 deletions
diff --git a/strata/core.morph b/strata/core.morph
index 56cdd92..7f30de1 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/foundation/acl.morph b/strata/core/acl.morph
index c742d8a..23f08c1 100644
--- a/strata/foundation/acl.morph
+++ b/strata/core/acl.morph
@@ -3,4 +3,4 @@ kind: chunk
build-commands:
- make
install-commands:
-- make DESTDIR="$DESTDIR" install-dev
+- make DESTDIR="$DESTDIR" install-lib install-dev
diff --git a/strata/foundation/attr.morph b/strata/core/attr.morph
index 46d0b9c..46d0b9c 100644
--- a/strata/foundation/attr.morph
+++ b/strata/core/attr.morph
diff --git a/strata/foundation/libcap2.morph b/strata/core/libcap2.morph
index 3e4f205..3e4f205 100644
--- a/strata/foundation/libcap2.morph
+++ b/strata/core/libcap2.morph
diff --git a/strata/core/linux-pam.morph b/strata/core/linux-pam.morph
new file mode 100644
index 0000000..71ad98e
--- /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 6887a6b..d709ddc 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 22f1952..eebba6f 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 d9ee3a3..17d6a59 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 c352ef1..95652fb 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/linux-pam.morph b/strata/foundation/linux-pam.morph
deleted file mode 100644
index 0dfbe75..0000000
--- 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