diff mbox series

[ovs-dev,V2,2/8] rhel: Remove kernel mode spec

Message ID 20220708161417.12438-3-gvrose8192@gmail.com
State Superseded
Headers show
Series Remove OVS kernel driver | expand

Checks

Context Check Description
ovsrobot/apply-robot fail apply and check: fail
ovsrobot/github-robot-_Build_and_Test fail github build: failed
ovsrobot/intel-ovs-compilation fail test: fail

Commit Message

Gregory Rose July 8, 2022, 4:14 p.m. UTC
Remove the kernel driver specification for RHEL 7.x, 8.x and Fedora.

Signed-off-by: Greg Rose <gvrose8192@gmail.com>
---
 Vagrantfile                          |   9 +-
 poc/playbook-fedora-builder.yml      |  13 ---
 rhel/.gitignore                      |   4 -
 rhel/automake.mk                     |  12 ---
 rhel/openvswitch-dkms.spec.in        | 103 ------------------
 rhel/openvswitch-kmod-fedora.spec.in | 152 ---------------------------
 6 files changed, 1 insertion(+), 292 deletions(-)
 delete mode 100644 rhel/openvswitch-dkms.spec.in
 delete mode 100644 rhel/openvswitch-kmod-fedora.spec.in

Comments

0-day Robot July 8, 2022, 4:40 p.m. UTC | #1
Bleep bloop.  Greetings Greg Rose, I am a robot and I have tried out your patch.
Thanks for your contribution.

I encountered some error that I wasn't expecting.  See the details below.


build:
echo 'VERSION = "2.17.90"' >> version.py.tmp && \
if cmp -s version.py.tmp python/ovs/version.py; then touch python/ovs/version.py; rm version.py.tmp; else mv version.py.tmp python/ovs/version.py; fi
PYTHONPATH=$PYTHONPATH":"./python /usr/bin/python3 ./build-aux/soexpand.py -I. < utilities/ovs-lib.in | \
  /usr/bin/python3 ./build-aux/dpdkstrip.py --nodpdk | \
  sed \
    -e 's,[@]PKIDIR[@],/usr/local/var/lib/openvswitch/pki,g' \
    -e 's,[@]LOGDIR[@],/usr/local/var/log/openvswitch,g' \
    -e 's,[@]DBDIR[@],/usr/local/etc/openvswitch,g' \
    -e 's,[@]PYTHON3[@],/usr/bin/python3,g' \
    -e 's,[@]RUNDIR[@],/usr/local/var/run/openvswitch,g' \
    -e 's,[@]VERSION[@],2.17.90,g' \
    -e 's,[@]localstatedir[@],/usr/local/var,g' \
    -e 's,[@]pkgdatadir[@],/usr/local/share/openvswitch,g' \
    -e 's,[@]sysconfdir[@],/usr/local/etc,g' \
    -e 's,[@]bindir[@],/usr/local/bin,g' \
    -e 's,[@]sbindir[@],/usr/local/sbin,g' \
    -e 's,[@]abs_builddir[@],/var/lib/jenkins/jobs/0day_robot_upstream_build_from_pw/workspace,g' \
    -e 's,[@]abs_top_srcdir[@],/var/lib/jenkins/jobs/0day_robot_upstream_build_from_pw/workspace,g' \
  > utilities/ovs-lib.tmp
mv -f utilities/ovs-lib.tmp utilities/ovs-lib
make[2]: *** No rule to make target `rhel/openvswitch-dkms.spec.in', needed by `rhel/openvswitch-dkms.spec'.  Stop.
make[2]: Leaving directory `/var/lib/jenkins/jobs/0day_robot_upstream_build_from_pw/workspace'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/var/lib/jenkins/jobs/0day_robot_upstream_build_from_pw/workspace'
make: *** [all] Error 2


Please check this out.  If you feel there has been an error, please email aconole@redhat.com

Thanks,
0-day Robot
diff mbox series

Patch

diff --git a/Vagrantfile b/Vagrantfile
index 2cd603932..c2c59265d 100644
--- a/Vagrantfile
+++ b/Vagrantfile
@@ -54,7 +54,7 @@  cd /vagrant
 [ -f Makefile ] && ./configure && make distclean
 mkdir -p ~/build
 cd ~/build
-/vagrant/configure --with-linux=/lib/modules/`uname -r`/build --enable-silent-rules
+/vagrant/configure --enable-silent-rules
 SCRIPT
 
 $build_ovs = <<SCRIPT
@@ -62,18 +62,12 @@  cd ~/build
 make
 SCRIPT
 
-$test_kmod = <<SCRIPT
-cd ~/build
-make check-kmod RECHECK=yes
-SCRIPT
-
 $install_rpm = <<SCRIPT
 cd ~/build
 PACKAGE_VERSION=`autom4te -l Autoconf -t 'AC_INIT:$2' /vagrant/configure.ac`
 make && make dist
 rpmdev-setuptree
 cp openvswitch-$PACKAGE_VERSION.tar.gz $HOME/rpmbuild/SOURCES
-rpmbuild --bb -D "kversion `uname -r`" /vagrant/rhel/openvswitch-kmod-fedora.spec
 rpmbuild --bb --without check /vagrant/rhel/openvswitch-fedora.spec
 rpm -e openvswitch
 rpm -ivh $HOME/rpmbuild/RPMS/x86_64/openvswitch-$PACKAGE_VERSION-1.fc23.x86_64.rpm
@@ -88,7 +82,6 @@  PACKAGE_VERSION=`autom4te -l Autoconf -t 'AC_INIT:$2' /vagrant/configure.ac`
 make && make dist
 rpmdev-setuptree
 cp openvswitch-$PACKAGE_VERSION.tar.gz $HOME/rpmbuild/SOURCES
-rpmbuild --bb -D "kversion `uname -r`" /vagrant/rhel/openvswitch-kmod-fedora.spec
 rpmbuild --bb --without check /vagrant/rhel/openvswitch-fedora.spec
 rpm -e openvswitch
 rpm -ivh $HOME/rpmbuild/RPMS/x86_64/openvswitch-$PACKAGE_VERSION-1.x86_64.rpm
diff --git a/poc/playbook-fedora-builder.yml b/poc/playbook-fedora-builder.yml
index 70f0b6ff2..e4be8dc22 100644
--- a/poc/playbook-fedora-builder.yml
+++ b/poc/playbook-fedora-builder.yml
@@ -53,8 +53,6 @@ 
         chdir: /git/ovs/rhel
     with_items:
       - openvswitch-fedora.spec
-      - openvswitch-kmod-fedora.spec
-      - openvswitch-dkms.spec
 
   - name: Install build dependencies specified from spec files
     shell: echo "y" | yum-builddep /tmp/{{item}}
@@ -95,23 +93,12 @@ 
       line: "Release: {{ ansible_local.builder.release }}"
     with_items:
       - openvswitch-fedora.spec
-      - openvswitch-kmod-fedora.spec
-      - openvswitch-dkms.spec
 
   - name: Build Open vSwitch user space rpms
     command: rpmbuild -bb --without check rhel/openvswitch-fedora.spec
     args:
         chdir: "{{SOURCE}}/openvswitch-{{version.stdout}}"
 
-  - name: Build Open vSwitch kmod rpm
-    command: rpmbuild -bb --without check rhel/openvswitch-fedora.spec
-    args:
-        chdir: "{{SOURCE}}/openvswitch-{{version.stdout}}"
-
-  - name: Build Open vSwitch dkms rpm
-    command: rpmbuild -bb --without check rhel/openvswitch-dkms.spec
-    args:
-        chdir: "{{SOURCE}}/openvswitch-{{version.stdout}}"
 
   - name: Copy RPM packages to /var/www/html
     command: cp -r /root/rpmbuild/RPMS/ /var/www/html
diff --git a/rhel/.gitignore b/rhel/.gitignore
index a9c047f83..577108130 100644
--- a/rhel/.gitignore
+++ b/rhel/.gitignore
@@ -1,7 +1,3 @@ 
-openvswitch-dkms.spec
-openvswitch-kmod-rhel5.spec
-kmod-openvswitch-rhel6.spec
-openvswitch-kmod-fedora.spec
 openvswitch.spec
 openvswitch-fedora.spec
 usr_lib_systemd_system_ovs-vswitchd.service
diff --git a/rhel/automake.mk b/rhel/automake.mk
index c75406e05..235779b49 100644
--- a/rhel/automake.mk
+++ b/rhel/automake.mk
@@ -17,8 +17,6 @@  EXTRA_DIST += \
 	rhel/openvswitch-dkms.spec.in \
 	rhel/kmod-openvswitch-rhel6.spec \
 	rhel/kmod-openvswitch-rhel6.spec.in \
-	rhel/openvswitch-kmod-fedora.spec \
-	rhel/openvswitch-kmod-fedora.spec.in \
 	rhel/openvswitch.spec \
 	rhel/openvswitch.spec.in \
 	rhel/openvswitch-fedora.spec \
@@ -47,9 +45,6 @@  $(srcdir)/rhel/openvswitch-dkms.spec: rhel/openvswitch-dkms.spec.in $(top_buildd
 $(srcdir)/rhel/kmod-openvswitch-rhel6.spec: rhel/kmod-openvswitch-rhel6.spec.in $(top_builddir)/config.status
 	$(update_rhel_spec)
 
-$(srcdir)/rhel/openvswitch-kmod-fedora.spec: rhel/openvswitch-kmod-fedora.spec.in $(top_builddir)/config.status
-	$(update_rhel_spec)
-
 $(srcdir)/rhel/openvswitch.spec: rhel/openvswitch.spec.in $(top_builddir)/config.status
 	$(update_rhel_spec)
 
@@ -67,10 +62,3 @@  rpm-fedora: dist $(srcdir)/rhel/openvswitch-fedora.spec
                  -D "_topdir ${RPMBUILD_TOP}" \
                  -ba $(srcdir)/rhel/openvswitch-fedora.spec
 
-# Build kernel datapath RPM
-rpm-fedora-kmod: dist $(srcdir)/rhel/openvswitch-kmod-fedora.spec
-	${MKDIR_P} ${RPMBUILD_TOP}/SOURCES
-	cp ${DIST_ARCHIVES} ${RPMBUILD_TOP}/SOURCES
-	rpmbuild -D "kversion $(shell uname -r)" ${RPMBUILD_OPT} \
-                 -D "_topdir ${RPMBUILD_TOP}" \
-                 -ba $(srcdir)/rhel/openvswitch-kmod-fedora.spec
diff --git a/rhel/openvswitch-dkms.spec.in b/rhel/openvswitch-dkms.spec.in
deleted file mode 100644
index e3d77e3c7..000000000
--- a/rhel/openvswitch-dkms.spec.in
+++ /dev/null
@@ -1,103 +0,0 @@ 
-# Spec file for Open vSwitch kernel modules using DKMS.
-#
-# Copyright (C) 2015 Nicira, Inc.
-#
-# Copying and distribution of this file, with or without modification,
-# are permitted in any medium without royalty provided the copyright
-# notice and this notice are preserved.  This file is offered as-is,
-# without warranty of any kind.
-
-%define oname openvswitch
-%{!?release_number:%define release_number 1}
-
-Name:             %{oname}-dkms
-Version:          @VERSION@
-Release:          %{release_number}%{?dist}
-Summary:          Open vSwitch kernel module
-
-Group:            System/Kernel
-License:          GPLv2
-URL:              http://openvswitch.org/
-Source:           %{oname}-%{version}.tar.gz
-Requires:         autoconf, gcc, make
-Requires(post):   dkms
-Requires(preun):  dkms
-BuildRoot:        %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
-
-# Without this we get an empty openvswitch-debuginfo package (whose name
-# conflicts with the openvswitch-debuginfo package for OVS userspace).
-%undefine _enable_debug_packages
-
-# Disable shebangs mangling
-%undefine __brp_mangle_shebangs
-
-%description
-Open vSwitch Linux kernel module.
-
-
-%prep
-%setup -n %{oname}-%{version}
-
-cat > %{oname}.conf << EOF
-override %{oname} * extra/%{oname}
-override %{oname} * weak-updates/%{oname}
-EOF
-
-
-%build
-# for running the '%{__make} -C datapath print-build-modules' below.
-./configure
-
-
-%install
-%{__rm} -rf %{buildroot}
-
-# Kernel module sources install for dkms
-%{__mkdir_p} %{buildroot}%{_usrsrc}/%{oname}-%{version}/
-%{__cp} -r * %{buildroot}%{_usrsrc}/%{oname}-%{version}/
-
-# check we can get kernel module names
-%{__make} -C datapath print-build-modules
-
-# Prepare dkms.conf
-cat > %{buildroot}%{_usrsrc}/%{oname}-%{version}/dkms.conf << EOF
-MODULES=( `%{__make} -C datapath print-build-modules | grep -v make` )
-
-PACKAGE_NAME="openvswitch"
-PACKAGE_VERSION="%{version}-%{release}"
-MAKE="./configure --with-linux='\${kernel_source_dir}' && make -C datapath/linux"
-for __idx in \${!MODULES[@]}; do
-    BUILT_MODULE_NAME[__idx]=\${MODULES[__idx]}
-    BUILT_MODULE_LOCATION[__idx]=datapath/linux/
-    DEST_MODULE_LOCATION[__idx]=/kernel/drivers/net/openvswitch/
-done
-AUTOINSTALL=yes
-EOF
-
-install -d %{buildroot}%{_sysconfdir}/depmod.d/
-install -m 644 %{oname}.conf %{buildroot}%{_sysconfdir}/depmod.d/
-
-
-%post
-# Add to DKMS registry
-isadded=`dkms status -m "%{oname}" -v "%{version}"`
-if [ "x${isadded}" = "x" ] ; then
-    dkms add -m "%{oname}" -v "%{version}" || :
-fi
-dkms build -m "%{oname}" -v "%{version}" || :
-dkms install -m "%{oname}" -v "%{version}" --force || :
-
-
-%preun
-# Remove all versions from DKMS registry
-dkms remove -m "%{oname}" -v "%{version}" --all || :
-
-
-%clean
-%{__rm} -rf %{buildroot}
-
-
-%files
-%defattr(-,root,root)
-%{_usrsrc}/%{oname}-%{version}/
-/etc/depmod.d/openvswitch.conf
diff --git a/rhel/openvswitch-kmod-fedora.spec.in b/rhel/openvswitch-kmod-fedora.spec.in
deleted file mode 100644
index e5f78701f..000000000
--- a/rhel/openvswitch-kmod-fedora.spec.in
+++ /dev/null
@@ -1,152 +0,0 @@ 
-# Spec file for Open vSwitch.
-
-# Copyright (C) 2009, 2010, 2015, 2018 Nicira Networks, Inc.
-#
-# Copying and distribution of this file, with or without modification,
-# are permitted in any medium without royalty provided the copyright
-# notice and this notice are preserved.  This file is offered as-is,
-# without warranty of any kind.
-
-%global debug_package %{nil}
-
-# Use the kversion macro such as
-# RPMBUILD_OPT='-D "kversion 3.10.0-693.1.1.el7.x86_64 3.10.0-693.17.1.el7.x86_64"'
-# to build package for mulitple kernel versions in the same package
-# This only works for the following kernels.
-#   - 3.10.0 major revision 327  (RHEL 7.2)
-#   - 3.10.0 major revision 693  (RHEL 7.4)
-#   - 3.10.0 major revision 957  (RHEL 7.6)
-#   - 3.10.0 major revision 1062 (RHEL 7.7)
-#   - 3.10.0 major revision 1101 (RHEL 7.8 Beta)
-#   - 3.10.0 major revision 1127 (RHEL 7.8 GA)
-#   - 3.10.0 major revision 1160 (RHEL 7.9 GA)
-# By default, build against the current running kernel version
-#%define kernel 3.1.5-1.fc16.x86_64
-#define kernel %{kernel_source}
-%{?kversion:%define kernel %kversion}
-
-%{!?release_number:%define release_number 1}
-
-Name: openvswitch-kmod
-Summary: Open vSwitch Kernel Modules
-Group: System Environment/Daemons
-URL: http://www.openvswitch.org/
-Vendor: OpenSource Security Ralf Spenneberg <ralf@os-s.net>
-Version: @VERSION@
-
-# The entire source code is ASL 2.0 except datapath/ which is GPLv2
-License: GPLv2
-Release: %{release_number}%{?dist}
-Source: openvswitch-%{version}.tar.gz
-#Source1: openvswitch-init
-Buildroot: /tmp/openvswitch-xen-rpm
-Provides: kmod-openvswitch
-Obsoletes: kmod-openvswitch < %{version}-%{release}
-
-%description
-Open vSwitch provides standard network bridging functions augmented with
-support for the OpenFlow protocol for remote per-flow control of
-traffic. This package contains the kernel modules.
-
-%prep
-%setup -q -n openvswitch-%{version}
-
-%build
-for kv in %{kversion}; do
-    mkdir -p _$kv
-    (cd _$kv && /bin/cp -f ../configure . && %configure --srcdir=.. \
-        --with-linux=/lib/modules/${kv}/build --enable-ssl %{_ovs_config_extra_flags})
-    make %{_smp_mflags} -C _$kv/datapath/linux
-done
-
-%install
-export INSTALL_MOD_DIR=extra/openvswitch
-rm -rf $RPM_BUILD_ROOT
-for kv in %{kversion}; do
-    make INSTALL_MOD_PATH=$RPM_BUILD_ROOT -C _$kv/datapath/linux modules_install
-done
-mkdir -p $RPM_BUILD_ROOT/etc/depmod.d
-for kv in %{kversion}; do
-    for module in $RPM_BUILD_ROOT/lib/modules/${kv}/extra/openvswitch/*.ko
-    do
-        modname="$(basename ${module})"
-        grep -qsPo "^\s*override ${modname%.ko} \* extra\/openvwitch" \
-            $RPM_BUILD_ROOT/etc/depmod.d/kmod-openvswitch.conf || \
-            echo "override ${modname%.ko} * extra/openvswitch" >> \
-            $RPM_BUILD_ROOT/etc/depmod.d/kmod-openvswitch.conf
-        grep -qsPo "^\s*override ${modname%.ko} \* weak-updates\/openvwitch" \
-            $RPM_BUILD_ROOT/etc/depmod.d/kmod-openvswitch.conf || \
-            echo "override ${modname%.ko} * weak-updates/openvswitch" >> \
-            $RPM_BUILD_ROOT/etc/depmod.d/kmod-openvswitch.conf
-    done
-done
-install -d -m 0755 $RPM_BUILD_ROOT/usr/share/openvswitch/scripts
-install -p -m 0755 rhel/usr_share_openvswitch_scripts_ovs-kmod-manage.sh \
-    $RPM_BUILD_ROOT%{_datadir}/openvswitch/scripts/ovs-kmod-manage.sh
-
-%clean
-rm -rf $RPM_BUILD_ROOT
-
-%post
-current_kernel=$(uname -r)
-IFS='.\|-' read mainline_major mainline_minor mainline_patch major_rev \
-    minor_rev _extra <<<"${current_kernel}"
-# echo mainline_major=$mainline_major mainline_minor=$mainline_minor \
-# mainline_patch=$mainline_patch major_rev=$major_rev minor_rev=$minor_rev
-if grep -qs "suse" /etc/os-release; then
-    # For SLES or OpenSUSE
-    if [ -x "%{_datadir}/openvswitch/scripts/ovs-kmod-manage.sh" ]; then
-        %{_datadir}/openvswitch/scripts/ovs-kmod-manage.sh
-    fi
-elif [ "$mainline_major" = "3" ] && [ "$mainline_minor" = "10" ] &&
-     { [ "$major_rev" = "327" ] || [ "$major_rev" = "693" ] || \
-       [ "$major_rev" = "957" ] || [ "$major_rev" == "1062" ] || \
-       [ "$major_rev" = "1101" ] || [ "$major_rev" = "1127" ] || \
-       [ "$major_rev" = "1160" ] ; }; then
-    # For RHEL 7.2, 7.4, 7.6, 7.7, 7.8 and 7.9
-    if [ -x "%{_datadir}/openvswitch/scripts/ovs-kmod-manage.sh" ]; then
-        %{_datadir}/openvswitch/scripts/ovs-kmod-manage.sh
-    fi
-else
-    # Ensure that modprobe will find our modules.
-    for k in $(cd /lib/modules && /bin/ls); do
-        [ -d "/lib/modules/$k/kernel/" ] && /sbin/depmod -a "$k"
-    done
-    if [ -x "/sbin/weak-modules" ]; then
-        for m in openvswitch vport-gre vport-stt vport-geneve \
-                 vport-lisp vport-vxlan; do
-            echo "/lib/modules/%{kernel}/extra/openvswitch/$m.ko"
-        done | /sbin/weak-modules --add-modules
-    fi
-fi
-
-%postun
-if [ "$1" = 0 ]; then  # Erase, not upgrade
-    for kname in `ls -d /lib/modules/*`
-do
-    rm -rf $kname/weak-updates/openvswitch
-done
-fi
-/sbin/depmod -a
-
-%posttrans
-# The upgrade path from the older kmod-openvswitch SysV package to
-# the newer openvswitch-kmod systemd package will end up removing
-# the symlinks to the weak-updates/openvswitch drivers because of
-# it's %postun section.  We add this section to handle that case.
-if [ -x "%{_datadir}/openvswitch/scripts/ovs-kmod-manage.sh" ]; then
-    %{_datadir}/openvswitch/scripts/ovs-kmod-manage.sh
-fi
-
-%files
-%defattr(0644,root,root)
-/lib/modules/*/extra/openvswitch/*.ko
-/etc/depmod.d/kmod-openvswitch.conf
-%exclude /lib/modules/*/modules.*
-%attr(755,root,root) %{_datadir}/openvswitch/scripts/ovs-kmod-manage.sh
-
-%changelog
-* Wed Sep 21 2011 Kyle Mestery <kmestery@cisco.com>
-- Updated for F15
-* Wed Jan 12 2011 Ralf Spenneberg <ralf@os-s.net>
-- First build on F14