diff mbox series

[ovs-dev] ci: ovn-kubernetes: Use official build instructions when preparing rpms.

Message ID 20230118165506.1985710-1-dceara@redhat.com
State Changes Requested
Headers show
Series [ovs-dev] ci: ovn-kubernetes: Use official build instructions when preparing rpms. | expand

Checks

Context Check Description
ovsrobot/apply-robot success apply and check: success
ovsrobot/github-robot-_Build_and_Test fail github build: failed
ovsrobot/github-robot-_ovn-kubernetes fail github build: failed

Commit Message

Dumitru Ceara Jan. 18, 2023, 4:55 p.m. UTC
Recently OVS enabled AF_XDP support by default and that broke our RPM
build because of missing dependencies.

Suggested-by: Ilya Maximets <i.maximets@ovn.org>
Signed-off-by: Dumitru Ceara <dceara@redhat.com>
---
 .ci/ovn-kubernetes/Dockerfile | 4 ++++
 1 file changed, 4 insertions(+)

Comments

Ilya Maximets Jan. 18, 2023, 5:14 p.m. UTC | #1
On 1/18/23 17:55, Dumitru Ceara wrote:
> Recently OVS enabled AF_XDP support by default and that broke our RPM
> build because of missing dependencies.
> 
> Suggested-by: Ilya Maximets <i.maximets@ovn.org>
> Signed-off-by: Dumitru Ceara <dceara@redhat.com>
> ---
>  .ci/ovn-kubernetes/Dockerfile | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/.ci/ovn-kubernetes/Dockerfile b/.ci/ovn-kubernetes/Dockerfile
> index 1cb26d0d0e..1b99f12259 100644
> --- a/.ci/ovn-kubernetes/Dockerfile
> +++ b/.ci/ovn-kubernetes/Dockerfile
> @@ -23,6 +23,8 @@ RUN mkdir /tmp/ovn
>  COPY . /tmp/ovn
>  WORKDIR /tmp/ovn/ovs
>  
> +RUN sed -e 's/@VERSION@/0.0.1/' rhel/openvswitch-fedora.spec.in > /tmp/ovs.spec
> +RUN dnf builddep -y /tmp/ovs.spec
>  RUN ./boot.sh
>  RUN ./configure -v
>  RUN make rpm-fedora
> @@ -30,6 +32,8 @@ RUN rm rpm/rpmbuild/RPMS/x86_64/*debug*
>  RUN rm rpm/rpmbuild/RPMS/x86_64/*devel*
>  
>  WORKDIR /tmp/ovn
> +RUN sed -e 's/@VERSION@/0.0.1/' rhel/ovn-fedora.spec.in > /tmp/ovn.spec
> +RUN dnf builddep -y /tmp/ovn.spec
>  RUN ./boot.sh
>  RUN ./configure
>  RUN make rpm-fedora

I suppose most of the 'install needed rpms' is not needed after that.
You should only need rpm-build and dnf-plugins-core installed, all
the rest will be installed by builddep.

And you probably need to move the 'dnf clean' command after all the
installations.  Maybe just at the end of this container build.

What do you think?

Best regards, Ilya Maximets.
Dumitru Ceara Jan. 18, 2023, 6:34 p.m. UTC | #2
On 1/18/23 18:14, Ilya Maximets wrote:
> On 1/18/23 17:55, Dumitru Ceara wrote:
>> Recently OVS enabled AF_XDP support by default and that broke our RPM
>> build because of missing dependencies.
>>
>> Suggested-by: Ilya Maximets <i.maximets@ovn.org>
>> Signed-off-by: Dumitru Ceara <dceara@redhat.com>
>> ---
>>  .ci/ovn-kubernetes/Dockerfile | 4 ++++
>>  1 file changed, 4 insertions(+)
>>
>> diff --git a/.ci/ovn-kubernetes/Dockerfile b/.ci/ovn-kubernetes/Dockerfile
>> index 1cb26d0d0e..1b99f12259 100644
>> --- a/.ci/ovn-kubernetes/Dockerfile
>> +++ b/.ci/ovn-kubernetes/Dockerfile
>> @@ -23,6 +23,8 @@ RUN mkdir /tmp/ovn
>>  COPY . /tmp/ovn
>>  WORKDIR /tmp/ovn/ovs
>>  
>> +RUN sed -e 's/@VERSION@/0.0.1/' rhel/openvswitch-fedora.spec.in > /tmp/ovs.spec
>> +RUN dnf builddep -y /tmp/ovs.spec
>>  RUN ./boot.sh
>>  RUN ./configure -v
>>  RUN make rpm-fedora
>> @@ -30,6 +32,8 @@ RUN rm rpm/rpmbuild/RPMS/x86_64/*debug*
>>  RUN rm rpm/rpmbuild/RPMS/x86_64/*devel*
>>  
>>  WORKDIR /tmp/ovn
>> +RUN sed -e 's/@VERSION@/0.0.1/' rhel/ovn-fedora.spec.in > /tmp/ovn.spec
>> +RUN dnf builddep -y /tmp/ovn.spec
>>  RUN ./boot.sh
>>  RUN ./configure
>>  RUN make rpm-fedora
> 
> I suppose most of the 'install needed rpms' is not needed after that.
> You should only need rpm-build and dnf-plugins-core installed, all
> the rest will be installed by builddep.

Very good point.

> 
> And you probably need to move the 'dnf clean' command after all the
> installations.  Maybe just at the end of this container build.

We can actually just remove it because it's part of the intermediate
builder image that we just drop at the end.

> 
> What do you think?

I posted v2 with these changes.  Also, the build time decreases by 20%
(from 30min to 25 min) thanks to your suggestion.  That's great!

> 
> Best regards, Ilya Maximets.
> 

Regards,
Dumitru
diff mbox series

Patch

diff --git a/.ci/ovn-kubernetes/Dockerfile b/.ci/ovn-kubernetes/Dockerfile
index 1cb26d0d0e..1b99f12259 100644
--- a/.ci/ovn-kubernetes/Dockerfile
+++ b/.ci/ovn-kubernetes/Dockerfile
@@ -23,6 +23,8 @@  RUN mkdir /tmp/ovn
 COPY . /tmp/ovn
 WORKDIR /tmp/ovn/ovs
 
+RUN sed -e 's/@VERSION@/0.0.1/' rhel/openvswitch-fedora.spec.in > /tmp/ovs.spec
+RUN dnf builddep -y /tmp/ovs.spec
 RUN ./boot.sh
 RUN ./configure -v
 RUN make rpm-fedora
@@ -30,6 +32,8 @@  RUN rm rpm/rpmbuild/RPMS/x86_64/*debug*
 RUN rm rpm/rpmbuild/RPMS/x86_64/*devel*
 
 WORKDIR /tmp/ovn
+RUN sed -e 's/@VERSION@/0.0.1/' rhel/ovn-fedora.spec.in > /tmp/ovn.spec
+RUN dnf builddep -y /tmp/ovn.spec
 RUN ./boot.sh
 RUN ./configure
 RUN make rpm-fedora