public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/oscillatord] rawhide: rebuild: list the upstream commits in the changelog
@ 2026-11-25 12:40 Oleg Obleukhov
  0 siblings, 0 replies; only message in thread
From: Oleg Obleukhov @ 2026-11-25 12:40 UTC (permalink / raw)
  To: git-commits

            A new commit has been pushed.

            Repo   : rpms/oscillatord
            Branch : rawhide
            Commit : 7dc335040982d4aaa31e90d8e4fbddffb70df7c9
            Author : Oleg Obleukhov <leoleovich@fedoraproject.org>
            Date   : 2026-11-25T12:38:54+00:00
            Stats  : +21/-3 in 2 file(s)
            URL    : https://src.fedoraproject.org/rpms/oscillatord/c/7dc335040982d4aaa31e90d8e4fbddffb70df7c9?branch=rawhide

            Log:
            rebuild: list the upstream commits in the changelog

The "Update to VERSION" commit of each package now carries one "- title (author)" line per upstream commit since the previous version tag, which %autochangelog turns into RPM changelog items. Merge commits are left out. If GitHub cannot be reached, the release warns and keeps the plain line.

[skip changelog]

---
diff --git a/rebuild/README.md b/rebuild/README.md
index 442a7f5..b4452de 100644
--- a/rebuild/README.md
+++ b/rebuild/README.md
@@ -16,7 +16,9 @@ rebuild/release.sh 3.10.5
 ```
 
 It bumps `Version:` in both specs on rawhide, uploads the tarballs with `fedpkg new-sources`,
-commits and pushes, and fast-forwards every release branch to rawhide. Then, for all branches at
+commits and pushes, and fast-forwards every release branch to rawhide. Each commit message lists
+the upstream commits since the previous version as `- title (author)` (merges left out), which
+`%autochangelog` puts into the RPM changelog. Then, for all branches at
 once (EPEL first), it requests a side tag, builds disciplining-minipod, builds oscillatord against
 it (`koji build --wait-build`) and files one Bodhi update from the side tag. Each update's link is
 printed the moment its branch is built (`epel10.3  Bodhi update for karma: https://...`), so it

diff --git a/rebuild/release-inner.sh b/rebuild/release-inner.sh
index 21dc55f..03b5c39 100755
--- a/rebuild/release-inner.sh
+++ b/rebuild/release-inner.sh
@@ -31,10 +31,17 @@ spec_version() { sed -n -E 's/^Version:[[:space:]]+([^[:space:]]+).*/\1/p' "$(co
 build_state() { koji --noauth buildinfo "$1" 2>/dev/null | sed -n -E 's/^State: ([A-Z]+).*/\1/p' || true; }
 build_tag() { koji --noauth list-targets --name "$1" --quiet 2>/dev/null | awk 'NR == 1 {print $2}' || true; }
 task_url() { echo "https://koji.fedoraproject.org/koji/taskinfo?taskID=$1"; }
+# Commits OLD..NEW of a GitHub repo, as "- title (author)" changelog lines; merges are dropped.
+upstream_changes() {
+  curl -fsSL "https://api.github.com/repos/$1/compare/$2...$3" | jq -r '
+    (.commits[] | select((.parents | length) == 1)
+      | "- \(.commit.message | split("\n")[0] | sub("\\s+$"; "")) (\(.commit.author.name))"),
+    (if .total_commits > (.commits | length) then "- and \(.total_commits - (.commits | length)) more: \(.html_url)" else empty end)'
+}
 
 log "Installing packaging tools"
 dnf -y -q --setopt=install_weak_deps=False install fedpkg koji bodhi-client rpmdevtools rpmautospec \
-  krb5-workstation fedora-packager-kerberos git-core openssh-clients >/tmp/release/dnf.log 2>&1 \
+  krb5-workstation fedora-packager-kerberos git-core openssh-clients jq >/tmp/release/dnf.log 2>&1 \
   || { tail -20 /tmp/release/dnf.log; die "package install failed"; }
 
 # Kerberos ticket in a file under the persistent state dir, so reruns within its lifetime don't prompt.
@@ -134,6 +141,15 @@ if [ ${#need[@]} -gt 0 ]; then
       (cd "$work" && spectool -g -f -s 0 "$p.spec" >/dev/null) || die "could not download $url"
     fi
     echo "$p: $(spec_version "$p") -> $version  $url"
+    repo=$(sed -n -E 's#^https://github\.com/([^/]+/[^/]+)/.*#\1#p' <<<"$url")
+    msg="Update to $version"
+    if changes=$(upstream_changes "$repo" "v$(spec_version "$p")" "v$version"); then
+      [ -z "$changes" ] || msg+=$'\n\n'"$changes"
+    else
+      echo "WARNING: could not list the $repo commits; the $p changelog gets only \"$msg\"" >&2
+    fi
+    printf '%s\n' "$msg" >"$work/commit-msg"
+    sed 's/^/  /' "$work/commit-msg"
   done
 fi
 
@@ -176,7 +192,7 @@ for p in "${need[@]}"; do
   cp "$work/$p.spec" "$d/$p.spec"
   fp "$p" new-sources "$work"/*.tar.gz
   git -C "$d" add "$p.spec" sources .gitignore
-  git -C "$d" commit -q -m "Update to $version"
+  git -C "$d" commit -q -F "$work/commit-msg"
 done
 pending=0
 for p in "${pkgs[@]}"; do

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2026-11-25 12:40 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-25 12:40 [rpms/oscillatord] rawhide: rebuild: list the upstream commits in the changelog Oleg Obleukhov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox