Skip to content

Commit 2c88d88

Browse files
committed
repro: Support BUILDTOOL and BUILDTOOLVER
Signed-off-by: Morten Linderud <morten@linderud.pw>
1 parent 57b1e91 commit 2c88d88

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

repro.in

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,7 @@ install -d -o builduser -g builduser /pkgdest
260260
install -d -o builduser -g builduser /srcpkgdest
261261
install -d -o builduser -g builduser /build
262262
__END__
263-
exec_nspawn "$build" $args sudo -iu builduser bash -c ". /etc/profile; cd /startdir; SOURCE_DATE_EPOCH=$SOURCE_DATE_EPOCH makepkg ${makepkg_args[*]}"
263+
exec_nspawn "$build" $args sudo -iu builduser bash -c ". /etc/profile; . /env; cd /startdir; makepkg ${makepkg_args[*]}"
264264
mkdir -p "$OUTDIR"
265265
for pkgfile in "$BUILDDIRECTORY/$build"/pkgdest/*; do
266266
mv "$pkgfile" "$OUTDIR/"
@@ -339,6 +339,8 @@ function cmd_check(){
339339

340340
pkgbuild_sha256sum="${buildinfo[pkgbuild_sha256sum]}"
341341
SOURCE_DATE_EPOCH="${buildinfo[builddate]}"
342+
BUILDTOOL=${buildinfo[buildtool]}
343+
BUILDTOOLVER=${buildinfo[buildtoolver]}
342344

343345
if [[ ${format} -ne 1 && ${format} -ne 2 ]]; then
344346
error "unsupported BUILDINFO format or no format definition found, aborting rebuild"
@@ -476,7 +478,7 @@ cp -v /usr/share/devtools/makepkg-x86_64.conf /mnt/etc/makepkg.conf
476478
__END__
477479
lock_close 9 "$KEYRINGCACHE/$keyring_package.lock"
478480

479-
# Setup environment
481+
# Setup makepkg.conf
480482
{
481483
printf 'MAKEFLAGS="%s"\n' "${MAKEFLAGS:--j$(nproc)}"
482484
printf 'PKGDEST=/pkgdest\n'
@@ -489,6 +491,13 @@ __END__
489491
printf 'PKGEXT=".pkg.tar%s"\n' "${pkg##*tar}"
490492
} >> "$build_root_dir/etc/makepkg.conf"
491493

494+
# Setup environment variables for makepkg
495+
{
496+
printf 'export SOURCE_DATE_EPOCH="%s"\n' "${SOURCE_DATE_EPOCH}"
497+
printf 'export BUILDTOOL="%s"\n' "${BUILDTOOL}"
498+
printf 'export BUILDTOOLVER="%s"\n' "${BUILDTOOLVER}"
499+
} >> "$build_root_dir/env"
500+
492501
printf '%s.UTF-8 UTF-8\n' en_US de_DE > "$build_root_dir/etc/locale.gen"
493502
printf 'LANG=en_US.UTF-8\n' > "$build_root_dir/etc/locale.conf"
494503
exec_nspawn "$build" locale-gen

0 commit comments

Comments
 (0)