Skip to content

Commit

Permalink
rhel: Stop packaging OVS kernel module.
Browse files Browse the repository at this point in the history
Remove the kernel driver specification for RHEL 6.x, 7.x, 8.x and Fedora.

Reviewed-by: David Marchand <[email protected]>
Signed-off-by: Greg Rose <[email protected]>
Signed-off-by: Ilya Maximets <[email protected]>
  • Loading branch information
gvrose8192 authored and igsilya committed Jul 15, 2022
1 parent b6941ca commit c94ae8a
Show file tree
Hide file tree
Showing 12 changed files with 3 additions and 702 deletions.
18 changes: 0 additions & 18 deletions Documentation/intro/install/rhel.rst
Original file line number Diff line number Diff line change
Expand Up @@ -194,24 +194,6 @@ the unit tests, run::
/lib/modules/2.6.32-279.el6.x86_64/build doesn't exist`` or similar, then
the kernel-devel package is missing or buggy.

Kernel Module
~~~~~~~~~~~~~

On RHEL 6, to build the Open vSwitch kernel module run::

$ rpmbuild -bb rhel/kmod-openvswitch-rhel6.spec

You might have to specify a kernel version and/or variants, e.g.::

$ rpmbuild -bb \
-D "kversion 2.6.32-131.6.1.el6.x86_64" \
-D "kflavors default debug kdump" \
rhel/kmod-openvswitch-rhel6.spec

This produces an "kmod-openvswitch" RPM for each kernel variant, in this
example: "kmod-openvswitch", "kmod-openvswitch-debug", and
"kmod-openvswitch-kdump".

.. _rhel-script-integrations:

Red Hat Network Scripts Integration
Expand Down
12 changes: 1 addition & 11 deletions Vagrantfile
Original file line number Diff line number Diff line change
Expand Up @@ -54,26 +54,20 @@ 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
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
Expand All @@ -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
Expand Down Expand Up @@ -125,7 +118,6 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
debian.vm.provision "bootstrap", type: "shell", inline: $bootstrap_debian
debian.vm.provision "configure_ovs", type: "shell", inline: $configure_ovs
debian.vm.provision "build_ovs", type: "shell", inline: $build_ovs
debian.vm.provision "test_ovs_kmod", type: "shell", inline: $test_kmod
debian.vm.provision "test_ovs_system_userspace", type: "shell", inline: $test_ovs_system_userspace
debian.vm.provision "install_deb", type: "shell", inline: $install_deb
end
Expand All @@ -135,7 +127,6 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
fedora.vm.provision "bootstrap", type: "shell", inline: $bootstrap_fedora
fedora.vm.provision "configure_ovs", type: "shell", inline: $configure_ovs
fedora.vm.provision "build_ovs", type: "shell", inline: $build_ovs
fedora.vm.provision "test_ovs_kmod", type: "shell", inline: $test_kmod
fedora.vm.provision "test_ovs_system_userspace", type: "shell", inline: $test_ovs_system_userspace
fedora.vm.provision "install_rpm", type: "shell", inline: $install_rpm
end
Expand All @@ -145,7 +136,6 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
centos.vm.provision "bootstrap", type: "shell", inline: $bootstrap_centos
centos.vm.provision "configure_ovs", type: "shell", inline: $configure_ovs
centos.vm.provision "build_ovs", type: "shell", inline: $build_ovs
centos.vm.provision "test_ovs_kmod", type: "shell", inline: $test_kmod
centos.vm.provision "test_ovs_system_userspace", type: "shell", inline: $test_ovs_system_userspace
centos.vm.provision "install_rpm", type: "shell", inline: $install_centos_rpm
end
Expand Down
8 changes: 0 additions & 8 deletions poc/playbook-centos-builder.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,11 @@
chdir: /git/ovs/rhel
with_items:
- openvswitch.spec
- kmod-openvswitch-rhel6.spec

- name: Install build dependencies specified from spec files
shell: echo "y" | yum-builddep /tmp/{{item}}
with_items:
- openvswitch.spec
- kmod-openvswitch-rhel6.spec

- name: Create rpm dev tree
command: rpmdev-setuptree
Expand Down Expand Up @@ -81,18 +79,12 @@
line: "Release: {{ ansible_local.builder.release }}"
with_items:
- openvswitch.spec
- kmod-openvswitch-rhel6.spec

- name: Build Open vSwitch user space rpms
command: rpmbuild -bb --without check rhel/openvswitch.spec
args:
chdir: "{{SOURCE}}/openvswitch-{{version.stdout}}"

- name: Build Open vSwitch kmod rpms (only for currently loaded kernel)
command: rpmbuild -bb --without check rhel/kmod-openvswitch-rhel6.spec
args:
chdir: "{{SOURCE}}/openvswitch-{{version.stdout}}"

- name: Copy RPM packages to /var/www/html
command: cp -r /root/rpmbuild/RPMS/ /var/www/html

Expand Down
16 changes: 0 additions & 16 deletions poc/playbook-fedora-builder.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,15 +53,11 @@
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}}
with_items:
- openvswitch-fedora.spec
- openvswitch-kmod-fedora.spec
- openvswitch-dkms.spec

- name: Create rpm dev tree
command: rpmdev-setuptree
Expand Down Expand Up @@ -95,24 +91,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

Expand Down
4 changes: 0 additions & 4 deletions rhel/.gitignore
Original file line number Diff line number Diff line change
@@ -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
23 changes: 0 additions & 23 deletions rhel/automake.mk
Original file line number Diff line number Diff line change
Expand Up @@ -13,20 +13,13 @@ EXTRA_DIST += \
rhel/etc_openvswitch_default.conf \
rhel/etc_sysconfig_network-scripts_ifdown-ovs \
rhel/etc_sysconfig_network-scripts_ifup-ovs \
rhel/openvswitch-dkms.spec \
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 \
rhel/openvswitch-fedora.spec.in \
rhel/usr_share_openvswitch_scripts_ovs-systemd-reload \
rhel/usr_share_openvswitch_scripts_sysconfig.template \
rhel/usr_share_openvswitch_scripts_systemd_sysconfig.template \
rhel/usr_share_openvswitch_scripts_ovs-kmod-manage.sh \
rhel/usr_lib_udev_rules.d_91-vfio.rules \
rhel/usr_lib_systemd_system_openvswitch.service \
rhel/usr_lib_systemd_system_ovsdb-server.service \
Expand All @@ -41,15 +34,6 @@ update_rhel_spec = \
< $(srcdir)/rhel/$(@F).in > $(@F).tmp || exit 1; \
if cmp -s $(@F).tmp $@; then touch $@; rm $(@F).tmp; else mv $(@F).tmp $@; fi

$(srcdir)/rhel/openvswitch-dkms.spec: rhel/openvswitch-dkms.spec.in $(top_builddir)/config.status
$(update_rhel_spec)

$(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)

Expand All @@ -67,10 +51,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
123 changes: 0 additions & 123 deletions rhel/kmod-openvswitch-rhel6.spec.in

This file was deleted.

Loading

0 comments on commit c94ae8a

Please sign in to comment.