summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Dale <richard.dale@codethink.co.uk>2015-03-31 10:32:57 +0100
committerRichard Dale <richard.dale@codethink.co.uk>2015-04-01 10:25:09 +0100
commit288f3058d4d26206ecff511d2aa588d88273cc6b (patch)
tree40d26fa6c7ddccab0c1ef493c0418ab8cefa72bd
parent4f72c438b5d95da379b1c630bc27434e115dadea (diff)
downloaddefinitions-288f3058d4d26206ecff511d2aa588d88273cc6b.tar.gz
Definitions for a complete musl based image
-rw-r--r--clusters/upgrade-devel-musl.morph39
-rw-r--r--strata/bsp-x86_64-musl.morph26
-rw-r--r--strata/core-musl.morph82
-rw-r--r--strata/core/autopoint.morph13
-rw-r--r--strata/core/flex-musl.morph2
-rw-r--r--strata/core/git-musl.morph2
-rw-r--r--strata/core/openssl-new-musl.morph2
-rw-r--r--strata/core/util-linux-musl.morph6
-rw-r--r--strata/core/xz-musl.morph11
-rw-r--r--strata/coreutils-common-musl.morph29
-rw-r--r--strata/coreutils-common/coreutils-musl.morph17
-rw-r--r--strata/coreutils-common/diff-musl.morph8
-rw-r--r--strata/coreutils-common/sed-musl.morph13
-rw-r--r--strata/foundation-musl.morph92
-rw-r--r--strata/foundation/e2fsprogs-musl.morph20
-rw-r--r--strata/foundation/openssh-musl.morph29
-rw-r--r--systems/base-system-x86_64-musl.morph19
17 files changed, 378 insertions, 32 deletions
diff --git a/clusters/upgrade-devel-musl.morph b/clusters/upgrade-devel-musl.morph
new file mode 100644
index 00000000..f77f0ba9
--- /dev/null
+++ b/clusters/upgrade-devel-musl.morph
@@ -0,0 +1,39 @@
+name: upgrade-devel
+kind: cluster
+description: |
+ This is a cluster morphology that can be used to deploy systems to a
+ an existing Baserock devel system, as an upgrade of the running system.
+
+ This method is for users who deployed a system manually from one of the
+ images provided on http://download.baserock.org. IT IS ONLY POSSIBLE TO
+ UPGRADE BASEROCK 14 RELEASES OR NEWER.
+
+ If you deployed your system using `morph deploy` then you should reuse the
+ cluster morphology you did the initial deployment with, instead of this one,
+ so that the configuration is preserved in the new system.
+
+ Ensure that your root user has passwordless SSH access to localhost with
+ `ssh root@localhost whoami`. If not, run `ssh-copy-id root@localhost`.
+ Make sure the 'morph' field below matches the system you are upgrading.
+
+ To upgrade, select a sensible a value for VERSION_LABEL and run:
+
+ morph deploy --upgrade upgrade-devel.morph self.HOSTNAME=$(hostname) self.VERSION_LABEL=$VERSION_LABEL
+
+ Your configuration in /etc should be propagated to the new system, but there
+ may be merge conflicts. Check /etc for files named '.rej' and '.orig' in the
+ new system, which will indicate that there are changes from the old system
+ that must be merged manually. You can get a nice diff from the old /etc as
+ follows:
+
+ mount /dev/sda /mnt
+ git diff --no-index /mnt/systems/factory/run/etc /mnt/systems/$VERSION_LABEL/run/etc
+
+ On a base system, use 'diff -r' instead of 'git diff --no-index'. It will
+ not be as colourful.
+systems:
+- morph: systems/base-system-x86_64-musl.morph
+ deploy:
+ self:
+ type: ssh-rsync
+ location: root@127.0.0.1
diff --git a/strata/bsp-x86_64-musl.morph b/strata/bsp-x86_64-musl.morph
new file mode 100644
index 00000000..5836c17e
--- /dev/null
+++ b/strata/bsp-x86_64-musl.morph
@@ -0,0 +1,26 @@
+name: bsp-x86_64-musl
+kind: stratum
+description: The set of platform specific components required for booting a 64-bit
+ x86 based system.
+build-depends:
+- morph: strata/coreutils-common-musl.morph
+chunks:
+- name: linux-x86-64-generic
+ morph: strata/bsp-x86_64-generic/linux-x86-64-generic.morph
+ repo: upstream:linux
+ ref: bfa76d49576599a4b9f9b7a71f23d73d6dcff735
+ unpetrify-ref: v3.19
+ build-depends: []
+- name: nasm
+ morph: strata/bsp-x86_64-generic/nasm.morph
+ repo: upstream:nasm
+ ref: 78bdad3d14fb875d5f2062957e326ba2a9e4ccb0
+ unpetrify-ref: baserock/morph
+ build-depends: []
+- name: syslinux
+ morph: strata/bsp-x86_64-generic/syslinux.morph
+ repo: file:///src/workspace/syslinux
+ ref: 73d9cd6336489ee98efca35e9e94ff64feb952e1
+ unpetrify-ref: baserock/morph
+ build-depends:
+ - nasm
diff --git a/strata/core-musl.morph b/strata/core-musl.morph
index c4169b87..ab2c4d3e 100644
--- a/strata/core-musl.morph
+++ b/strata/core-musl.morph
@@ -22,9 +22,15 @@ chunks:
ref: e5faeaaf75ecfb705a9b643b3e4cb881ebb69f48
unpetrify-ref: gdbm-1.11
build-depends: []
+- name: autopoint
+ morph: strata/core/autopoint.morph
+ repo: upstream:gettext-tarball
+ ref: 482840e61f86ca321838a91e902c41d40c098bbb
+ unpetrify-ref: gettext-0.19.4
+ build-depends: []
- name: gettext-tiny
morph: strata/core/gettext-tiny.morph
- repo: file:///src/workspace/gettext-tiny
+ repo: upstream:gettext-tiny
ref: eb8abea562725223ac74555879aae5a023215ba8
unpetrify-ref: v0.0.4
build-depends: []
@@ -84,7 +90,7 @@ chunks:
unpetrify-ref: baserock/build-essential
build-depends:
- automake
- - gettext-tiny
+ - autopoint
- name: openssl-new
morph: strata/core/openssl-new-musl.morph
repo: upstream:openssl-new
@@ -128,7 +134,15 @@ chunks:
unpetrify-ref: baserock/morph
build-depends:
- bash
-
+- name: xz
+ repo: upstream:xz
+ ref: a0cd05ee71d330b79ead6eb9222e1b24e1559d3a
+ unpetrify-ref: v5.2.0
+ build-depends:
+ - autoconf-tarball
+ - automake
+ - autopoint
+ - libtool-tarball
- name: ca-certificates
morph: strata/core/ca-certificates.morph
repo: upstream:ca-certificates
@@ -173,6 +187,19 @@ chunks:
build-depends:
- autoconf-tarball
- automake
+- name: bison
+ morph: strata/core/bison.morph
+ repo: upstream:bison
+ ref: 2ab6d1daaccf32fc4314e4b2fe44da977f11a308
+ unpetrify-ref: baserock/v3.0.2
+ build-depends:
+ - autoconf-tarball
+ - automake
+ - flex
+ - autopoint
+ - git
+ - help2man
+ - mini-utils
- name: gperf
morph: strata/core/gperf.morph
repo: upstream:gperf
@@ -189,25 +216,26 @@ chunks:
- automake
- libtool-tarball
- name: util-linux
- morph: strata/core/util-linux.morph
+ morph: strata/core/util-linux-musl.morph
repo: upstream:util-linux
- ref: b567c9cbc854a36da0a198e4dcc463e134d26a25
- unpetrify-ref: v2.25.2
- build-depends:
+ ref: d118c36d181352b9dd03d4f9b3203d588e410858
+ unpetrify-ref: baserock/2.25.2-musl
+ build-depends:
- autoconf-tarball
- - automake
- - gettext-tiny
- - git
- - libtool-tarball
-- name: nano
- morph: strata/core/nano.morph
- repo: upstream:nano-tarball
+ - automake
+ - autopoint
+ - git
+ - libtool-tarball
+ - pkg-config
+- name: nano
+ morph: strata/core/nano.morph
+ repo: upstream:nano-tarball
ref: 8b74abeb02c01ddc768c465a826360cf33cec063
unpetrify-ref: baserock/morph
- build-depends:
- - ncurses
- - automake
- - gettext-tiny
+ build-depends:
+ - ncurses
+ - automake
+ - autopoint
- name: bc
repo: upstream:bc-tarball
ref: 0956d119432ff6a2e85bae1fa336df799cad70b0
@@ -215,3 +243,21 @@ chunks:
build-depends:
- flex
- texinfo-tarball
+- name: shadow
+ morph: strata/core/shadow.morph
+ repo: upstream:shadow
+ ref: 4f5000a45963c2cc2a403ad23e459f20296b29c2
+ unpetrify-ref: baserock/4.2
+ build-depends:
+ - autoconf-tarball
+ - automake
+ - autopoint
+ - libtool-tarball
+ - bison
+- name: patch
+ morph: strata/core/patch.morph
+ repo: upstream:patch
+ ref: 3bbb26c928a147cfcf0756f1cc0a1307e5cc663f
+ unpetrify-ref: baserock/v2.7.1
+ build-depends:
+ - shadow
diff --git a/strata/core/autopoint.morph b/strata/core/autopoint.morph
new file mode 100644
index 00000000..0864993d
--- /dev/null
+++ b/strata/core/autopoint.morph
@@ -0,0 +1,13 @@
+name: autopoint
+kind: chunk
+configure-commands:
+- ./configure --prefix="$PREFIX"
+build-commands:
+- make
+install-commands:
+- install -d $DESTDIR$PREFIX/bin
+- cd gettext-tools/misc ; install -m 755 autopoint "$DESTDIR$PREFIX/bin/autopoint"
+- install -d $DESTDIR$PREFIX/share/gettext
+- cd gettext-tools/misc ; install -m 644 archive.dir.tar.gz "$DESTDIR$PREFIX/share/gettext/archive.dir.tar.gz"
+- cd gettext-runtime/m4 ; make install
+- cd gettext-tools/m4 ; make install
diff --git a/strata/core/flex-musl.morph b/strata/core/flex-musl.morph
index 7ca8f538..b4077047 100644
--- a/strata/core/flex-musl.morph
+++ b/strata/core/flex-musl.morph
@@ -1,4 +1,4 @@
-name: flex
+name: flex-musl
kind: chunk
configure-commands:
- ./configure --prefix="$PREFIX"
diff --git a/strata/core/git-musl.morph b/strata/core/git-musl.morph
index 9880c1e9..fe89f904 100644
--- a/strata/core/git-musl.morph
+++ b/strata/core/git-musl.morph
@@ -1,4 +1,4 @@
-name: git
+name: git-musl
kind: chunk
build-system: autotools
pre-configure-commands:
diff --git a/strata/core/openssl-new-musl.morph b/strata/core/openssl-new-musl.morph
index b1113189..9e6743bb 100644
--- a/strata/core/openssl-new-musl.morph
+++ b/strata/core/openssl-new-musl.morph
@@ -1,4 +1,4 @@
-name: openssl-new
+name: openssl-new-musl
kind: chunk
max-jobs: 1
configure-commands:
diff --git a/strata/core/util-linux-musl.morph b/strata/core/util-linux-musl.morph
new file mode 100644
index 00000000..b3676b51
--- /dev/null
+++ b/strata/core/util-linux-musl.morph
@@ -0,0 +1,6 @@
+name: util-linux-musl
+kind: chunk
+build-system: autotools
+configure-commands:
+- ./autogen.sh
+- ./configure --prefix="$PREFIX" --disable-use-tty-group --disable-nls
diff --git a/strata/core/xz-musl.morph b/strata/core/xz-musl.morph
deleted file mode 100644
index 43fefd05..00000000
--- a/strata/core/xz-musl.morph
+++ /dev/null
@@ -1,11 +0,0 @@
-name: xz
-kind: chunk
-configure-commands:
-- sed -i -e '/AUTOPOINT/d' autogen.sh
-- sed -i -e '/GETTEXT/d' configure.ac
-- ./autogen.sh --prefix=$PREFIX
-- ./configure --prefix=$PREFIX
-build-commands:
-- make
-install-commands:
-- make DESTDIR="$DESTDIR" PREFIX="$PREFIX" install
diff --git a/strata/coreutils-common-musl.morph b/strata/coreutils-common-musl.morph
new file mode 100644
index 00000000..7528df19
--- /dev/null
+++ b/strata/coreutils-common-musl.morph
@@ -0,0 +1,29 @@
+name: coreutils-common-musl
+kind: stratum
+description: |
+ We need to split this so we can build stuff using coreutils but we can not
+ having it in the final systems (for example in genivi ones that do not
+ accept GPLv3 code)
+build-depends:
+- morph: strata/core-musl.morph
+chunks:
+- name: coreutils
+ morph: strata/coreutils-common/coreutils.morph
+ repo: upstream:coreutils
+ ref: 9df9643842e4b4d8ece710fe6105f32fa38a0d22
+ unpetrify-ref: baserock/8.23
+ build-depends: []
+- name: sed
+ morph: strata/coreutils-common/sed.morph
+ repo: upstream:sed
+ ref: ed4b1d7c04f92b330b940d4f0d02cd51d2473ce9
+ unpetrify-ref: baserock/morph
+ build-depends:
+ - coreutils
+- name: diff
+ morph: strata/coreutils-common/diff.morph
+ repo: upstream:diffutils
+ ref: bd86eb1a1e87ab85a7c8dbb658fa829ce69c252e
+ unpetrify-ref: baserock/v3.3
+ build-depends:
+ - coreutils
diff --git a/strata/coreutils-common/coreutils-musl.morph b/strata/coreutils-common/coreutils-musl.morph
new file mode 100644
index 00000000..5f624650
--- /dev/null
+++ b/strata/coreutils-common/coreutils-musl.morph
@@ -0,0 +1,17 @@
+name: coreutils-musl
+kind: chunk
+build-system: autotools
+configure-commands:
+- sed -i -e '/^buildreq="/,/^"/{/rsync/d}' bootstrap.conf
+- sed -i -e '/^buildreq="/,/^"/{/gettext/d}' bootstrap.conf
+- bash bootstrap --skip-po --no-git --gnulib-srcdir=gnulib
+- FORCE_UNSAFE_CONFIGURE=1 ./configure --prefix="$PREFIX" --disable-nls
+build-commands:
+- make WERROR_CFLAGS=
+install-commands:
+- make INSTALL_PROGRAM=install DESTDIR="$DESTDIR" install
+# This hack is for supporting "fdatasync" argument in "dd" command
+# which busybox "dd" does not support.
+# This hack should dissappear when we merge /usr/bin and /bin.
+- mkdir -p "$DESTDIR"/bin/
+- ln -sf ../usr/bin/dd "$DESTDIR"/bin/
diff --git a/strata/coreutils-common/diff-musl.morph b/strata/coreutils-common/diff-musl.morph
new file mode 100644
index 00000000..b6acc5e3
--- /dev/null
+++ b/strata/coreutils-common/diff-musl.morph
@@ -0,0 +1,8 @@
+name: diff-musl
+kind: chunk
+build-system: autotools
+configure-commands:
+- sed -i -e '/^buildreq="/,/^"/{/rsync/d}' bootstrap.conf
+- sed -i -e '/^buildreq="/,/^"/{/gettext/d}' bootstrap.conf
+- ./bootstrap --skip-po
+- ./configure --prefix="$PREFIX" --disable-gcc-warnings --disable-nls
diff --git a/strata/coreutils-common/sed-musl.morph b/strata/coreutils-common/sed-musl.morph
new file mode 100644
index 00000000..d11bfaea
--- /dev/null
+++ b/strata/coreutils-common/sed-musl.morph
@@ -0,0 +1,13 @@
+name: sed-musl
+kind: chunk
+build-system: autotools
+configure-commands:
+- sed -i -e '/^buildreq="/,/^"/{/rsync/d}' bootstrap.conf
+- sed -i -e '/^buildreq="/,/^"/{/gettext/d}' bootstrap.conf
+- ./bootstrap --skip-po
+- ac_c_werror_flag=no ./configure --prefix="$PREFIX" --disable-gcc-warnings --disable-nls
+post-install-commands:
+# This hack is to use GNU sed instead the busybox one.
+# This will dissappear when we merge /usr/bin and /bin.
+- mkdir -p "$DESTDIR"/bin/
+- ln -sf ../usr/bin/sed "$DESTDIR"/bin/
diff --git a/strata/foundation-musl.morph b/strata/foundation-musl.morph
new file mode 100644
index 00000000..1e3f7b42
--- /dev/null
+++ b/strata/foundation-musl.morph
@@ -0,0 +1,92 @@
+name: foundation-musl
+kind: stratum
+description: Basic userland runtime system
+build-depends:
+- morph: strata/coreutils-common-musl.morph
+chunks:
+- name: attr
+ morph: strata/foundation/attr.morph
+ repo: upstream:attr
+ ref: fdcd484ed6f5df9a2d60ae446c325f12e3d9d0b3
+ unpetrify-ref: baserock/morph-musl
+ build-depends: []
+- name: groff
+ morph: strata/foundation/groff.morph
+ repo: upstream:groff-git
+ ref: 16305a24e67966ace06d55e2a0b98cc0e3127a93
+ unpetrify-ref: 1.22.3
+ build-depends: []
+- name: kmod
+ morph: strata/foundation/kmod.morph
+ repo: upstream:kmod
+ ref: ae58de0fcb4a6528dd365e23d383bbe2eaf2d566
+ unpetrify-ref: v18
+ build-depends: []
+- name: time-zone-database
+ morph: strata/foundation/time-zone-database.morph
+ repo: upstream:tz
+ ref: a0782484f101ac55c916568bc1c490d7761fc904
+ unpetrify-ref: 2015a
+ build-depends: []
+- name: libcap2
+ morph: strata/foundation/libcap2.morph
+ repo: upstream:libcap2
+ ref: 4f7cca1bc9c2a274edb39d351b65747010d3ba7b
+ unpetrify-ref: baserock/morph
+ build-depends:
+ - attr
+- name: libffi
+ morph: strata/foundation/libffi.morph
+ repo: upstream:libffi
+ ref: 77d4586cc47e8f4c02278afbc220145bba0d442b
+ unpetrify-ref: baserock/morph
+ build-depends: []
+- name: pciutils
+ morph: strata/foundation/pciutils.morph
+ repo: upstream:pciutils
+ ref: 27ace7572d430d3a88d3bd4d4594fd6633a4ea50
+ unpetrify-ref: baserock/morph-musl
+ build-depends: []
+- name: glib
+ repo: upstream:glib
+ ref: 4125415e7f4d1213fc7122beac0d91af08e37b28
+ build-depends:
+ - libffi
+- name: linux-pam
+ morph: strata/foundation/linux-pam.morph
+ repo: upstream:linux-pam
+ ref: a3ebc3aeb92ccf413253d934cf14169d1d36b15e
+ unpetrify-ref: baserock/v1.1.8-musl
+ build-depends: []
+- name: lzo
+ morph: strata/foundation/lzo.morph
+ repo: upstream:lzo
+ ref: 5cca83e4d1b0be5825a597ab24ffa6126dc0bc95
+ unpetrify-ref: lzo-2.08
+ build-depends: []
+- 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-musl.morph
+ repo: upstream:e2fsprogs
+ ref: 6a3741ad293031447b95b88431eafa77401a8987
+ unpetrify-ref: v1.42.12
+ build-depends: []
+- name: openssh
+ morph: strata/foundation/openssh-musl.morph
+ repo: file:///src/workspace/openssh-git
+ ref: 7e02d01ea76505e7fb33db48b8fc67f3b6f6e99b
+ unpetrify-ref: baserock/morph-musl
+ build-depends: []
+- name: tbdiff
+ morph: strata/foundation/tbdiff.morph
+ repo: baserock:baserock/tbdiff
+ ref: 47fb728f2432929868666afc915dbc5a64836c08
+ unpetrify-ref: master
+ build-depends:
+ - attr
diff --git a/strata/foundation/e2fsprogs-musl.morph b/strata/foundation/e2fsprogs-musl.morph
new file mode 100644
index 00000000..b6fcde9b
--- /dev/null
+++ b/strata/foundation/e2fsprogs-musl.morph
@@ -0,0 +1,20 @@
+name: e2fsprogs-musl
+kind: chunk
+build-system: autotools
+configure-commands:
+# Configure with the usual paths for binaries and config
+# but also disable whatever we can that is already provided by util-linux
+# Disabling e2fsprofs' libblkid does not work, but we don't have to
+# install it.
+- |
+ ./configure --prefix="$PREFIX" --sysconfdir=/etc
+install-commands:
+# e2fsprogs also includes tools that are provided by util-linux, so we
+# need to selectively exclude them. Removing them directly from DESTDIR
+# causes problems, so we need to remove them beforehand.
+- |
+ td="$(mktemp -d)"
+ make DESTDIR="$td" install-libs
+ find "$td" \( -name blkid -o -name findfs -o -name fsck \) -delete
+ find "$td" \( -name blkid.8 -o -name findfs.8 \) -delete
+ mv "$td"/* "$DESTDIR"
diff --git a/strata/foundation/openssh-musl.morph b/strata/foundation/openssh-musl.morph
new file mode 100644
index 00000000..7c57ad79
--- /dev/null
+++ b/strata/foundation/openssh-musl.morph
@@ -0,0 +1,29 @@
+name: openssh-musl
+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 \
+ ac_cv_have_decl_howmany=no
+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/systems/base-system-x86_64-musl.morph b/systems/base-system-x86_64-musl.morph
new file mode 100644
index 00000000..6154ddbf
--- /dev/null
+++ b/systems/base-system-x86_64-musl.morph
@@ -0,0 +1,19 @@
+name: base-system-x86_64-musl
+kind: system
+description: The set of strata required to have a minimal system for a 64-bit x86
+ system.
+arch: x86_64
+strata:
+- name: build-essential-musl
+ morph: strata/build-essential-musl.morph
+- name: core-musl
+ morph: strata/core-musl.morph
+- name: foundation-musl
+ morph: strata/foundation-musl.morph
+- name: bsp-x86_64-musl
+ morph: strata/bsp-x86_64-musl.morph
+configuration-extensions:
+- set-hostname
+- nfsboot
+- install-files
+- busybox-init