diff --git a/SOURCES/openvswitch-3.1.0.patch b/SOURCES/openvswitch-3.1.0.patch index 4fdac76..a44346d 100644 --- a/SOURCES/openvswitch-3.1.0.patch +++ b/SOURCES/openvswitch-3.1.0.patch @@ -587,10 +587,19 @@ index 3a5f5be988..284b951f79 100644 Jumbo Frames ------------ diff --git a/Makefile.am b/Makefile.am -index e605187b81..f2e0650b88 100644 +index e605187b81..859c746b01 100644 --- a/Makefile.am +++ b/Makefile.am -@@ -75,6 +75,8 @@ EXTRA_DIST = \ +@@ -8,6 +8,8 @@ + AUTOMAKE_OPTIONS = foreign subdir-objects + ACLOCAL_AMFLAGS = -I m4 + ++AM_DISTCHECK_CONFIGURE_FLAGS = --with-version-suffix="$(VERSION_SUFFIX)" ++ + AM_CPPFLAGS = $(SSL_CFLAGS) + AM_LDFLAGS = $(SSL_LDFLAGS) + AM_LDFLAGS += $(OVS_LDFLAGS) +@@ -75,6 +77,8 @@ EXTRA_DIST = \ MAINTAINERS.rst \ README.rst \ NOTICE \ @@ -599,7 +608,15 @@ index e605187b81..f2e0650b88 100644 .ci/linux-build.sh \ .ci/linux-prepare.sh \ .ci/osx-build.sh \ -@@ -365,7 +367,7 @@ ALL_LOCAL += manpage-check +@@ -157,6 +161,7 @@ SUFFIXES += .in + -e 's,[@]PYTHON3[@],$(PYTHON3),g' \ + -e 's,[@]RUNDIR[@],$(RUNDIR),g' \ + -e 's,[@]VERSION[@],$(VERSION),g' \ ++ -e 's,[@]VERSION_SUFFIX[@],$(VERSION_SUFFIX),g' \ + -e 's,[@]localstatedir[@],$(localstatedir),g' \ + -e 's,[@]pkgdatadir[@],$(pkgdatadir),g' \ + -e 's,[@]sysconfdir[@],$(sysconfdir),g' \ +@@ -365,7 +370,7 @@ ALL_LOCAL += manpage-check manpage-check: $(man_MANS) $(dist_man_MANS) $(noinst_man_MANS) @error=false; \ for manpage in $?; do \ @@ -608,7 +625,7 @@ index e605187b81..f2e0650b88 100644 if grep warning: $@.tmp; then error=:; fi; \ rm -f $@.tmp; \ done; \ -@@ -396,23 +398,17 @@ ALL_LOCAL += flake8-check +@@ -396,23 +401,17 @@ ALL_LOCAL += flake8-check # F811 redefinition of unused from line (only from flake8 v2.0) # D*** -- warnings from flake8-docstrings plugin # H*** -- warnings from flake8 hacking plugin (custom style checks beyond PEP8) @@ -672,6 +689,30 @@ index 37a01dea50..cf0700ab3a 100644 v3.1.0 - 16 Feb 2023 -------------------- - ovs-vswitchd now detects changes in CPU affinity and adjusts the number +diff --git a/acinclude.m4 b/acinclude.m4 +index ac1eab7900..1947c92e10 100644 +--- a/acinclude.m4 ++++ b/acinclude.m4 +@@ -470,6 +470,19 @@ AC_DEFUN([OVS_CHECK_DPDK], [ + AM_CONDITIONAL([DPDK_NETDEV], test "$DPDKLIB_FOUND" = true) + ]) + ++dnl Append a version suffix. ++ ++AC_DEFUN([OVS_CHECK_VERSION_SUFFIX], [ ++ AC_ARG_WITH([version-suffix], ++ [AS_HELP_STRING([--with-version-suffix=ver_suffix], ++ [Specify a string that will be appended ++ to OVS version])]) ++ AC_DEFINE_UNQUOTED([VERSION_SUFFIX], ["$with_version_suffix"], ++ [Package version suffix]) ++ AC_SUBST([VERSION_SUFFIX], [$with_version_suffix]) ++ ]) ++]) ++ + dnl Checks for net/if_dl.h. + dnl + dnl (We use this as a proxy for checking whether we're building on FreeBSD diff --git a/build-aux/automake.mk b/build-aux/automake.mk index b9a77a51cf..d65b6da6c5 100644 --- a/build-aux/automake.mk @@ -1654,7 +1695,7 @@ index ee5553f456..3e937910be 100755 sys.exit(1) for line in s.splitlines(): diff --git a/configure.ac b/configure.ac -index 9bf896c013..d647b547c5 100644 +index 9bf896c013..b05bdbe17d 100644 --- a/configure.ac +++ b/configure.ac @@ -13,7 +13,7 @@ @@ -1679,6 +1720,14 @@ index 9bf896c013..d647b547c5 100644 AM_PROG_CC_C_O AC_PROG_CXX AC_PROG_CPP +@@ -198,6 +202,7 @@ OVS_CHECK_LINUX_SCTP_CT + OVS_CHECK_LINUX_VIRTIO_TYPES + OVS_CHECK_DPDK + OVS_CHECK_PRAGMA_MESSAGE ++OVS_CHECK_VERSION_SUFFIX + AC_SUBST([CFLAGS]) + AC_SUBST([OVS_CFLAGS]) + AC_SUBST([OVS_LDFLAGS]) diff --git a/datapath-windows/include/automake.mk b/datapath-windows/include/automake.mk index a354f007fd..185a06b03e 100644 --- a/datapath-windows/include/automake.mk @@ -1811,6 +1860,19 @@ index 045dce8f5f..3b0220aaa2 100644 #ifdef __cplusplus } #endif +diff --git a/include/openvswitch/version.h.in b/include/openvswitch/version.h.in +index 23d8fde4f1..231f61e30c 100644 +--- a/include/openvswitch/version.h.in ++++ b/include/openvswitch/version.h.in +@@ -19,7 +19,7 @@ + #define OPENVSWITCH_VERSION_H 1 + + #define OVS_PACKAGE_STRING "@PACKAGE_STRING@" +-#define OVS_PACKAGE_VERSION "@PACKAGE_VERSION@" ++#define OVS_PACKAGE_VERSION "@PACKAGE_VERSION@@VERSION_SUFFIX@" + + #define OVS_LIB_VERSION @LT_CURRENT@ + #define OVS_LIB_REVISION @LT_REVISION@ diff --git a/include/sparse/automake.mk b/include/sparse/automake.mk index e966371192..2b1dd0e005 100644 --- a/include/sparse/automake.mk @@ -6193,6 +6255,19 @@ index 5f8f20afa4..97b6fa3df7 100644 .. . . +diff --git a/lib/ovsdb-error.c b/lib/ovsdb-error.c +index a75ad36b73..65bbfe8768 100644 +--- a/lib/ovsdb-error.c ++++ b/lib/ovsdb-error.c +@@ -150,7 +150,7 @@ ovsdb_internal_error(struct ovsdb_error *inner_error, + ds_put_char(&ds, ')'); + } + +- ds_put_format(&ds, " (%s %s)", program_name, VERSION); ++ ds_put_format(&ds, " (%s %s)", program_name, VERSION VERSION_SUFFIX); + + if (inner_error) { + char *s = ovsdb_error_to_string_free(inner_error); diff --git a/lib/ovsdb-idl.c b/lib/ovsdb-idl.c index 634fbb56df..ba720474b6 100644 --- a/lib/ovsdb-idl.c @@ -6847,7 +6922,7 @@ index cdd3b4f60e..44f34dfc80 100644 uint8_t tos; uint8_t ttl; diff --git a/lib/util.c b/lib/util.c -index 96a71550d9..d0a61ddfab 100644 +index 96a71550d9..5f0679bb99 100644 --- a/lib/util.c +++ b/lib/util.c @@ -224,6 +224,8 @@ xvasprintf(const char *format, va_list args) @@ -6859,6 +6934,24 @@ index 96a71550d9..d0a61ddfab 100644 va_copy(args2, args); needed = vsnprintf(NULL, 0, format, args); +@@ -617,12 +619,14 @@ ovs_set_program_name(const char *argv0, const char *version) + program_name = basename; + + free(program_version); +- if (!strcmp(version, VERSION)) { +- program_version = xasprintf("%s (Open vSwitch) "VERSION"\n", ++ if (!strcmp(version, VERSION VERSION_SUFFIX)) { ++ program_version = xasprintf("%s (Open vSwitch) "VERSION ++ VERSION_SUFFIX"\n", + program_name); + } else { + program_version = xasprintf("%s %s\n" +- "Open vSwitch Library "VERSION"\n", ++ "Open vSwitch Library "VERSION ++ VERSION_SUFFIX"\n", + program_name, version); + } + } diff --git a/lib/vconn.c b/lib/vconn.c index b556762277..e9603432d2 100644 --- a/lib/vconn.c @@ -9469,7 +9562,7 @@ index 41b986c0ac..f1eefd49cb 100755 sys.exit(0) diff --git a/ovsdb/ovsdb-server.c b/ovsdb/ovsdb-server.c -index 33ca4910d7..e286c4c579 100644 +index 33ca4910d7..4314ad4e90 100644 --- a/ovsdb/ovsdb-server.c +++ b/ovsdb/ovsdb-server.c @@ -233,7 +233,7 @@ main_loop(struct server_config *config, @@ -9481,7 +9574,17 @@ index 33ca4910d7..e286c4c579 100644 ovsdb_storage_run(db->db->storage); read_db(config, db); /* Run triggers after storage_run and read_db to make sure new raft -@@ -573,8 +573,9 @@ close_db(struct server_config *config, struct db *db, char *comment) +@@ -424,7 +424,8 @@ main(int argc, char *argv[]) + /* ovsdb-server is usually a long-running process, in which case it + * makes plenty of sense to log the version, but --run makes + * ovsdb-server more like a command-line tool, so skip it. */ +- VLOG_INFO("%s (Open vSwitch) %s", program_name, VERSION); ++ VLOG_INFO("%s (Open vSwitch) %s", program_name, ++ VERSION VERSION_SUFFIX); + } + + unixctl_command_register("exit", "", 0, 0, ovsdb_server_exit, &exiting); +@@ -573,8 +574,9 @@ close_db(struct server_config *config, struct db *db, char *comment) } } @@ -9493,7 +9596,7 @@ index 33ca4910d7..e286c4c579 100644 { struct server_config *config = aux; -@@ -586,13 +587,27 @@ update_schema(struct ovsdb *db, const struct ovsdb_schema *schema, void *aux) +@@ -586,13 +588,27 @@ update_schema(struct ovsdb *db, const struct ovsdb_schema *schema, void *aux) : xasprintf("database %s connected to storage", db->name))); } @@ -9522,7 +9625,7 @@ index 33ca4910d7..e286c4c579 100644 } static struct ovsdb_error * OVS_WARN_UNUSED_RESULT -@@ -600,23 +615,30 @@ parse_txn(struct server_config *config, struct db *db, +@@ -600,23 +616,30 @@ parse_txn(struct server_config *config, struct db *db, const struct ovsdb_schema *schema, const struct json *txn_json, const struct uuid *txnid) { @@ -9560,7 +9663,7 @@ index 33ca4910d7..e286c4c579 100644 } if (txn_json) { -@@ -624,24 +646,26 @@ parse_txn(struct server_config *config, struct db *db, +@@ -624,24 +647,26 @@ parse_txn(struct server_config *config, struct db *db, return ovsdb_error(NULL, "%s: data without schema", db->filename); } @@ -9598,7 +9701,7 @@ index 33ca4910d7..e286c4c579 100644 } static void -@@ -2195,6 +2219,7 @@ sset_from_json(struct sset *sset, const struct json *array) +@@ -2195,6 +2220,7 @@ sset_from_json(struct sset *sset, const struct json *array) sset_clear(sset); @@ -10307,11 +10410,19 @@ index 01bb80e282..84dbc96f52 100644 json_destroy(txn_json); t->reply = jsonrpc_create_reply(json_object_create(), t->request->id); +diff --git a/python/.gitignore b/python/.gitignore +index 60ace6f05b..ad5486af83 100644 +--- a/python/.gitignore ++++ b/python/.gitignore +@@ -1,2 +1,3 @@ + dist/ + *.egg-info ++setup.py diff --git a/python/automake.mk b/python/automake.mk -index d00911828c..b0f444169c 100644 +index d00911828c..63afb739ab 100644 --- a/python/automake.mk +++ b/python/automake.mk -@@ -64,10 +64,10 @@ ovs_pytests = \ +@@ -64,34 +64,33 @@ ovs_pytests = \ # These python files are used at build time but not runtime, # so they are not installed. EXTRA_DIST += \ @@ -10326,28 +10437,45 @@ index d00911828c..b0f444169c 100644 # PyPI support. EXTRA_DIST += \ -@@ -86,10 +86,10 @@ PYCOV_CLEAN_FILES += $(PYFILES:.py=.py,cover) + python/ovs/compat/sortedcontainers/LICENSE \ + python/README.rst \ +- python/setup.py \ + python/test_requirements.txt + + # C extension support. + EXTRA_DIST += python/ovs/_json.c + +-PYFILES = $(ovs_pyfiles) python/ovs/dirs.py $(ovstest_pyfiles) $(ovs_pytests) ++PYFILES = $(ovs_pyfiles) python/ovs/dirs.py python/setup.py $(ovstest_pyfiles) $(ovs_pytests) + + EXTRA_DIST += $(PYFILES) + PYCOV_CLEAN_FILES += $(PYFILES:.py=.py,cover) FLAKE8_PYFILES += \ - $(filter-out python/ovs/compat/% python/ovs/dirs.py,$(PYFILES)) \ +- $(filter-out python/ovs/compat/% python/ovs/dirs.py,$(PYFILES)) \ - python/build/__init__.py \ - python/build/extract_ofp_fields.py \ - python/build/nroff.py \ - python/build/soutil.py \ ++ $(filter-out python/ovs/compat/% python/ovs/dirs.py python/setup.py,$(PYFILES)) \ + python/ovs_build_helpers/__init__.py \ + python/ovs_build_helpers/extract_ofp_fields.py \ + python/ovs_build_helpers/nroff.py \ + python/ovs_build_helpers/soutil.py \ python/ovs/dirs.py.template \ - python/setup.py +- python/setup.py ++ python/setup.py.template -@@ -110,11 +110,14 @@ ovs-install-data-local: + nobase_pkgdata_DATA = $(ovs_pyfiles) $(ovstest_pyfiles) + ovs-install-data-local: +@@ -110,11 +109,14 @@ ovs-install-data-local: $(INSTALL_DATA) python/ovs/dirs.py.tmp $(DESTDIR)$(pkgdatadir)/python/ovs/dirs.py rm python/ovs/dirs.py.tmp -+.PHONY: python-sdist - python-sdist: $(srcdir)/python/ovs/version.py $(ovs_pyfiles) python/ovs/dirs.py +-python-sdist: $(srcdir)/python/ovs/version.py $(ovs_pyfiles) python/ovs/dirs.py - (cd python/ && $(PYTHON3) setup.py sdist) ++.PHONY: python-sdist ++python-sdist: $(srcdir)/python/ovs/version.py $(ovs_pyfiles) python/ovs/dirs.py python/setup.py + cd python/ && $(PYTHON3) -m build --sdist + +.PHONY: pypi-upload @@ -10359,6 +10487,33 @@ index d00911828c..b0f444169c 100644 install-data-local: ovs-install-data-local UNINSTALL_LOCAL += ovs-uninstall-local +@@ -124,8 +126,8 @@ ovs-uninstall-local: + ALL_LOCAL += $(srcdir)/python/ovs/version.py + $(srcdir)/python/ovs/version.py: config.status + $(AM_V_GEN)$(ro_shell) > $(@F).tmp && \ +- echo 'VERSION = "$(VERSION)"' >> $(@F).tmp && \ +- if cmp -s $(@F).tmp $@; then touch $@; rm $(@F).tmp; else mv $(@F).tmp $@; fi ++ echo 'VERSION = "$(VERSION)$(VERSION_SUFFIX)"' >> $(@F).tmp && \ ++ if cmp -s $(@F).tmp $@; then touch $@; else cp $(@F).tmp $@; fi; rm $(@F).tmp + + ALL_LOCAL += $(srcdir)/python/ovs/dirs.py + $(srcdir)/python/ovs/dirs.py: python/ovs/dirs.py.template +@@ -142,6 +144,15 @@ $(srcdir)/python/ovs/dirs.py: python/ovs/dirs.py.template + EXTRA_DIST += python/ovs/dirs.py.template + CLEANFILES += python/ovs/dirs.py + ++ALL_LOCAL += $(srcdir)/python/setup.py ++$(srcdir)/python/setup.py: python/setup.py.template config.status ++ $(AM_V_GEN)sed \ ++ -e 's,[@]VERSION[@],$(VERSION),g' \ ++ < $(srcdir)/python/setup.py.template > $(@F).tmp && \ ++ if cmp -s $(@F).tmp $@; then touch $@; else cp $(@F).tmp $@; fi; rm $(@F).tmp ++EXTRA_DIST += python/setup.py.template ++CLEANFILES += python/setup.py ++ + EXTRA_DIST += python/TODO.rst + + $(srcdir)/python/ovs/flow/ofp_fields.py: $(srcdir)/build-aux/gen_ofp_field_decoders include/openvswitch/meta-flow.h diff --git a/python/ovs/db/custom_index.py b/python/ovs/db/custom_index.py index 587caf5e3e..3fa03d3c95 100644 --- a/python/ovs/db/custom_index.py @@ -10981,6 +11136,48 @@ diff --git a/python/build/soutil.py b/python/ovs_build_helpers/soutil.py similarity index 100% rename from python/build/soutil.py rename to python/ovs_build_helpers/soutil.py +diff --git a/python/setup.py b/python/setup.py.template +similarity index 87% +rename from python/setup.py +rename to python/setup.py.template +index 27684c4046..a35e733930 100644 +--- a/python/setup.py ++++ b/python/setup.py.template +@@ -23,24 +23,16 @@ except ImportError: # Needed for setuptools < 59.0 + + import setuptools + +-VERSION = "unknown" +- +-try: +- # Try to set the version from the generated ovs/version.py +- exec(open("ovs/version.py").read()) +-except IOError: +- print("Ensure version.py is created by running make python/ovs/version.py", +- file=sys.stderr) +- sys.exit(-1) +- +-try: +- # Try to open generated ovs/dirs.py. However, in this case we +- # don't need to exec() +- open("ovs/dirs.py") +-except IOError: +- print("Ensure dirs.py is created by running make python/ovs/dirs.py", +- file=sys.stderr) +- sys.exit(-1) ++VERSION = "@VERSION@" ++ ++for x in ("version.py", "dirs.py"): ++ try: ++ # Try to open generated ovs/{version,dirs}.py ++ open(f"ovs/{x}") ++ except IOError: ++ print(f"Ensure {x} is created by running make python/ovs/{x}", ++ file=sys.stderr) ++ sys.exit(-1) + + ext_errors = (CCompilerError, ExecError, PlatformError) + if sys.platform == 'win32': diff --git a/python/test_requirements.txt b/python/test_requirements.txt index 6aaee13e3f..6e96ce50b3 100644 --- a/python/test_requirements.txt @@ -10990,6 +11187,18 @@ index 6aaee13e3f..6e96ce50b3 100644 pytest netaddr pyparsing +diff --git a/rhel/openvswitch-fedora.spec.in b/rhel/openvswitch-fedora.spec.in +index 44899c1ca7..952dbe79bb 100644 +--- a/rhel/openvswitch-fedora.spec.in ++++ b/rhel/openvswitch-fedora.spec.in +@@ -178,6 +178,7 @@ This package provides IPsec tunneling support for OVS tunnels. + --disable-static \ + --enable-shared \ + --with-pkidir=%{_sharedstatedir}/openvswitch/pki \ ++ --with-version-suffix=-%{release} \ + PYTHON3=%{__python3} + + build-aux/dpdkstrip.py \ diff --git a/rhel/usr_lib_systemd_system_ovsdb-server.service b/rhel/usr_lib_systemd_system_ovsdb-server.service index 49dc06e38c..558632320c 100644 --- a/rhel/usr_lib_systemd_system_ovsdb-server.service @@ -17744,6 +17953,32 @@ index 4384be8ae1..0a9af1a18f 100644 local myPS1 v myPS1="$(sed 's/Begin prompt/\\Begin prompt/; s/End prompt/\\End prompt/' <<< "$PS1")" +diff --git a/utilities/ovs-dpctl-top.in b/utilities/ovs-dpctl-top.in +index 2c1766eff5..ec57eccd66 100755 +--- a/utilities/ovs-dpctl-top.in ++++ b/utilities/ovs-dpctl-top.in +@@ -351,7 +351,7 @@ def args_get(): + # None is a special value indicating to read flows from stdin. + # This handles the case + # ovs-dpctl dump-flows | ovs-dpctl-flows.py +- parser.add_argument("-v", "--version", version="@VERSION@", ++ parser.add_argument("-v", "--version", version="@VERSION@@VERSION_SUFFIX@", + action="version", help="show version") + parser.add_argument("-f", "--flow-file", dest="flowFiles", default=None, + action="append", +diff --git a/utilities/ovs-lib.in b/utilities/ovs-lib.in +index 13477a6a9e..65d3d2e08e 100644 +--- a/utilities/ovs-lib.in ++++ b/utilities/ovs-lib.in +@@ -70,7 +70,7 @@ ovs_ctl () { + esac + } + +-VERSION='@VERSION@' ++VERSION='@VERSION@@VERSION_SUFFIX@' + + DAEMON_CWD=/ + diff --git a/utilities/ovs-ofctl.c b/utilities/ovs-ofctl.c index eabec18a36..75fbd53260 100644 --- a/utilities/ovs-ofctl.c @@ -17846,10 +18081,58 @@ index eabec18a36..75fbd53260 100644 { "ofp-parse", "file", 1, 1, ofctl_ofp_parse, OVS_RW }, +diff --git a/utilities/ovs-parse-backtrace.in b/utilities/ovs-parse-backtrace.in +index f44f05cd1e..42f831eed5 100755 +--- a/utilities/ovs-parse-backtrace.in ++++ b/utilities/ovs-parse-backtrace.in +@@ -51,7 +51,7 @@ def addr2line(binary, addr): + + + def main(): +- parser = optparse.OptionParser(version='@VERSION@', ++ parser = optparse.OptionParser(version='@VERSION@@VERSION_SUFFIX@', + usage="usage: %prog [binary]", + description="""\ + Parses the output of ovs-appctl backtrace producing a more human readable +diff --git a/utilities/ovs-pcap.in b/utilities/ovs-pcap.in +index 6b5f63399e..d0ca947886 100755 +--- a/utilities/ovs-pcap.in ++++ b/utilities/ovs-pcap.in +@@ -85,7 +85,7 @@ if __name__ == "__main__": + if key in ['-h', '--help']: + usage() + elif key in ['-V', '--version']: +- print("ovs-pcap (Open vSwitch) @VERSION@") ++ print("ovs-pcap (Open vSwitch) @VERSION@@VERSION_SUFFIX@") + else: + sys.exit(0) + +diff --git a/utilities/ovs-pki.in b/utilities/ovs-pki.in +index e0ba910f94..c34e5888a2 100755 +--- a/utilities/ovs-pki.in ++++ b/utilities/ovs-pki.in +@@ -118,7 +118,7 @@ EOF + exit 0 + ;; + -V|--version) +- echo "ovs-pki (Open vSwitch) @VERSION@" ++ echo "ovs-pki (Open vSwitch) @VERSION@@VERSION_SUFFIX@" + exit 0 + ;; + --di*=*) diff --git a/utilities/ovs-tcpdump.in b/utilities/ovs-tcpdump.in -index a49ec9f942..4cbd9a5d31 100755 +index a49ec9f942..104ee355aa 100755 --- a/utilities/ovs-tcpdump.in +++ b/utilities/ovs-tcpdump.in +@@ -47,7 +47,7 @@ try: + from ovs.fatal_signal import add_hook + except Exception: + print("ERROR: Please install the correct Open vSwitch python support") +- print(" libraries (version @VERSION@).") ++ print(" libraries (version @VERSION@@VERSION_SUFFIX@).") + print(" Alternatively, check that your PYTHONPATH is pointing to") + print(" the correct location.") + sys.exit(1) @@ -96,6 +96,10 @@ def _install_dst_if_linux(tap_name, mtu_value=None): *(['ip', 'link', 'set', 'dev', str(tap_name), 'up'])) pipe.wait() @@ -17861,6 +18144,15 @@ index a49ec9f942..4cbd9a5d31 100755 def _remove_dst_if_linux(tap_name): _doexec( +@@ -449,7 +453,7 @@ def main(): + if cur in ['-h', '--help']: + usage() + elif cur in ['-V', '--version']: +- print("ovs-tcpdump (Open vSwitch) @VERSION@") ++ print("ovs-tcpdump (Open vSwitch) @VERSION@@VERSION_SUFFIX@") + sys.exit(0) + elif cur in ['--db-sock']: + db_sock = nxt @@ -538,6 +542,17 @@ def main(): print(data.decode('utf-8')) raise KeyboardInterrupt @@ -17879,6 +18171,32 @@ index a49ec9f942..4cbd9a5d31 100755 if pipes.poll() is None: pipes.terminate() +diff --git a/utilities/ovs-tcpundump.in b/utilities/ovs-tcpundump.in +index ede5448b49..2a1b08332d 100755 +--- a/utilities/ovs-tcpundump.in ++++ b/utilities/ovs-tcpundump.in +@@ -46,7 +46,7 @@ if __name__ == "__main__": + if key in ['-h', '--help']: + usage() + elif key in ['-V', '--version']: +- print("ovs-tcpundump (Open vSwitch) @VERSION@") ++ print("ovs-tcpundump (Open vSwitch) @VERSION@@VERSION_SUFFIX@") + sys.exit(0) + else: + sys.exit(0) +diff --git a/utilities/ovs-vlan-test.in b/utilities/ovs-vlan-test.in +index de3ae16862..3c15e2b135 100755 +--- a/utilities/ovs-vlan-test.in ++++ b/utilities/ovs-vlan-test.in +@@ -393,7 +393,7 @@ def main(): + usage() + return 0 + elif key in ['-V', '--version']: +- print_safe('ovs-vlan-test (Open vSwitch) @VERSION@') ++ print_safe('ovs-vlan-test (Open vSwitch) @VERSION@@VERSION_SUFFIX@') + return 0 + elif key in ['-s', '--server']: + server = True diff --git a/utilities/ovs-vsctl-bashcomp.bash b/utilities/ovs-vsctl-bashcomp.bash index fc8245bfb5..c5ad24fb70 100644 --- a/utilities/ovs-vsctl-bashcomp.bash @@ -17910,7 +18228,7 @@ index 2f5ac1a262..6d7ce4a4e7 100644 struct ovsrec_port *port_cfg = br_cfg->ports[j]; struct vsctl_port *port; diff --git a/vswitchd/bridge.c b/vswitchd/bridge.c -index bfb2adef1d..0deca14b9d 100644 +index bfb2adef1d..087869ff8b 100644 --- a/vswitchd/bridge.c +++ b/vswitchd/bridge.c @@ -832,6 +832,9 @@ bridge_reconfigure(const struct ovsrec_open_vswitch *ovs_cfg) @@ -17923,6 +18241,16 @@ index bfb2adef1d..0deca14b9d 100644 ofproto_set_vlan_limit(smap_get_int(&ovs_cfg->other_config, "vlan-limit", LEGACY_MAX_VLAN_HEADERS)); ofproto_set_bundle_idle_timeout(smap_get_uint(&ovs_cfg->other_config, +@@ -3322,7 +3325,8 @@ bridge_run(void) + + vlog_enable_async(); + +- VLOG_INFO_ONCE("%s (Open vSwitch) %s", program_name, VERSION); ++ VLOG_INFO_ONCE("%s (Open vSwitch) %s", program_name, ++ VERSION VERSION_SUFFIX); + } + } + diff --git a/vswitchd/ovs-vswitchd.c b/vswitchd/ovs-vswitchd.c index 407bfc60eb..2b2afb44ca 100644 --- a/vswitchd/ovs-vswitchd.c diff --git a/SPECS/openvswitch3.1.spec b/SPECS/openvswitch3.1.spec index 16accc9..85eecdf 100644 --- a/SPECS/openvswitch3.1.spec +++ b/SPECS/openvswitch3.1.spec @@ -57,7 +57,7 @@ Summary: Open vSwitch Group: System Environment/Daemons daemon/database/utilities URL: http://www.openvswitch.org/ Version: 3.1.0 -Release: 125%{?dist} +Release: 127%{?dist} # Nearly all of openvswitch is ASL 2.0. The bugtool is LGPLv2+, and the # lib/sflow*.[ch] files are SISSL @@ -408,7 +408,8 @@ ln -s ../configure --enable-ssl \ --with-pkidir=%{_sharedstatedir}/openvswitch/pki \ --enable-usdt-probes \ - --disable-afxdp + --disable-afxdp \ + --with-version-suffix=-%{release} make %{?_smp_mflags} popd pushd build-static @@ -428,7 +429,8 @@ PKG_CONFIG_PATH=%{_builddir}/dpdk-build/%{_lib}/pkgconfig \ %endif --with-pkidir=%{_sharedstatedir}/openvswitch/pki \ --enable-usdt-probes \ - --disable-afxdp + --disable-afxdp \ + --with-version-suffix=-%{release} make %{?_smp_mflags} popd @@ -754,6 +756,29 @@ exit 0 %endif %changelog +* Fri Jul 26 2024 Timothy Redaelli - 3.1.0-127 +- Use --with-version-suffix [RH git: 9e8d2ddcd8] + + +* Fri Jul 26 2024 Timothy Redaelli - 3.1.0-126 +- rhel: Make the version, displayed to the user, customizable. [RH git: 32ba2da86b] + Since on CentOS/RHEL the builds are based on stable branches and not on + tags for debugging purpose it's better to have the downstream version as + version so it's easier to know which commits are included in a build. + + This commit adds --with-version-suffix as ./configure option in + order to set an OVS version suffix that should be shown to the user via + ovs-vsctl -V and, so, also on database, on ovs-vsctl show and the other + utilities. + + --with-version-suffix is used in Fedora/CentOS/RHEL spec file in order to have + the version be aligned with the downstream one. + + Signed-off-by: Timothy Redaelli + Signed-off-by: Ilya Maximets + (cherry picked from commit 9e6d43ef32152527f7887d7f316a191adb5f338c) + + * Fri Jul 19 2024 Open vSwitch CI - 3.1.0-125 - Merging upstream branch-3.1 [RH git: e16c1783f6] Commit list: