diff mbox series

[ovs-dev,v2,1/1] debian: Allow passing DEB_BUILD_OPTIONS.

Message ID 20240929090647.1076311-1-roid@nvidia.com
State Superseded
Delegated to: Eelco Chaudron
Headers show
Series [ovs-dev,v2,1/1] debian: Allow passing DEB_BUILD_OPTIONS. | expand

Checks

Context Check Description
ovsrobot/apply-robot success apply and check: success
ovsrobot/github-robot-_Build_and_Test success github build: passed

Commit Message

Roi Dayan Sept. 29, 2024, 9:06 a.m. UTC
Allow passing different DEB_BUILD_OPTIONS to make debian-deb.

Signed-off-by: Roi Dayan <roid@nvidia.com>
---

Notes:
    v2
    - Fix export of DEB_BUILD_OPTIONS in the Makefile

 debian/automake.mk | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

Comments

Eelco Chaudron Sept. 30, 2024, 9:42 a.m. UTC | #1
On 29 Sep 2024, at 11:06, Roi Dayan wrote:

> Allow passing different DEB_BUILD_OPTIONS to make debian-deb.

Hi Roi,

I did some experiments and it does not need the export part (or is it needed for something else?).

Also, you could move the definitions to the existing ‘if DPDK_NETDEV’ something like this:


@@ -95,10 +95,12 @@ CLEANFILES += debian/copyright


 if DPDK_NETDEV
+DEB_BUILD_OPTIONS ?= nocheck parallel=`nproc`
 update_deb_control = \
        $(AM_V_GEN) sed -e 's/^\# DPDK_NETDEV //' \
                < $(srcdir)/debian/control.in > debian/control
 else
+DEB_BUILD_OPTIONS ?= nocheck parallel=`nproc` nodpdk
 update_deb_control = \
        $(AM_V_GEN) grep -v '^\# DPDK_NETDEV' \
                < $(srcdir)/debian/control.in > debian/control
@@ -113,12 +115,6 @@ CLEANFILES += debian/control
 debian: debian/copyright debian/control
 .PHONY: debian

-if DPDK_NETDEV
-export DEB_BUILD_OPTIONS ?= nocheck parallel=`nproc`
-else
-export DEB_BUILD_OPTIONS ?= nocheck parallel=`nproc` nodpdk
-endif
-
 debian-deb: debian


//Eelco
> Signed-off-by: Roi Dayan <roid@nvidia.com>
> ---
>
> Notes:
>     v2
>     - Fix export of DEB_BUILD_OPTIONS in the Makefile
>
>  debian/automake.mk | 12 ++++++------
>  1 file changed, 6 insertions(+), 6 deletions(-)
>
> diff --git a/debian/automake.mk b/debian/automake.mk
> index 7b2afafae1a2..7da8b041226a 100644
> --- a/debian/automake.mk
> +++ b/debian/automake.mk
> @@ -113,6 +113,11 @@ CLEANFILES += debian/control
>  debian: debian/copyright debian/control
>  .PHONY: debian
>
> +if DPDK_NETDEV
> +export DEB_BUILD_OPTIONS ?= nocheck parallel=`nproc`
> +else
> +export DEB_BUILD_OPTIONS ?= nocheck parallel=`nproc` nodpdk
> +endif
>
>  debian-deb: debian
>  	@if test X"$(srcdir)" != X"$(top_builddir)"; then			\
> @@ -123,10 +128,5 @@ debian-deb: debian
>  	$(update_deb_copyright)
>  	$(update_deb_control)
>  	$(AM_V_GEN) fakeroot debian/rules clean
> -if DPDK_NETDEV
> -	$(AM_V_GEN) DEB_BUILD_OPTIONS="nocheck parallel=`nproc`" \
> +	$(AM_V_GEN) DEB_BUILD_OPTIONS="${DEB_BUILD_OPTIONS}" \
>  		fakeroot debian/rules binary
> -else
> -	$(AM_V_GEN) DEB_BUILD_OPTIONS="nocheck parallel=`nproc` nodpdk" \
> -		fakeroot debian/rules binary
> -endif
> -- 
> 2.46.1
Roi Dayan Sept. 30, 2024, 2:16 p.m. UTC | #2
On 30/09/2024 12:42, Eelco Chaudron wrote:
> 
> 
> On 29 Sep 2024, at 11:06, Roi Dayan wrote:
> 
>> Allow passing different DEB_BUILD_OPTIONS to make debian-deb.
> 
> Hi Roi,
> 
> I did some experiments and it does not need the export part (or is it needed for something else?).
> 
> Also, you could move the definitions to the existing ‘if DPDK_NETDEV’ something like this:
> 

Hi,

Actually from testing after v1 issue from the bot
I noticed without export it was empty in the debian-deb
target and I saw in the log DEB_BUILD_OPTIONS="".
This is why I added it in v2.

I wonder why I had the issue as update_deb_control does
the same basically.

I can do a retest and check again.
I guess it can go next to update_deb_control.

I'll get a machine and retest.

Thanks,
Roi

> 
> @@ -95,10 +95,12 @@ CLEANFILES += debian/copyright
> 
> 
>  if DPDK_NETDEV
> +DEB_BUILD_OPTIONS ?= nocheck parallel=`nproc`
>  update_deb_control = \
>         $(AM_V_GEN) sed -e 's/^\# DPDK_NETDEV //' \
>                 < $(srcdir)/debian/control.in > debian/control
>  else
> +DEB_BUILD_OPTIONS ?= nocheck parallel=`nproc` nodpdk
>  update_deb_control = \
>         $(AM_V_GEN) grep -v '^\# DPDK_NETDEV' \
>                 < $(srcdir)/debian/control.in > debian/control
> @@ -113,12 +115,6 @@ CLEANFILES += debian/control
>  debian: debian/copyright debian/control
>  .PHONY: debian
> 
> -if DPDK_NETDEV
> -export DEB_BUILD_OPTIONS ?= nocheck parallel=`nproc`
> -else
> -export DEB_BUILD_OPTIONS ?= nocheck parallel=`nproc` nodpdk
> -endif
> -
>  debian-deb: debian
> 
> 
> //Eelco
>> Signed-off-by: Roi Dayan <roid@nvidia.com>
>> ---
>>
>> Notes:
>>     v2
>>     - Fix export of DEB_BUILD_OPTIONS in the Makefile
>>
>>  debian/automake.mk | 12 ++++++------
>>  1 file changed, 6 insertions(+), 6 deletions(-)
>>
>> diff --git a/debian/automake.mk b/debian/automake.mk
>> index 7b2afafae1a2..7da8b041226a 100644
>> --- a/debian/automake.mk
>> +++ b/debian/automake.mk
>> @@ -113,6 +113,11 @@ CLEANFILES += debian/control
>>  debian: debian/copyright debian/control
>>  .PHONY: debian
>>
>> +if DPDK_NETDEV
>> +export DEB_BUILD_OPTIONS ?= nocheck parallel=`nproc`
>> +else
>> +export DEB_BUILD_OPTIONS ?= nocheck parallel=`nproc` nodpdk
>> +endif
>>
>>  debian-deb: debian
>>  	@if test X"$(srcdir)" != X"$(top_builddir)"; then			\
>> @@ -123,10 +128,5 @@ debian-deb: debian
>>  	$(update_deb_copyright)
>>  	$(update_deb_control)
>>  	$(AM_V_GEN) fakeroot debian/rules clean
>> -if DPDK_NETDEV
>> -	$(AM_V_GEN) DEB_BUILD_OPTIONS="nocheck parallel=`nproc`" \
>> +	$(AM_V_GEN) DEB_BUILD_OPTIONS="${DEB_BUILD_OPTIONS}" \
>>  		fakeroot debian/rules binary
>> -else
>> -	$(AM_V_GEN) DEB_BUILD_OPTIONS="nocheck parallel=`nproc` nodpdk" \
>> -		fakeroot debian/rules binary
>> -endif
>> -- 
>> 2.46.1
>
Roi Dayan Sept. 30, 2024, 2:49 p.m. UTC | #3
On 30/09/2024 17:16, Roi Dayan wrote:
> 
> 
> On 30/09/2024 12:42, Eelco Chaudron wrote:
>>
>>
>> On 29 Sep 2024, at 11:06, Roi Dayan wrote:
>>
>>> Allow passing different DEB_BUILD_OPTIONS to make debian-deb.
>>
>> Hi Roi,
>>
>> I did some experiments and it does not need the export part (or is it needed for something else?).
>>
>> Also, you could move the definitions to the existing ‘if DPDK_NETDEV’ something like this:
>>
> 
> Hi,
> 
> Actually from testing after v1 issue from the bot
> I noticed without export it was empty in the debian-deb
> target and I saw in the log DEB_BUILD_OPTIONS="".
> This is why I added it in v2.
> 
> I wonder why I had the issue as update_deb_control does
> the same basically.
> 
> I can do a retest and check again.
> I guess it can go next to update_deb_control.
> 
> I'll get a machine and retest.
> 
> Thanks,
> Roi
> 

you were right. export not needed. maybe the issue was i had
spaces before the assignment and not inside a target.
anyway it works fine and i can use the existing DPDK_NETDEV check.
i'll send v3.


>>
>> @@ -95,10 +95,12 @@ CLEANFILES += debian/copyright
>>
>>
>>  if DPDK_NETDEV
>> +DEB_BUILD_OPTIONS ?= nocheck parallel=`nproc`
>>  update_deb_control = \
>>         $(AM_V_GEN) sed -e 's/^\# DPDK_NETDEV //' \
>>                 < $(srcdir)/debian/control.in > debian/control
>>  else
>> +DEB_BUILD_OPTIONS ?= nocheck parallel=`nproc` nodpdk
>>  update_deb_control = \
>>         $(AM_V_GEN) grep -v '^\# DPDK_NETDEV' \
>>                 < $(srcdir)/debian/control.in > debian/control
>> @@ -113,12 +115,6 @@ CLEANFILES += debian/control
>>  debian: debian/copyright debian/control
>>  .PHONY: debian
>>
>> -if DPDK_NETDEV
>> -export DEB_BUILD_OPTIONS ?= nocheck parallel=`nproc`
>> -else
>> -export DEB_BUILD_OPTIONS ?= nocheck parallel=`nproc` nodpdk
>> -endif
>> -
>>  debian-deb: debian
>>
>>
>> //Eelco
>>> Signed-off-by: Roi Dayan <roid@nvidia.com>
>>> ---
>>>
>>> Notes:
>>>     v2
>>>     - Fix export of DEB_BUILD_OPTIONS in the Makefile
>>>
>>>  debian/automake.mk | 12 ++++++------
>>>  1 file changed, 6 insertions(+), 6 deletions(-)
>>>
>>> diff --git a/debian/automake.mk b/debian/automake.mk
>>> index 7b2afafae1a2..7da8b041226a 100644
>>> --- a/debian/automake.mk
>>> +++ b/debian/automake.mk
>>> @@ -113,6 +113,11 @@ CLEANFILES += debian/control
>>>  debian: debian/copyright debian/control
>>>  .PHONY: debian
>>>
>>> +if DPDK_NETDEV
>>> +export DEB_BUILD_OPTIONS ?= nocheck parallel=`nproc`
>>> +else
>>> +export DEB_BUILD_OPTIONS ?= nocheck parallel=`nproc` nodpdk
>>> +endif
>>>
>>>  debian-deb: debian
>>>  	@if test X"$(srcdir)" != X"$(top_builddir)"; then			\
>>> @@ -123,10 +128,5 @@ debian-deb: debian
>>>  	$(update_deb_copyright)
>>>  	$(update_deb_control)
>>>  	$(AM_V_GEN) fakeroot debian/rules clean
>>> -if DPDK_NETDEV
>>> -	$(AM_V_GEN) DEB_BUILD_OPTIONS="nocheck parallel=`nproc`" \
>>> +	$(AM_V_GEN) DEB_BUILD_OPTIONS="${DEB_BUILD_OPTIONS}" \
>>>  		fakeroot debian/rules binary
>>> -else
>>> -	$(AM_V_GEN) DEB_BUILD_OPTIONS="nocheck parallel=`nproc` nodpdk" \
>>> -		fakeroot debian/rules binary
>>> -endif
>>> -- 
>>> 2.46.1
>>
>
diff mbox series

Patch

diff --git a/debian/automake.mk b/debian/automake.mk
index 7b2afafae1a2..7da8b041226a 100644
--- a/debian/automake.mk
+++ b/debian/automake.mk
@@ -113,6 +113,11 @@  CLEANFILES += debian/control
 debian: debian/copyright debian/control
 .PHONY: debian
 
+if DPDK_NETDEV
+export DEB_BUILD_OPTIONS ?= nocheck parallel=`nproc`
+else
+export DEB_BUILD_OPTIONS ?= nocheck parallel=`nproc` nodpdk
+endif
 
 debian-deb: debian
 	@if test X"$(srcdir)" != X"$(top_builddir)"; then			\
@@ -123,10 +128,5 @@  debian-deb: debian
 	$(update_deb_copyright)
 	$(update_deb_control)
 	$(AM_V_GEN) fakeroot debian/rules clean
-if DPDK_NETDEV
-	$(AM_V_GEN) DEB_BUILD_OPTIONS="nocheck parallel=`nproc`" \
+	$(AM_V_GEN) DEB_BUILD_OPTIONS="${DEB_BUILD_OPTIONS}" \
 		fakeroot debian/rules binary
-else
-	$(AM_V_GEN) DEB_BUILD_OPTIONS="nocheck parallel=`nproc` nodpdk" \
-		fakeroot debian/rules binary
-endif