Skip to content

Commit c92647a

Browse files
committed
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.
1 parent 7454ec7 commit c92647a

6 files changed

Lines changed: 12 additions & 47 deletions

File tree

Makefile.am

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,6 @@ SUFFIXES =
6969
noinst_HEADERS += $(EXTRA_DIST)
7070

7171
EXTRA_DIST += \
72-
build-aux/update-debian-changelog \
7372
soexpand.pl
7473

7574
ro_c = echo '/* -*- mode: c; buffer-read-only: t -*- */'

boot.sh

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,2 @@
11
#! /bin/sh
22
autoreconf --install --force
3-
4-
# Ensure that debian/changelog is up-to-date.
5-
VERSION=`autom4te --language=autoconf -t 'AC_INIT:$2' configure.ac`
6-
build-aux/update-debian-changelog debian/changelog "$VERSION"

build-aux/update-debian-changelog

Lines changed: 0 additions & 37 deletions
This file was deleted.

configure.ac

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ AM_PROG_CC_C_O
2727
AC_PROG_CPP
2828
AC_PROG_RANLIB
2929
AC_PROG_MKDIR_P
30+
AC_PROG_FGREP
3031

3132
AC_ARG_VAR([PERL], [path to Perl interpreter])
3233
AC_PATH_PROG([PERL], perl, no)

debian/automake.mk

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,13 @@ EXTRA_DIST += \
6262
debian/rules \
6363
debian/rules.modules
6464

65-
dist-hook-debian-changelog:
66-
$(srcdir)/build-aux/update-debian-changelog '$(distdir)/debian/changelog' '$(VERSION)'
67-
DIST_HOOKS += dist-hook-debian-changelog
68-
EXTRA_DIST += build-aux/update-debian-changelog
65+
check-debian-changelog-version:
66+
@if $(FGREP) '($(VERSION))' $(srcdir)/debian/changelog >/dev/null; \
67+
then \
68+
:; \
69+
else \
70+
echo "Update debian/changelog to mention version $(VERSION)"; \
71+
exit 1; \
72+
fi
73+
ALL_LOCAL += check-debian-changelog-version
74+
DIST_HOOKS += check-debian-changelog-version

debian/changelog

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
openvswitch (1.0.0) unstable; urgency=low
1+
openvswitch (1.0.1) unstable; urgency=low
22

33
* New upstream version.
44

0 commit comments

Comments
 (0)