Skip to content

Commit

Permalink
[repro] Add BUILDENV and OPTIONS to the build env
Browse files Browse the repository at this point in the history
Signed-off-by: Morten Linderud <morten@linderud.pw>
  • Loading branch information
Foxboron committed Nov 12, 2019
1 parent 2f6a3eb commit 5dffe47
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions repro.in
Original file line number Diff line number Diff line change
Expand Up @@ -217,15 +217,21 @@ function cmd_check(){
pkgrel=${_pkgver##*-}
pkgver=${_pkgver%-*}
pkgbase=${buildinfo[pkgbase]}
options=${buildinfo[options]}
buildenv=${buildinfo[buildenv]}

pkgbuild_sha256sum="${buildinfo[pkgbuild_sha256sum]}"
SOURCE_DATE_EPOCH="${buildinfo[builddate]}"

printf 'PACKAGER=%s' "${packager@Q}" > "$BUILDDIRECTORY/build/home/builduser/.makepkg.conf"
{
printf 'PACKAGER=%s\n' "${packager@Q}"
printf 'OPTIONS=(%s)\n' "${options}"
printf 'BUILDENV=(%s)\n' "${buildenv}"
} >> "$BUILDDIRECTORY/$build/home/builduser/.makepkg.conf"

# Father I have sinned
exec_nspawn "build" \
bash -x <<-__END__
bash <<-__END__
shopt -s globstar
mkdir -p $builddir
chown builduser:builduser $builddir
Expand All @@ -240,6 +246,7 @@ pkgbuild_checksum=\${pkgbuild_checksum%% *}
if [ \$pkgbuild_checksum != $pkgbuild_sha256sum ]; then
# TODO: use warning or exit
echo "Warning PKGBUILD checksum does not match"
exit 1
fi
mv ./\$file_path/* $builddir
pacman -Rs asp --noconfirm
Expand Down

0 comments on commit 5dffe47

Please sign in to comment.