From 208d496f15787e55777c2ef541595f9e750ef771 Mon Sep 17 00:00:00 2001 From: Ben Pfaff Date: Wed, 26 May 2010 15:53:57 -0700 Subject: [PATCH] debian: Attempt to keep debian/changelog up-to-date. Invariably we forget to update the version number in debian/changelog as we change OVS's own version number. This is embarrassing. This commit introduces two different times to automatically update the debian/changelog version number: whenever boot.sh runs and whenever "make dist" runs. In the latter case, only the version number in the distributed tarball is updated, but that seems OK. Reported by Joan Cirer most recently, and by others over the last year or so too. --- Makefile.am | 4 +++- boot.sh | 4 ++++ build-aux/update-debian-changelog | 37 +++++++++++++++++++++++++++++++ debian/automake.mk | 4 ++++ 4 files changed, 48 insertions(+), 1 deletion(-) create mode 100755 build-aux/update-debian-changelog diff --git a/Makefile.am b/Makefile.am index c23b670a5..3a3ddb7ed 100644 --- a/Makefile.am +++ b/Makefile.am @@ -52,7 +52,9 @@ noinst_SCRIPTS = OVSIDL_BUILT = SUFFIXES = -EXTRA_DIST += soexpand.pl +EXTRA_DIST += \ + build-aux/update-debian-changelog \ + soexpand.pl ro_c = echo '/* -*- mode: c; buffer-read-only: t -*- */' diff --git a/boot.sh b/boot.sh index 05dd35996..dce5625c5 100755 --- a/boot.sh +++ b/boot.sh @@ -1,2 +1,6 @@ #! /bin/sh autoreconf --install --force + +# Ensure that debian/changelog is up-to-date. +VERSION=`autom4te --language=autoconf -t 'AC_INIT:$2' configure.ac` +build-aux/update-debian-changelog debian/changelog "$VERSION" diff --git a/build-aux/update-debian-changelog b/build-aux/update-debian-changelog new file mode 100755 index 000000000..2007d4ff7 --- /dev/null +++ b/build-aux/update-debian-changelog @@ -0,0 +1,37 @@ +#! /bin/sh + +if test $# != 2; then + cat </dev/null 2>&1; then + : +else + echo "Adding change log record for $VERSION to $CHANGELOG" + { + cat < `date -u +"%a, %d %b %Y %H:%M:%S +0000"` + +EOF + cat "$CHANGELOG" + } > "$CHANGELOG".new + mv "$CHANGELOG".new "$CHANGELOG" +fi diff --git a/debian/automake.mk b/debian/automake.mk index 1b649453f..2658e392d 100644 --- a/debian/automake.mk +++ b/debian/automake.mk @@ -61,3 +61,7 @@ EXTRA_DIST += \ debian/reconfigure \ debian/rules \ debian/rules.modules + +dist-hook: + $(srcdir)/build-aux/update-debian-changelog '$(distdir)/debian/changelog' '$(VERSION)' +EXTRA_DIST += build-aux/check-structs -- 2.43.0