public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Michel Lind <salimma@fedoraproject.org>
To: git-commits@fedoraproject.org
Subject: [rpms/git-review] f43: incorporate fixes from #9 by Steve Traylen <steve.traylen@cern.ch>
Date: Fri, 19 Jun 2026 21:53:30 GMT [thread overview]
Message-ID: <178190601046.1.3483854690133401233.rpms-git-review-42f106e1471f@fedoraproject.org> (raw)
A new commit has been pushed.
Repo : rpms/git-review
Branch : f43
Commit : 42f106e1471fa69edab368c7639a52d5351357b7
Author : Michel Lind <salimma@fedoraproject.org>
Date : 2026-06-18T16:56:33+01:00
Stats : +40/-13 in 5 file(s)
URL : https://src.fedoraproject.org/rpms/git-review/c/42f106e1471fa69edab368c7639a52d5351357b7?branch=f43
Log:
incorporate fixes from #9 by Steve Traylen <steve.traylen@cern.ch>
- * set PBR_VERSION
- * simplified git checkout and tarball generation
- * enforce that license is shipped
- * add import checks
- * exclude tests
- convert the git checkout procedure into a shell script for automation
- switch tarball to zstd compression
- automatically apply patches (if any)
- add rpmlint config
Signed-off-by: Michel Lind <salimma@fedoraproject.org>
---
diff --git a/.gitignore b/.gitignore
index ed315e2..d25b49f 100644
--- a/.gitignore
+++ b/.gitignore
@@ -10,4 +10,4 @@
/git-review-1.28.0.tar.gz
/git-review-2.2.0.tar.gz
/git-review-2.3.1.tar.gz
-/git_review-2.5.0.tar.gz
+/git-review-2.5.0.tar.zst
diff --git a/get-tarball.sh b/get-tarball.sh
new file mode 100755
index 0000000..fcbbcd9
--- /dev/null
+++ b/get-tarball.sh
@@ -0,0 +1,14 @@
+#!/bin/sh
+# adapted from https://src.fedoraproject.org/rpms/git-review/pull-request/9
+# by Steve Traylen <steve.traylen@cern.ch>
+if [ "$#" -ne 1 ]; then
+ echo "Usage: $0 VERSION" >&2
+ exit 1
+fi
+VERSION=$1
+SCRATCH=$(mktemp -d)
+TARGET="$(dirname "$0")/git-review-${VERSION}.tar.zst"
+rm -i "${TARGET}"
+git -C "${SCRATCH}" clone --depth 1 --branch "${VERSION}" https://opendev.org/opendev/git-review.git 2>/dev/null
+git -C "${SCRATCH}/git-review" archive --format=tar --prefix="git-review-${VERSION}/" HEAD | zstd -o "${TARGET}"
+rm -rf "${SCRATCH}"
diff --git a/git-review.rpmlintrc b/git-review.rpmlintrc
new file mode 100644
index 0000000..8f7b55a
--- /dev/null
+++ b/git-review.rpmlintrc
@@ -0,0 +1,4 @@
+# no way to programmatically download tarball from Gitea
+# and the web interface is stuck at 2.4.0 anyway
+addFilter("W: invalid-url")
+
diff --git a/git-review.spec b/git-review.spec
index 7152c6f..38a090a 100644
--- a/git-review.spec
+++ b/git-review.spec
@@ -6,47 +6,56 @@ Summary: A Git helper for integration with Gerrit
License: Apache-2.0
URL: https://opendev.org/opendev/git-review
# Created by:
-# $ git clone https://opendev.org/opendev/git-review.git
-# $ cd git-review
-# $ git checkout 2.5.0
-# $ python -m build --sdist .
-# $ cp dist/git_review-2.5.0.tar.gz ..
-Source0: git_review-%{version}.tar.gz
+# $ ./get-tarball.sh %%{version}
+Source: git-review-%{version}.tar.zst
BuildArch: noarch
BuildRequires: python3-devel
BuildRequires: pyproject-rpm-macros
+BuildRequires: sed
Requires: git-core
-Requires: python3-pkg-resources
%description
An extension for source control system Git that creates and manages
review requests in the patch management system Gerrit. It replaces the
rfc.sh script.
+
%prep
-%autosetup -n git_review-%{version}
+%autosetup -p1
sed -i 's/\r//' LICENSE
+
%generate_buildrequires
+export PBR_VERSION=%{version}
%pyproject_buildrequires
+
%build
+export PBR_VERSION=%{version}
%pyproject_wheel
+
%install
%pyproject_install
-%pyproject_save_files git_review
+%pyproject_save_files -l git_review
install -p -m 0644 -D git-review.1 %{buildroot}%{_mandir}/man1/git-review.1
+
+%check
+# Tests require gerrit.war file to be available
+%pyproject_check_import git_review -e git_review.tests -e git_review.tests.*
+
+
%files -f %{pyproject_files}
-%license LICENSE
-%doc AUTHORS README.rst
+%doc README.rst
%{_bindir}/git-review
%{_mandir}/man1/git-review.1.gz
+%exclude %{python3_sitelib}/git_review/tests
+
%changelog
%autochangelog
diff --git a/sources b/sources
index 10a95dd..309324a 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-SHA512 (git_review-2.5.0.tar.gz) = 31678d356e094ef92f40ca3ca571010fef22b4589f1cd90acfe11afdabb92caa40b69eb5961582f1b2ac7d27172ad5d2e47839eba37edce78bf4f0ac0d5bb572
+SHA512 (git-review-2.5.0.tar.zst) = a7dfbc00cd0364b4e32766825bd63be234ad033d46ecdf356c599845c9ed94f4a05b17ee50da80ec1e2665c4fd400fb46657bc1528962e3d186136ddf53b271f
reply other threads:[~2026-06-19 21:53 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=178190601046.1.3483854690133401233.rpms-git-review-42f106e1471f@fedoraproject.org \
--to=salimma@fedoraproject.org \
--cc=git-commits@fedoraproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox