- convert to sysuser generated users

- Add BuildRequires on python-setuptools. Previously this was pulled
  by python-Sphinx in the build environment.
       CVE-2023-3152.patch
     CVE-2023-1668.patch
   Some of the features are,
   -For more details, check
   - Added ovsb tool install patch,
     * install-ovsdb-tools.patch
- add openssl(cli) dependency on pki (bsc#1185839)
  https://github.com/openvswitch/ovs/blob/v2.14.2/NEWS
  (bsc#1181742).
- Fix wrong default directories for OVS python utilities (bsc#1176273).
  https://github.com/openvswitch/ovs/blob/v2.14.0/NEWS
  https://github.com/ovn-org/ovn/blob/v20.06.2/NEWS
- add missing provides/obsoletes for python3-openvswitch-test
- Update openvswitch to 2.13.0.
    https://github.com/openvswitch/ovs/blob/v2.13.0/NEWS
  https://github.com/openvswitch/ovs/blob/master/NEWS
- Update DPDK dependency to support DPDK 18.11.2.
  * 0001-rhel-secure-openvswitch-useropts.patch
- Use temporary directory for python build.
  including:
     - Support for the kernel versions 4.18.x
 * 0001-python-c-ext-Fix-memory-leak-in-Parser_finish.patch
  * 0001-utilities-Add-script-to-support-DPDK-option-migratio.patch
- Replace references to /var/adm/fillup-templates with new
  removed (bsc#1050896)
  builds on aarch64 now
- fix rcX link

OBS-URL: https://build.opensuse.org/package/show/network/openvswitch?expand=0&rev=251
This commit is contained in:
Dirk Mueller 2023-12-14 12:03:53 +00:00 committed by Git OBS Bridge
parent 8e59917189
commit 95221c70c1
3 changed files with 65 additions and 56 deletions

3
openvswitch-user.conf Normal file
View File

@ -0,0 +1,3 @@
# Type Name ID GECOS [HOME]
g openvswitch - -
u openvswitch - "Open vSwitch Daemons" / /sbin/nologin

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
Thu Dec 14 11:55:19 UTC 2023 - Dirk Müller <dmueller@suse.com>
- convert to sysuser generated users
-------------------------------------------------------------------
Mon Dec 4 15:52:33 UTC 2023 - Ana Guerrero <ana.guerrero@suse.com>

View File

@ -63,6 +63,7 @@ URL: http://openvswitch.org/
Source0: http://openvswitch.org/releases/openvswitch-%{version}.tar.gz
Source1: https://github.com/ovn-org/ovn/archive/v%{ovn_version}.tar.gz#/ovn-%{ovn_version}.tar.gz
Source2: preamble
Source10: openvswitch-user.conf
Source89: Module.supported.updates
Source99: openvswitch-rpmlintrc
# OVS patches
@ -116,10 +117,12 @@ Obsoletes: %{name}-switch < 2.7.0
%if 0%{?suse_version}
BuildRequires: libopenssl-devel
BuildRequires: python-rpm-macros
BuildRequires: sysuser-tools
Requires(post): %fillup_prereq
Requires(pre): shadow
Suggests: logrotate
%{?systemd_ordering}
%sysusers_requires
%else
BuildRequires: environment-modules
BuildRequires: openssl-devel
@ -507,6 +510,8 @@ bash -x boot.sh
PYTHON3=%{_bindir}/python3 \
LDFLAGS=-L../%{ovs_dir}/lib/.libs
%make_build
popd
%sysusers_generate_pre %{SOURCE10} openvswitch openvswitch.conf
%check
%if %{with check}
@ -727,7 +732,9 @@ rm %{buildroot}%{_docdir}/ovn/conf.py
# Done with OVN additional files.
popd
%pre
install -D -m 0644 %{SOURCE10} %{buildroot}%{_sysusersdir}/openvswitch.conf
%pre -f openvswitch.pre
%if 0%{?suse_version}
%service_add_pre ovsdb-server.service ovs-vswitchd.service openvswitch.service ovs-delete-transient-ports.service
%endif
@ -736,17 +743,10 @@ if [ "$1" -ge 1 ]; then
# ownership of openvswitch.service from openvswitch-switch to
# openvswitch.
if [ x$(systemctl is-enabled openvswitch.service 2>/dev/null ||:) = "xenabled" ]; then
touch %{rpmstate}openvswitch
touch %{rpmstate}openvswitch || :
fi
fi
getent group openvswitch >/dev/null || groupadd -r openvswitch
getent passwd openvswitch >/dev/null || \
useradd -r -g openvswitch -d / -s /sbin/nologin \
-c "Open vSwitch Daemons" openvswitch
exit 0
%pre ipsec
%if 0%{?suse_version}
%service_add_pre openvswitch-ipsec.service
@ -1171,6 +1171,7 @@ fi
%{_fillupdir}/sysconfig.openvswitch
%{_datadir}/bash-completion/completions/ovs-appctl-bashcomp.bash
%{_datadir}/bash-completion/completions/ovs-vsctl-bashcomp.bash
%{_sysusersdir}/openvswitch.conf
%else
%config(noreplace) %{_sysconfdir}/sysconfig/openvswitch
%{_sysconfdir}/bash_completion.d/ovs-appctl-bashcomp.bash