mirror of
https://github.com/xcat2/xcat-core.git
synced 2026-07-31 18:19:40 +00:00
fix(packaging): verify xCAT repository metadata
Signed-off-by: Vinícius Ferrão <2031761+viniciusferrao@users.noreply.github.com>
This commit is contained in:
@@ -12,6 +12,7 @@ my $repo_root = File::Spec->rel2abs(File::Spec->catdir($FindBin::Bin, '..', '..'
|
||||
my $spec = read_file('xcat-release/xcat-release.spec');
|
||||
like($spec, qr/^Name:\s+xcat-release$/m, 'package has the expected name');
|
||||
like($spec, qr/^BuildArch:\s+noarch$/m, 'package is architecture independent');
|
||||
like($spec, qr/^Requires:\s+dnf$/m, 'package is limited to DNF-based systems');
|
||||
like($spec, qr/^%config\(noreplace\) .*xcat-core\.repo$/m, 'core repo preserves local changes');
|
||||
like($spec, qr/^%config\(noreplace\) .*xcat-dep\.repo$/m, 'dependency repo preserves local changes');
|
||||
like($spec, qr{RPM-GPG-KEY-xCAT}, 'package installs the signing key');
|
||||
@@ -59,6 +60,7 @@ sub assert_repo_security {
|
||||
my ($content, $label) = @_;
|
||||
like($content, qr/^enabled=1$/m, "$label repo is enabled");
|
||||
like($content, qr/^gpgcheck=1$/m, "$label repo verifies packages");
|
||||
like($content, qr/^repo_gpgcheck=1$/m, "$label repo verifies repository metadata");
|
||||
like(
|
||||
$content,
|
||||
qr{^gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-xCAT$}m,
|
||||
|
||||
@@ -3,4 +3,5 @@ name=xCAT Core packages
|
||||
baseurl=https://xcat.org/files/xcat/repos/yum/latest/xcat-core
|
||||
enabled=1
|
||||
gpgcheck=1
|
||||
repo_gpgcheck=1
|
||||
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-xCAT
|
||||
|
||||
@@ -3,4 +3,5 @@ name=xCAT dependencies
|
||||
baseurl=https://xcat.org/files/xcat/repos/yum/latest/xcat-dep/rh$releasever/$basearch
|
||||
enabled=1
|
||||
gpgcheck=1
|
||||
repo_gpgcheck=1
|
||||
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-xCAT
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
Summary: xCAT repository configuration
|
||||
Summary: xCAT DNF repository configuration
|
||||
Name: xcat-release
|
||||
Version: %{?version:%{version}}%{!?version:%(cat Version)}
|
||||
Release: %{?release:%{release}}%{!?release:%(cat Release)}
|
||||
@@ -6,10 +6,11 @@ License: EPL
|
||||
URL: https://xcat.org/
|
||||
Source0: xcat-release-%{version}.tar.gz
|
||||
BuildArch: noarch
|
||||
Requires: dnf
|
||||
|
||||
%description
|
||||
Installs the xCAT core and dependency repository definitions and the public
|
||||
signing key used to verify their packages.
|
||||
Installs the xCAT core and dependency DNF repository definitions and the public
|
||||
signing key used to verify their packages and repository metadata.
|
||||
|
||||
%prep
|
||||
%setup -q -n xcat-release
|
||||
|
||||
Reference in New Issue
Block a user