Skip to content

Commit

Permalink
chore: move common steps into base
Browse files Browse the repository at this point in the history
Signed-off-by: Andrew Rynhard <andrew@andrewrynhard.com>
  • Loading branch information
andrewrynhard committed Oct 12, 2019
1 parent bf4e6ab commit 1e2003e
Show file tree
Hide file tree
Showing 13 changed files with 212 additions and 281 deletions.
25 changes: 13 additions & 12 deletions base/pkg.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,20 @@ name: base
variant: scratch
shell: /toolchain/bin/bash
dependencies:
- image: docker.io/autonomy/tools:b4e3778
- stage: musl
- image: docker.io/autonomy/tools:b4e3778
- stage: musl
steps:
- prepare:
- |
cp -R /toolchain/lib/gcc /lib
cp -R /toolchain/lib/libgcc* /lib
- prepare:
- |
cp -R /toolchain/lib/gcc /lib
cp -R /toolchain/lib/libgcc* /lib
mkdir /bin
ln -sv /toolchain/bin/bash /bin/bash
ln -sv /toolchain/bin/bash /bin/sh
mkdir /bin
ln -sv /toolchain/bin/bash /bin/bash
ln -sv /toolchain/bin/bash /bin/sh
ln -sv /toolchain/bin/pwd /bin/pwd
adjust.sh
adjust.sh
finalize:
- from: /toolchain
to: /toolchain
- from: /
to: /
6 changes: 0 additions & 6 deletions containerd/pkg.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,6 @@ steps:
export GOPATH=/go
mkdir -p ${GOPATH}/src/github.com/containerd/containerd
tar -xzf containerd.tar.gz --strip-components=1 -C ${GOPATH}/src/github.com/containerd/containerd
mkdir /bin
ln -sv /toolchain/bin/bash /bin/bash
ln -sv /toolchain/bin/bash /bin/sh
cp -R /toolchain/lib/gcc /lib
cp -R /toolchain/lib/libgcc* /lib
build:
- |
export PKG_CONFIG_PATH=/usr/lib/pkgconfig
Expand Down
58 changes: 26 additions & 32 deletions dosfstools/pkg.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,39 +2,33 @@ name: dosfstools
variant: scratch
shell: /toolchain/bin/bash
dependencies:
- stage: base
- stage: musl
- stage: ca-certificates
- stage: base
- stage: musl
- stage: ca-certificates
steps:
- sources:
- url: https://github.com/dosfstools/dosfstools/releases/download/v4.1/dosfstools-4.1.tar.xz
destination: dosfstools.tar.xz
sha256: e6b2aca70ccc3fe3687365009dd94a2e18e82b688ed4e260e04b7412471cc173
sha512: e7a8aab34255d15e6865a7b031971352af1255134fab83389673bcc3cbd6ba255241bd2429070aeb4b927f8d7d73ccf1aeafe94566b133e88e7586897c317b78
prepare:
- |
tar -xJf dosfstools.tar.xz --strip-components=1
- sources:
- url: https://github.com/dosfstools/dosfstools/releases/download/v4.1/dosfstools-4.1.tar.xz
destination: dosfstools.tar.xz
sha256: e6b2aca70ccc3fe3687365009dd94a2e18e82b688ed4e260e04b7412471cc173
sha512: e7a8aab34255d15e6865a7b031971352af1255134fab83389673bcc3cbd6ba255241bd2429070aeb4b927f8d7d73ccf1aeafe94566b133e88e7586897c317b78
prepare:
- |
tar -xJf dosfstools.tar.xz --strip-components=1
mkdir /bin
ln -sv /toolchain/bin/bash /bin/bash
ln -sv /toolchain/bin/bash /bin/sh
cp -R /toolchain/lib/gcc /lib
cp -R /toolchain/lib/libgcc* /lib
mkdir build
cd build
mkdir build
cd build
../configure \
--prefix=/ \
--enable-compat-symlinks
build:
- |
cd build
make -j $(nproc)
install:
- |
cd build
make install DESTDIR=/rootfs
../configure \
--prefix=/ \
--enable-compat-symlinks
build:
- |
cd build
make -j $(nproc)
install:
- |
cd build
make install DESTDIR=/rootfs
finalize:
- from: /rootfs
to: /
- from: /rootfs
to: /
79 changes: 37 additions & 42 deletions eudev/pkg.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,51 +2,46 @@ name: eudev
variant: scratch
shell: /toolchain/bin/bash
dependencies:
- stage: base
- stage: musl
- stage: ca-certificates
- stage: base
- stage: musl
- stage: ca-certificates
steps:
- sources:
- url: https://dev.gentoo.org/~blueness/eudev/eudev-3.2.8.tar.gz
destination: eudev.tar.gz
sha256: 61e4948e9e51271c3cce2bb5311a30b206dd03ef011062e6c627fb007e43f6b8
sha512: 13221e6f9696a8630d867eb7d73f3bf5dd1bc2dfd80d62af00342be4cbf39a862e644ea3776fa4d91463e594ca50c5deecbeb7e05d161097e889ea58a66ccc42
prepare:
- |
tar -xzf eudev.tar.gz --strip-components=1
- sources:
- url: https://dev.gentoo.org/~blueness/eudev/eudev-3.2.8.tar.gz
destination: eudev.tar.gz
sha256: 61e4948e9e51271c3cce2bb5311a30b206dd03ef011062e6c627fb007e43f6b8
sha512: 13221e6f9696a8630d867eb7d73f3bf5dd1bc2dfd80d62af00342be4cbf39a862e644ea3776fa4d91463e594ca50c5deecbeb7e05d161097e889ea58a66ccc42
prepare:
- |
tar -xzf eudev.tar.gz --strip-components=1
mkdir /bin
ln -sv /toolchain/bin/bash /bin/bash
ln -sv /toolchain/bin/bash /bin/sh
cp -R /toolchain/lib/gcc /lib
cp -R /toolchain/lib/libgcc* /lib
# Required by gperf.
cp /toolchain/lib/libstdc++* /lib
# Required by gperf.
cp /toolchain/lib/libstdc++* /lib
cat > config.cache << "EOF"
HAVE_BLKID=1
BLKID_LIBS="-lblkid"
BLKID_CFLAGS="-I${TOOLCHAIN}/include"
EOF
cat > config.cache << "EOF"
HAVE_BLKID=1
BLKID_LIBS="-lblkid"
BLKID_CFLAGS="-I${TOOLCHAIN}/include"
EOF
mkdir build
cd build
mkdir build
cd build
../configure \
--prefix=/usr \
--libexecdir=/usr/libexec \
--sbindir=/sbin \
--disable-manpages \
--enable-hwdb \
--disable-static
build:
- |
cd build
make -j $(nproc)
install:
- |
cd build
make install DESTDIR=/rootfs
../configure \
--prefix=/usr \
--libexecdir=/usr/libexec \
--sbindir=/sbin \
--disable-manpages \
--enable-hwdb \
--disable-static
build:
- |
cd build
make -j $(nproc)
install:
- |
cd build
make install DESTDIR=/rootfs
finalize:
- from: /rootfs
to: /
- from: /rootfs
to: /
68 changes: 31 additions & 37 deletions iptables/pkg.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,44 +2,38 @@ name: iptables
variant: scratch
shell: /toolchain/bin/bash
dependencies:
- stage: base
- stage: musl
- stage: ca-certificates
- stage: base
- stage: musl
- stage: ca-certificates
steps:
- sources:
- url: http://www.netfilter.org/projects/iptables/files/iptables-1.8.2.tar.bz2
destination: iptables.tar.bz2
sha256: a3778b50ed1a3256f9ca975de82c2204e508001fc2471238c8c97f3d1c4c12af
sha512: 8cf0f515764e1dc6e03284581d682d1949b33e8f25fea29c27ae856f1089fe8ca7b1814524b85f4378fd1fc7c7c7d002f06557b257ae2bbc945f8555bad0dc76
prepare:
- |
tar -xjf iptables.tar.bz2 --strip-components=1
- sources:
- url: http://www.netfilter.org/projects/iptables/files/iptables-1.8.2.tar.bz2
destination: iptables.tar.bz2
sha256: a3778b50ed1a3256f9ca975de82c2204e508001fc2471238c8c97f3d1c4c12af
sha512: 8cf0f515764e1dc6e03284581d682d1949b33e8f25fea29c27ae856f1089fe8ca7b1814524b85f4378fd1fc7c7c7d002f06557b257ae2bbc945f8555bad0dc76
prepare:
- |
tar -xjf iptables.tar.bz2 --strip-components=1
mkdir /bin
ln -sv /toolchain/bin/bash /bin/bash
ln -sv /toolchain/bin/bash /bin/sh
cp -R /toolchain/lib/gcc /lib
cp -R /toolchain/lib/libgcc* /lib
mkdir build
cd build
mkdir build
cd build
../configure \
--prefix=/usr \
--libexecdir=/usr/libexec \
--disable-static \
--sbindir=/sbin \
--disable-nftables \
--enable-libipq \
--with-xtlibdir=/lib/xtables
build:
- |
cd build
make -j $(nproc)
install:
- |
cd build
make install DESTDIR=/rootfs
../configure \
--prefix=/usr \
--libexecdir=/usr/libexec \
--disable-static \
--sbindir=/sbin \
--disable-nftables \
--enable-libipq \
--with-xtlibdir=/lib/xtables
build:
- |
cd build
make -j $(nproc)
install:
- |
cd build
make install DESTDIR=/rootfs
finalize:
- from: /rootfs
to: /
- from: /rootfs
to: /
6 changes: 0 additions & 6 deletions kmod/pkg.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,6 @@ steps:
- |
tar -xJf kmod.tar.xz --strip-components=1
mkdir /bin
ln -sv /toolchain/bin/bash /bin/bash
ln -sv /toolchain/bin/bash /bin/sh
cp -R /toolchain/lib/gcc /lib
cp -R /toolchain/lib/libgcc* /lib
mkdir build
cd build
../configure \
Expand Down
48 changes: 21 additions & 27 deletions libressl/pkg.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,33 +2,27 @@ name: libressl
variant: scratch
shell: /toolchain/bin/bash
dependencies:
- stage: base
- stage: musl
- stage: ca-certificates
- stage: base
- stage: musl
- stage: ca-certificates
steps:
- sources:
- url: https://ftp.openbsd.org/pub/OpenBSD/LibreSSL/libressl-2.9.0.tar.gz
destination: libressl.tar.gz
sha256: eb5f298408b723f11a0ca0192c122ecb79b4855bfdf7eea183a6264296a13cf4
sha512: db7fec664bef8d76204ca691c11df236abce3c85b2a51011eec5bd302e273b62fa3cfce0430980915c3f3ce34176d5ef9c187902f0b39d7fc151e69e552b499c
prepare:
- |
tar -xzf libressl.tar.gz --strip-components=1
- sources:
- url: https://ftp.openbsd.org/pub/OpenBSD/LibreSSL/libressl-2.9.0.tar.gz
destination: libressl.tar.gz
sha256: eb5f298408b723f11a0ca0192c122ecb79b4855bfdf7eea183a6264296a13cf4
sha512: db7fec664bef8d76204ca691c11df236abce3c85b2a51011eec5bd302e273b62fa3cfce0430980915c3f3ce34176d5ef9c187902f0b39d7fc151e69e552b499c
prepare:
- |
tar -xzf libressl.tar.gz --strip-components=1
mkdir /bin
ln -sv /toolchain/bin/bash /bin/bash
ln -sv /toolchain/bin/bash /bin/sh
cp -R /toolchain/lib/gcc /lib
cp -R /toolchain/lib/libgcc* /lib
./configure \
--prefix=/usr
build:
- |
make -j $(nproc)
install:
- |
make install DESTDIR=/rootfs
./configure \
--prefix=/usr
build:
- |
make -j $(nproc)
install:
- |
make install DESTDIR=/rootfs
finalize:
- from: /rootfs
to: /
- from: /rootfs
to: /
Loading

0 comments on commit 1e2003e

Please sign in to comment.