52 lines
1.7 KiB
Bash
Executable File
52 lines
1.7 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
# 2018 Luke Shumaker
|
|
{
|
|
set -euE
|
|
GITREF="${1:-branch=systemd/master}"
|
|
workdir=$PWD/workdir
|
|
|
|
mkdir -p -- "$workdir"
|
|
gitget bare https://git.parabola.nu/~lukeshu/systemd.git "$workdir/systemd.git"
|
|
|
|
# Build systemd 232
|
|
mkdir -p "$workdir/build-232"
|
|
./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-232:/home/testuser/packages/abs/systemd" \
|
|
"${workdir}/build-232/build.raw"
|
|
./osi-run "${workdir}/build-232/build.raw" <<-EOF
|
|
#!/usr/bin/env bash
|
|
set -ex
|
|
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"
|
|
|
|
# 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
|
|
cd ~/packages/abs/systemd
|
|
sed 's:@GITREF@:${GITREF}:' < PKGBUILD.in > PKGBUILD
|
|
script --return --quiet --command 'sudo libremakepkg' /dev/null
|
|
EOF
|
|
./osi-extract "${workdir}/build-main/build.raw" /home/testuser/packages/pkgdest "${workdir}/build-main/pkgdest"
|
|
}
|