[Qemu-devel] [PATCH v1] configure: recognize more rpmbuild macros

Olaf Hering posted 1 patch 5 years, 11 months ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20180418075045.27393-1-olaf@aepfle.de
Test checkpatch passed
Test docker-build@min-glib passed
Test docker-mingw@fedora passed
Test s390x passed
configure | 3 +++
1 file changed, 3 insertions(+)
[Qemu-devel] [PATCH v1] configure: recognize more rpmbuild macros
Posted by Olaf Hering 5 years, 11 months ago
Extend the list of recognized, but ignored options from rpms %configure
macro. This fixes build on hosts running SUSE Linux.

Signed-off-by: Olaf Hering <olaf@aepfle.de>
---
 configure | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/configure b/configure
index 0a19b033bc..6e9b994f21 100755
--- a/configure
+++ b/configure
@@ -959,6 +959,9 @@ for opt do
   ;;
   --firmwarepath=*) firmwarepath="$optarg"
   ;;
+  --host=*|--build=*|\
+  --program-prefix=*|--exec-prefix=*|\
+  --disable-dependency-tracking|\
   --sbindir=*|--sharedstatedir=*|\
   --oldincludedir=*|--datarootdir=*|--infodir=*|--localedir=*|\
   --htmldir=*|--dvidir=*|--pdfdir=*|--psdir=*)

Re: [Qemu-devel] [PATCH v1] configure: recognize more rpmbuild macros
Posted by Paolo Bonzini 5 years, 11 months ago
On 18/04/2018 09:50, Olaf Hering wrote:
> Extend the list of recognized, but ignored options from rpms %configure
> macro. This fixes build on hosts running SUSE Linux.
> 
> Signed-off-by: Olaf Hering <olaf@aepfle.de>
> ---
>  configure | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/configure b/configure
> index 0a19b033bc..6e9b994f21 100755
> --- a/configure
> +++ b/configure
> @@ -959,6 +959,9 @@ for opt do
>    ;;
>    --firmwarepath=*) firmwarepath="$optarg"
>    ;;
> +  --host=*|--build=*|\
> +  --program-prefix=*|--exec-prefix=*|\
> +  --disable-dependency-tracking|\
>    --sbindir=*|--sharedstatedir=*|\
>    --oldincludedir=*|--datarootdir=*|--infodir=*|--localedir=*|\
>    --htmldir=*|--dvidir=*|--pdfdir=*|--psdir=*)
> 

Queued, thanks.

Paolo

Re: [Qemu-devel] [PATCH v1] configure: recognize more rpmbuild macros
Posted by Paolo Bonzini 5 years, 10 months ago
On 18/04/2018 11:23, Paolo Bonzini wrote:
> On 18/04/2018 09:50, Olaf Hering wrote:
>> Extend the list of recognized, but ignored options from rpms %configure
>> macro. This fixes build on hosts running SUSE Linux.
>>
>> Signed-off-by: Olaf Hering <olaf@aepfle.de>
>> ---
>>  configure | 3 +++
>>  1 file changed, 3 insertions(+)
>>
>> diff --git a/configure b/configure
>> index 0a19b033bc..6e9b994f21 100755
>> --- a/configure
>> +++ b/configure
>> @@ -959,6 +959,9 @@ for opt do
>>    ;;
>>    --firmwarepath=*) firmwarepath="$optarg"
>>    ;;
>> +  --host=*|--build=*|\
>> +  --program-prefix=*|--exec-prefix=*|\
>> +  --disable-dependency-tracking|\

Actually, --program-prefix= and --exec-prefix= have a meaning, they
cannot just be ignored.  For now I've removed this line; what is the
exact incantation used by SUSE Linux?

Thanks,

Paolo

>>    --sbindir=*|--sharedstatedir=*|\
>>    --oldincludedir=*|--datarootdir=*|--infodir=*|--localedir=*|\
>>    --htmldir=*|--dvidir=*|--pdfdir=*|--psdir=*)
>>
> 
> Queued, thanks.
> 
> Paolo
> 


Re: [Qemu-devel] [PATCH v1] configure: recognize more rpmbuild macros
Posted by Olaf Hering 5 years, 10 months ago
Am Wed, 9 May 2018 00:15:42 +0200
schrieb Paolo Bonzini <pbonzini@redhat.com>:

> Actually, --program-prefix= and --exec-prefix= have a meaning, they
> cannot just be ignored.  For now I've removed this line; what is the
> exact incantation used by SUSE Linux?

Like in every other rpm.rpm I guess:

/usr/lib/rpm/macros:%_exec_prefix               %{_prefix}
/usr/lib/rpm/macros:    --program-prefix=%{?_program_prefix} \\\
/usr/lib/rpm/macros:    --exec-prefix=%{_exec_prefix} \\\

Are you saying your %configure is different from my %configure?
In any case, qemu has to tolerate both options.

Olaf
Re: [Qemu-devel] [PATCH v1] configure: recognize more rpmbuild macros
Posted by Paolo Bonzini 5 years, 10 months ago
On 09/05/2018 07:44, Olaf Hering wrote:
> Am Wed, 9 May 2018 00:15:42 +0200
> schrieb Paolo Bonzini <pbonzini@redhat.com>:
> 
>> Actually, --program-prefix= and --exec-prefix= have a meaning, they
>> cannot just be ignored.  For now I've removed this line; what is the
>> exact incantation used by SUSE Linux?
> 
> Like in every other rpm.rpm I guess:
> 
> /usr/lib/rpm/macros:%_exec_prefix               %{_prefix}
> /usr/lib/rpm/macros:    --program-prefix=%{?_program_prefix} \\\
> /usr/lib/rpm/macros:    --exec-prefix=%{_exec_prefix} \\\
> 
> Are you saying your %configure is different from my %configure?
> In any case, qemu has to tolerate both options.

I agree that it's a worthwhile improvement but it also has to fail if
use an argument other than the default (or implement them, which I'm
probably not advising here).  Otherwise packaging breaks if someone for
whatever reason overrides the %_program_prefix and %_exec_prefix macros.

Paolo