index : builder | |
Archlinux32 build system | gitolite user |
summaryrefslogtreecommitdiff |
author | Erich Eckner <git@eckner.net> | 2017-06-23 15:43:39 +0200 |
---|---|---|
committer | Erich Eckner <git@eckner.net> | 2017-06-23 15:43:39 +0200 |
commit | e6407986535c5f17fff79315e7b541d8258d64e0 (patch) | |
tree | a2c6cb61900cad5359d7a9f35216a1c73d3b353e | |
parent | 3a92880a3011e29422902a01f3f23fa39aa4497f (diff) |
-rwxr-xr-x | bin/common-functions | 31 | ||||
-rwxr-xr-x | bin/mksrcinfo | 3 |
diff --git a/bin/common-functions b/bin/common-functions index b07e75d..714a05a 100755 --- a/bin/common-functions +++ b/bin/common-functions @@ -194,15 +194,36 @@ generate_package_metadata() { exit 1 fi + overlays_dir="$(mktemp -d)" + + sudo mount -t tmpfs none "${overlays_dir}" + + mkdir \ + "${overlays_dir}/upper" \ + "${overlays_dir}/work" \ + "${overlays_dir}/merged" + + sudo mount -t overlay overlay -o lowerdir="${PKGBUILD%/*}":"/",upperdir="${overlays_dir}/upper",workdir="${overlays_dir}/work" "${overlays_dir}/merged" + ( - cd "${PKGBUILD%/*}" + cd "${overlays_dir}/merged" apply_package_customizations - grep -q '\$CARCH' 'PKGBUILD' && \ - CARCH=i686 makepkg --printsrcinfo > \ - "${file_prefix}.SRCINFO" || \ - mksrcinfo -o "${file_prefix}.SRCINFO" ) + sudo systemd-nspawn -q \ + -D "${overlays_dir}/merged" \ + --register=no \ + ${base_dir}/bin/mksrcinfo + + sudo umount -f "${overlays_dir}/merged" + + mv \ + "${overlays_dir}/upper/.SRCINFO" \ + "${file_prefix}.SRCINFO" + + sudo umount -f "${overlays_dir}" + rmdir "${overlays_dir}" + # otherwise this just calls for trouble sed -i '/=\s*$/d' "${file_prefix}.SRCINFO" diff --git a/bin/mksrcinfo b/bin/mksrcinfo new file mode 100755 index 0000000..a033a6a --- /dev/null +++ b/bin/mksrcinfo @@ -0,0 +1,3 @@ +#!/bin/sh + +mksrcinfo -o .SRCINFO |