Skip to content

Commit

Permalink
Merge pull request #51 from 2m/fix/fetch-gpg-2m
Browse files Browse the repository at this point in the history
Fetch gpg keys for source validation
  • Loading branch information
2m authored Oct 31, 2023
2 parents f2c3164 + d85a3d0 commit 1e857b7
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 5 deletions.
7 changes: 7 additions & 0 deletions entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,16 @@ install_deps() {
xargs yay -S --noconfirm --needed
}

fetch_gpg_keys() {
awk '/validpgpkeys/ {print $3}' .SRCINFO | \
xargs gpg --keyserver keyserver.ubuntu.com --recv-key
}

case $target in
pkgbuild)
namcap PKGBUILD
install_deps
fetch_gpg_keys
makepkg --syncdeps --noconfirm

# shellcheck disable=SC1091
Expand All @@ -73,6 +79,7 @@ case $target in
;;
run)
install_deps
fetch_gpg_keys
makepkg --syncdeps --noconfirm --install
eval "$command"
;;
Expand Down
13 changes: 8 additions & 5 deletions justfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,11 @@ build:
docker pull martynas/archlinux
docker build -t arch-pkgbuild-builder .

# run a comment on AUR project, like `just run-on-aur ucm-bin pkgbuild`
run-on-aur project command:
mkdir -p target
git -C target/{{project}} pull || git clone https://aur.archlinux.org/{{project}}.git target/{{project}}
docker run --rm -v {{pwd}}/target/{{project}}:/home/build -v /tmp/gh:/github/home arch-pkgbuild-builder {{command}} .
# run a command on a project, like:
# just run [email protected]:Marcool04/linux-fix-e1000e.git pkgbuild
# just run https://aur.archlinux.org/ucm-bin.git pkgbuild
run project-uri command:
rm -rf target
mkdir target
git clone {{project-uri}} target
docker run --rm -v {{pwd}}/target:/home/build -v /tmp/gh:/github/home arch-pkgbuild-builder {{command}} .

0 comments on commit 1e857b7

Please sign in to comment.