On Tue, Sep 15, 2015 at 7:05 PM, Tashi Lu <dotslash...@gmail.com> wrote:
> Still the same error shown below. And i do have python2.7 installed and it
> is the default $(python)
>
> % rpmbuild -bb --without check rhel/openvswitch.spec
> .
> .
> .
> Executing(%check): /bin/sh -e /var/tmp/rpm-tmp.cqv4YQ
> + umask 022
> + cd /root/rpmbuild/BUILD
> + cd openvswitch-2.4.90
> + unset DISPLAY
> + exit 0
> Processing files: openvswitch-2.4.90-1.x86_64
> error: File not found:
> /root/rpmbuild/BUILDROOT/openvswitch-2.4.90-1.x86_64/usr/share/man/man1/ovs-sim.1.gz
> Executing(%doc): /bin/sh -e /var/tmp/rpm-tmp.bpweQA
> + umask 022
> + cd /root/rpmbuild/BUILD
> + cd openvswitch-2.4.90
> +
> DOCDIR=/root/rpmbuild/BUILDROOT/openvswitch-2.4.90-1.x86_64/usr/share/doc/openvswitch-2.4.90
> + export DOCDIR
> + rm -rf
> /root/rpmbuild/BUILDROOT/openvswitch-2.4.90-1.x86_64/usr/share/doc/openvswitch-2.4.90
> + /bin/mkdir -p
> /root/rpmbuild/BUILDROOT/openvswitch-2.4.90-1.x86_64/usr/share/doc/openvswitch-2.4.90
> + cp -pr COPYING DESIGN.md INSTALL.SSL.md NOTICE README.md WHY-OVS.md FAQ.md
> NEWS
> /root/rpmbuild/BUILDROOT/openvswitch-2.4.90-1.x86_64/usr/share/doc/openvswitch-2.4.90
> + cp -pr INSTALL.DPDK.md rhel/README.RHEL README-native-tunneling.md
> /root/rpmbuild/BUILDROOT/openvswitch-2.4.90-1.x86_64/usr/share/doc/openvswitch-2.4.90
> + exit 0
>
>
> RPM build errors:
>     File not found:
> /root/rpmbuild/BUILDROOT/openvswitch-2.4.90-1.x86_64/usr/share/man/man1/ovs-sim.1.gz


The above error is different than the one you saw in your first mail.
So installing python 2.7 got rid of those errors and you ended up with
the above. I only tested on the commit that changed python
requirements and that worked and I happily made an assumption that no
other commit breaks later. Sorry about that. The above error needs the
following patch.


diff --git a/rhel/openvswitch.spec.in b/rhel/openvswitch.spec.in
index dad3e04..0ec65be 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
@@ -180,7 +180,6 @@ exit 0
 /var/lib/openvswitch
 /var/log/openvswitch
 %exclude /usr/bin/ovn-*
-%exclude /usr/share/man/man1/ovs-sim.1.gz
 %exclude /usr/share/man/man5/ovn-*
 %exclude /usr/share/man/man7/ovn-*
 %exclude /usr/share/man/man8/ovn-*


>
>
> % python -V
> Python 2.7.10
>
>
> On 16 September 2015 at 05:03, Gurucharan Shetty <shet...@nicira.com> wrote:
>>
>> 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 <shet...@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 <shet...@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...@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 <shet...@nicira.com>
>> >>> wrote:
>> >>>>
>> >>>> On Tue, Sep 15, 2015 at 10:43 AM, Tashi Lu <dotslash...@gmail.com>
>> >>>> wrote:
>> >>>> > From 338df1bfb07f7b0f16037aa0bbb8fe5dba6aa005 Mon Sep 17 00:00:00
>> >>>> > 2001
>> >>>> > From: dotSlashLu <dotslash...@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...@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@openvswitch.org
>> >>>> > http://openvswitch.org/mailman/listinfo/dev
>> >>>
>> >>>
>
>
_______________________________________________
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev

Reply via email to