From c92647a47ad610ce188e29302c90ae6f7692dcb2 Mon Sep 17 00:00:00 2001 From: Ben Pfaff Date: Wed, 21 Jul 2010 15:38:23 -0700 Subject: [PATCH] debian: Check for accurate Debian changelog version at build time too. When we increment the Open vSwitch version number, we tend to forget to update it in debian/changelog at the same time. Right now this gets fixed up automatically at "make dist" time, but it's even better if we can always have it be correct in the repository. This commit should help with that, by making both "make" and "make dist" refuse to proceed if the version number is out of sync. --- Makefile.am | 1 - boot.sh | 4 ---- build-aux/update-debian-changelog | 37 ------------------------------- configure.ac | 1 + debian/automake.mk | 14 ++++++++---- debian/changelog | 2 +- 6 files changed, 12 insertions(+), 47 deletions(-) delete mode 100755 build-aux/update-debian-changelog diff --git a/Makefile.am b/Makefile.am index 62d4d491..71833262 100644 --- a/Makefile.am +++ b/Makefile.am @@ -69,7 +69,6 @@ SUFFIXES = noinst_HEADERS += $(EXTRA_DIST) 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 dce5625c..05dd3599 100755 --- a/boot.sh +++ b/boot.sh @@ -1,6 +1,2 @@ #! /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 deleted file mode 100755 index 9353e700..00000000 --- a/build-aux/update-debian-changelog +++ /dev/null @@ -1,37 +0,0 @@ -#! /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 -f "$CHANGELOG".new "$CHANGELOG" -fi diff --git a/configure.ac b/configure.ac index aff53a1f..5dd6590e 100644 --- a/configure.ac +++ b/configure.ac @@ -27,6 +27,7 @@ AM_PROG_CC_C_O AC_PROG_CPP AC_PROG_RANLIB AC_PROG_MKDIR_P +AC_PROG_FGREP AC_ARG_VAR([PERL], [path to Perl interpreter]) AC_PATH_PROG([PERL], perl, no) diff --git a/debian/automake.mk b/debian/automake.mk index ad347df7..7c656c8a 100644 --- a/debian/automake.mk +++ b/debian/automake.mk @@ -62,7 +62,13 @@ EXTRA_DIST += \ debian/rules \ debian/rules.modules -dist-hook-debian-changelog: - $(srcdir)/build-aux/update-debian-changelog '$(distdir)/debian/changelog' '$(VERSION)' -DIST_HOOKS += dist-hook-debian-changelog -EXTRA_DIST += build-aux/update-debian-changelog +check-debian-changelog-version: + @if $(FGREP) '($(VERSION))' $(srcdir)/debian/changelog >/dev/null; \ + then \ + :; \ + else \ + echo "Update debian/changelog to mention version $(VERSION)"; \ + exit 1; \ + fi +ALL_LOCAL += check-debian-changelog-version +DIST_HOOKS += check-debian-changelog-version diff --git a/debian/changelog b/debian/changelog index 945f65d6..216e089e 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,4 +1,4 @@ -openvswitch (1.0.0) unstable; urgency=low +openvswitch (1.0.1) unstable; urgency=low * New upstream version. -- 2.30.2