Switch vendor archive update from alias to command and rename
Build and provide rpm of demus-packaging-utils / Build and deploy an rpm to the demus.dk repo (f44) (release) Failing after 26s
Build and provide rpm of demus-packaging-utils / Build and deploy an rpm to the demus.dk repo (rawhide) (release) Failing after 31s

This commit is contained in:
2026-06-05 16:15:36 +02:00
parent 69f31159d8
commit 751ee93487
6 changed files with 23 additions and 15 deletions
+6 -10
View File
@@ -1,6 +1,6 @@
%global major 0
%global minor 1
%global release 1
%global release 2
Name: demus-packaging-utils
Version: %{major}.%{minor}.%{release}
@@ -8,7 +8,7 @@ Release: %autorelease
Summary: Aliases and scripts to assist in rpm packaging workflows
License: GPL3
Source: go-vendor-update.sh
Source: go2rpm-vendor-update.sh
Source: regenerate-from-spec.sh
Source: macros.demus-packaging
Source: LICENSE
@@ -21,31 +21,27 @@ BuildArch: noarch
%description
* Alias to regenerate vendor archive in a go2rpm spec generated with the vendor profile
%global regen_basename %(basename "%{S:1}" .sh)
%prep
%if %{exists:%{S:2}}
%{load:%{S:2}}
%verify_source_checksum
%endif
%?verify_source_checksum
%build
%install
%{__install} -m 0755 -d %{buildroot}%{_sysconfdir}/profile.d
%{__install} -m 0755 -d %{buildroot}%{_bindir}
%{__install} -m 0755 -d %{buildroot}%{_rpmmacrodir}
%{__install} -p -m 644 -t %{buildroot}%{_sysconfdir}/profile.d %{S:0}
%{__install} -p -m 755 %{S:1} %{buildroot}%{_bindir}/%regen_basename
%{__install} -p -m 755 %{S:0} %{buildroot}%{_bindir}/%{binshellname:%{S:0}}
%{__install} -p -m 755 %{S:1} %{buildroot}%{_bindir}/%{binshellname:%{S:1}}
%{__install} -p -m 755 %{S:2} %{buildroot}%{_rpmmacrodir}/
%{__install} -p -m 644 %{S:3} %{S:4} %{_builddir}
%files
%doc README.md
%license LICENSE
%{_sysconfdir}/profile.d/*
%{_bindir}/%regen_basename
%{_bindir}/*
%{_rpmmacrodir}/*
%changelog
-2
View File
@@ -1,2 +0,0 @@
# Update go vendor archive and config emulating the way go2rpm does it
alias go-vendor-update='go_vendor_archive create --config go-vendor-tools.toml --write-config '
+8
View File
@@ -0,0 +1,8 @@
#!/bin/bash
# Update go vendor archive and config emulating the way go2rpm does it
if [ $# -ne 1 ] || ! [[ "$1" =~ .*.\.spec$ ]] || [ ! -f "$1" ]; then
echo "Required spec parameter missing"
echo "Usage: go2rpm-vendor-update <specfile>.spec"
exit 1
fi
go_vendor_archive create --config go-vendor-tools.toml --write-config "$1"
+6
View File
@@ -9,3 +9,9 @@
%define checksumresult %{expand:%(cksum --check --quiet "%{-s:%{-s*}}%{!-s:sources}" 2>/dev/null)}
%[ %{len:%checksumresult} > 0 ? "echo -e 'ERROR: Checksums do not match\\n%{checksumresult}'; exit 1" : "%{nil}" ]
}
# Macro wrapping basename <file> <extension>, so the extension can stripped
%stripped_basename() %{expand:%(basename "%1" %2)}
# Strip the path and .sh extension from the given string
%binshellname() %{expand:%stripped_basename "%1" .sh}
+1 -1
View File
@@ -13,7 +13,7 @@ fi
if grep -q go-vendor-tools.toml "$1"; then
echo Updating go vendor archive
go-vendor-update "$1"
go2rpm-vendor-update "$1"
fi
# Update the sources checksums
+2 -2
View File
@@ -1,5 +1,5 @@
SHA512 (go-vendor-update.sh) = 4ba1a21e84d91d37e66a7ade8eea09bb278ac87d8ea731420c0f56064424cbcc43e1d1f3d80b727472c6a6adeaefb22c909e949b7009c0f6e6bb7c3ace9268dc
SHA512 (macros.demus-packaging) = d0ebab10d2dace6b0a70428d49771a191a91ebe6cdc8b00322b23a2284c8d8413df433c7098ec1f5aaacf7376a191b2bc00c74ac5d8e38e4570565894a93cfc4
SHA512 (go2rpm-vendor-update.sh) = 914e447930a50c1a77d2950c4f9a132a40e91f17919c03640e94068ca6a76e9fbc43b8022482c7c0e4d8242faf15cb745a7af5f313c079676b06990f45b2ea22
SHA512 (macros.demus-packaging) = 8c1218425b20da00e6e67c15d1cf09a5913f74f5b2c14a9fda90d28db228ebc87c85bc2e73018638f94a272c71d310a025dc6893f0c69481126602db5e64ff53
SHA512 (regenerate-from-spec.sh) = a420e572ad92c0cdd140f98fae7b7e96f94c383a83b86bdfb69e6b7d968305391f6d20720df584ca3adb624b5e01d9fa2e4e07b754c176a9f4811b3326d49363
SHA512 (README.md) = 72a6f0085fea6d2b5736c4fa98f31db8fb42462db6fe65d44de7e99405982cc2330e270f6fb042d598d4136bd2a933e226ae85fb99828e07af6ab2b74a5c89f2
SHA512 (LICENSE) = ccb0f3b838dff6254510f19c2bd6f5c48e38b8c40a5bf93d38482f4fb31015823741d3f160b6836ec99bd8f4e6c5fa9a5c9196ecdd7775b793f3ada50467aabd