diff mbox

Add missing config to RPM target package

Message ID 55D70AF3.3050604@gmx.de
State Rejected
Headers show

Commit Message

universe II Aug. 21, 2015, 11:26 a.m. UTC
Dear all,
building the RPM package for my remote target I found a misconfiguration 
of the .mk file.
If the regular expression package pcre is enabled in buildroot, rpm will 
use it. If not, nothing will be used and regular expression are not 
available, making rpm unusable. But rpm has the ability to use an 
internal pcre implementation if the external lib is not available. This 
needs to be correctly activated before building and then rpm works fine 
on the target. See the attached patch for more details.

Regards,
Andreas

Comments

Vicente Olivert Riera Aug. 21, 2015, 1:41 p.m. UTC | #1
Dear Andreas,

> diff -Naur a/package/rpm/rpm.mk b/package/rpm/rpm.mk
> --- a/package/rpm/rpm.mk        2015-08-07 11:38:37.559148663 +0200
> +++ b/package/rpm/rpm.mk        2015-08-21 11:13:31.679042077 +0200
> @@ -34,7 +34,7 @@
>  RPM_DEPENDENCIES += pcre
>  RPM_CONF_OPTS += --with-pcre=external
>  else
> -RPM_CONF_OPTS += --with-pcre=none
> +RPM_CONF_OPTS += --with-pcre=internal
>  endif
> 
>  ifeq ($(BR2_PACKAGE_FILE),y)

I cannot apply your patch:

$ wget http://patchwork.ozlabs.org/patch/509471/mbox/ -q -O - | git am
Applying: Add missing config to RPM target package
error: patch failed: package/rpm/rpm.mk:34
error: package/rpm/rpm.mk: patch does not apply
Patch failed at 0001 Add missing config to RPM target package
When you have resolved this problem run "git am --resolved".
If you would prefer to skip this patch, instead run "git am --skip".
To restore the original branch and stop patching run "git am --abort".

Please make your patches using git, as stated in the Buildroot manual:

http://buildroot.uclibc.org/downloads/manual/manual.html#submitting-patches

Regards,

Vincent.
Thomas Petazzoni Aug. 23, 2015, 6:06 p.m. UTC | #2
Andreas,

On Fri, 21 Aug 2015 13:26:43 +0200, universe II wrote:

> building the RPM package for my remote target I found a misconfiguration 
> of the .mk file.
> If the regular expression package pcre is enabled in buildroot, rpm will 
> use it. If not, nothing will be used and regular expression are not 
> available, making rpm unusable. But rpm has the ability to use an 
> internal pcre implementation if the external lib is not available. This 
> needs to be correctly activated before building and then rpm works fine 
> on the target. See the attached patch for more details.

We generally don't want to use the internal copy of libraries, and
prefer to use the system-provided library when possible, which is what
is done here.

So there are really two cases:

 1 Either the regexp support in RPM is absolutely mandatory for RPM to
   be useful. If this is the case, then just make the pcre dependency a
   mandatory one, and always pass --with-pcre=external.

 2 Or the regexp support in RPM is really optional, and useful only in
   certain situations. If this is the case, then what is done today is
   correct, and you should simply enable the pcre library.

Consequently, I've marked your patch as Rejected in our patch tracking
system. Do not hesitate to follow up with a different patch if we are
in case (1) above.

Thanks a lot!

Thomas
universe II Aug. 24, 2015, 4:25 p.m. UTC | #3
Am 21.08.2015 um 15:41 schrieb Vicente Olivert Riera:
> Dear Andreas,
>
>> diff -Naur a/package/rpm/rpm.mk b/package/rpm/rpm.mk
>> --- a/package/rpm/rpm.mk        2015-08-07 11:38:37.559148663 +0200
>> +++ b/package/rpm/rpm.mk        2015-08-21 11:13:31.679042077 +0200
>> @@ -34,7 +34,7 @@
>>   RPM_DEPENDENCIES += pcre
>>   RPM_CONF_OPTS += --with-pcre=external
>>   else
>> -RPM_CONF_OPTS += --with-pcre=none
>> +RPM_CONF_OPTS += --with-pcre=internal
>>   endif
>>
>>   ifeq ($(BR2_PACKAGE_FILE),y)
> I cannot apply your patch:
>
> $ wget http://patchwork.ozlabs.org/patch/509471/mbox/ -q -O - | git am
> Applying: Add missing config to RPM target package
> error: patch failed: package/rpm/rpm.mk:34
> error: package/rpm/rpm.mk: patch does not apply
> Patch failed at 0001 Add missing config to RPM target package
> When you have resolved this problem run "git am --resolved".
> If you would prefer to skip this patch, instead run "git am --skip".
> To restore the original branch and stop patching run "git am --abort".
>
> Please make your patches using git, as stated in the Buildroot manual:
>
> http://buildroot.uclibc.org/downloads/manual/manual.html#submitting-patches
>
> Regards,
>
> Vincent.
Dear Vincent,
I tried to make my patch using git according to the manual, but I always 
got an error. Maybe related to my inexperience with git. After 4 hours 
of different tries I gave up and sent the patch via email. Sorry for the 
inconvenience.

Regards,
Andreas
universe II Aug. 25, 2015, 7:28 p.m. UTC | #4
Thomas,
in my first try I had no pcre support, so rpm package was built with 
--with-pcre=none
Trying to install a binary rpm just containing one file on my target 
system failed at the very beginning when rpm was checking package 
dependencies. Setting --with-pcre=internal solved this problem. So it 
seems to me that pcre is necessary to to dependency checks which is in 
my opinion one of the main features or rpm. Isn't it?

Arnout mentioned that he wants to change from rpm5 to rpm and this will 
solve my problem too.
So let me know what you think and if I shall send the patch again (now 
in the right format) or not.

Regards,
Andreas


Am 23.08.2015 um 20:06 schrieb Thomas Petazzoni:
> Andreas,
>
> On Fri, 21 Aug 2015 13:26:43 +0200, universe II wrote:
>
>> building the RPM package for my remote target I found a misconfiguration
>> of the .mk file.
>> If the regular expression package pcre is enabled in buildroot, rpm will
>> use it. If not, nothing will be used and regular expression are not
>> available, making rpm unusable. But rpm has the ability to use an
>> internal pcre implementation if the external lib is not available. This
>> needs to be correctly activated before building and then rpm works fine
>> on the target. See the attached patch for more details.
> We generally don't want to use the internal copy of libraries, and
> prefer to use the system-provided library when possible, which is what
> is done here.
>
> So there are really two cases:
>
>   1 Either the regexp support in RPM is absolutely mandatory for RPM to
>     be useful. If this is the case, then just make the pcre dependency a
>     mandatory one, and always pass --with-pcre=external.
>
>   2 Or the regexp support in RPM is really optional, and useful only in
>     certain situations. If this is the case, then what is done today is
>     correct, and you should simply enable the pcre library.
>
> Consequently, I've marked your patch as Rejected in our patch tracking
> system. Do not hesitate to follow up with a different patch if we are
> in case (1) above.
>
> Thanks a lot!
>
> Thomas
Thomas Petazzoni Aug. 31, 2015, 2:32 p.m. UTC | #5
Dear Andreas Ehmanns,

On Tue, 25 Aug 2015 21:28:54 +0200, Andreas Ehmanns wrote:

> in my first try I had no pcre support, so rpm package was built with 
> --with-pcre=none
> Trying to install a binary rpm just containing one file on my target 
> system failed at the very beginning when rpm was checking package 
> dependencies. Setting --with-pcre=internal solved this problem. So it 
> seems to me that pcre is necessary to to dependency checks which is in 
> my opinion one of the main features or rpm. Isn't it?

If that's indeed the case, then pcre support is really mandatory for
RPM to be useful. Therefore, can you send a patch to make the pcre
dependency a mandatory one? Don't forget to add a comment explaining
why we're making it mandatory even if RPM makes it an optional
dependency.

Thanks,

Thomas
universe II Dec. 4, 2015, 7:30 a.m. UTC | #6
Dear Thomas,
unfortunately it took some time, but finally I cross-checked this topic.
With the change from rpm5 to rpm the problem does not exist anymore and 
there is no need for a patch.
Thanks for your support.

Regards,
Andreas


Am 03.09.2015 um 21:19 schrieb Andreas Ehmanns:
> Thomas,
> I will first check if and how the change from rpm5 to rpm affects this 
> topic.
> If the patch is then still necessary I will send it again. Since I'm 
> going on holiday right now it will take some time until you hear from 
> me again.
>
> Regards,
> Andreas
>
>
> Am 31.08.2015 um 16:32 schrieb Thomas Petazzoni:
>> Dear Andreas Ehmanns,
>>
>> On Tue, 25 Aug 2015 21:28:54 +0200, Andreas Ehmanns wrote:
>>
>>> in my first try I had no pcre support, so rpm package was built with
>>> --with-pcre=none
>>> Trying to install a binary rpm just containing one file on my target
>>> system failed at the very beginning when rpm was checking package
>>> dependencies. Setting --with-pcre=internal solved this problem. So it
>>> seems to me that pcre is necessary to to dependency checks which is in
>>> my opinion one of the main features or rpm. Isn't it?
>> If that's indeed the case, then pcre support is really mandatory for
>> RPM to be useful. Therefore, can you send a patch to make the pcre
>> dependency a mandatory one? Don't forget to add a comment explaining
>> why we're making it mandatory even if RPM makes it an optional
>> dependency.
>>
>> Thanks,
>>
>> Thomas
>
Thomas Petazzoni Dec. 4, 2015, 8:13 a.m. UTC | #7
Hello,

On Fri, 4 Dec 2015 08:30:27 +0100, Andreas Ehmanns wrote:

> unfortunately it took some time, but finally I cross-checked this topic.
> With the change from rpm5 to rpm the problem does not exist anymore and 
> there is no need for a patch.

Great, thanks for the follow-up.

Best regards,

Thomas
diff mbox

Patch

diff -Naur a/package/rpm/rpm.mk b/package/rpm/rpm.mk
--- a/package/rpm/rpm.mk        2015-08-07 11:38:37.559148663 +0200
+++ b/package/rpm/rpm.mk        2015-08-21 11:13:31.679042077 +0200
@@ -34,7 +34,7 @@ 
  RPM_DEPENDENCIES += pcre
  RPM_CONF_OPTS += --with-pcre=external
  else
-RPM_CONF_OPTS += --with-pcre=none
+RPM_CONF_OPTS += --with-pcre=internal
  endif

  ifeq ($(BR2_PACKAGE_FILE),y)