commit f9298f219fd88904c7cc6e884c2270a9cf474ad6
Author: Leigh Scott <leigh123linux(a)googlemail.com>
Date: Sat Aug 24 01:18:49 2019 +0100
Combine fedpkg-base to match fedpkg-minimal
add-fedpkg-base-to-rfpkg-minimal.patch | 53 ++++++++++++++++++++++++++++++++++
rfpkg-minimal.spec | 8 +++--
2 files changed, 59 insertions(+), 2 deletions(-)
---
diff --git a/add-fedpkg-base-to-rfpkg-minimal.patch
b/add-fedpkg-base-to-rfpkg-minimal.patch
new file mode 100644
index 0000000..7bf7628
--- /dev/null
+++ b/add-fedpkg-base-to-rfpkg-minimal.patch
@@ -0,0 +1,53 @@
+From 5de09953819053aee8879b29223da82836557a12 Mon Sep 17 00:00:00 2001
+From: Leigh Scott <leigh123linux(a)googlemail.com>
+Date: Sat, 24 Aug 2019 01:08:16 +0100
+Subject: [PATCH] add fedpkg-base to rfpkg-minimal
+
+---
+ bin/rfpkg-minimal | 31 ++++++++++++++++++++++++++++---
+ 1 file changed, 28 insertions(+), 3 deletions(-)
+
+diff --git a/bin/rfpkg-minimal b/bin/rfpkg-minimal
+index 4697a71..a8083c1 100755
+--- a/bin/rfpkg-minimal
++++ b/bin/rfpkg-minimal
+@@ -20,8 +20,33 @@
+ # Abort on errors
+ set -e
+
+-#url=$(git remote get-url origin)
+-#url=$(git remote -v |grep origin | head -1 | awk '{print $2}')
+ url=$(cat .git/config |awk '/url/ {print $3}')
+ namespace=$(echo ${url} | awk -F '/' '{print $(NF-1)}')
+-baseurl=https://pkgs.rpmfusion.org/repo/pkgs/${namespace} fedpkg-base $@
++baseurl=https://pkgs.rpmfusion.org/repo/pkgs/${namespace}
++
++pkgname=$(basename "$PWD")
++if [[ -s sources ]]; then
++ # Read first word of first line. For old MD5 format it's the 32 character
++ # hash. Otherwise let's assume the sources have the BSD format where lines
++ # start with hash type.
++ hashtype="$(head -n1 sources | cut -d' ' -f1 | tr '[:upper:]'
'[:lower:]')"
++ if [ "${#hashtype}" -ne 32 ]; then
++ # The format is
++ # SHA512 (filename) = ABCDEF
++ # We don't care about the equals sign. We also assume all hashes are
++ # the same type, so we don't need to read it again for each line.
++ while read -r _ filename _ hash; do
++ # Remove parenthesis around tarball name
++ filename=${filename#(}
++ tarball=${filename%)}
++ curl -L -H Pragma: -o "./$tarball" -R -S --fail --retry 5
--max-time 15 "$baseurl/$pkgname/$tarball/$hashtype/$hash/$tarball"
++ done < sources
++ "${hashtype}sum" -c sources
++ else
++ # Ok, we're working with MD5.
++ while read -r md5sum tarball; do
++ curl -L -H Pragma: -o "./$tarball" -R -S --fail --retry 5
--max-time 15 "$baseurl/$pkgname/$tarball/$md5sum/$tarball"
++ done < sources
++ md5sum -c sources
++ fi
++fi
+--
+2.21.0
+
diff --git a/rfpkg-minimal.spec b/rfpkg-minimal.spec
index 8109f77..c7bbb9f 100644
--- a/rfpkg-minimal.spec
+++ b/rfpkg-minimal.spec
@@ -1,6 +1,6 @@
Name: rfpkg-minimal
Version: 0.4.1
-Release: 1%{?dist}
+Release: 2%{?dist}
Summary: Fork of fedpkg-minimal for RPM Fusion
# Licensing is unclear; LICENSE is the GPLv2 but bin/fedpkg (upstream)
@@ -10,6 +10,7 @@ License: GPLv2
URL:
https://github.com/rpmfusion-infra/rfpkg-minimal
Source0: %{url}/archive/%{version}.tar.gz#/rfpkg-minimal-%{version}.tar.gz
+Patch0: add-fedpkg-base-to-rfpkg-minimal.patch
BuildArch: noarch
@@ -26,7 +27,7 @@ to download the sources of a package. It is based on (and is a fork of)
fedpkg-minimal.
%prep
-%autosetup
+%autosetup -p1
%build
# Nothing to build!
@@ -41,6 +42,9 @@ install -pm 755 bin/rfpkg-minimal %{buildroot}%{_bindir}/rfpkg-minimal
%license LICENSE
%changelog
+* Sat Aug 24 2019 Leigh Scott <leigh123linux(a)googlemail.com> - 0.4.1-2
+- Combine fedpkg-base to match fedpkg-minimal
+
* Fri Aug 23 2019 Nicolas Chauvet <kwizart(a)gmail.com> - 0.4.1-1
- Update to 0.4.1