]> git.ipfire.org Git - location/libloc.git/commitdiff
debian: Attribute all maintainers in changlog
authorValters Jansons <valter.jansons@gmail.com>
Sun, 13 Jun 2021 16:16:25 +0000 (19:16 +0300)
committerMichael Tremer <michael.tremer@ipfire.org>
Sun, 20 Jun 2021 12:36:13 +0000 (12:36 +0000)
This commit further builds on historical changelog modifications,
to properly attribute all authors of the commits.

An additional d/genchangelog.sh script has been added. This allows
generation of changelog entries, internally using `debchange` (`dch`).
The script accepts an argument, which is the commit range to generate
entries for. Each commit's subject line (first line of body) is used,
along with author name and email. This information is added to the
changelog. Automatic detection (via `debchange` built-in functionality)
is used to determine whether these entries should be added to an
existing version number. If there is no UNRELEASED version, then a new
version is automatically tagged.

The new version tag will usually need to be modified, for example,
replacing an automatically generated 0.9.6-2 with 0.9.7-1.

The final release change (s/UNRELEASED/unstable/) needs to be done
manually as well, when the Git tag is actually being tagged.
`dch -r` can be useful for this particular purpose.

Signed-off-by: Valters Jansons <valter.jansons@gmail.com>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
debian/changelog
debian/genchangelog.sh [new file with mode: 0755]

index e58c0cadffdfbc85f925245af4fd9a89b41439c6..6817fb336e6376ac0504697507f4e633d0b2a800 100644 (file)
@@ -1,13 +1,16 @@
 libloc (0.9.6-1) unstable; urgency=medium
 
-  * location-importer.in: skip networks with unknown country codes
-  * location-importer.in: process unaligned IP ranges in RIR data files
-    correctly
+  [ Michael Tremer ]
+  * location: Fix list-networks-by-as
   * database: Free mmapped countries section
-  * location-importer.in: reduce log noise for unusable networks
-  * location-importer.in: delete 6to4 IPv6 space as well
+
+  [ Peter Müller ]
   * location-importer.in: fix typo
-  * location: Fix list-networks-by-as
+  * location-importer.in: delete 6to4 IPv6 space as well
+  * location-importer.in: reduce log noise for unusable networks
+  * location-importer.in: process unaligned IP ranges in RIR data files
+    correctly
+  * location-importer.in: skip networks with unknown country codes
 
  -- Michael Tremer <michael.tremer@ipfire.org>  Wed, 31 Mar 2021 14:06:00 +0100
 
diff --git a/debian/genchangelog.sh b/debian/genchangelog.sh
new file mode 100755 (executable)
index 0000000..85d3922
--- /dev/null
@@ -0,0 +1,36 @@
+#!/bin/bash -e
+gitshow () {
+  local format=$1
+  local commit=$2
+
+  git show --no-patch --format=format:"$format" "$commit"
+}
+
+main () {
+  if [ $# -lt 1 ]; then
+    local bn="$(basename $0)"
+    echo "Usage:    $bn  <commit range>" >&2
+    echo "Example:  $bn  0.9.7..HEAD" >&2
+    echo "Example:  $bn  0.9.5..0.9.6^" >&2
+    return 1
+  fi
+
+  local commitrange=$1
+
+  local commit
+  for commit in $(git rev-list --reverse "$commitrange"); do
+    # Skip commits with diffs that only have Makefile.am or d/ changes.
+    if [ "$(git diff --name-only "${commit}^..${commit}" -- . ':^Makefile.am' ':^debian/' | wc -l)" == 0 ]; then
+      continue
+    fi
+
+    local author_name="$(gitshow %an "$commit")"
+    local author_email="$(gitshow %ae "$commit")"
+    local subject="$(gitshow %s "$commit")"
+
+    echo "$author_name <$author_email>  $subject"
+    DEBFULLNAME="$author_name" DEBEMAIL="$author_email" debchange --upstream --multimaint-merge "$subject"
+  done
+}
+
+main "$@" || exit $?