diff mbox series

[ovs-dev] rhel: Support RHEL7.7 build and packaging

Message ID 1570830554-9336-1-git-send-email-pkusunyifeng@gmail.com
State Accepted
Commit 454dc17c75c9eeaa536116bb7df99015bff0ded8
Headers show
Series [ovs-dev] rhel: Support RHEL7.7 build and packaging | expand

Commit Message

Yifeng Sun Oct. 11, 2019, 9:49 p.m. UTC
This patch provides essential fixes for OVS to support
RHEL7.7's new kernel.

make rpm-fedora-kmod \
RPMBUILD_OPT='-D "kversion 3.10.0-1062.1.2.el7.x86_64"'

Signed-off-by: Yifeng Sun <pkusunyifeng@gmail.com>
---
 rhel/openvswitch-kmod-fedora.spec.in                  |  9 +++++----
 rhel/usr_share_openvswitch_scripts_ovs-kmod-manage.sh | 14 ++++++++++----
 2 files changed, 15 insertions(+), 8 deletions(-)

Comments

Ben Pfaff Oct. 15, 2019, 5:57 p.m. UTC | #1
On Tue, Oct 15, 2019 at 12:28:21PM -0700, Gregory Rose wrote:
> 
> On 10/11/2019 2:49 PM, Yifeng Sun wrote:
> > This patch provides essential fixes for OVS to support
> > RHEL7.7's new kernel.
> > 
> > make rpm-fedora-kmod \
> > RPMBUILD_OPT='-D "kversion 3.10.0-1062.1.2.el7.x86_64"'
> > 
> > Signed-off-by: Yifeng Sun <pkusunyifeng@gmail.com>
> 
> Hi Yifeng,
> 
> I'm trying to test this patch on a RHEL 7.7 system but it requires python
> sphinx and I can't
> seem to find out how to install it.  I've found a bunch of RPMs but all of
> them have
> broken dependencies.
> 
> I've never installed the sphinx stuff before but now it's required. Did you
> find a way
> to install it?
> 
> Here is the error:
> error: Failed build dependencies:
>     /usr/bin/sphinx-build-3 is needed by openvswitch-2.12.90-1.el7.x86_64

It's easy to figure out how to get a particular file on Fedora or RHEL,
using "dnf provides":

    $ dnf provides /usr/bin/sphinx-build-3
    python3-sphinx-1:1.8.4-1.fc30.noarch : Python documentation generator
    Repo        : @System
    Matched from:
    Filename    : /usr/bin/sphinx-build-3

    python3-sphinx-1:1.8.4-1.fc30.noarch : Python documentation generator
    Repo        : fedora
    Matched from:
    Filename    : /usr/bin/sphinx-build-3

Then "sudo dnf install python3-sphinx" ought to fix the problem.
Ben Pfaff Oct. 15, 2019, 6:42 p.m. UTC | #2
On Tue, Oct 15, 2019 at 02:54:05PM -0700, Gregory Rose wrote:
> 
> On 10/15/2019 10:57 AM, Ben Pfaff wrote:
> > It's easy to figure out how to get a particular file on Fedora or RHEL,
> > using "dnf provides":
> > 
> >      $ dnf provides /usr/bin/sphinx-build-3
> >      python3-sphinx-1:1.8.4-1.fc30.noarch : Python documentation generator
> >      Repo        : @System
> >      Matched from:
> >      Filename    : /usr/bin/sphinx-build-3
> > 
> >      python3-sphinx-1:1.8.4-1.fc30.noarch : Python documentation generator
> >      Repo        : fedora
> >      Matched from:
> >      Filename    : /usr/bin/sphinx-build-3
> > 
> > Then "sudo dnf install python3-sphinx" ought to fix the problem.
> 
> I tried 'yum whatprovides' and it found nothing.  I tried install dnf and
> then used 'dnf provides /usr/bin/sphinx-build-3'
> but that also found nothing.

I guess this must be a difference between RHEL and Fedora.  I don't know
RHEL, only Fedora, and only slightly.
Gregory Rose Oct. 15, 2019, 7:28 p.m. UTC | #3
On 10/11/2019 2:49 PM, Yifeng Sun wrote:
> This patch provides essential fixes for OVS to support
> RHEL7.7's new kernel.
>
> make rpm-fedora-kmod \
> RPMBUILD_OPT='-D "kversion 3.10.0-1062.1.2.el7.x86_64"'
>
> Signed-off-by: Yifeng Sun <pkusunyifeng@gmail.com>

Hi Yifeng,

I'm trying to test this patch on a RHEL 7.7 system but it requires 
python sphinx and I can't
seem to find out how to install it.  I've found a bunch of RPMs but all 
of them have
broken dependencies.

I've never installed the sphinx stuff before but now it's required. Did 
you find a way
to install it?

Here is the error:
error: Failed build dependencies:
     /usr/bin/sphinx-build-3 is needed by openvswitch-2.12.90-1.el7.x86_64

Thanks,

- Greg

> ---
>   rhel/openvswitch-kmod-fedora.spec.in                  |  9 +++++----
>   rhel/usr_share_openvswitch_scripts_ovs-kmod-manage.sh | 14 ++++++++++----
>   2 files changed, 15 insertions(+), 8 deletions(-)
>
> diff --git a/rhel/openvswitch-kmod-fedora.spec.in b/rhel/openvswitch-kmod-fedora.spec.in
> index b3588982ef7a..fbb8366990f1 100644
> --- a/rhel/openvswitch-kmod-fedora.spec.in
> +++ b/rhel/openvswitch-kmod-fedora.spec.in
> @@ -12,8 +12,9 @@
>   # 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 kernel 3.10.0 major revision 957 (RHEL 7.6),
> -# major revision 693 (RHEL 7.4) and major revision 327 (RHEL 7.2).
> +# This only works for kernel 3.10.0 major revision 1062 (RHEL 7.7),
> +# major revision 957 (RHEL 7.6), major revision 693 (RHEL 7.4) and
> +# major revision 327 (RHEL 7.2).
>   # By default, build against the current running kernel version
>   #%define kernel 3.1.5-1.fc16.x86_64
>   #define kernel %{kernel_source}
> @@ -92,8 +93,8 @@ if grep -qs "suse" /etc/os-release; then
>       fi
>   elif [ "$mainline_major" = "3" ] && [ "$mainline_minor" = "10" ] &&
>        { [ "$major_rev" = "327" ] || [ "$major_rev" = "693" ] || \
> -       [ "$major_rev" = "957" ]; }; then
> -    # For RHEL 7.2, 7.4 and 7.6
> +       [ "$major_rev" = "957" ] || [ "$major_rev" == "1062" ]; }; then
> +    # For RHEL 7.2, 7.4, 7.6 and 7.7
>       if [ -x "%{_datadir}/openvswitch/scripts/ovs-kmod-manage.sh" ]; then
>           %{_datadir}/openvswitch/scripts/ovs-kmod-manage.sh
>       fi
> diff --git a/rhel/usr_share_openvswitch_scripts_ovs-kmod-manage.sh b/rhel/usr_share_openvswitch_scripts_ovs-kmod-manage.sh
> index 693fb0b744b3..a643b55ff0f8 100644
> --- a/rhel/usr_share_openvswitch_scripts_ovs-kmod-manage.sh
> +++ b/rhel/usr_share_openvswitch_scripts_ovs-kmod-manage.sh
> @@ -15,9 +15,10 @@
>   # limitations under the License.
>   
>   # This script is intended to be used on 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 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)
>   #   - 4.4.x,  x >= 73           (SLES 12 SP3)
>   #   - 4.12.x, x >= 14           (SLES 12 SP4).
>   # It is packaged in the openvswitch kmod RPM and run in the post-install
> @@ -100,6 +101,11 @@ if [ "$mainline_major" = "3" ] && [ "$mainline_minor" = "10" ]; then
>           comp_ver=10
>           ver_offset=4
>           installed_ver="$minor_rev"
> +    elif [ "$major_rev" = "1062" ]; then
> +#        echo "rhel77"
> +        comp_ver=10
> +        ver_offset=4
> +        installed_ver="$minor_rev"
>       fi
>   elif [ "$mainline_major" = "4" ] && [ "$mainline_minor" = "4" ]; then
>       if [ "$mainline_patch" -ge "73" ]; then
> @@ -111,7 +117,7 @@ elif [ "$mainline_major" = "4" ] && [ "$mainline_minor" = "4" ]; then
>   elif [ "$mainline_major" = "4" ] && [ "$mainline_minor" = "12" ]; then
>       if [ "$mainline_patch" -ge "14" ]; then
>   #        echo "sles12sp4"
> -        comp_ver=14
> +        comp_ver=1
>           ver_offset=2
>           installed_ver="$mainline_patch"
>       fi
Yifeng Sun Oct. 15, 2019, 9:27 p.m. UTC | #4
Hi Greg,

Please try the following:

# yum install scl-utils scl-utils-build
# yum install rh-python36
# scl enable rh-python36 bash
# pip install sphinx

Thanks,
Yifeng

On Tue, Oct 15, 2019 at 12:28 PM Gregory Rose <gvrose8192@gmail.com> wrote:
>
>
> On 10/11/2019 2:49 PM, Yifeng Sun wrote:
> > This patch provides essential fixes for OVS to support
> > RHEL7.7's new kernel.
> >
> > make rpm-fedora-kmod \
> > RPMBUILD_OPT='-D "kversion 3.10.0-1062.1.2.el7.x86_64"'
> >
> > Signed-off-by: Yifeng Sun <pkusunyifeng@gmail.com>
>
> Hi Yifeng,
>
> I'm trying to test this patch on a RHEL 7.7 system but it requires
> python sphinx and I can't
> seem to find out how to install it.  I've found a bunch of RPMs but all
> of them have
> broken dependencies.
>
> I've never installed the sphinx stuff before but now it's required. Did
> you find a way
> to install it?
>
> Here is the error:
> error: Failed build dependencies:
>      /usr/bin/sphinx-build-3 is needed by openvswitch-2.12.90-1.el7.x86_64
>
> Thanks,
>
> - Greg
>
> > ---
> >   rhel/openvswitch-kmod-fedora.spec.in                  |  9 +++++----
> >   rhel/usr_share_openvswitch_scripts_ovs-kmod-manage.sh | 14 ++++++++++----
> >   2 files changed, 15 insertions(+), 8 deletions(-)
> >
> > diff --git a/rhel/openvswitch-kmod-fedora.spec.in b/rhel/openvswitch-kmod-fedora.spec.in
> > index b3588982ef7a..fbb8366990f1 100644
> > --- a/rhel/openvswitch-kmod-fedora.spec.in
> > +++ b/rhel/openvswitch-kmod-fedora.spec.in
> > @@ -12,8 +12,9 @@
> >   # 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 kernel 3.10.0 major revision 957 (RHEL 7.6),
> > -# major revision 693 (RHEL 7.4) and major revision 327 (RHEL 7.2).
> > +# This only works for kernel 3.10.0 major revision 1062 (RHEL 7.7),
> > +# major revision 957 (RHEL 7.6), major revision 693 (RHEL 7.4) and
> > +# major revision 327 (RHEL 7.2).
> >   # By default, build against the current running kernel version
> >   #%define kernel 3.1.5-1.fc16.x86_64
> >   #define kernel %{kernel_source}
> > @@ -92,8 +93,8 @@ if grep -qs "suse" /etc/os-release; then
> >       fi
> >   elif [ "$mainline_major" = "3" ] && [ "$mainline_minor" = "10" ] &&
> >        { [ "$major_rev" = "327" ] || [ "$major_rev" = "693" ] || \
> > -       [ "$major_rev" = "957" ]; }; then
> > -    # For RHEL 7.2, 7.4 and 7.6
> > +       [ "$major_rev" = "957" ] || [ "$major_rev" == "1062" ]; }; then
> > +    # For RHEL 7.2, 7.4, 7.6 and 7.7
> >       if [ -x "%{_datadir}/openvswitch/scripts/ovs-kmod-manage.sh" ]; then
> >           %{_datadir}/openvswitch/scripts/ovs-kmod-manage.sh
> >       fi
> > diff --git a/rhel/usr_share_openvswitch_scripts_ovs-kmod-manage.sh b/rhel/usr_share_openvswitch_scripts_ovs-kmod-manage.sh
> > index 693fb0b744b3..a643b55ff0f8 100644
> > --- a/rhel/usr_share_openvswitch_scripts_ovs-kmod-manage.sh
> > +++ b/rhel/usr_share_openvswitch_scripts_ovs-kmod-manage.sh
> > @@ -15,9 +15,10 @@
> >   # limitations under the License.
> >
> >   # This script is intended to be used on 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 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)
> >   #   - 4.4.x,  x >= 73           (SLES 12 SP3)
> >   #   - 4.12.x, x >= 14           (SLES 12 SP4).
> >   # It is packaged in the openvswitch kmod RPM and run in the post-install
> > @@ -100,6 +101,11 @@ if [ "$mainline_major" = "3" ] && [ "$mainline_minor" = "10" ]; then
> >           comp_ver=10
> >           ver_offset=4
> >           installed_ver="$minor_rev"
> > +    elif [ "$major_rev" = "1062" ]; then
> > +#        echo "rhel77"
> > +        comp_ver=10
> > +        ver_offset=4
> > +        installed_ver="$minor_rev"
> >       fi
> >   elif [ "$mainline_major" = "4" ] && [ "$mainline_minor" = "4" ]; then
> >       if [ "$mainline_patch" -ge "73" ]; then
> > @@ -111,7 +117,7 @@ elif [ "$mainline_major" = "4" ] && [ "$mainline_minor" = "4" ]; then
> >   elif [ "$mainline_major" = "4" ] && [ "$mainline_minor" = "12" ]; then
> >       if [ "$mainline_patch" -ge "14" ]; then
> >   #        echo "sles12sp4"
> > -        comp_ver=14
> > +        comp_ver=1
> >           ver_offset=2
> >           installed_ver="$mainline_patch"
> >       fi
>
Gregory Rose Oct. 15, 2019, 9:54 p.m. UTC | #5
On 10/15/2019 10:57 AM, Ben Pfaff wrote:
> On Tue, Oct 15, 2019 at 12:28:21PM -0700, Gregory Rose wrote:
>> On 10/11/2019 2:49 PM, Yifeng Sun wrote:
>>> This patch provides essential fixes for OVS to support
>>> RHEL7.7's new kernel.
>>>
>>> make rpm-fedora-kmod \
>>> RPMBUILD_OPT='-D "kversion 3.10.0-1062.1.2.el7.x86_64"'
>>>
>>> Signed-off-by: Yifeng Sun <pkusunyifeng@gmail.com>
>> Hi Yifeng,
>>
>> I'm trying to test this patch on a RHEL 7.7 system but it requires python
>> sphinx and I can't
>> seem to find out how to install it.  I've found a bunch of RPMs but all of
>> them have
>> broken dependencies.
>>
>> I've never installed the sphinx stuff before but now it's required. Did you
>> find a way
>> to install it?
>>
>> Here is the error:
>> error: Failed build dependencies:
>>      /usr/bin/sphinx-build-3 is needed by openvswitch-2.12.90-1.el7.x86_64
> It's easy to figure out how to get a particular file on Fedora or RHEL,
> using "dnf provides":
>
>      $ dnf provides /usr/bin/sphinx-build-3
>      python3-sphinx-1:1.8.4-1.fc30.noarch : Python documentation generator
>      Repo        : @System
>      Matched from:
>      Filename    : /usr/bin/sphinx-build-3
>
>      python3-sphinx-1:1.8.4-1.fc30.noarch : Python documentation generator
>      Repo        : fedora
>      Matched from:
>      Filename    : /usr/bin/sphinx-build-3
>
> Then "sudo dnf install python3-sphinx" ought to fix the problem.

I tried 'yum whatprovides' and it found nothing.  I tried install dnf 
and then used 'dnf provides /usr/bin/sphinx-build-3'
but that also found nothing.

I'll try Yifeng's suggestion.

Thanks,

- Greg
Gregory Rose Oct. 15, 2019, 9:58 p.m. UTC | #6
On 10/15/2019 2:27 PM, Yifeng Sun wrote:
> Hi Greg,
>
> Please try the following:
>
> # yum install scl-utils scl-utils-build
> # yum install rh-python36

Hi Yifeng,

I tried this step but no luck.

[root@localhost ~]# yum install rh-python36 -y
Loaded plugins: product-id, search-disabled-repos, subscription-manager
No package rh-python36 available.
Error: Nothing to do

Could you list your repos?  Here's what I've got:
[root@localhost ~]# yum repolist
Loaded plugins: product-id, search-disabled-repos, subscription-manager
repo id                                    repo 
name                      status
rhel-7-server-extras-rpms/x86_64           Red Hat Enterprise Linux 7 
Ser  1,182
rhel-7-server-optional-rpms/7Server/x86_64 Red Hat Enterprise Linux 7 
Ser 19,307
rhel-7-server-rpms/7Server/x86_64          Red Hat Enterprise Linux 7 
Ser 26,484
repolist: 46,973


Thanks,

- Greg

> # scl enable rh-python36 bash
> # pip install sphinx
>
> Thanks,
> Yifeng
>
> On Tue, Oct 15, 2019 at 12:28 PM Gregory Rose <gvrose8192@gmail.com> wrote:
>>
>> On 10/11/2019 2:49 PM, Yifeng Sun wrote:
>>> This patch provides essential fixes for OVS to support
>>> RHEL7.7's new kernel.
>>>
>>> make rpm-fedora-kmod \
>>> RPMBUILD_OPT='-D "kversion 3.10.0-1062.1.2.el7.x86_64"'
>>>
>>> Signed-off-by: Yifeng Sun <pkusunyifeng@gmail.com>
>> Hi Yifeng,
>>
>> I'm trying to test this patch on a RHEL 7.7 system but it requires
>> python sphinx and I can't
>> seem to find out how to install it.  I've found a bunch of RPMs but all
>> of them have
>> broken dependencies.
>>
>> I've never installed the sphinx stuff before but now it's required. Did
>> you find a way
>> to install it?
>>
>> Here is the error:
>> error: Failed build dependencies:
>>       /usr/bin/sphinx-build-3 is needed by openvswitch-2.12.90-1.el7.x86_64
>>
>> Thanks,
>>
>> - Greg
>>
>>> ---
>>>    rhel/openvswitch-kmod-fedora.spec.in                  |  9 +++++----
>>>    rhel/usr_share_openvswitch_scripts_ovs-kmod-manage.sh | 14 ++++++++++----
>>>    2 files changed, 15 insertions(+), 8 deletions(-)
>>>
>>> diff --git a/rhel/openvswitch-kmod-fedora.spec.in b/rhel/openvswitch-kmod-fedora.spec.in
>>> index b3588982ef7a..fbb8366990f1 100644
>>> --- a/rhel/openvswitch-kmod-fedora.spec.in
>>> +++ b/rhel/openvswitch-kmod-fedora.spec.in
>>> @@ -12,8 +12,9 @@
>>>    # 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 kernel 3.10.0 major revision 957 (RHEL 7.6),
>>> -# major revision 693 (RHEL 7.4) and major revision 327 (RHEL 7.2).
>>> +# This only works for kernel 3.10.0 major revision 1062 (RHEL 7.7),
>>> +# major revision 957 (RHEL 7.6), major revision 693 (RHEL 7.4) and
>>> +# major revision 327 (RHEL 7.2).
>>>    # By default, build against the current running kernel version
>>>    #%define kernel 3.1.5-1.fc16.x86_64
>>>    #define kernel %{kernel_source}
>>> @@ -92,8 +93,8 @@ if grep -qs "suse" /etc/os-release; then
>>>        fi
>>>    elif [ "$mainline_major" = "3" ] && [ "$mainline_minor" = "10" ] &&
>>>         { [ "$major_rev" = "327" ] || [ "$major_rev" = "693" ] || \
>>> -       [ "$major_rev" = "957" ]; }; then
>>> -    # For RHEL 7.2, 7.4 and 7.6
>>> +       [ "$major_rev" = "957" ] || [ "$major_rev" == "1062" ]; }; then
>>> +    # For RHEL 7.2, 7.4, 7.6 and 7.7
>>>        if [ -x "%{_datadir}/openvswitch/scripts/ovs-kmod-manage.sh" ]; then
>>>            %{_datadir}/openvswitch/scripts/ovs-kmod-manage.sh
>>>        fi
>>> diff --git a/rhel/usr_share_openvswitch_scripts_ovs-kmod-manage.sh b/rhel/usr_share_openvswitch_scripts_ovs-kmod-manage.sh
>>> index 693fb0b744b3..a643b55ff0f8 100644
>>> --- a/rhel/usr_share_openvswitch_scripts_ovs-kmod-manage.sh
>>> +++ b/rhel/usr_share_openvswitch_scripts_ovs-kmod-manage.sh
>>> @@ -15,9 +15,10 @@
>>>    # limitations under the License.
>>>
>>>    # This script is intended to be used on 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 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)
>>>    #   - 4.4.x,  x >= 73           (SLES 12 SP3)
>>>    #   - 4.12.x, x >= 14           (SLES 12 SP4).
>>>    # It is packaged in the openvswitch kmod RPM and run in the post-install
>>> @@ -100,6 +101,11 @@ if [ "$mainline_major" = "3" ] && [ "$mainline_minor" = "10" ]; then
>>>            comp_ver=10
>>>            ver_offset=4
>>>            installed_ver="$minor_rev"
>>> +    elif [ "$major_rev" = "1062" ]; then
>>> +#        echo "rhel77"
>>> +        comp_ver=10
>>> +        ver_offset=4
>>> +        installed_ver="$minor_rev"
>>>        fi
>>>    elif [ "$mainline_major" = "4" ] && [ "$mainline_minor" = "4" ]; then
>>>        if [ "$mainline_patch" -ge "73" ]; then
>>> @@ -111,7 +117,7 @@ elif [ "$mainline_major" = "4" ] && [ "$mainline_minor" = "4" ]; then
>>>    elif [ "$mainline_major" = "4" ] && [ "$mainline_minor" = "12" ]; then
>>>        if [ "$mainline_patch" -ge "14" ]; then
>>>    #        echo "sles12sp4"
>>> -        comp_ver=14
>>> +        comp_ver=1
>>>            ver_offset=2
>>>            installed_ver="$mainline_patch"
>>>        fi
Yifeng Sun Oct. 15, 2019, 10:02 p.m. UTC | #7
Hi Greg,

I added this repo:
subscription-manager repos  --enable rhel-server-rhscl-7-rpms

Thanks,
Yifeng

On Tue, Oct 15, 2019 at 2:58 PM Gregory Rose <gvrose8192@gmail.com> wrote:
>
>
> On 10/15/2019 2:27 PM, Yifeng Sun wrote:
> > Hi Greg,
> >
> > Please try the following:
> >
> > # yum install scl-utils scl-utils-build
> > # yum install rh-python36
>
> Hi Yifeng,
>
> I tried this step but no luck.
>
> [root@localhost ~]# yum install rh-python36 -y
> Loaded plugins: product-id, search-disabled-repos, subscription-manager
> No package rh-python36 available.
> Error: Nothing to do
>
> Could you list your repos?  Here's what I've got:
> [root@localhost ~]# yum repolist
> Loaded plugins: product-id, search-disabled-repos, subscription-manager
> repo id                                    repo
> name                      status
> rhel-7-server-extras-rpms/x86_64           Red Hat Enterprise Linux 7
> Ser  1,182
> rhel-7-server-optional-rpms/7Server/x86_64 Red Hat Enterprise Linux 7
> Ser 19,307
> rhel-7-server-rpms/7Server/x86_64          Red Hat Enterprise Linux 7
> Ser 26,484
> repolist: 46,973
>
>
> Thanks,
>
> - Greg
>
> > # scl enable rh-python36 bash
> > # pip install sphinx
> >
> > Thanks,
> > Yifeng
> >
> > On Tue, Oct 15, 2019 at 12:28 PM Gregory Rose <gvrose8192@gmail.com> wrote:
> >>
> >> On 10/11/2019 2:49 PM, Yifeng Sun wrote:
> >>> This patch provides essential fixes for OVS to support
> >>> RHEL7.7's new kernel.
> >>>
> >>> make rpm-fedora-kmod \
> >>> RPMBUILD_OPT='-D "kversion 3.10.0-1062.1.2.el7.x86_64"'
> >>>
> >>> Signed-off-by: Yifeng Sun <pkusunyifeng@gmail.com>
> >> Hi Yifeng,
> >>
> >> I'm trying to test this patch on a RHEL 7.7 system but it requires
> >> python sphinx and I can't
> >> seem to find out how to install it.  I've found a bunch of RPMs but all
> >> of them have
> >> broken dependencies.
> >>
> >> I've never installed the sphinx stuff before but now it's required. Did
> >> you find a way
> >> to install it?
> >>
> >> Here is the error:
> >> error: Failed build dependencies:
> >>       /usr/bin/sphinx-build-3 is needed by openvswitch-2.12.90-1.el7.x86_64
> >>
> >> Thanks,
> >>
> >> - Greg
> >>
> >>> ---
> >>>    rhel/openvswitch-kmod-fedora.spec.in                  |  9 +++++----
> >>>    rhel/usr_share_openvswitch_scripts_ovs-kmod-manage.sh | 14 ++++++++++----
> >>>    2 files changed, 15 insertions(+), 8 deletions(-)
> >>>
> >>> diff --git a/rhel/openvswitch-kmod-fedora.spec.in b/rhel/openvswitch-kmod-fedora.spec.in
> >>> index b3588982ef7a..fbb8366990f1 100644
> >>> --- a/rhel/openvswitch-kmod-fedora.spec.in
> >>> +++ b/rhel/openvswitch-kmod-fedora.spec.in
> >>> @@ -12,8 +12,9 @@
> >>>    # 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 kernel 3.10.0 major revision 957 (RHEL 7.6),
> >>> -# major revision 693 (RHEL 7.4) and major revision 327 (RHEL 7.2).
> >>> +# This only works for kernel 3.10.0 major revision 1062 (RHEL 7.7),
> >>> +# major revision 957 (RHEL 7.6), major revision 693 (RHEL 7.4) and
> >>> +# major revision 327 (RHEL 7.2).
> >>>    # By default, build against the current running kernel version
> >>>    #%define kernel 3.1.5-1.fc16.x86_64
> >>>    #define kernel %{kernel_source}
> >>> @@ -92,8 +93,8 @@ if grep -qs "suse" /etc/os-release; then
> >>>        fi
> >>>    elif [ "$mainline_major" = "3" ] && [ "$mainline_minor" = "10" ] &&
> >>>         { [ "$major_rev" = "327" ] || [ "$major_rev" = "693" ] || \
> >>> -       [ "$major_rev" = "957" ]; }; then
> >>> -    # For RHEL 7.2, 7.4 and 7.6
> >>> +       [ "$major_rev" = "957" ] || [ "$major_rev" == "1062" ]; }; then
> >>> +    # For RHEL 7.2, 7.4, 7.6 and 7.7
> >>>        if [ -x "%{_datadir}/openvswitch/scripts/ovs-kmod-manage.sh" ]; then
> >>>            %{_datadir}/openvswitch/scripts/ovs-kmod-manage.sh
> >>>        fi
> >>> diff --git a/rhel/usr_share_openvswitch_scripts_ovs-kmod-manage.sh b/rhel/usr_share_openvswitch_scripts_ovs-kmod-manage.sh
> >>> index 693fb0b744b3..a643b55ff0f8 100644
> >>> --- a/rhel/usr_share_openvswitch_scripts_ovs-kmod-manage.sh
> >>> +++ b/rhel/usr_share_openvswitch_scripts_ovs-kmod-manage.sh
> >>> @@ -15,9 +15,10 @@
> >>>    # limitations under the License.
> >>>
> >>>    # This script is intended to be used on 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 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)
> >>>    #   - 4.4.x,  x >= 73           (SLES 12 SP3)
> >>>    #   - 4.12.x, x >= 14           (SLES 12 SP4).
> >>>    # It is packaged in the openvswitch kmod RPM and run in the post-install
> >>> @@ -100,6 +101,11 @@ if [ "$mainline_major" = "3" ] && [ "$mainline_minor" = "10" ]; then
> >>>            comp_ver=10
> >>>            ver_offset=4
> >>>            installed_ver="$minor_rev"
> >>> +    elif [ "$major_rev" = "1062" ]; then
> >>> +#        echo "rhel77"
> >>> +        comp_ver=10
> >>> +        ver_offset=4
> >>> +        installed_ver="$minor_rev"
> >>>        fi
> >>>    elif [ "$mainline_major" = "4" ] && [ "$mainline_minor" = "4" ]; then
> >>>        if [ "$mainline_patch" -ge "73" ]; then
> >>> @@ -111,7 +117,7 @@ elif [ "$mainline_major" = "4" ] && [ "$mainline_minor" = "4" ]; then
> >>>    elif [ "$mainline_major" = "4" ] && [ "$mainline_minor" = "12" ]; then
> >>>        if [ "$mainline_patch" -ge "14" ]; then
> >>>    #        echo "sles12sp4"
> >>> -        comp_ver=14
> >>> +        comp_ver=1
> >>>            ver_offset=2
> >>>            installed_ver="$mainline_patch"
> >>>        fi
>
Gregory Rose Oct. 15, 2019, 10:18 p.m. UTC | #8
On 10/15/2019 11:42 AM, Ben Pfaff wrote:
> On Tue, Oct 15, 2019 at 02:54:05PM -0700, Gregory Rose wrote:
>> On 10/15/2019 10:57 AM, Ben Pfaff wrote:
>>> It's easy to figure out how to get a particular file on Fedora or RHEL,
>>> using "dnf provides":
>>>
>>>       $ dnf provides /usr/bin/sphinx-build-3
>>>       python3-sphinx-1:1.8.4-1.fc30.noarch : Python documentation generator
>>>       Repo        : @System
>>>       Matched from:
>>>       Filename    : /usr/bin/sphinx-build-3
>>>
>>>       python3-sphinx-1:1.8.4-1.fc30.noarch : Python documentation generator
>>>       Repo        : fedora
>>>       Matched from:
>>>       Filename    : /usr/bin/sphinx-build-3
>>>
>>> Then "sudo dnf install python3-sphinx" ought to fix the problem.
>> I tried 'yum whatprovides' and it found nothing.  I tried install dnf and
>> then used 'dnf provides /usr/bin/sphinx-build-3'
>> but that also found nothing.
> I guess this must be a difference between RHEL and Fedora.  I don't know
> RHEL, only Fedora, and only slightly.

Right, the RH SW collections repo isn't installed by default in RHEL.

Trying Yifeng's suggestion.

- Greg
Gregory Rose Oct. 15, 2019, 10:33 p.m. UTC | #9
On 10/15/2019 3:02 PM, Yifeng Sun wrote:
> Hi Greg,
>
> I added this repo:
> subscription-manager repos  --enable rhel-server-rhscl-7-rpms

I had to install the epel-release package as well and that is fixed now.

Thanks!


> Thanks,
> Yifeng
>
> On Tue, Oct 15, 2019 at 2:58 PM Gregory Rose <gvrose8192@gmail.com> wrote:
>>
>> On 10/15/2019 2:27 PM, Yifeng Sun wrote:
>>> Hi Greg,
>>>
>>> Please try the following:
>>>
>>> # yum install scl-utils scl-utils-build
>>> # yum install rh-python36
>> Hi Yifeng,
>>
>> I tried this step but no luck.
>>
>> [root@localhost ~]# yum install rh-python36 -y
>> Loaded plugins: product-id, search-disabled-repos, subscription-manager
>> No package rh-python36 available.
>> Error: Nothing to do
>>
>> Could you list your repos?  Here's what I've got:
>> [root@localhost ~]# yum repolist
>> Loaded plugins: product-id, search-disabled-repos, subscription-manager
>> repo id                                    repo
>> name                      status
>> rhel-7-server-extras-rpms/x86_64           Red Hat Enterprise Linux 7
>> Ser  1,182
>> rhel-7-server-optional-rpms/7Server/x86_64 Red Hat Enterprise Linux 7
>> Ser 19,307
>> rhel-7-server-rpms/7Server/x86_64          Red Hat Enterprise Linux 7
>> Ser 26,484
>> repolist: 46,973
>>
>>
>> Thanks,
>>
>> - Greg
>>
>>> # scl enable rh-python36 bash
>>> # pip install sphinx
>>>
>>> Thanks,
>>> Yifeng
>>>
>>> On Tue, Oct 15, 2019 at 12:28 PM Gregory Rose <gvrose8192@gmail.com> wrote:
>>>> On 10/11/2019 2:49 PM, Yifeng Sun wrote:
>>>>> This patch provides essential fixes for OVS to support
>>>>> RHEL7.7's new kernel.
>>>>>
>>>>> make rpm-fedora-kmod \
>>>>> RPMBUILD_OPT='-D "kversion 3.10.0-1062.1.2.el7.x86_64"'
>>>>>
>>>>> Signed-off-by: Yifeng Sun <pkusunyifeng@gmail.com>
>>>> Hi Yifeng,
>>>>
>>>> I'm trying to test this patch on a RHEL 7.7 system but it requires
>>>> python sphinx and I can't
>>>> seem to find out how to install it.  I've found a bunch of RPMs but all
>>>> of them have
>>>> broken dependencies.
>>>>
>>>> I've never installed the sphinx stuff before but now it's required. Did
>>>> you find a way
>>>> to install it?
>>>>
>>>> Here is the error:
>>>> error: Failed build dependencies:
>>>>        /usr/bin/sphinx-build-3 is needed by openvswitch-2.12.90-1.el7.x86_64
>>>>
>>>> Thanks,
>>>>
>>>> - Greg
>>>>
>>>>> ---
>>>>>     rhel/openvswitch-kmod-fedora.spec.in                  |  9 +++++----
>>>>>     rhel/usr_share_openvswitch_scripts_ovs-kmod-manage.sh | 14 ++++++++++----
>>>>>     2 files changed, 15 insertions(+), 8 deletions(-)
>>>>>
>>>>> diff --git a/rhel/openvswitch-kmod-fedora.spec.in b/rhel/openvswitch-kmod-fedora.spec.in
>>>>> index b3588982ef7a..fbb8366990f1 100644
>>>>> --- a/rhel/openvswitch-kmod-fedora.spec.in
>>>>> +++ b/rhel/openvswitch-kmod-fedora.spec.in
>>>>> @@ -12,8 +12,9 @@
>>>>>     # 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 kernel 3.10.0 major revision 957 (RHEL 7.6),
>>>>> -# major revision 693 (RHEL 7.4) and major revision 327 (RHEL 7.2).
>>>>> +# This only works for kernel 3.10.0 major revision 1062 (RHEL 7.7),
>>>>> +# major revision 957 (RHEL 7.6), major revision 693 (RHEL 7.4) and
>>>>> +# major revision 327 (RHEL 7.2).
>>>>>     # By default, build against the current running kernel version
>>>>>     #%define kernel 3.1.5-1.fc16.x86_64
>>>>>     #define kernel %{kernel_source}
>>>>> @@ -92,8 +93,8 @@ if grep -qs "suse" /etc/os-release; then
>>>>>         fi
>>>>>     elif [ "$mainline_major" = "3" ] && [ "$mainline_minor" = "10" ] &&
>>>>>          { [ "$major_rev" = "327" ] || [ "$major_rev" = "693" ] || \
>>>>> -       [ "$major_rev" = "957" ]; }; then
>>>>> -    # For RHEL 7.2, 7.4 and 7.6
>>>>> +       [ "$major_rev" = "957" ] || [ "$major_rev" == "1062" ]; }; then
>>>>> +    # For RHEL 7.2, 7.4, 7.6 and 7.7
>>>>>         if [ -x "%{_datadir}/openvswitch/scripts/ovs-kmod-manage.sh" ]; then
>>>>>             %{_datadir}/openvswitch/scripts/ovs-kmod-manage.sh
>>>>>         fi
>>>>> diff --git a/rhel/usr_share_openvswitch_scripts_ovs-kmod-manage.sh b/rhel/usr_share_openvswitch_scripts_ovs-kmod-manage.sh
>>>>> index 693fb0b744b3..a643b55ff0f8 100644
>>>>> --- a/rhel/usr_share_openvswitch_scripts_ovs-kmod-manage.sh
>>>>> +++ b/rhel/usr_share_openvswitch_scripts_ovs-kmod-manage.sh
>>>>> @@ -15,9 +15,10 @@
>>>>>     # limitations under the License.
>>>>>
>>>>>     # This script is intended to be used on 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 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)
>>>>>     #   - 4.4.x,  x >= 73           (SLES 12 SP3)
>>>>>     #   - 4.12.x, x >= 14           (SLES 12 SP4).
>>>>>     # It is packaged in the openvswitch kmod RPM and run in the post-install
>>>>> @@ -100,6 +101,11 @@ if [ "$mainline_major" = "3" ] && [ "$mainline_minor" = "10" ]; then
>>>>>             comp_ver=10
>>>>>             ver_offset=4
>>>>>             installed_ver="$minor_rev"
>>>>> +    elif [ "$major_rev" = "1062" ]; then
>>>>> +#        echo "rhel77"
>>>>> +        comp_ver=10
>>>>> +        ver_offset=4
>>>>> +        installed_ver="$minor_rev"
>>>>>         fi
>>>>>     elif [ "$mainline_major" = "4" ] && [ "$mainline_minor" = "4" ]; then
>>>>>         if [ "$mainline_patch" -ge "73" ]; then
>>>>> @@ -111,7 +117,7 @@ elif [ "$mainline_major" = "4" ] && [ "$mainline_minor" = "4" ]; then
>>>>>     elif [ "$mainline_major" = "4" ] && [ "$mainline_minor" = "12" ]; then
>>>>>         if [ "$mainline_patch" -ge "14" ]; then
>>>>>     #        echo "sles12sp4"
>>>>> -        comp_ver=14
>>>>> +        comp_ver=1
>>>>>             ver_offset=2
>>>>>             installed_ver="$mainline_patch"
>>>>>         fi
Gregory Rose Oct. 16, 2019, 4:28 p.m. UTC | #10
On 10/11/2019 2:49 PM, Yifeng Sun wrote:
> This patch provides essential fixes for OVS to support
> RHEL7.7's new kernel.
>
> make rpm-fedora-kmod \
> RPMBUILD_OPT='-D "kversion 3.10.0-1062.1.2.el7.x86_64"'
>
> Signed-off-by: Yifeng Sun <pkusunyifeng@gmail.com>

Thanks Yifeng!

Tested-by: Greg Rose <gvrose8192@gmail.com>
Reviewed-by: Greg Rose <gvrose8192@gmail.com>

> ---
>   rhel/openvswitch-kmod-fedora.spec.in                  |  9 +++++----
>   rhel/usr_share_openvswitch_scripts_ovs-kmod-manage.sh | 14 ++++++++++----
>   2 files changed, 15 insertions(+), 8 deletions(-)
>
> diff --git a/rhel/openvswitch-kmod-fedora.spec.in b/rhel/openvswitch-kmod-fedora.spec.in
> index b3588982ef7a..fbb8366990f1 100644
> --- a/rhel/openvswitch-kmod-fedora.spec.in
> +++ b/rhel/openvswitch-kmod-fedora.spec.in
> @@ -12,8 +12,9 @@
>   # 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 kernel 3.10.0 major revision 957 (RHEL 7.6),
> -# major revision 693 (RHEL 7.4) and major revision 327 (RHEL 7.2).
> +# This only works for kernel 3.10.0 major revision 1062 (RHEL 7.7),
> +# major revision 957 (RHEL 7.6), major revision 693 (RHEL 7.4) and
> +# major revision 327 (RHEL 7.2).
>   # By default, build against the current running kernel version
>   #%define kernel 3.1.5-1.fc16.x86_64
>   #define kernel %{kernel_source}
> @@ -92,8 +93,8 @@ if grep -qs "suse" /etc/os-release; then
>       fi
>   elif [ "$mainline_major" = "3" ] && [ "$mainline_minor" = "10" ] &&
>        { [ "$major_rev" = "327" ] || [ "$major_rev" = "693" ] || \
> -       [ "$major_rev" = "957" ]; }; then
> -    # For RHEL 7.2, 7.4 and 7.6
> +       [ "$major_rev" = "957" ] || [ "$major_rev" == "1062" ]; }; then
> +    # For RHEL 7.2, 7.4, 7.6 and 7.7
>       if [ -x "%{_datadir}/openvswitch/scripts/ovs-kmod-manage.sh" ]; then
>           %{_datadir}/openvswitch/scripts/ovs-kmod-manage.sh
>       fi
> diff --git a/rhel/usr_share_openvswitch_scripts_ovs-kmod-manage.sh b/rhel/usr_share_openvswitch_scripts_ovs-kmod-manage.sh
> index 693fb0b744b3..a643b55ff0f8 100644
> --- a/rhel/usr_share_openvswitch_scripts_ovs-kmod-manage.sh
> +++ b/rhel/usr_share_openvswitch_scripts_ovs-kmod-manage.sh
> @@ -15,9 +15,10 @@
>   # limitations under the License.
>   
>   # This script is intended to be used on 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 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)
>   #   - 4.4.x,  x >= 73           (SLES 12 SP3)
>   #   - 4.12.x, x >= 14           (SLES 12 SP4).
>   # It is packaged in the openvswitch kmod RPM and run in the post-install
> @@ -100,6 +101,11 @@ if [ "$mainline_major" = "3" ] && [ "$mainline_minor" = "10" ]; then
>           comp_ver=10
>           ver_offset=4
>           installed_ver="$minor_rev"
> +    elif [ "$major_rev" = "1062" ]; then
> +#        echo "rhel77"
> +        comp_ver=10
> +        ver_offset=4
> +        installed_ver="$minor_rev"
>       fi
>   elif [ "$mainline_major" = "4" ] && [ "$mainline_minor" = "4" ]; then
>       if [ "$mainline_patch" -ge "73" ]; then
> @@ -111,7 +117,7 @@ elif [ "$mainline_major" = "4" ] && [ "$mainline_minor" = "4" ]; then
>   elif [ "$mainline_major" = "4" ] && [ "$mainline_minor" = "12" ]; then
>       if [ "$mainline_patch" -ge "14" ]; then
>   #        echo "sles12sp4"
> -        comp_ver=14
> +        comp_ver=1
>           ver_offset=2
>           installed_ver="$mainline_patch"
>       fi
Ben Pfaff Oct. 24, 2019, 9:26 p.m. UTC | #11
On Fri, Oct 11, 2019 at 02:49:14PM -0700, Yifeng Sun wrote:
> This patch provides essential fixes for OVS to support
> RHEL7.7's new kernel.
> 
> make rpm-fedora-kmod \
> RPMBUILD_OPT='-D "kversion 3.10.0-1062.1.2.el7.x86_64"'
> 
> Signed-off-by: Yifeng Sun <pkusunyifeng@gmail.com>

Thanks, applied to master.
Yifeng Sun Dec. 2, 2019, 5:15 p.m. UTC | #12
Thanks Ben. Can you please backport this patch to 2.12?

Yifeng

On Thu, Oct 24, 2019 at 3:12 PM Ben Pfaff <blp@ovn.org> wrote:
>
> On Fri, Oct 11, 2019 at 02:49:14PM -0700, Yifeng Sun wrote:
> > This patch provides essential fixes for OVS to support
> > RHEL7.7's new kernel.
> >
> > make rpm-fedora-kmod \
> > RPMBUILD_OPT='-D "kversion 3.10.0-1062.1.2.el7.x86_64"'
> >
> > Signed-off-by: Yifeng Sun <pkusunyifeng@gmail.com>
>
> Thanks, applied to master.
Ben Pfaff Dec. 2, 2019, 6:42 p.m. UTC | #13
Done.

On Mon, Dec 02, 2019 at 09:15:03AM -0800, Yifeng Sun wrote:
> Thanks Ben. Can you please backport this patch to 2.12?
> 
> Yifeng
> 
> On Thu, Oct 24, 2019 at 3:12 PM Ben Pfaff <blp@ovn.org> wrote:
> >
> > On Fri, Oct 11, 2019 at 02:49:14PM -0700, Yifeng Sun wrote:
> > > This patch provides essential fixes for OVS to support
> > > RHEL7.7's new kernel.
> > >
> > > make rpm-fedora-kmod \
> > > RPMBUILD_OPT='-D "kversion 3.10.0-1062.1.2.el7.x86_64"'
> > >
> > > Signed-off-by: Yifeng Sun <pkusunyifeng@gmail.com>
> >
> > Thanks, applied to master.
Yifeng Sun Dec. 2, 2019, 6:55 p.m. UTC | #14
Thanks.

On Mon, Dec 2, 2019 at 10:42 AM Ben Pfaff <blp@ovn.org> wrote:
>
> Done.
>
> On Mon, Dec 02, 2019 at 09:15:03AM -0800, Yifeng Sun wrote:
> > Thanks Ben. Can you please backport this patch to 2.12?
> >
> > Yifeng
> >
> > On Thu, Oct 24, 2019 at 3:12 PM Ben Pfaff <blp@ovn.org> wrote:
> > >
> > > On Fri, Oct 11, 2019 at 02:49:14PM -0700, Yifeng Sun wrote:
> > > > This patch provides essential fixes for OVS to support
> > > > RHEL7.7's new kernel.
> > > >
> > > > make rpm-fedora-kmod \
> > > > RPMBUILD_OPT='-D "kversion 3.10.0-1062.1.2.el7.x86_64"'
> > > >
> > > > Signed-off-by: Yifeng Sun <pkusunyifeng@gmail.com>
> > >
> > > Thanks, applied to master.
diff mbox series

Patch

diff --git a/rhel/openvswitch-kmod-fedora.spec.in b/rhel/openvswitch-kmod-fedora.spec.in
index b3588982ef7a..fbb8366990f1 100644
--- a/rhel/openvswitch-kmod-fedora.spec.in
+++ b/rhel/openvswitch-kmod-fedora.spec.in
@@ -12,8 +12,9 @@ 
 # 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 kernel 3.10.0 major revision 957 (RHEL 7.6),
-# major revision 693 (RHEL 7.4) and major revision 327 (RHEL 7.2).
+# This only works for kernel 3.10.0 major revision 1062 (RHEL 7.7),
+# major revision 957 (RHEL 7.6), major revision 693 (RHEL 7.4) and
+# major revision 327 (RHEL 7.2).
 # By default, build against the current running kernel version
 #%define kernel 3.1.5-1.fc16.x86_64
 #define kernel %{kernel_source}
@@ -92,8 +93,8 @@  if grep -qs "suse" /etc/os-release; then
     fi
 elif [ "$mainline_major" = "3" ] && [ "$mainline_minor" = "10" ] &&
      { [ "$major_rev" = "327" ] || [ "$major_rev" = "693" ] || \
-       [ "$major_rev" = "957" ]; }; then
-    # For RHEL 7.2, 7.4 and 7.6
+       [ "$major_rev" = "957" ] || [ "$major_rev" == "1062" ]; }; then
+    # For RHEL 7.2, 7.4, 7.6 and 7.7
     if [ -x "%{_datadir}/openvswitch/scripts/ovs-kmod-manage.sh" ]; then
         %{_datadir}/openvswitch/scripts/ovs-kmod-manage.sh
     fi
diff --git a/rhel/usr_share_openvswitch_scripts_ovs-kmod-manage.sh b/rhel/usr_share_openvswitch_scripts_ovs-kmod-manage.sh
index 693fb0b744b3..a643b55ff0f8 100644
--- a/rhel/usr_share_openvswitch_scripts_ovs-kmod-manage.sh
+++ b/rhel/usr_share_openvswitch_scripts_ovs-kmod-manage.sh
@@ -15,9 +15,10 @@ 
 # limitations under the License.
 
 # This script is intended to be used on 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 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)
 #   - 4.4.x,  x >= 73           (SLES 12 SP3)
 #   - 4.12.x, x >= 14           (SLES 12 SP4).
 # It is packaged in the openvswitch kmod RPM and run in the post-install
@@ -100,6 +101,11 @@  if [ "$mainline_major" = "3" ] && [ "$mainline_minor" = "10" ]; then
         comp_ver=10
         ver_offset=4
         installed_ver="$minor_rev"
+    elif [ "$major_rev" = "1062" ]; then
+#        echo "rhel77"
+        comp_ver=10
+        ver_offset=4
+        installed_ver="$minor_rev"
     fi
 elif [ "$mainline_major" = "4" ] && [ "$mainline_minor" = "4" ]; then
     if [ "$mainline_patch" -ge "73" ]; then
@@ -111,7 +117,7 @@  elif [ "$mainline_major" = "4" ] && [ "$mainline_minor" = "4" ]; then
 elif [ "$mainline_major" = "4" ] && [ "$mainline_minor" = "12" ]; then
     if [ "$mainline_patch" -ge "14" ]; then
 #        echo "sles12sp4"
-        comp_ver=14
+        comp_ver=1
         ver_offset=2
         installed_ver="$mainline_patch"
     fi