[ovs-dev] [PATCH 1/3] rhel: fix 'cannot remove' build error

Gurucharan Shetty shettyg at nicira.com
Tue Sep 15 21:03:51 UTC 2015


So it turns out that OVS master/OVS 2.4 depend on Python 2.7. Since
Centos 6 comes with python 2.6.6, you have all the above problems. If
you upgrade CentOS's python version, you will be able to build the
RPMs.

So on that respect, can you add the following patch to ovs sources and
check whether you get the correct error?

diff --git a/rhel/openvswitch.spec.in b/rhel/openvswitch.spec.in
index dad3e04..642986b 100644
--- a/rhel/openvswitch.spec.in
+++ b/rhel/openvswitch.spec.in
@@ -22,7 +22,7 @@ License: ASL 2.0
 Release: 1
 Source: openvswitch-%{version}.tar.gz
 Buildroot: /tmp/openvswitch-rpm
-Requires: logrotate, python
+Requires: logrotate, python >= 2.7
 BuildRequires: openssl-devel

 %bcond_without check

On Tue, Sep 15, 2015 at 1:05 PM, Gurucharan Shetty <shettyg at nicira.com> wrote:
> Never mind. I see the errors on Centos 6.5 and openvswitch master
> branch. Let me look at your patches.
>
> On Tue, Sep 15, 2015 at 12:43 PM, Gurucharan Shetty <shettyg at nicira.com> wrote:
>> The only reason I ask is because we have had successful RHEL rpm
>> builds for a long time now. I have atleast tested it upto Centos 6.5
>> with OVS 2.3. Do you see problems with OVS 2.3 too?. I also have a
>> internal system that builds a RHEL 7 rpm for every OVS commit and they
>> have been building just fine. So trying to understand on why I have
>> not come across a bug report like this.
>>
>> On Tue, Sep 15, 2015 at 11:16 AM, Tashi Lu <dotslash.lu at gmail.com> wrote:
>>> Only tested on several CentOS 6.6 boxes.
>>> Is this distro version relevant? These missing files, including the ones in
>>> the 2nd patch, are really confusing to me.
>>> blp cross referenced the better maintained fedora build spec, and those
>>> files are excluded. Why are these binaries not built and distributed on
>>> rhel?
>>>
>>> On 16 September 2015 at 01:54, Gurucharan Shetty <shettyg at nicira.com> wrote:
>>>>
>>>> On Tue, Sep 15, 2015 at 10:43 AM, Tashi Lu <dotslash.lu at gmail.com> wrote:
>>>> > From 338df1bfb07f7b0f16037aa0bbb8fe5dba6aa005 Mon Sep 17 00:00:00 2001
>>>> > From: dotSlashLu <dotslash.lu at gmail.com>
>>>> > Date: Fri, 4 Sep 2015 21:38:13 +0800
>>>> > Subject: [PATCH 1/3] rhel: fix 'cannot remove' build error
>>>> >
>>>> > These 3 patches are for fixing several rpm build errors on CentOS 6.x,
>>>> > see
>>>> > https://github.com/openvswitch/ovs/pull/65
>>>> >
>>>> > Fix rpmbuild error:
>>>> > rm: cannot remove
>>>> > `/root/rpmbuild/BUILDROOT/openvswitch-2.4.90-1.x86_64/usr/bin/ovs-test':
>>>> > No
>>>> > su
>>>> > rm: cannot remove
>>>> >
>>>> > `/root/rpmbuild/BUILDROOT/openvswitch-2.4.90-1.x86_64/usr/bin/ovs-l3ping':
>>>> > No
>>>> > error: Bad exit status from /var/tmp/rpm-tmp.dd9miw (%install)
>>>> >
>>>> > Signed-off-by: Dotslash Lu <dotslash.lu at gmail.com>
>>>>
>>>> What centos do you see these errors in? Do you see it in centos6.5 or
>>>> lower?
>>>>
>>>>
>>>> > ---
>>>> >  rhel/openvswitch.spec.in |    2 +-
>>>> >  1 files changed, 1 insertions(+), 1 deletions(-)
>>>> >
>>>> > diff --git a/rhel/openvswitch.spec.in b/rhel/openvswitch.spec.in
>>>> > index dad3e04..cc9d9ab 100644
>>>> > --- a/rhel/openvswitch.spec.in
>>>> > +++ b/rhel/openvswitch.spec.in
>>>> > @@ -56,7 +56,7 @@ rhel_cp etc_sysconfig_network-scripts_ifdown-ovs 0755
>>>> >  rhel_cp usr_share_openvswitch_scripts_sysconfig.template 0644
>>>> >
>>>> >  # Get rid of stuff we don't want to make RPM happy.
>>>> > -rm \
>>>> > +rm -rf \
>>>> >      $RPM_BUILD_ROOT/usr/bin/ovs-testcontroller \
>>>> >      $RPM_BUILD_ROOT/usr/share/man/man8/ovs-testcontroller.8 \
>>>> >      $RPM_BUILD_ROOT/usr/bin/ovs-test \
>>>> > --
>>>> > 1.7.1
>>>> > _______________________________________________
>>>> > dev mailing list
>>>> > dev at openvswitch.org
>>>> > http://openvswitch.org/mailman/listinfo/dev
>>>
>>>



More information about the dev mailing list