diff options
author | Paul Sherwood <paul.sherwood@codethink.co.uk> | 2015-09-25 08:47:49 +0000 |
---|---|---|
committer | Paul Sherwood <paul.sherwood@codethink.co.uk> | 2015-09-26 08:27:41 +0100 |
commit | 3a2f641e4e70e76ffa77629c6208970c1a7af667 (patch) | |
tree | e6635788976c616017c05b5ea93432f9b2dc769e /baserock/strata/foundation | |
parent | c844667a718e8640d9ae2b7640a3b0dc0fb53b0e (diff) | |
download | definitions-3a2f641e4e70e76ffa77629c6208970c1a7af667.tar.gz |
Proposed re-org of definitions repobaserock/ps/reorganise-definitions
Diffstat (limited to 'baserock/strata/foundation')
-rw-r--r-- | baserock/strata/foundation/btrfs-progs.morph | 8 | ||||
-rw-r--r-- | baserock/strata/foundation/dbus-pre.morph | 10 | ||||
-rw-r--r-- | baserock/strata/foundation/dbus.morph | 10 | ||||
-rw-r--r-- | baserock/strata/foundation/fuse.morph | 5 | ||||
-rw-r--r-- | baserock/strata/foundation/groff.morph | 13 | ||||
-rw-r--r-- | baserock/strata/foundation/kmod.morph | 49 | ||||
-rw-r--r-- | baserock/strata/foundation/libgpg-error.morph | 7 | ||||
-rw-r--r-- | baserock/strata/foundation/lzo.morph | 5 | ||||
-rw-r--r-- | baserock/strata/foundation/openssh.morph | 28 | ||||
-rw-r--r-- | baserock/strata/foundation/pciutils.morph | 11 | ||||
-rw-r--r-- | baserock/strata/foundation/rsync.morph | 9 | ||||
-rw-r--r-- | baserock/strata/foundation/systemd.morph | 38 | ||||
-rw-r--r-- | baserock/strata/foundation/tbdiff.morph | 3 | ||||
-rw-r--r-- | baserock/strata/foundation/time-zone-database.morph | 11 |
14 files changed, 207 insertions, 0 deletions
diff --git a/baserock/strata/foundation/btrfs-progs.morph b/baserock/strata/foundation/btrfs-progs.morph new file mode 100644 index 00000000..807a115f --- /dev/null +++ b/baserock/strata/foundation/btrfs-progs.morph @@ -0,0 +1,8 @@ +name: btrfs-progs +kind: chunk +build-system: autotools +pre-configure-commands: +- ./autogen.sh +configure-commands: +# The change in the CFLAGS is needed to make the compilation succeed in armv5l +- export CFLAGS="-O2 $CFLAGS"; ./configure --prefix="$PREFIX" --disable-documentation diff --git a/baserock/strata/foundation/dbus-pre.morph b/baserock/strata/foundation/dbus-pre.morph new file mode 100644 index 00000000..3ec008bf --- /dev/null +++ b/baserock/strata/foundation/dbus-pre.morph @@ -0,0 +1,10 @@ +name: dbus-pre +kind: chunk +build-system: autotools +configure-commands: +- sh autogen.sh --no-configure +- ./configure --prefix="$PREFIX" --localstatedir=/var --sysconfdir=/etc --disable-systemd +build-commands: +- make XMLTO_OUTPUT= +install-commands: +- make XMLTO_OUTPUT= DESTDIR="$DESTDIR" install diff --git a/baserock/strata/foundation/dbus.morph b/baserock/strata/foundation/dbus.morph new file mode 100644 index 00000000..23840ce1 --- /dev/null +++ b/baserock/strata/foundation/dbus.morph @@ -0,0 +1,10 @@ +name: dbus +kind: chunk +build-system: autotools +configure-commands: +- sh autogen.sh --no-configure +- ./configure --prefix="$PREFIX" --localstatedir=/var --sysconfdir=/etc --enable-user-session +build-commands: +- make XMLTO_OUTPUT= +install-commands: +- make XMLTO_OUTPUT= DESTDIR="$DESTDIR" install diff --git a/baserock/strata/foundation/fuse.morph b/baserock/strata/foundation/fuse.morph new file mode 100644 index 00000000..5d431307 --- /dev/null +++ b/baserock/strata/foundation/fuse.morph @@ -0,0 +1,5 @@ +name: fuse +kind: chunk +build-system: autotools +pre-configure-commands: +- ./makeconf.sh diff --git a/baserock/strata/foundation/groff.morph b/baserock/strata/foundation/groff.morph new file mode 100644 index 00000000..8380a9cc --- /dev/null +++ b/baserock/strata/foundation/groff.morph @@ -0,0 +1,13 @@ +name: groff +kind: chunk +max-jobs: 1 +configure-commands: +- PAGE=A4 ./configure --prefix="$PREFIX" +build-commands: +# hack to avoid a netpbm dependency +- touch doc/gnu.eps +- make +install-commands: +- make DESTDIR="$DESTDIR" install +- ln -s eqn "$DESTDIR$PREFIX/bin/geqn" +- ln -s tbl "$DESTDIR$PREFIX/bin/gtbl" diff --git a/baserock/strata/foundation/kmod.morph b/baserock/strata/foundation/kmod.morph new file mode 100644 index 00000000..8f158e8e --- /dev/null +++ b/baserock/strata/foundation/kmod.morph @@ -0,0 +1,49 @@ +name: kmod +kind: chunk +configure-commands: +- rm -rf libkmod/docs +- sed -i -e'/SUBDIRS/{s/\S*doc\S*//;s/\S*man\S*//}' Makefile.am +- sed -i -e'/AC_CONFIG_FILES(\[/,/])/{/docs/d}' configure.ac +- autoreconf -fiv +- | + ./configure --prefix="$PREFIX" --bindir="$PREFIX"/bin \ + --libdir="$PREFIX"/lib --sysconfdir=/etc \ + --without-xz --with-zlib \ + --disable-manpages --enable-python +build-commands: +- make +install-commands: +- make DESTDIR="$DESTDIR" pkgconfigdir="$PREFIX"/lib/pkgconfig install + +# WARNING with the following command: +# if the staging area when kmod is built is sufficiently different to the +# staging area that kmod is included in, then these symlinks may not work. +# +# i.e. if /sbin isn't a symlink when this is built (fhs-dirs isn't included or +# doesn't symlink /sbin to /usr/bin) then we get symlinks in /sbin which point +# to ../usr/bin, but if /sbin is itself a symlink to /usr/bin, then the symlinks +# would end up in /usr/bin, which would point to ../usr/bin, which would evaluate +# to /usr/usr/bin. +# +# The alternatives to this are: +# +# 1. Use hardlinks instead, which has the problem of ssh-rsync upgrades duplicating +# the binary +# +# 2. Use an absolute path for the symlink, which makes things interesting when +# inspecting a chroot +# +# 3. Use a wrapper script to invoke kmod with a different name, which isn't +# possible in busybox ash without making a temporary directory, which means +# you need an extra process to hang around to clean that directory up. +- | + if [ -h /sbin ]; then + for app in modprobe lsmod rmmod insmod modinfo depmod; do + ln -sf kmod "$DESTDIR$PREFIX/bin/$app" + done + else + install -d "$DESTDIR"/sbin + for app in modprobe lsmod rmmod insmod modinfo depmod; do + ln -sf ../"$PREFIX"/bin/kmod "$DESTDIR/sbin/$app" + done + fi diff --git a/baserock/strata/foundation/libgpg-error.morph b/baserock/strata/foundation/libgpg-error.morph new file mode 100644 index 00000000..bc8dcdab --- /dev/null +++ b/baserock/strata/foundation/libgpg-error.morph @@ -0,0 +1,7 @@ +name: libgpg-error +kind: chunk +build-system: autotools +pre-configure-commands: +- autoreconf -fi +configure-commands: +- ./configure --prefix="$PREFIX" --disable-doc diff --git a/baserock/strata/foundation/lzo.morph b/baserock/strata/foundation/lzo.morph new file mode 100644 index 00000000..a1a7bbc7 --- /dev/null +++ b/baserock/strata/foundation/lzo.morph @@ -0,0 +1,5 @@ +name: lzo +kind: chunk +build-system: autotools +configure-commands: +- ./configure --enable-shared=yes --prefix="$PREFIX" diff --git a/baserock/strata/foundation/openssh.morph b/baserock/strata/foundation/openssh.morph new file mode 100644 index 00000000..6c759cb0 --- /dev/null +++ b/baserock/strata/foundation/openssh.morph @@ -0,0 +1,28 @@ +name: openssh +kind: chunk +configure-commands: +- autoreconf -if +- | + OPENSSL_SEEDS_ITSELF=yes ./configure \ + --prefix="$PREFIX" --sysconfdir=/etc/ssh \ + --datadir="$PREFIX/share/sshd" \ + --libexecdir="$PREFIX/lib/openssh" \ + --with-privsep-path=/var/lib/sshd +build-commands: +- make +- | + sed -e "s|@prefix@|$PREFIX|g" \ + -e 's|@STARTUP_SCRIPT_SHELL@|/bin/sh|g' \ + -e 's|@sysconfdir@|/etc/ssh|g' \ + -e 's|@COMMENT_OUT_ECC@||g' \ + sshd-keygen.in >sshd-keygen +- sed -e "s|@prefix@|$PREFIX|g" opensshd.service.in >opensshd.service +install-commands: +- make DESTDIR="$DESTDIR" install +- mkdir -p "$DESTDIR/$PREFIX/sbin" +- chmod go= "$DESTDIR"/var/lib/sshd +- install -m 744 sshd-keygen "$DESTDIR/$PREFIX/sbin/sshd-keygen" +- install -m 755 contrib/ssh-copy-id "$DESTDIR/$PREFIX/bin/ssh-copy-id" +- mkdir -p "$DESTDIR/lib/systemd/system/multi-user.target.wants" +- install -m 644 opensshd.service "$DESTDIR/lib/systemd/system/opensshd.service" +- ln -s ../opensshd.service "$DESTDIR/lib/systemd/system/multi-user.target.wants/opensshd.service" diff --git a/baserock/strata/foundation/pciutils.morph b/baserock/strata/foundation/pciutils.morph new file mode 100644 index 00000000..03bd4a23 --- /dev/null +++ b/baserock/strata/foundation/pciutils.morph @@ -0,0 +1,11 @@ +name: pciutils +kind: chunk +configure-commands: +- make PREFIX="$PREFIX" ZLIB=no lib/config.mk +- echo PREFIX="$PREFIX" >>lib/config.mk +- echo MANDIR="$PREFIX/share/man" >>lib/config.mk # ensure manpages are always installed in share/man +build-commands: +- make PREFIX="$PREFIX" +install-commands: +- make PREFIX="$PREFIX" DESTDIR="$DESTDIR" install +- make PREFIX="$PREFIX" DESTDIR="$DESTDIR" install-lib diff --git a/baserock/strata/foundation/rsync.morph b/baserock/strata/foundation/rsync.morph new file mode 100644 index 00000000..54337412 --- /dev/null +++ b/baserock/strata/foundation/rsync.morph @@ -0,0 +1,9 @@ +name: rsync +kind: chunk +build-system: autotools +build-commands: +- make proto +- make +install-commands: +- make install +- install -D -m 644 packaging/systemd/rsync.service "$DESTDIR$PREFIX"/lib/systemd/system/rsync.service diff --git a/baserock/strata/foundation/systemd.morph b/baserock/strata/foundation/systemd.morph new file mode 100644 index 00000000..4c62d617 --- /dev/null +++ b/baserock/strata/foundation/systemd.morph @@ -0,0 +1,38 @@ +name: systemd +kind: chunk +build-system: autotools +configure-commands: +- sh autogen.sh +# KILL added because it picks up /usr/bin/kill, which is not installed on +# all systems +- | + KILL=/bin/kill ./configure --prefix="$PREFIX" --enable-xz --disable-manpages \ + --disable-tests --sysconfdir=/etc --localstatedir=/var \ + --libdir="$PREFIX/lib" --libexecdir="$PREFIX/libexec" \ + --with-rootprefix= --with-rootlibdir=/lib +install-commands: +- make DESTDIR="$DESTDIR" install +- mkdir -p "$DESTDIR"/sbin +- ln -s /lib/systemd/systemd "$DESTDIR"/sbin/init +- for f in telinit runlevel shutdown poweroff reboot halt; do ln -s /bin/systemctl + "$DESTDIR/sbin/$f"; done +- sed -e 's|@sushell@|/bin/sh|g' units/debug-shell.service.in >"$DESTDIR/etc/systemd/system/debug-shell.service" +- sed -r -e '/Options=/s/,?strictatime//' "$DESTDIR/lib/systemd/system/tmp.mount" + >"$DESTDIR/etc/systemd/system/tmp.mount" +- touch "$DESTDIR/etc/machine-id" +post-install-commands: +- | + cat > "$DESTDIR/etc/systemd/network/10-dhcp.network" << "EOF" + [Match] + Name=e* + + [Network] + DHCP=yes + EOF +# Use the pam config systemd provides +- cp -a "$DESTDIR/$PREFIX"/share/factory/etc/pam.d/* "$DESTDIR/etc/pam.d" + +# Add pam_deny.so to the default systemd-auth pam.d config file. Without +# it, if shadow is configured to use PAM, it would be possible to login +# to a system with the wrong password. +- echo 'auth requisite pam_deny.so' >> "$DESTDIR"/etc/pam.d/system-auth diff --git a/baserock/strata/foundation/tbdiff.morph b/baserock/strata/foundation/tbdiff.morph new file mode 100644 index 00000000..a907a109 --- /dev/null +++ b/baserock/strata/foundation/tbdiff.morph @@ -0,0 +1,3 @@ +name: tbdiff +kind: chunk +build-system: autotools diff --git a/baserock/strata/foundation/time-zone-database.morph b/baserock/strata/foundation/time-zone-database.morph new file mode 100644 index 00000000..701d781a --- /dev/null +++ b/baserock/strata/foundation/time-zone-database.morph @@ -0,0 +1,11 @@ +name: time-zone-database +kind: chunk +description: | + Time zone database. +build-system: manual +install-commands: +# ETCDIR is actually where the 'tzselect', 'zdump' and 'zic' commands get +# installed. Note that tzselect from this chunk will overlap with and override +# the tzselect binary from GLIBC. +- make TOPDIR="$PREFIX" ETCDIR="$PREFIX/bin" TZDIR="$PREFIX/share/zoneinfo" DESTDIR="$DESTDIR" + install |