!79 Add host, ipsec and ovn subpackage
From: @wang--ge Reviewed-by: @zengwefeng Signed-off-by: @zengwefeng
This commit is contained in:
commit
5e8fec57ae
100
0002-fix-DPDK-compiling-error.patch
Normal file
100
0002-fix-DPDK-compiling-error.patch
Normal file
@ -0,0 +1,100 @@
|
||||
From cb68d449111b02481aa74829ddc5de0d44d604cf Mon Sep 17 00:00:00 2001
|
||||
From: wang--ge <wang__ge@126.com>
|
||||
Date: Thu, 26 Aug 2021 15:06:02 +0800
|
||||
Subject: [PATCH] fix DPDK compiling error
|
||||
|
||||
---
|
||||
lib/netdev-dpdk.c | 24 ++++++++++++------------
|
||||
1 file changed, 12 insertions(+), 12 deletions(-)
|
||||
|
||||
diff --git a/lib/netdev-dpdk.c b/lib/netdev-dpdk.c
|
||||
index 4805783..67377b4 100644
|
||||
--- a/lib/netdev-dpdk.c
|
||||
+++ b/lib/netdev-dpdk.c
|
||||
@@ -83,12 +83,12 @@ static struct vlog_rate_limit rl = VLOG_RATE_LIMIT_INIT(5, 20);
|
||||
* The minimum mbuf size is limited to avoid scatter behaviour and drop in
|
||||
* performance for standard Ethernet MTU.
|
||||
*/
|
||||
-#define ETHER_HDR_MAX_LEN (ETHER_HDR_LEN + ETHER_CRC_LEN \
|
||||
+#define RTE_ETHER_HDR_MAX_LEN (RTE_ETHER_HDR_LEN + RTE_ETHER_CRC_LEN \
|
||||
+ (2 * VLAN_HEADER_LEN))
|
||||
-#define MTU_TO_FRAME_LEN(mtu) ((mtu) + ETHER_HDR_LEN + ETHER_CRC_LEN)
|
||||
-#define MTU_TO_MAX_FRAME_LEN(mtu) ((mtu) + ETHER_HDR_MAX_LEN)
|
||||
+#define MTU_TO_FRAME_LEN(mtu) ((mtu) + RTE_ETHER_HDR_LEN + RTE_ETHER_CRC_LEN)
|
||||
+#define MTU_TO_MAX_FRAME_LEN(mtu) ((mtu) + RTE_ETHER_HDR_MAX_LEN)
|
||||
#define FRAME_LEN_TO_MTU(frame_len) ((frame_len) \
|
||||
- - ETHER_HDR_LEN - ETHER_CRC_LEN)
|
||||
+ - RTE_ETHER_HDR_LEN - RTE_ETHER_CRC_LEN)
|
||||
#define NETDEV_DPDK_MBUF_ALIGN 1024
|
||||
#define NETDEV_DPDK_MAX_PKT_LEN 9728
|
||||
|
||||
@@ -615,7 +615,7 @@ dpdk_calculate_mbufs(struct netdev_dpdk *dev, int mtu, bool per_port_mp)
|
||||
* can change dynamically at runtime. For now, use this rough
|
||||
* heurisitic.
|
||||
*/
|
||||
- if (mtu >= ETHER_MTU) {
|
||||
+ if (mtu >= RTE_ETHER_MTU) {
|
||||
n_mbufs = MAX_NB_MBUF;
|
||||
} else {
|
||||
n_mbufs = MIN_NB_MBUF;
|
||||
@@ -930,7 +930,7 @@ dpdk_eth_dev_port_config(struct netdev_dpdk *dev, int n_rxq, int n_txq)
|
||||
* scatter to support jumbo RX.
|
||||
* Setting scatter for the device is done after checking for
|
||||
* scatter support in the device capabilites. */
|
||||
- if (dev->mtu > ETHER_MTU) {
|
||||
+ if (dev->mtu > RTE_ETHER_MTU) {
|
||||
if (dev->hw_ol_features & NETDEV_RX_HW_SCATTER) {
|
||||
conf.rxmode.offloads |= DEV_RX_OFFLOAD_SCATTER;
|
||||
}
|
||||
@@ -1042,7 +1042,7 @@ dpdk_eth_dev_init(struct netdev_dpdk *dev)
|
||||
{
|
||||
struct rte_pktmbuf_pool_private *mbp_priv;
|
||||
struct rte_eth_dev_info info;
|
||||
- struct ether_addr eth_addr;
|
||||
+ struct rte_ether_addr eth_addr;
|
||||
int diag;
|
||||
int n_rxq, n_txq;
|
||||
uint32_t rx_chksm_offload_capa = DEV_RX_OFFLOAD_UDP_CKSUM |
|
||||
@@ -1167,7 +1167,7 @@ common_construct(struct netdev *netdev, dpdk_port_t port_no,
|
||||
dev->port_id = port_no;
|
||||
dev->type = type;
|
||||
dev->flags = 0;
|
||||
- dev->requested_mtu = ETHER_MTU;
|
||||
+ dev->requested_mtu = RTE_ETHER_MTU;
|
||||
dev->max_packet_len = MTU_TO_FRAME_LEN(dev->mtu);
|
||||
dev->requested_lsc_interrupt_mode = 0;
|
||||
ovsrcu_index_init(&dev->vid, -1);
|
||||
@@ -1694,7 +1694,7 @@ netdev_dpdk_get_port_by_mac(const char *mac_str)
|
||||
}
|
||||
|
||||
RTE_ETH_FOREACH_DEV (port_id) {
|
||||
- struct ether_addr ea;
|
||||
+ struct rte_ether_addr ea;
|
||||
|
||||
rte_eth_macaddr_get(port_id, &ea);
|
||||
memcpy(port_mac.ea, ea.addr_bytes, ETH_ADDR_LEN);
|
||||
@@ -2077,10 +2077,10 @@ netdev_dpdk_policer_pkt_handle(struct rte_meter_srtcm *meter,
|
||||
struct rte_meter_srtcm_profile *profile,
|
||||
struct rte_mbuf *pkt, uint64_t time)
|
||||
{
|
||||
- uint32_t pkt_len = rte_pktmbuf_pkt_len(pkt) - sizeof(struct ether_hdr);
|
||||
+ uint32_t pkt_len = rte_pktmbuf_pkt_len(pkt) - sizeof(struct rte_ether_hdr);
|
||||
|
||||
return rte_meter_srtcm_color_blind_check(meter, profile, time, pkt_len) ==
|
||||
- e_RTE_METER_GREEN;
|
||||
+ RTE_COLOR_GREEN;
|
||||
}
|
||||
|
||||
static int
|
||||
@@ -2623,7 +2623,7 @@ netdev_dpdk_set_mtu(struct netdev *netdev, int mtu)
|
||||
* a method to retrieve the upper bound MTU for a given device.
|
||||
*/
|
||||
if (MTU_TO_MAX_FRAME_LEN(mtu) > NETDEV_DPDK_MAX_PKT_LEN
|
||||
- || mtu < ETHER_MIN_MTU) {
|
||||
+ || mtu < RTE_ETHER_MIN_MTU) {
|
||||
VLOG_WARN("%s: unsupported MTU %d\n", dev->up.name, mtu);
|
||||
return EINVAL;
|
||||
}
|
||||
--
|
||||
2.27.0
|
||||
|
||||
325
openvswitch.spec
325
openvswitch.spec
@ -3,7 +3,7 @@ Summary: Production Quality, Multilayer Open Virtual Switch
|
||||
URL: http://www.openvswitch.org/
|
||||
Version: 2.12.0
|
||||
License: ASL 2.0 and ISC
|
||||
Release: 12
|
||||
Release: 13
|
||||
Source: https://www.openvswitch.org/releases/openvswitch-%{version}.tar.gz
|
||||
Buildroot: /tmp/openvswitch-rpm
|
||||
Patch0000: 0000-openvswitch-add-stack-protector-strong.patch
|
||||
@ -13,12 +13,25 @@ Patch0003: CVE-2020-35498.patch
|
||||
Patch0004: CVE-2020-27827.patch
|
||||
Patch0005: CVE-2015-8011.patch
|
||||
Patch0006: backport-CVE-2021-36980.patch
|
||||
Patch0007: 0002-fix-DPDK-compiling-error.patch
|
||||
|
||||
Requires: %{name}-help
|
||||
Requires: logrotate hostname python >= 2.7 python2-six selinux-policy-targeted
|
||||
Requires: openssl iproute module-init-tools
|
||||
BuildRequires: python2-six, openssl-devel checkpolicy selinux-policy-devel autoconf automake libtool python-sphinx unbound-devel
|
||||
# required by python3-openvswitch and build configuration --with-dpdk --libcapng
|
||||
BuildRequires: python3-sphinx python3-devel python3-six libcap-ng-devel dpdk-devel libpcap-devel numactl-devel
|
||||
|
||||
Requires(pre): shadow-utils
|
||||
Requires(post): /bin/sed
|
||||
Requires(post): /usr/sbin/usermod
|
||||
Requires(post): /usr/sbin/groupadd
|
||||
Requires(post): systemd-units
|
||||
Requires(preun): systemd-units
|
||||
Requires(postun): systemd-units
|
||||
Provides: openvswitch-selinux-policy = %{version}-%{release}
|
||||
Obsoletes: openvswitch-selinux-policy < %{version}-%{release}
|
||||
Obsoletes: openvswitch-controller <= 0:2.1.0-1
|
||||
|
||||
%bcond_without check
|
||||
%bcond_with check_datapath_kernel
|
||||
@ -39,23 +52,95 @@ Summary: Helpful information for Open vSwitch
|
||||
%description help
|
||||
Documents and helpful information for Open vSwitch.
|
||||
|
||||
%package -n python3-openvswitch
|
||||
Summary: Open vSwitch python3 bindings
|
||||
Requires: python3 python3-six
|
||||
Obsoletes: python-openvswitch < 2.10.0-6
|
||||
Provides: python-openvswitch = %{version}-%{release}
|
||||
|
||||
%description -n python3-openvswitch
|
||||
Python bindings for the Open vSwitch database
|
||||
|
||||
%package test
|
||||
Summary: Open vSwitch testing utilities
|
||||
BuildArch: noarch
|
||||
Requires: python3-openvswitch = %{version}-%{release}
|
||||
|
||||
%description test
|
||||
Utilities that are useful to diagnose performance and connectivity issues in Open vSwitch setup.
|
||||
|
||||
%package -n network-scripts-%{name}
|
||||
Summary: Open vSwitch legacy network service support
|
||||
Requires: network-scripts
|
||||
Supplements: (%{name} and network-scripts)
|
||||
|
||||
%description -n network-scripts-%{name}
|
||||
This provides the ifup and ifdown scripts for use with the legacy network service.
|
||||
|
||||
%package ipsec
|
||||
Summary: Open vSwitch IPsec tunneling support
|
||||
Requires: openvswitch libreswan
|
||||
Requires: python3-openvswitch = %{version}-%{release}
|
||||
|
||||
%description ipsec
|
||||
This package provides IPsec tunneling support for OVS tunnels.
|
||||
|
||||
%package ovn-central
|
||||
Summary: Open vSwitch - Open Virtual Network support
|
||||
Requires: openvswitch openvswitch-ovn-common
|
||||
Requires: firewalld-filesystem
|
||||
|
||||
%description ovn-central
|
||||
OVN, the Open Virtual Network, is a system to support virtual network
|
||||
abstraction. OVN complements the existing capabilities of OVS to add
|
||||
native support for virtual network abstractions, such as virtual L2 and
|
||||
L3 overlays and security groups.
|
||||
|
||||
%package ovn-host
|
||||
Summary: Open vSwitch - Open Virtual Network support
|
||||
Requires: openvswitch openvswitch-ovn-common
|
||||
Requires: firewalld-filesystem
|
||||
|
||||
%description ovn-host
|
||||
OVN, the Open Virtual Network, is a system to support virtual network
|
||||
abstraction. OVN complements the existing capabilities of OVS to add
|
||||
native support for virtual network abstractions, such as virtual L2 and
|
||||
L3 overlays and security groups.
|
||||
|
||||
%package ovn-vtep
|
||||
Summary: Open vSwitch - Open Virtual Network support
|
||||
Requires: openvswitch openvswitch-ovn-common
|
||||
|
||||
%description ovn-vtep
|
||||
OVN vtep controller
|
||||
|
||||
%package ovn-common
|
||||
Summary: Open vSwitch - Open Virtual Network support
|
||||
Requires: openvswitch
|
||||
|
||||
%description ovn-common
|
||||
Utilities that are use to diagnose and manage the OVN components.
|
||||
|
||||
%prep
|
||||
%autosetup -p1
|
||||
|
||||
%build
|
||||
./boot.sh
|
||||
autoreconf
|
||||
./configure \
|
||||
--prefix=/usr \
|
||||
--sysconfdir=/etc \
|
||||
--localstatedir=%{_localstatedir} \
|
||||
--libdir=%{_libdir} \
|
||||
--enable-libcapng \
|
||||
--disable-static \
|
||||
--enable-ssl \
|
||||
--enable-shared \
|
||||
--with-pkidir=%{_sharedstatedir}/openvswitch/pki \
|
||||
PYTHON=%{__python2}
|
||||
--with-dpdk \
|
||||
--with-pkidir=%{_sharedstatedir}/openvswitch/pki
|
||||
|
||||
build-aux/dpdkstrip.py \
|
||||
--nodpdk \
|
||||
/usr/bin/python3 build-aux/dpdkstrip.py \
|
||||
--dpdk \
|
||||
< rhel/usr_lib_systemd_system_ovs-vswitchd.service.in \
|
||||
> rhel/usr_lib_systemd_system_ovs-vswitchd.service
|
||||
|
||||
@ -66,12 +151,14 @@ make selinux-policy
|
||||
rm -rf $RPM_BUILD_ROOT
|
||||
make install DESTDIR=$RPM_BUILD_ROOT
|
||||
|
||||
install -d -m 0755 $RPM_BUILD_ROOT%{_rundir}/openvswitch
|
||||
install -d -m 0750 $RPM_BUILD_ROOT%{_localstatedir}/log/openvswitch
|
||||
install -d -m 0755 $RPM_BUILD_ROOT%{_sysconfdir}/openvswitch
|
||||
|
||||
install -p -D -m 0644 \
|
||||
rhel/usr_share_openvswitch_scripts_systemd_sysconfig.template \
|
||||
$RPM_BUILD_ROOT/%{_sysconfdir}/sysconfig/openvswitch
|
||||
for service in openvswitch ovsdb-server ovs-vswitchd; do
|
||||
for service in openvswitch ovsdb-server ovs-vswitchd openvswitch-ipsec ovn-controller ovn-controller-vtep ovn-northd; do
|
||||
install -p -D -m 0644 \
|
||||
rhel/usr_lib_systemd_system_${service}.service \
|
||||
$RPM_BUILD_ROOT%{_unitdir}/${service}.service
|
||||
@ -83,25 +170,19 @@ install -D -m 0644 rhel/etc_openvswitch_default.conf $RPM_BU
|
||||
install -D -m 0755 rhel/etc_sysconfig_network-scripts_ifup-ovs $RPM_BUILD_ROOT/etc/sysconfig/network-scripts/ifup-ovs
|
||||
install -D -m 0755 rhel/etc_sysconfig_network-scripts_ifdown-ovs $RPM_BUILD_ROOT/etc/sysconfig/network-scripts/ifdown-ovs
|
||||
install -D -m 0644 rhel/usr_share_openvswitch_scripts_sysconfig.template $RPM_BUILD_ROOT/usr/share/openvswitch/scripts/sysconfig.template
|
||||
install -m 0644 vswitchd/vswitch.ovsschema \
|
||||
$RPM_BUILD_ROOT/%{_datadir}/openvswitch/vswitch.ovsschema
|
||||
|
||||
install -p -m 644 -D selinux/openvswitch-custom.pp \
|
||||
$RPM_BUILD_ROOT%{_datadir}/selinux/packages/%{name}/openvswitch-custom.pp
|
||||
|
||||
rm \
|
||||
$RPM_BUILD_ROOT/usr/bin/ovs-testcontroller \
|
||||
$RPM_BUILD_ROOT/usr/share/man/man8/ovs-testcontroller.8 \
|
||||
$RPM_BUILD_ROOT/usr/bin/ovs-test \
|
||||
$RPM_BUILD_ROOT/usr/bin/ovs-l3ping \
|
||||
$RPM_BUILD_ROOT/usr/share/man/man8/ovs-test.8 \
|
||||
$RPM_BUILD_ROOT/usr/share/man/man8/ovs-l3ping.8 \
|
||||
$RPM_BUILD_ROOT/usr/sbin/ovs-vlan-bug-workaround \
|
||||
$RPM_BUILD_ROOT/usr/share/man/man8/ovs-vlan-bug-workaround.8 \
|
||||
$RPM_BUILD_ROOT/usr/bin/ovn-* \
|
||||
$RPM_BUILD_ROOT/usr/share/man/man?/ovn-* \
|
||||
$RPM_BUILD_ROOT/usr/share/openvswitch/ovn-* \
|
||||
$RPM_BUILD_ROOT/usr/share/openvswitch/scripts/ovn*
|
||||
(cd "$RPM_BUILD_ROOT" && rm -rf usr/%{_lib}/*.la)
|
||||
(cd "$RPM_BUILD_ROOT" && rm -rf usr/include)
|
||||
pushd python
|
||||
export CPPFLAGS="-I ../include"
|
||||
export LDFLAGS="%{__global_ldflags} -L $RPM_BUILD_ROOT%{_libdir}"
|
||||
%py3_build
|
||||
%py3_install
|
||||
[ -f "$RPM_BUILD_ROOT/%{python3_sitearch}/ovs/_json.cpython-%{python3_version_nodots}m-%{_arch}-%{_target_os}%{?_gnu}.so" ]
|
||||
popd
|
||||
|
||||
install -d -m 0755 $RPM_BUILD_ROOT%{_rundir}/openvswitch
|
||||
install -d -m 0755 $RPM_BUILD_ROOT%{_localstatedir}/log/openvswitch
|
||||
@ -124,9 +205,6 @@ install -m 0644 include/sparse/netinet/*.h $RPM_BUILD_ROOT/%{_includedir}/openvs
|
||||
install -m 0644 include/sparse/sys/*.h $RPM_BUILD_ROOT/%{_includedir}/openvswitch/sparse/sys
|
||||
install -m 0644 lib/*.h $RPM_BUILD_ROOT/%{_includedir}/openvswitch/lib
|
||||
|
||||
install -D -m 0644 lib/.libs/libopenvswitch.a \
|
||||
$RPM_BUILD_ROOT/%{_libdir}/libopenvswitch.a
|
||||
|
||||
install -d -m 0755 $RPM_BUILD_ROOT/%{_sharedstatedir}/openvswitch
|
||||
|
||||
touch $RPM_BUILD_ROOT%{_sysconfdir}/openvswitch/conf.db
|
||||
@ -134,16 +212,46 @@ touch $RPM_BUILD_ROOT%{_sysconfdir}/openvswitch/.conf.db.~lock~
|
||||
touch $RPM_BUILD_ROOT%{_sysconfdir}/openvswitch/system-id.conf
|
||||
|
||||
install -d $RPM_BUILD_ROOT%{_prefix}/lib/firewalld/services/
|
||||
install -p -m 0644 rhel/usr_lib_firewalld_services_ovn-central-firewall-service.xml \
|
||||
$RPM_BUILD_ROOT%{_prefix}/lib/firewalld/services/ovn-central-firewall-service.xml
|
||||
install -p -m 0644 rhel/usr_lib_firewalld_services_ovn-host-firewall-service.xml \
|
||||
$RPM_BUILD_ROOT%{_prefix}/lib/firewalld/services/ovn-host-firewall-service.xml
|
||||
|
||||
install -d -m 0755 $RPM_BUILD_ROOT%{_prefix}/lib/ocf/resource.d/ovn
|
||||
ln -s %{_datadir}/openvswitch/scripts/ovndb-servers.ocf \
|
||||
$RPM_BUILD_ROOT%{_prefix}/lib/ocf/resource.d/ovn/ovndb-servers
|
||||
|
||||
install -p -D -m 0755 \
|
||||
rhel/usr_share_openvswitch_scripts_ovs-systemd-reload \
|
||||
$RPM_BUILD_ROOT/usr/share/openvswitch/scripts/ovs-systemd-reload
|
||||
|
||||
rm -rf $RPM_BUILD_ROOT/usr/include/openflow/
|
||||
rm -rf $RPM_BUILD_ROOT/usr/include/ovn/
|
||||
rm \
|
||||
$RPM_BUILD_ROOT/usr/bin/ovs-testcontroller \
|
||||
$RPM_BUILD_ROOT/usr/share/man/man8/ovs-testcontroller.8 \
|
||||
$RPM_BUILD_ROOT/usr/bin/ovs-test \
|
||||
$RPM_BUILD_ROOT/usr/bin/ovs-l3ping \
|
||||
$RPM_BUILD_ROOT/usr/bin/ovn-docker-overlay-driver \
|
||||
$RPM_BUILD_ROOT/usr/bin/ovn-docker-underlay-driver \
|
||||
$RPM_BUILD_ROOT/usr/sbin/ovs-vlan-bug-workaround \
|
||||
$RPM_BUILD_ROOT/usr/share/openvswitch/scripts/ovn-bugtool-nbctl-show \
|
||||
$RPM_BUILD_ROOT/usr/share/openvswitch/scripts/ovn-bugtool-sbctl-lflow-list \
|
||||
$RPM_BUILD_ROOT/usr/share/openvswitch/scripts/ovn-bugtool-sbctl-show
|
||||
(cd "$RPM_BUILD_ROOT" && rm -rf usr/%{_lib}/*.la)
|
||||
|
||||
%clean
|
||||
rm -rf $RPM_BUILD_ROOT
|
||||
|
||||
%pre
|
||||
%selinux_relabel_pre -s targeted
|
||||
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
|
||||
getent group hugetlbfs >/dev/null || groupadd hugetlbfs
|
||||
usermod -a -G hugetlbfs openvswitch
|
||||
exit 0
|
||||
|
||||
%preun
|
||||
%if 0%{?systemd_preun:1}
|
||||
@ -156,7 +264,48 @@ rm -rf $RPM_BUILD_ROOT
|
||||
fi
|
||||
%endif
|
||||
|
||||
%preun ovn-central
|
||||
%if 0%{?systemd_preun:1}
|
||||
%systemd_preun ovn-northd.service
|
||||
%else
|
||||
if [ $1 -eq 0 ] ; then
|
||||
# Package removal, not upgrade
|
||||
/bin/systemctl --no-reload disable ovn-northd.service >/dev/null 2>&1 || :
|
||||
/bin/systemctl stop ovn-northd.service >/dev/null 2>&1 || :
|
||||
fi
|
||||
%endif
|
||||
|
||||
%preun ovn-host
|
||||
%if 0%{?systemd_preun:1}
|
||||
%systemd_preun ovn-controller.service
|
||||
%else
|
||||
if [ $1 -eq 0 ] ; then
|
||||
# Package removal, not upgrade
|
||||
/bin/systemctl --no-reload disable ovn-controller.service >/dev/null 2>&1 || :
|
||||
/bin/systemctl stop ovn-controller.service >/dev/null 2>&1 || :
|
||||
fi
|
||||
%endif
|
||||
|
||||
%preun ovn-vtep
|
||||
%if 0%{?systemd_preun:1}
|
||||
%systemd_preun ovn-controller-vtep.service
|
||||
%else
|
||||
if [ $1 -eq 0 ] ; then
|
||||
# Package removal, not upgrade
|
||||
/bin/systemctl --no-reload disable ovn-controller-vtep.service >/dev/null 2>&1 || :
|
||||
/bin/systemctl stop ovn-controller-vtep.service >/dev/null 2>&1 || :
|
||||
fi
|
||||
%endif
|
||||
|
||||
%post
|
||||
if [ $1 -eq 1 ]; then
|
||||
sed -i 's:^#OVS_USER_ID=:OVS_USER_ID=:' /etc/sysconfig/openvswitch
|
||||
sed -i \
|
||||
's@OVS_USER_ID="openvswitch:openvswitch"@OVS_USER_ID="openvswitch:hugetlbfs"@'\
|
||||
/etc/sysconfig/openvswitch
|
||||
fi
|
||||
chown -R openvswitch:openvswitch /etc/openvswitch
|
||||
|
||||
%if 0%{?systemd_post:1}
|
||||
# This may not enable openvswitch service or do daemon-reload.
|
||||
%systemd_post %{name}.service
|
||||
@ -169,6 +318,69 @@ rm -rf $RPM_BUILD_ROOT
|
||||
|
||||
%selinux_modules_install -s targeted /usr/share/selinux/packages/%{name}/openvswitch-custom.pp
|
||||
|
||||
%post ovn-central
|
||||
%if 0%{?systemd_post:1}
|
||||
%systemd_post ovn-northd.service
|
||||
%else
|
||||
# Package install, not upgrade
|
||||
if [ $1 -eq 1 ]; then
|
||||
/bin/systemctl daemon-reload >dev/null || :
|
||||
fi
|
||||
%endif
|
||||
|
||||
%post ovn-host
|
||||
%if 0%{?systemd_post:1}
|
||||
%systemd_post ovn-controller.service
|
||||
%else
|
||||
# Package install, not upgrade
|
||||
if [ $1 -eq 1 ]; then
|
||||
/bin/systemctl daemon-reload >dev/null || :
|
||||
fi
|
||||
%endif
|
||||
|
||||
%post ovn-vtep
|
||||
%if 0%{?systemd_post:1}
|
||||
%systemd_post ovn-controller-vtep.service
|
||||
%else
|
||||
# Package install, not upgrade
|
||||
if [ $1 -eq 1 ]; then
|
||||
/bin/systemctl daemon-reload >dev/null || :
|
||||
fi
|
||||
%endif
|
||||
|
||||
%postun ovn-central
|
||||
%if 0%{?systemd_postun_with_restart:1}
|
||||
%systemd_postun_with_restart ovn-northd.service
|
||||
%else
|
||||
/bin/systemctl daemon-reload >/dev/null 2>&1 || :
|
||||
if [ "$1" -ge "1" ] ; then
|
||||
# Package upgrade, not uninstall
|
||||
/bin/systemctl try-restart ovn-northd.service >/dev/null 2>&1 || :
|
||||
fi
|
||||
%endif
|
||||
|
||||
%postun ovn-host
|
||||
%if 0%{?systemd_postun_with_restart:1}
|
||||
%systemd_postun_with_restart ovn-controller.service
|
||||
%else
|
||||
/bin/systemctl daemon-reload >/dev/null 2>&1 || :
|
||||
if [ "$1" -ge "1" ] ; then
|
||||
# Package upgrade, not uninstall
|
||||
/bin/systemctl try-restart ovn-controller.service >/dev/null 2>&1 || :
|
||||
fi
|
||||
%endif
|
||||
|
||||
%postun ovn-vtep
|
||||
%if 0%{?systemd_postun_with_restart:1}
|
||||
%systemd_postun_with_restart ovn-controller-vtep.service
|
||||
%else
|
||||
/bin/systemctl daemon-reload >/dev/null 2>&1 || :
|
||||
if [ "$1" -ge "1" ] ; then
|
||||
# Package upgrade, not uninstall
|
||||
/bin/systemctl try-restart ovn-controller-vtep.service >/dev/null 2>&1 || :
|
||||
fi
|
||||
%endif
|
||||
|
||||
%postun
|
||||
%if 0%{?systemd_postun:1}
|
||||
%systemd_postun %{name}.service
|
||||
@ -225,6 +437,7 @@ exit 0
|
||||
%{_sysconfdir}/openvswitch/default.conf
|
||||
%config %ghost %{_sysconfdir}/openvswitch/conf.db
|
||||
%ghost %{_sysconfdir}/openvswitch/.conf.db.~lock~
|
||||
%ghost %attr(0600,-,-) %verify(not owner group md5 size mtime) %{_sysconfdir}/openvswitch/.conf.db.~lock~
|
||||
%config %ghost %{_sysconfdir}/openvswitch/system-id.conf
|
||||
%config(noreplace) %{_sysconfdir}/sysconfig/openvswitch
|
||||
%defattr(-,root,root)
|
||||
@ -242,7 +455,6 @@ exit 0
|
||||
|
||||
%files devel
|
||||
%{_libdir}/lib*.so
|
||||
%{_libdir}/lib*.a
|
||||
%{_libdir}/pkgconfig
|
||||
%{_includedir}/openvswitch/*
|
||||
|
||||
@ -253,7 +465,70 @@ exit 0
|
||||
/usr/share/man/man8/*
|
||||
%doc README.rst NEWS rhel/README.RHEL.rst
|
||||
|
||||
%files -n python3-openvswitch
|
||||
%{python3_sitearch}/ovs
|
||||
%{python3_sitearch}/ovs-*.egg-info
|
||||
%doc LICENSE
|
||||
|
||||
%files test
|
||||
%{_bindir}/ovs-pcap
|
||||
%{_bindir}/ovs-tcpdump
|
||||
%{_bindir}/ovs-tcpundump
|
||||
%{_mandir}/man1/ovs-pcap.1*
|
||||
%{_mandir}/man8/ovs-tcpdump.8*
|
||||
%{_mandir}/man1/ovs-tcpundump.1*
|
||||
%exclude %{_mandir}/man8/ovs-test.8*
|
||||
%exclude %{_mandir}/man8/ovs-vlan-test.8*
|
||||
%exclude %{_mandir}/man8/ovs-l3ping.8*
|
||||
|
||||
%files -n network-scripts-%{name}
|
||||
%{_sysconfdir}/sysconfig/network-scripts/ifup-ovs
|
||||
%{_sysconfdir}/sysconfig/network-scripts/ifdown-ovs
|
||||
|
||||
%files ipsec
|
||||
%{_datadir}/openvswitch/scripts/ovs-monitor-ipsec
|
||||
%{_unitdir}/openvswitch-ipsec.service
|
||||
|
||||
%files ovn-common
|
||||
%{_bindir}/ovn-detrace
|
||||
%{_bindir}/ovn-nbctl
|
||||
%{_bindir}/ovn-sbctl
|
||||
%{_bindir}/ovn-trace
|
||||
%{_datadir}/openvswitch/scripts/ovn-ctl
|
||||
%{_datadir}/openvswitch/scripts/ovndb-servers.ocf
|
||||
%{_mandir}/man1/ovn-detrace.1*
|
||||
%{_mandir}/man8/ovn-ctl.8*
|
||||
%{_mandir}/man8/ovn-nbctl.8*
|
||||
%{_mandir}/man8/ovn-trace.8*
|
||||
%{_mandir}/man7/ovn-architecture.7*
|
||||
%{_mandir}/man8/ovn-sbctl.8*
|
||||
%{_mandir}/man5/ovn-nb.5*
|
||||
%{_mandir}/man5/ovn-sb.5*
|
||||
%{_prefix}/lib/ocf/resource.d/ovn/ovndb-servers
|
||||
|
||||
%files ovn-central
|
||||
%{_bindir}/ovn-northd
|
||||
%{_mandir}/man8/ovn-northd.8*
|
||||
%config %{_datadir}/openvswitch/ovn-nb.ovsschema
|
||||
%config %{_datadir}/openvswitch/ovn-sb.ovsschema
|
||||
%{_unitdir}/ovn-northd.service
|
||||
%{_prefix}/lib/firewalld/services/ovn-central-firewall-service.xml
|
||||
|
||||
%files ovn-host
|
||||
%{_bindir}/ovn-controller
|
||||
%{_mandir}/man8/ovn-controller.8*
|
||||
%{_unitdir}/ovn-controller.service
|
||||
%{_prefix}/lib/firewalld/services/ovn-host-firewall-service.xml
|
||||
|
||||
%files ovn-vtep
|
||||
%{_bindir}/ovn-controller-vtep
|
||||
%{_mandir}/man8/ovn-controller-vtep.8*
|
||||
%{_unitdir}/ovn-controller-vtep.service
|
||||
|
||||
%changelog
|
||||
* Fri Aug 27 2021 Ge Wang <wangge20@openeuler.org> - 2.12.0-13
|
||||
- Add host, ipsec and ovn subpackage
|
||||
|
||||
* Thu Jul 29 2021 liuyumeng <liuyumeng5@huawei.com> - 2.12.0-12
|
||||
- Type:cve
|
||||
- ID:CVE-2021-36980
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user