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 --- debian/changelog | 15 +++++++++------ debian/genchangelog.sh | 36 ++++++++++++++++++++++++++++++++++++ 2 files changed, 45 insertions(+), 6 deletions(-) create mode 100755 debian/genchangelog.sh
diff --git a/debian/changelog b/debian/changelog index e58c0ca..6817fb3 100644 --- a/debian/changelog +++ b/debian/changelog @@ -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 index 0000000..85d3922 --- /dev/null +++ b/debian/genchangelog.sh @@ -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 $?