@@ -334,9 +334,7 @@ function cmd_check(){
334
334
done <<< " $( buildinfo -ff " ${pkg} " ) "
335
335
packager= " ${buildinfo[packager]} "
336
336
builddir= " ${buildinfo[builddir]} "
337
- _pkgver= " ${buildinfo[pkgver]} "
338
- pkgrel= ${_pkgver##* -}
339
- pkgver= ${_pkgver% -* }
337
+ pkgver= " ${buildinfo[pkgver]} "
340
338
pkgbase= ${buildinfo[pkgbase]}
341
339
options= ${buildinfo[options]}
342
340
buildenv= ${buildinfo[buildenv]}
@@ -377,31 +375,28 @@ function cmd_check(){
377
375
378
376
# Father I have sinned
379
377
if (( ! pkgbuild_file)) ; then
380
- msg2 " Fetching PKGBUILD from ASP ..."
378
+ msg2 " Fetching PKGBUILD from git ..."
381
379
382
380
# Lock the cachedir as we might have a race condition with pacman -S and the cachedir
383
381
lock 9 " ${cachedir} .lock"
384
382
385
383
EPHEMERAL=1 exec_nspawn root --bind=" ${build_root_dir} /startdir:/startdir" --bind=" $( readlink -e ${cachedir} ) :/var/cache/pacman/pkg" \
386
384
bash << -__END__
387
385
shopt -s globstar
388
- pacman -S asp --noconfirm --needed
389
- if ! asp checkout $pkgbase ; then
386
+
387
+ pacman -S devtools --noconfirm --needed
388
+
389
+ if ! pkgctl repo clone --protocol https --switch "$pkgver " "$pkgbase "; then
390
390
echo "ERROR: Failed checkout $pkgbase " >&2
391
391
exit 1
392
392
fi
393
- pushd $pkgbase
394
- for rev in \$ (git rev-list --all -- repos/); do
395
- pkgbuild_checksum=\$ (git show \$ rev:trunk/PKGBUILD | sha256sum -b)
396
- pkgbuild_checksum=\$ {pkgbuild_checksum%% *}
397
- if [ \$ pkgbuild_checksum = $pkgbuild_sha256sum ]; then
398
- git checkout \$ rev
399
- mv ./trunk/* /startdir
400
- exit 0
401
- fi
402
- done
403
- echo "ERROR: Failed to find commit this was built with (PKGBUILD checksum didn't match any commit)" >&2
404
- exit 1
393
+
394
+ if ! echo "$pkgbuild_sha256sum $pkgbase /PKGBUILD" | sha256sum -c; then
395
+ echo "ERROR: Failed to find commit this was built with (PKGBUILD checksum didn't match)" >&2
396
+ exit 1
397
+ fi
398
+
399
+ mv ./$pkgbase /* /startdir
405
400
__END__
406
401
lock_close 9 " ${cachedir} .lock"
407
402
elif [[ -r " PKGBUILD" ]]; then
@@ -490,6 +485,7 @@ rm --recursive /etc/pacman.d/gnupg/
490
485
cp --target-directory= /etc/pacman.d/ --recursive /gnupg
491
486
echo " faked-system-time ${SOURCE_DATE_EPOCH} " >> /etc/pacman.d/gnupg/gpg.conf
492
487
pacstrap -G -U /mnt --needed " \$ @"
488
+
493
489
echo " Installing devtools from $DEVTOOLS_PKG "
494
490
# Ignore all dependencies since we only want the file
495
491
# Saves us a few seconds and doesn't download a bunch of things
@@ -499,7 +495,12 @@ if [[ "$DEVTOOLS_PKG" == https* ]]; then
499
495
else
500
496
pacman --noconfirm --needed -Sddu " $DEVTOOLS_PKG "
501
497
fi
502
- cp -v /usr/share/devtools/makepkg-x86_64.conf /mnt/etc/makepkg.conf
498
+
499
+ for makepkg_path in /usr/share/devtools/{makepkg-x86_64.conf,makepkg.d/x86_64.conf}; do
500
+ if [ -f " \$ makepkg_path" ]; then
501
+ cp -v " \$ makepkg_path" /mnt/etc/makepkg.conf
502
+ fi
503
+ done
503
504
__END__
504
505
lock_close 9 " $KEYRINGCACHE /$keyring_package .lock"
505
506
0 commit comments