From 6f2a331456d659bebaa3301f8114e66a6fcc5c73 Mon Sep 17 00:00:00 2001
From: Timothy Redaelli
Date: Oct 04 2023 12:55:01 +0000
Subject: Update to 3.2.0
Backport two patches to fix building with groff 1.23.0
Resolves: #2218328
Resolves: #2226068
---
diff --git a/.gitignore b/.gitignore
index f0864c5..e0d34da 100644
--- a/.gitignore
+++ b/.gitignore
@@ -46,3 +46,4 @@
/openvswitch-3.0.3.tar.gz
/openvswitch-3.1.0.tar.gz
/openvswitch-3.1.1.tar.gz
+/openvswitch-3.2.0.tar.gz
diff --git a/0001-cpu-Fix-cpuid-check-for-some-AMD-processors.patch b/0001-cpu-Fix-cpuid-check-for-some-AMD-processors.patch
deleted file mode 100644
index f30f154..0000000
--- a/0001-cpu-Fix-cpuid-check-for-some-AMD-processors.patch
+++ /dev/null
@@ -1,37 +0,0 @@
-From 3fcb817840fd4bed114d6bbe7275d08310feb797 Mon Sep 17 00:00:00 2001
-From: David Marchand
-Date: Wed, 7 Jun 2023 10:24:40 +0200
-Subject: [PATCH] cpu: Fix cpuid check for some AMD processors.
-
-Some venerable AMD processors do not support querying extended features
-(EAX=7) with cpuid.
-In this case, it is not a programmatic error and the runtime check should
-simply return the isa is unsupported.
-
-Reported-by: Davide Repetto
-Reported-at: https://bugzilla.redhat.com/show_bug.cgi?id=2211747
-Fixes: b366fa2f4947 ("dpif-netdev: Call cpuid for x86 isa availability.")
-Signed-off-by: David Marchand
-Signed-off-by: Ilya Maximets
----
- lib/cpu.c | 4 +++-
- 1 file changed, 3 insertions(+), 1 deletion(-)
-
-diff --git a/lib/cpu.c b/lib/cpu.c
-index 0292f715e..fbbea4005 100644
---- a/lib/cpu.c
-+++ b/lib/cpu.c
-@@ -37,7 +37,9 @@ static bool x86_has_isa(uint32_t leaf, enum x86_reg reg, uint32_t bit)
- {
- uint32_t regs[4];
-
-- ovs_assert(__get_cpuid_max(leaf & X86_LEAF_MASK, NULL) >= leaf);
-+ if (__get_cpuid_max(leaf & X86_LEAF_MASK, NULL) < leaf) {
-+ return false;
-+ }
-
- __cpuid_count(leaf, 0, regs[EAX], regs[EBX], regs[ECX], regs[EDX]);
- return (regs[reg] & ((uint32_t) 1 << bit)) != 0;
---
-2.40.1
-
diff --git a/94480983382b1d0b778a82cba2d39cd2ab8ec27a.patch b/94480983382b1d0b778a82cba2d39cd2ab8ec27a.patch
new file mode 100644
index 0000000..4257128
--- /dev/null
+++ b/94480983382b1d0b778a82cba2d39cd2ab8ec27a.patch
@@ -0,0 +1,31 @@
+From 94480983382b1d0b778a82cba2d39cd2ab8ec27a Mon Sep 17 00:00:00 2001
+From: Colin Watson
+Date: Mon, 21 Aug 2023 15:53:34 +0200
+Subject: [PATCH] docs: Run tbl preprocessor in manpage-check rule.
+
+If we omit this, groff 1.23.0 warns:
+
+ tbl preprocessor failed, or it or soelim was not run; table(s) likely
+ not rendered (TE macro called with TW register undefined)
+
+Reported-by: Lucas Nussbaum
+Reported-at: https://bugs.debian.org/1042358
+Signed-off-by: Colin Watson
+Signed-off-by: Ilya Maximets
+---
+ Makefile.am | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/Makefile.am b/Makefile.am
+index db341504d37..265cf0a7b52 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -368,7 +368,7 @@ ALL_LOCAL += manpage-check
+ manpage-check: $(man_MANS) $(dist_man_MANS) $(noinst_man_MANS)
+ @error=false; \
+ for manpage in $?; do \
+- LANG=en_US.UTF-8 groff -w mac -w delim -w escape -w input -w missing -w tab -T utf8 -man -p -z $$manpage >$@.tmp 2>&1; \
++ LANG=en_US.UTF-8 groff -t -w mac -w delim -w escape -w input -w missing -w tab -T utf8 -man -p -z $$manpage >$@.tmp 2>&1; \
+ if grep warning: $@.tmp; then error=:; fi; \
+ rm -f $@.tmp; \
+ done; \
diff --git a/e2163f2ed4d12e0bc2fad37a9b3870a1394fe22e.patch b/e2163f2ed4d12e0bc2fad37a9b3870a1394fe22e.patch
new file mode 100644
index 0000000..1b4bef8
--- /dev/null
+++ b/e2163f2ed4d12e0bc2fad37a9b3870a1394fe22e.patch
@@ -0,0 +1,68 @@
+From e2163f2ed4d12e0bc2fad37a9b3870a1394fe22e Mon Sep 17 00:00:00 2001
+From: Frode Nordahl
+Date: Mon, 21 Aug 2023 15:53:33 +0200
+Subject: [PATCH] docs: Add `nowarn` region option to tables.
+
+Starting with groff 1.23.0 a warning is produced if the tbl
+preprocessor is not run. A side effect of enabling it is that
+new warnings on table formatting is printed.
+
+As requested during the review [0] of a series [1] attempting to
+address this, this patch makes use of the `nowarn` region option
+as opposed to attempting to change the formatting.
+
+0: https://patchwork.ozlabs.org/project/openvswitch/patch/ZM00Wfa80rOb2oCA@riva.ucam.org/#3164177
+1: https://patchwork.ozlabs.org/project/openvswitch/list/?series=367378&state=*
+
+Reported-by: Lucas Nussbaum
+Reported-at: https://bugs.debian.org/1042358
+Signed-off-by: Frode Nordahl
+Signed-off-by: Ilya Maximets
+---
+ build-aux/extract-ofp-fields | 6 +++---
+ lib/meta-flow.xml | 1 +
+ 2 files changed, 4 insertions(+), 3 deletions(-)
+
+diff --git a/build-aux/extract-ofp-fields b/build-aux/extract-ofp-fields
+index efec59c25b3..6366bd44618 100755
+--- a/build-aux/extract-ofp-fields
++++ b/build-aux/extract-ofp-fields
+@@ -216,7 +216,7 @@ def field_to_xml(field_node, f, body, summary):
+ """.PP
+ \\fB%s Field\\fR
+ .TS
+-tab(;);
++tab(;),nowarn;
+ l lx.
+ """
+ % title
+@@ -317,7 +317,7 @@ def group_xml_to_nroff(group_node, fields):
+ '.SH "%s"\n' % build.nroff.text_to_nroff(title.upper() + " FIELDS"),
+ '.SS "Summary:"\n',
+ ".TS\n",
+- "tab(;);\n",
++ "tab(;),nowarn;\n",
+ "l l l l l l l.\n",
+ "Name;Bytes;Mask;RW?;Prereqs;NXM/OXM Support\n",
+ "\_;\_;\_;\_;\_;\_\n",
+@@ -329,7 +329,7 @@ def group_xml_to_nroff(group_node, fields):
+
+
+ def make_oxm_classes_xml(document):
+- s = """tab(;);
++ s = """tab(;),nowarn;
+ l l l.
+ Prefix;Vendor;Class
+ \_;\_;\_
+diff --git a/lib/meta-flow.xml b/lib/meta-flow.xml
+index bdd12f6a7bb..416ea0cf224 100644
+--- a/lib/meta-flow.xml
++++ b/lib/meta-flow.xml
+@@ -3517,6 +3517,7 @@ actions=clone(load:0->NXM_OF_IN_PORT[],output:123)
+
+
+
++nowarn;
+ r r r r r.
+ Criteria OpenFlow 1.0 OpenFlow 1.1 OpenFlow 1.2+ NXM
+ \_ \_ \_ \_ \_
diff --git a/openvswitch.spec b/openvswitch.spec
index b30368f..be0db18 100644
--- a/openvswitch.spec
+++ b/openvswitch.spec
@@ -47,8 +47,8 @@ Epoch: 1
Name: openvswitch
Summary: Open vSwitch daemon/database/utilities
URL: https://www.openvswitch.org/
-Version: 3.1.1
-Release: 5%{?dist}
+Version: 3.2.0
+Release: 1%{?dist}
# Nearly all of openvswitch is ASL 2.0. The bugtool is LGPLv2+, and the
# lib/sflow*.[ch] files are SISSL
@@ -68,7 +68,8 @@ Source1: openvswitch.sysusers
# ovs-patches
# OVS (including OVN) backports (0 - 300)
-Patch0: 0001-cpu-Fix-cpuid-check-for-some-AMD-processors.patch
+Patch1: https://github.com/openvswitch/ovs/commit/e2163f2ed4d12e0bc2fad37a9b3870a1394fe22e.patch
+Patch2: https://github.com/openvswitch/ovs/commit/94480983382b1d0b778a82cba2d39cd2ab8ec27a.patch
BuildRequires: gcc gcc-c++ make
BuildRequires: autoconf automake libtool
@@ -602,6 +603,10 @@ fi
%{_sysusersdir}/openvswitch.conf
%changelog
+* Wed Oct 04 2023 Timothy Redaelli - 3.2.0-1
+- Update to 3.2.0 (#2218328)
+- Fix building with groff 1.23.0 (#2226068)
+
* Thu Jul 20 2023 Fedora Release Engineering - 3.1.1-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
diff --git a/sources b/sources
index 13b10b1..a4b32b9 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-SHA512 (openvswitch-3.1.1.tar.gz) = e22aa43b8942fd1c57c6875b3a24b28e552ad359dfe6e3772f9792e328713bcdd49a428cd80dec21dcfa2c8c75bcc8125d84e8cc3582033077d180986dd833ff
+SHA512 (openvswitch-3.2.0.tar.gz) = 15847a39a17dff70d2a00fc41c0df73d64e7d9648f0fce62b392d39ae3911b5a3c93879e1add72a22fb15750f0ff5fface8ceefb7887a20a672ea55c974fdc9a