2018-08-06 00:09:42 +00:00
|
|
|
#!/usr/bin/env bash
|
2018-08-06 01:49:45 +00:00
|
|
|
# 2018 Luke Shumaker
|
2018-08-06 00:09:42 +00:00
|
|
|
{
|
|
|
|
set -euE
|
2018-08-12 01:58:39 +00:00
|
|
|
gitrev="${1:-systemd/master}"
|
2018-08-06 00:09:42 +00:00
|
|
|
workdir=$PWD/workdir
|
|
|
|
|
|
|
|
mkdir -p -- "$workdir"
|
|
|
|
gitget bare https://git.parabola.nu/~lukeshu/systemd.git "$workdir/systemd.git"
|
|
|
|
|
2018-08-12 01:58:39 +00:00
|
|
|
pushd "$workdir/systemd.git"
|
|
|
|
COMMIT=$(git rev-parse --verify "$gitrev")
|
|
|
|
popd
|
|
|
|
|
2018-08-10 00:22:41 +00:00
|
|
|
# Build systemd 232
|
|
|
|
mkdir -p "$workdir/build-232"
|
2018-08-06 01:56:44 +00:00
|
|
|
./osi-mk \
|
2018-08-10 00:22:41 +00:00
|
|
|
--size=4G \
|
2018-08-06 01:49:45 +00:00
|
|
|
--package='base' \
|
2018-08-06 04:02:37 +00:00
|
|
|
--module=osi-mk.d/libretools.sh \
|
2018-08-09 21:38:54 +00:00
|
|
|
--module=osi-mk.d/builddeps.sh \
|
2018-08-06 04:02:37 +00:00
|
|
|
--module=osi-mk.d/systemd-dhcpcd.sh \
|
2018-08-06 01:56:44 +00:00
|
|
|
--module=osi-mk.d/systemd-osi-run.sh \
|
|
|
|
--directory="$workdir/systemd.git:/home/testuser/packages/srcdest/systemd" \
|
2018-08-10 00:22:41 +00:00
|
|
|
--directory="abs/systemd-232:/home/testuser/packages/abs/systemd" \
|
|
|
|
"${workdir}/build-232/build.raw"
|
|
|
|
./osi-run "${workdir}/build-232/build.raw" <<-EOF
|
2018-08-06 00:09:42 +00:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
set -ex
|
2018-08-10 00:22:41 +00:00
|
|
|
cd ~/packages/abs/systemd
|
|
|
|
script --return --quiet --command 'sudo libremakepkg' /dev/null
|
|
|
|
EOF
|
|
|
|
./osi-extract "${workdir}/build-232/build.raw" /home/testuser/packages/pkgdest "${workdir}/build-232/pkgdest"
|
2018-08-06 04:02:37 +00:00
|
|
|
|
2018-08-10 00:22:41 +00:00
|
|
|
# Build the code under under test
|
|
|
|
mkdir -p "$workdir/build-main"
|
|
|
|
./osi-mk \
|
|
|
|
--size=4G \
|
|
|
|
--package='base' \
|
|
|
|
--module=osi-mk.d/libretools.sh \
|
|
|
|
--module=osi-mk.d/builddeps.sh \
|
|
|
|
--module=osi-mk.d/systemd-dhcpcd.sh \
|
|
|
|
--module=osi-mk.d/systemd-osi-run.sh \
|
|
|
|
--directory="$workdir/systemd.git:/home/testuser/packages/srcdest/systemd" \
|
|
|
|
--directory="abs/systemd:/home/testuser/packages/abs/systemd" \
|
|
|
|
"${workdir}/build-main/build.raw"
|
|
|
|
./osi-run "${workdir}/build-main/build.raw" <<-EOF
|
|
|
|
#!/usr/bin/env bash
|
|
|
|
set -ex
|
2018-08-06 00:09:42 +00:00
|
|
|
cd ~/packages/abs/systemd
|
2018-08-12 01:56:00 +00:00
|
|
|
sed 's:@COMMIT@:${COMMIT}:' < PKGBUILD.in > PKGBUILD
|
2018-08-10 00:22:41 +00:00
|
|
|
script --return --quiet --command 'sudo libremakepkg' /dev/null
|
2018-08-06 00:09:42 +00:00
|
|
|
EOF
|
2018-08-10 00:22:41 +00:00
|
|
|
./osi-extract "${workdir}/build-main/build.raw" /home/testuser/packages/pkgdest "${workdir}/build-main/pkgdest"
|
2018-08-06 00:09:42 +00:00
|
|
|
}
|