Skip to content

Commit

Permalink
configure: Remove --with-build-number.
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
blp committed Mar 19, 2012
1 parent 8a5b3cf commit 8a07709
Show file tree
Hide file tree
Showing 18 changed files with 23 additions and 111 deletions.
3 changes: 1 addition & 2 deletions Makefile.am
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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' \
Expand Down
3 changes: 1 addition & 2 deletions configure.ac
Original file line number Diff line number Diff line change
@@ -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.
Expand All @@ -14,7 +14,6 @@

AC_PREREQ(2.64)
AC_INIT(openvswitch, 1.6.90, [email protected])
NX_BUILDNR
AC_CONFIG_SRCDIR([datapath/datapath.c])
AC_CONFIG_MACRO_DIR([m4])
AC_CONFIG_AUX_DIR([build-aux])
Expand Down
2 changes: 1 addition & 1 deletion datapath/datapath.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
6 changes: 0 additions & 6 deletions datapath/linux/Kbuild.in
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,13 @@ 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

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

Expand Down
17 changes: 3 additions & 14 deletions debian/rules
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand All @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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

Expand Down
5 changes: 1 addition & 4 deletions debian/rules.modules
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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)/
Expand Down
4 changes: 2 additions & 2 deletions lib/ovsdb-error.c
Original file line number Diff line number Diff line change
@@ -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.
Expand Down Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion lib/util.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down
53 changes: 0 additions & 53 deletions m4/nx-build.m4

This file was deleted.

2 changes: 1 addition & 1 deletion ofproto/ofproto.h
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down
7 changes: 3 additions & 4 deletions ovsdb/ovsdb-tool.c
Original file line number Diff line number Diff line change
@@ -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.
Expand Down Expand Up @@ -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
Expand All @@ -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);
}

Expand Down
4 changes: 0 additions & 4 deletions python/automake.mk
Original file line number Diff line number Diff line change
Expand Up @@ -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
5 changes: 2 additions & 3 deletions python/ovs/unixctl.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)


Expand Down
4 changes: 2 additions & 2 deletions rhel/openvswitch.spec.in
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion utilities/ovs-ctl.in
Original file line number Diff line number Diff line change
Expand Up @@ -501,7 +501,7 @@ do
usage
;;
-V | --version)
echo "$0 (Open vSwitch) $VERSION$BUILDNR"
echo "$0 (Open vSwitch) $VERSION"
exit 0
;;
--external-id=*)
Expand Down
6 changes: 1 addition & 5 deletions utilities/ovs-lib.in
Original file line number Diff line number Diff line change
@@ -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.
Expand Down Expand Up @@ -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

Expand Down
2 changes: 0 additions & 2 deletions vswitchd/vswitch.xml
Original file line number Diff line number Diff line change
Expand Up @@ -233,8 +233,6 @@

<column name="ovs_version">
The Open vSwitch version number, e.g. <code>1.1.0</code>.
If Open vSwitch was configured with a build number, then it is
also included, e.g. <code>1.1.0+build6579</code>.
</column>

<column name="db_version">
Expand Down
7 changes: 3 additions & 4 deletions xenserver/openvswitch-xen.spec.in
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 8a07709

Please sign in to comment.