1
1
Fork 0
mirror of https://code.mensbeam.com/MensBeam/Arsse.git synced 2024-12-22 13:12:41 +00:00

Check for RPM keys before producing RPM packages

This commit is contained in:
J. King 2021-07-28 17:49:39 -04:00
parent 530296e104
commit 892c4c668d
2 changed files with 12 additions and 9 deletions

View file

@ -436,6 +436,12 @@ class RoboFile extends \Robo\Tasks {
$this->yell("Build target '$target' skipped: RPM tools not available"); $this->yell("Build target '$target' skipped: RPM tools not available");
continue; continue;
} }
$installed = explode("\n", trim(`rpm -qa "gpg-pubkey*"`));
$missing = array_diff($s['keys'], $installed);
if ($missing) {
$this->yell("Build target '$target' skipped: the following RPM verificcation keys are not installed:\n".implode("\n", $missing));
continue;
}
} }
$recipe = escapeshellarg($recipe[0]); $recipe = escapeshellarg($recipe[0]);
$dist = "--dist ".escapeshellarg($s['dist']); $dist = "--dist ".escapeshellarg($s['dist']);

View file

@ -1,27 +1,24 @@
<?php <?php
return [ return [
'arch' => [ 'arch' => [
'type' => "arch",
'repos' => ["http://mirror.csclub.uwaterloo.ca/archlinux/core/os/x86_64/", "http://mirror.csclub.uwaterloo.ca/archlinux/extra/os/x86_64/"],
'keys' => [],
'dist' => "arch", 'dist' => "arch",
'recipe' => "PKGBUILD", 'recipe' => "PKGBUILD",
'repos' => ["http://mirror.csclub.uwaterloo.ca/archlinux/core/os/x86_64/", "http://mirror.csclub.uwaterloo.ca/archlinux/extra/os/x86_64/"],
'keys' => [],
'output' => "/usr/src/packages/ARCHPKGS/*.pkg.tar.zst", 'output' => "/usr/src/packages/ARCHPKGS/*.pkg.tar.zst",
], ],
'debian' => [ 'debian' => [
'type' => "debian",
'repos' => ["http://ftp.ca.debian.org/debian/?dist=buster&component=main"],
'keys' => [],
'dist' => "debian10", 'dist' => "debian10",
'recipe' => "*.dsc", 'recipe' => "*.dsc",
'repos' => ["http://ftp.ca.debian.org/debian/?dist=buster&component=main"],
'keys' => [],
'output' => "/usr/src/packages/DEBS/*.deb", 'output' => "/usr/src/packages/DEBS/*.deb",
], ],
'suse' => [ 'suse' => [
'type' => "rpm",
'repos' => ["http://mirror.csclub.uwaterloo.ca/opensuse/distribution/leap/15.3/repo/oss/"],
'keys' => ["gpg-pubkey-39db7c82-5f68629b", "gpg-pubkey-65176565-5d94a381", "gpg-pubkey-307e3d54-5aaa90a5", "gpg-pubkey-3dbdc284-53674dd4"],
'dist' => "sl15.3", 'dist' => "sl15.3",
'recipe' => "arsse.spec", 'recipe' => "arsse.spec",
'repos' => ["http://mirror.csclub.uwaterloo.ca/opensuse/distribution/leap/15.3/repo/oss/"],
'keys' => ["gpg-pubkey-39db7c82-5f68629b", "gpg-pubkey-65176565-5d94a381", "gpg-pubkey-307e3d54-5aaa90a5", "gpg-pubkey-3dbdc284-53674dd4"],
'output' => "/home/abuild/rpmbuild/RPMS/noarch/*.rpm", 'output' => "/home/abuild/rpmbuild/RPMS/noarch/*.rpm",
], ],
]; ];