mirror of
https://github.com/openvswitch/ovs
synced 2025-08-22 01:51:26 +00:00
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.
This commit is contained in:
parent
7454ec7a74
commit
c92647a47a
@ -69,7 +69,6 @@ SUFFIXES =
|
|||||||
noinst_HEADERS += $(EXTRA_DIST)
|
noinst_HEADERS += $(EXTRA_DIST)
|
||||||
|
|
||||||
EXTRA_DIST += \
|
EXTRA_DIST += \
|
||||||
build-aux/update-debian-changelog \
|
|
||||||
soexpand.pl
|
soexpand.pl
|
||||||
|
|
||||||
ro_c = echo '/* -*- mode: c; buffer-read-only: t -*- */'
|
ro_c = echo '/* -*- mode: c; buffer-read-only: t -*- */'
|
||||||
|
4
boot.sh
4
boot.sh
@ -1,6 +1,2 @@
|
|||||||
#! /bin/sh
|
#! /bin/sh
|
||||||
autoreconf --install --force
|
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"
|
|
||||||
|
@ -1,37 +0,0 @@
|
|||||||
#! /bin/sh
|
|
||||||
|
|
||||||
if test $# != 2; then
|
|
||||||
cat <<EOF
|
|
||||||
$0, to update version information a Debian changelog
|
|
||||||
usage: $0 CHANGELOG VERSION
|
|
||||||
|
|
||||||
This utility checks whether CHANGELOG, which should be a Debian changelog
|
|
||||||
file, contains a record for VERSION. If not, then it adds one at the top.
|
|
||||||
EOF
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
CHANGELOG=$1
|
|
||||||
VERSION=$2
|
|
||||||
if test ! -e "$CHANGELOG"; then
|
|
||||||
echo "$0: $CHANGELOG does not exist (use --help for help"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
if grep '('$VERSION')' debian/changelog >/dev/null 2>&1; then
|
|
||||||
:
|
|
||||||
else
|
|
||||||
echo "Adding change log record for $VERSION to $CHANGELOG"
|
|
||||||
{
|
|
||||||
cat <<EOF
|
|
||||||
openvswitch ($VERSION) unstable; urgency=low
|
|
||||||
|
|
||||||
* New upstream version.
|
|
||||||
|
|
||||||
-- Open vSwitch team <dev@openvswitch.org> `date -u +"%a, %d %b %Y %H:%M:%S +0000"`
|
|
||||||
|
|
||||||
EOF
|
|
||||||
cat "$CHANGELOG"
|
|
||||||
} > "$CHANGELOG".new
|
|
||||||
mv -f "$CHANGELOG".new "$CHANGELOG"
|
|
||||||
fi
|
|
@ -27,6 +27,7 @@ AM_PROG_CC_C_O
|
|||||||
AC_PROG_CPP
|
AC_PROG_CPP
|
||||||
AC_PROG_RANLIB
|
AC_PROG_RANLIB
|
||||||
AC_PROG_MKDIR_P
|
AC_PROG_MKDIR_P
|
||||||
|
AC_PROG_FGREP
|
||||||
|
|
||||||
AC_ARG_VAR([PERL], [path to Perl interpreter])
|
AC_ARG_VAR([PERL], [path to Perl interpreter])
|
||||||
AC_PATH_PROG([PERL], perl, no)
|
AC_PATH_PROG([PERL], perl, no)
|
||||||
|
14
debian/automake.mk
vendored
14
debian/automake.mk
vendored
@ -62,7 +62,13 @@ EXTRA_DIST += \
|
|||||||
debian/rules \
|
debian/rules \
|
||||||
debian/rules.modules
|
debian/rules.modules
|
||||||
|
|
||||||
dist-hook-debian-changelog:
|
check-debian-changelog-version:
|
||||||
$(srcdir)/build-aux/update-debian-changelog '$(distdir)/debian/changelog' '$(VERSION)'
|
@if $(FGREP) '($(VERSION))' $(srcdir)/debian/changelog >/dev/null; \
|
||||||
DIST_HOOKS += dist-hook-debian-changelog
|
then \
|
||||||
EXTRA_DIST += build-aux/update-debian-changelog
|
:; \
|
||||||
|
else \
|
||||||
|
echo "Update debian/changelog to mention version $(VERSION)"; \
|
||||||
|
exit 1; \
|
||||||
|
fi
|
||||||
|
ALL_LOCAL += check-debian-changelog-version
|
||||||
|
DIST_HOOKS += check-debian-changelog-version
|
||||||
|
2
debian/changelog
vendored
2
debian/changelog
vendored
@ -1,4 +1,4 @@
|
|||||||
openvswitch (1.0.0) unstable; urgency=low
|
openvswitch (1.0.1) unstable; urgency=low
|
||||||
|
|
||||||
* New upstream version.
|
* New upstream version.
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user