From 8a07709cb80462edb32fc11d056bfc08ce90f62d Mon Sep 17 00:00:00 2001 From: Ben Pfaff Date: Mon, 19 Mar 2012 10:07:09 -0700 Subject: [PATCH] configure: Remove --with-build-number. From early days, Nicira used the --with-build-number option to configure to stamp our internal builds. We've since switched to another scheme, so this option is obsolete. Good riddance. Signed-off-by: Ben Pfaff --- Makefile.am | 3 +- configure.ac | 3 +- datapath/datapath.c | 2 +- datapath/linux/Kbuild.in | 6 ---- debian/rules | 17 ++-------- debian/rules.modules | 5 +-- lib/ovsdb-error.c | 4 +-- lib/util.c | 2 +- m4/nx-build.m4 | 53 ------------------------------- ofproto/ofproto.h | 2 +- ovsdb/ovsdb-tool.c | 7 ++-- python/automake.mk | 4 --- python/ovs/unixctl.py | 5 ++- rhel/openvswitch.spec.in | 4 +-- utilities/ovs-ctl.in | 2 +- utilities/ovs-lib.in | 6 +--- vswitchd/vswitch.xml | 2 -- xenserver/openvswitch-xen.spec.in | 7 ++-- 18 files changed, 23 insertions(+), 111 deletions(-) delete mode 100644 m4/nx-build.m4 diff --git a/Makefile.am b/Makefile.am index 4eab72af..70ea49cb 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,4 +1,4 @@ -# Copyright (C) 2007, 2008, 2009, 2010, 2011 Nicira Networks, Inc. +# Copyright (C) 2007, 2008, 2009, 2010, 2011, 2012 Nicira Networks, Inc. # # Copying and distribution of this file, with or without modification, # are permitted in any medium without royalty provided the copyright @@ -101,7 +101,6 @@ SUFFIXES += .in -e 's,[@]PYTHON[@],$(PYTHON),g' \ -e 's,[@]RUNDIR[@],$(RUNDIR),g' \ -e 's,[@]VERSION[@],$(VERSION),g' \ - -e 's,[@]BUILDNR[@],$(BUILDNR),g' \ -e 's,[@]localstatedir[@],$(localstatedir),g' \ -e 's,[@]pkgdatadir[@],$(pkgdatadir),g' \ -e 's,[@]sysconfdir[@],$(sysconfdir),g' \ diff --git a/configure.ac b/configure.ac index 3c3b1e9a..a2fcfbab 100644 --- a/configure.ac +++ b/configure.ac @@ -1,4 +1,4 @@ -# Copyright (c) 2008, 2009, 2010, 2011 Nicira Networks +# Copyright (c) 2008, 2009, 2010, 2011, 2012 Nicira Networks # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -14,7 +14,6 @@ AC_PREREQ(2.64) AC_INIT(openvswitch, 1.6.90, ovs-bugs@openvswitch.org) -NX_BUILDNR AC_CONFIG_SRCDIR([datapath/datapath.c]) AC_CONFIG_MACRO_DIR([m4]) AC_CONFIG_AUX_DIR([build-aux]) diff --git a/datapath/datapath.c b/datapath/datapath.c index bb969673..d64fc32b 100644 --- a/datapath/datapath.c +++ b/datapath/datapath.c @@ -2164,7 +2164,7 @@ static int __init dp_init(void) BUILD_BUG_ON(sizeof(struct ovs_skb_cb) > sizeof(dummy_skb->cb)); pr_info("Open vSwitch switching datapath %s, built "__DATE__" "__TIME__"\n", - VERSION BUILDNR); + VERSION); err = genl_exec_init(); if (err) diff --git a/datapath/linux/Kbuild.in b/datapath/linux/Kbuild.in index d82cb002..6f6f65f0 100644 --- a/datapath/linux/Kbuild.in +++ b/datapath/linux/Kbuild.in @@ -3,7 +3,6 @@ export builddir = @abs_builddir@ export srcdir = @abs_srcdir@ export top_srcdir = @abs_top_srcdir@ export VERSION = @VERSION@ -export BUILDNR = @BUILDNR@ include $(srcdir)/../Modules.mk include $(srcdir)/Modules.mk @@ -11,11 +10,6 @@ include $(srcdir)/Modules.mk EXTRA_CFLAGS := -DVERSION=\"$(VERSION)\" EXTRA_CFLAGS += -I$(srcdir)/.. EXTRA_CFLAGS += -I$(builddir)/.. -ifeq '$(BUILDNR)' '0' -EXTRA_CFLAGS += -DBUILDNR=\"\" -else -EXTRA_CFLAGS += -DBUILDNR=\"+build$(BUILDNR)\" -endif EXTRA_CFLAGS += -g EXTRA_CFLAGS += -include $(builddir)/kcompat.h diff --git a/debian/rules b/debian/rules index 24c9850f..4a0e8b58 100755 --- a/debian/rules +++ b/debian/rules @@ -10,9 +10,6 @@ # Modified to make a template file for a multi-binary package with separated # build-arch and build-indep targets by Bill Allombert 2001 -# Official build number. Leave set to 0 if not an official build. -BUILD_NUMBER = 0 - PACKAGE=openvswitch pdkms=openvswitch-datapath-dkms DEB_UPSTREAM_VERSION=$(shell dpkg-parsechangelog | sed -rne 's,^Version: ([0-9]:)*([^-]+).*,\2,p') @@ -31,12 +28,6 @@ else CFLAGS += -O2 endif -ifeq ($(BUILD_NUMBER),0) -BUILD_NUMBER_OPTION = -else -BUILD_NUMBER_OPTION = --with-build-number=$(BUILD_NUMBER) -endif - configure: configure-stamp configure-stamp: dh_testdir @@ -47,8 +38,8 @@ configure-stamp: cd _debian && ( \ test -e Makefile || \ ../configure --prefix=/usr --localstatedir=/var --enable-ssl \ - --sysconfdir=/etc $(BUILD_NUMBER_OPTION) \ - CFLAGS="$(CFLAGS)" $(DATAPATH_CONFIGURE_OPTS)) + --sysconfdir=/etc CFLAGS="$(CFLAGS)" \ + $(DATAPATH_CONFIGURE_OPTS)) touch configure-stamp #Architecture @@ -88,9 +79,7 @@ install-indep: build-indep dh_installdirs -i $(MAKE) -C _debian DESTDIR=$(CURDIR)/debian/tmp install dh_install -i - sed 's/^BUILD_NUMBER = .*/BUILD_NUMBER = $(BUILD_NUMBER)/' \ - < debian/rules.modules \ - > debian/openvswitch-datapath-source/usr/src/modules/openvswitch-datapath/debian/rules + cp debian/rules.modules debian/openvswitch-datapath-source/usr/src/modules/openvswitch-datapath/debian/rules chmod 755 debian/openvswitch-datapath-source/usr/src/modules/openvswitch-datapath/debian/rules cd debian/openvswitch-datapath-source/usr/src && tar -c modules | bzip2 -9 > openvswitch-datapath.tar.bz2 && rm -rf modules diff --git a/debian/rules.modules b/debian/rules.modules index 64f4cd42..2eb94405 100755 --- a/debian/rules.modules +++ b/debian/rules.modules @@ -7,9 +7,6 @@ MA_DIR ?= /usr/share/modass DATAPATH_CONFIGURE_OPTS = -# Official build number. Leave set to 0 if not an official build. -BUILD_NUMBER = 0 - kdist_clean: dh_testdir dh_testroot @@ -26,7 +23,7 @@ binary-modules: prep-deb-files dh_testroot dh_clean -k tar xzf openvswitch.tar.gz - cd openvswitch && ./configure --with-linux=$(KSRC) $(DATAPATH_CONFIGURE_OPTS) --with-build-number=$(BUILD_NUMBER) + cd openvswitch && ./configure --with-linux=$(KSRC) $(DATAPATH_CONFIGURE_OPTS) cd openvswitch && $(MAKE) -C datapath/linux install -d -m755 $(DSTDIR) install -m644 openvswitch/datapath/linux/*.ko $(DSTDIR)/ diff --git a/lib/ovsdb-error.c b/lib/ovsdb-error.c index 0ac93dc6..c5a4ad4c 100644 --- a/lib/ovsdb-error.c +++ b/lib/ovsdb-error.c @@ -1,4 +1,4 @@ -/* Copyright (c) 2009, 2010, 2011 Nicira Networks +/* Copyright (c) 2009, 2010, 2011, 2012 Nicira Networks * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -150,7 +150,7 @@ ovsdb_internal_error(struct ovsdb_error *inner_error, ds_put_char(&ds, ')'); } - ds_put_format(&ds, " (%s %s%s)", program_name, VERSION, BUILDNR); + ds_put_format(&ds, " (%s %s)", program_name, VERSION); if (inner_error) { char *s = ovsdb_error_to_string(inner_error); diff --git a/lib/util.c b/lib/util.c index dfdc51ea..2402ac6e 100644 --- a/lib/util.c +++ b/lib/util.c @@ -296,7 +296,7 @@ set_program_name__(const char *argv0, const char *date, const char *time) program_name = slash ? slash + 1 : argv0; free(program_version); - program_version = xasprintf("%s (Open vSwitch) "VERSION BUILDNR"\n" + program_version = xasprintf("%s (Open vSwitch) "VERSION"\n" "Compiled %s %s\n", program_name, date, time); } diff --git a/m4/nx-build.m4 b/m4/nx-build.m4 deleted file mode 100644 index 94abb9f5..00000000 --- a/m4/nx-build.m4 +++ /dev/null @@ -1,53 +0,0 @@ -# -*- autoconf -*- - -# Copyright (c) 2008 Nicira Networks. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at: -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -dnl NX_BUILDNR -dnl -dnl If --with-build-number=NUMBER is used, substitutes a Makefile -dnl variable BUILDNR with NUMBER, and sets a C preprocessor variable -dnl BUILDNR to "+buildNUMBER". -dnl -dnl Otherwise, if --with-build-number is not used, substitutes BUILDNR -dnl with 0 and sets C preprocessor variable BUILDNR to "". -AC_DEFUN([NX_BUILDNR], - [AC_ARG_WITH( - [build-number], - [AS_HELP_STRING([--with-build-number=NUMBER], - [Official build number (default is none)])]) - AC_MSG_CHECKING([build number]) - case $with_build_number in # ( - [[0-9]] | \ - [[0-9]][[0-9]] | \ - [[0-9]][[0-9]][[0-9]] | \ - [[0-9]][[0-9]][[0-9]][[0-9]] | \ - [[0-9]][[0-9]][[0-9]][[0-9]][[0-9]]) - BUILDNR=$with_build_number - buildnr='"+build'$BUILDNR'"' - AC_MSG_RESULT([$with_build_number]) - ;; # ( - ''|no) - BUILDNR=0 - buildnr='""' - AC_MSG_RESULT([none]) - ;; # ( - *) - AC_MSG_ERROR([invalid build number $with_build_number]) - ;; - esac - AC_SUBST([BUILDNR]) - AC_DEFINE_UNQUOTED([BUILDNR], [$buildnr], - [Official build number as a VERSION suffix string, e.g. "+build123", - or "" if this is not an official build.])]) diff --git a/ofproto/ofproto.h b/ofproto/ofproto.h index 860c5142..adbb80d6 100644 --- a/ofproto/ofproto.h +++ b/ofproto/ofproto.h @@ -131,7 +131,7 @@ struct ofproto_controller { #define DEFAULT_MFR_DESC "Nicira Networks, Inc." #define DEFAULT_HW_DESC "Open vSwitch" -#define DEFAULT_SW_DESC VERSION BUILDNR +#define DEFAULT_SW_DESC VERSION #define DEFAULT_SERIAL_DESC "None" #define DEFAULT_DP_DESC "None" diff --git a/ovsdb/ovsdb-tool.c b/ovsdb/ovsdb-tool.c index ad8cece2..ecf998b3 100644 --- a/ovsdb/ovsdb-tool.c +++ b/ovsdb/ovsdb-tool.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, 2010, 2011 Nicira Networks. + * Copyright (c) 2009, 2010, 2011, 2012 Nicira Networks. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -260,8 +260,7 @@ do_compact(int argc, char *argv[]) const char *db = argc >= 2 ? argv[1] : default_db(); const char *target = argc >= 3 ? argv[2] : NULL; - compact_or_convert(db, target, NULL, - "compacted by ovsdb-tool "VERSION BUILDNR); + compact_or_convert(db, target, NULL, "compacted by ovsdb-tool "VERSION); } static void @@ -274,7 +273,7 @@ do_convert(int argc, char *argv[]) check_ovsdb_error(ovsdb_schema_from_file(schema, &new_schema)); compact_or_convert(db, target, new_schema, - "converted by ovsdb-tool "VERSION BUILDNR); + "converted by ovsdb-tool "VERSION); ovsdb_schema_destroy(new_schema); } diff --git a/python/automake.mk b/python/automake.mk index 447c08fc..b60e26b1 100644 --- a/python/automake.mk +++ b/python/automake.mk @@ -64,8 +64,4 @@ ALL_LOCAL += $(srcdir)/python/ovs/version.py $(srcdir)/python/ovs/version.py: config.status $(ro_shell) > $(@F).tmp echo 'VERSION = "$(VERSION)"' >> $(@F).tmp - if [ "$(BUILDNR)" != "0" ]; \ - then echo 'BUILDNR = "+build$(BUILDNR)"' >> $(@F).tmp; \ - else echo 'BUILDNR = ""' >> $(@F).tmp; \ - fi if cmp -s $(@F).tmp $@; then touch $@; rm $(@F).tmp; else mv $(@F).tmp $@; fi diff --git a/python/ovs/unixctl.py b/python/ovs/unixctl.py index 4a591a7e..452afa5c 100644 --- a/python/ovs/unixctl.py +++ b/python/ovs/unixctl.py @@ -57,9 +57,8 @@ def _unixctl_help(conn, unused_argv, unused_aux): def _unixctl_version(conn, unused_argv, unused_aux): assert isinstance(conn, UnixctlConnection) - version = "%s (Open vSwitch) %s%s" % (ovs.util.PROGRAM_NAME, - ovs.version.VERSION, - ovs.version.BUILDNR) + version = "%s (Open vSwitch) %s" % (ovs.util.PROGRAM_NAME, + ovs.version.VERSION) conn.reply(version) diff --git a/rhel/openvswitch.spec.in b/rhel/openvswitch.spec.in index 0c2daf32..e9997574 100644 --- a/rhel/openvswitch.spec.in +++ b/rhel/openvswitch.spec.in @@ -1,6 +1,6 @@ # Spec file for Open vSwitch on Red Hat Enterprise Linux. -# Copyright (C) 2009, 2010, 2011 Nicira Networks, Inc. +# Copyright (C) 2009, 2010, 2011, 2012 Nicira Networks, Inc. # # Copying and distribution of this file, with or without modification, # are permitted in any medium without royalty provided the copyright @@ -29,7 +29,7 @@ traffic. %setup -q %build -./configure --prefix=/usr --sysconfdir=/etc --localstatedir=%{_localstatedir} --enable-ssl %{?build_number} +./configure --prefix=/usr --sysconfdir=/etc --localstatedir=%{_localstatedir} --enable-ssl make %{_smp_mflags} %install diff --git a/utilities/ovs-ctl.in b/utilities/ovs-ctl.in index 76d39ec1..ed558346 100755 --- a/utilities/ovs-ctl.in +++ b/utilities/ovs-ctl.in @@ -501,7 +501,7 @@ do usage ;; -V | --version) - echo "$0 (Open vSwitch) $VERSION$BUILDNR" + echo "$0 (Open vSwitch) $VERSION" exit 0 ;; --external-id=*) diff --git a/utilities/ovs-lib.in b/utilities/ovs-lib.in index f53d4afd..7a15aaec 100644 --- a/utilities/ovs-lib.in +++ b/utilities/ovs-lib.in @@ -1,7 +1,7 @@ # This is a shell function library sourced by some Open vSwitch scripts. # It is not intended to be invoked on its own. -# Copyright (C) 2009, 2010, 2011 Nicira Networks, Inc. +# Copyright (C) 2009, 2010, 2011, 2012 Nicira Networks, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -29,10 +29,6 @@ bindir=${OVS_BINDIR-'@bindir@'} # /usr/bin sbindir=${OVS_SBINDIR-'@sbindir@'} # /usr/sbin VERSION='@VERSION@' -case @BUILDNR@ in - [1-9]*) BUILDNR='+build@BUILDNR@' ;; - *) BUILDNR= ;; -esac LC_ALL=C; export LC_ALL diff --git a/vswitchd/vswitch.xml b/vswitchd/vswitch.xml index 7739793c..3e136823 100644 --- a/vswitchd/vswitch.xml +++ b/vswitchd/vswitch.xml @@ -233,8 +233,6 @@ The Open vSwitch version number, e.g. 1.1.0. - If Open vSwitch was configured with a build number, then it is - also included, e.g. 1.1.0+build6579. diff --git a/xenserver/openvswitch-xen.spec.in b/xenserver/openvswitch-xen.spec.in index a8e7e973..8c9d168c 100644 --- a/xenserver/openvswitch-xen.spec.in +++ b/xenserver/openvswitch-xen.spec.in @@ -8,15 +8,14 @@ # without warranty of any kind. # When building, the rpmbuild command line should define -# openvswitch_version, kernel_name, kernel_version, kernel_flavor, -# and build_number using -D arguments. +# openvswitch_version, kernel_name, kernel_version, and kernel_flavor +# using -D arguments. # for example: # # rpmbuild -D "openvswitch_version 1.1.0+build123" # -D "kernel_name NAME-xen" # -D "kernel_version 2.6.32.12-0.7.1.xs5.6.100.323.170596" # -D "kernel_flavor xen" -# -D "build_number --with-build-number=123" # -bb /usr/src/redhat/SPECS/openvswitch-xen.spec %if %{?openvswitch_version:0}%{!?openvswitch_version:1} @@ -71,7 +70,7 @@ Open vSwitch Linux kernel module compiled against kernel version %setup -q -n openvswitch-%{openvswitch_version} %build -./configure --prefix=/usr --sysconfdir=/etc --localstatedir=%{_localstatedir} --with-linux=/lib/modules/%{xen_version}/build --enable-ssl %{?build_number} +./configure --prefix=/usr --sysconfdir=/etc --localstatedir=%{_localstatedir} --with-linux=/lib/modules/%{xen_version}/build --enable-ssl make %{_smp_mflags} %install -- 2.30.2