Add missing config to RPM target package
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
package/rpm/rpm.mk 2015-08-21 11:13:31.679042077 +0200 renamed from package/rpm/rpm.mk 2015-08-07 11:38:37.559148663 +0200 +1 -1
@@ -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)
Dear Andreas,
package/rpm/rpm.mk 2015-08-21 11:13:31.679042077 +0200 line 40
Quoted 12 lines
diff -Naur
a/package/rpm/rpm.mkb/package/rpm/rpm.mkpackage/rpm/rpm.mk 2015-08-21 11:13:31.679042077 +0200 renamed from package/rpm/rpm.mk 2015-08-07 11:38:37.559148663 +0200 +1
-1@@ -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.
Am 21.08.2015 um 15:41 schrieb Vicente Olivert Riera:
Quoted 25 lines
Dear Andreas,
package/rpm/rpm.mk 2015-08-21 11:13:31.679042077 +0200 line 40
Quoted 12 lines
diff -Naur
a/package/rpm/rpm.mkb/package/rpm/rpm.mkpackage/rpm/rpm.mk 2015-08-21 11:13:31.679042077 +0200 renamed from package/rpm/rpm.mk 2015-08-07 11:38:37.559148663 +0200 +1
-1@@ -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".
Quoted 7 lines
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
Dear Andreas,
Quoted 34 lines · universe II
Am 21.08.2015 um 15:41 schrieb Vicente Olivert Riera:
Quoted 25 lines
Dear Andreas,
package/rpm/rpm.mk 2015-08-21 11:13:31.679042077 +0200 line 40
Quoted 12 lines
diff -Naur
a/package/rpm/rpm.mkb/package/rpm/rpm.mkpackage/rpm/rpm.mk 2015-08-21 11:13:31.679042077 +0200 renamed from package/rpm/rpm.mk 2015-08-07 11:38:37.559148663 +0200 +1
-1@@ -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".Quoted 8 lines
Please make your patches using git, as stated in the Buildroot manual:
http://buildroot.uclibc.org/downloads/manual/manual.html#submitting-patches
Regards,
Vincent.
Quoted 8 lines
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
so, lets see if I can help you.
1- configure git in order to be able to use "git send-email" and also to sign your commits automatically when using "git commit -s". Here is an example of a ~/.gitconfig file:
user at localhost ~ $ cat .gitconfig [sendemail]
smtpencryption = tls
smtpserver = your.mail.server.address.here smtpuser = "your.smtp.username" smtpserverport = 25
confirm = always
[user]
name = Your Full Name Here
email = your.email at address.here
user at localhost ~ $
That should be enough. But, if you need it, there is more information here:
http://git-scm.com/docs/git-send-email
2- clone the Buildroot repository:
user at localhost ~ $ git clone git://git.busybox.net/buildroot
3- make the changes your want:
user at localhost ~ $ cd buildroot
user at localhost ~ $ vim package/rpm/rpm.mk
4- now observe how that file has been modified:
user at localhost ~ $ git status
# On branch master
# Changed but not updated:
# (use "git add <file>..." to update what will be committed)
# (use "git checkout -- <file>..." to discard changes in working
directory)
#
# modified: package/rpm/rpm.mk
#
no changes added to commit (use "git add" and/or "git commit -a")
user at localhost ~ $ git diff package/rpm/rpm.mk
package/rpm/rpm.mk +1 -1
@@ -34,7 +34,7 @@ ifeq ($(BR2_PACKAGE_PCRE),y) 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)
user at localhost ~ $
5- now you need to add that modified file to the staging area:
user at localhost ~ $ git add package/rpm/rpm.mk
6- now if you check the status again, you will see how that file has been added to the staging are in order to be committed:
user at localhost ~ $ git status
# On branch master
# Changes to be committed:
# (use "git reset HEAD <file>..." to unstage)
#
# modified: package/rpm/rpm.mk
#
7- now you have to "commit", so all the changes to the files in the staging area (although you only have one file) will be committed. Also pass the "-s" option to the commit so your "Signed-off-by" will be added automatically taking the value from your ~/.gitconfig file:
user at localhost ~ $ git commit -s
A text editor should have opened and now you can write a title in the first line and a comment below the title, leaving one blank line between them. Please don't write lines longer than 72 characters
(http://stackoverflow.com/questions/4297574/do-i-need-to-wrap-email-messages-longer-than-72-characters-in-a-line).
8- now you can see your commit on top of the log history. Run "git log" to see the entire log history paged, or just "git log -1" to see the most recent commit (which should be yours). This in an example of how it would look like:
user at localhost ~ $ git log -1
commit 8eb4fddc0ff18b51fbcc5011f1d1d159e4169922
Author: Your Full Name Here <[email protected]> Date: Tue Aug 25 10:28:47 2015 +0100
package/rpm: use the internal pcre when the external is not provided
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.
user at localhost ~ $
9- submit that commit by email using "git send-email", so it will format the patch automatically using "git format-patch" (again, this is an example of how it would look like):
user at localhost ~ $ git send-email --to=buildroot at buildroot.org -1 /tmp/s5ZjTPKm7e/0001-package-rpm-use-the-internal-pcre-when-the-external-.patch Who should the emails appear to be from? [Your Full Name Here <[email protected]>]
Emails will be sent from: Your Full Name Here <[email protected]> Message-ID to be used as In-Reply-To for the first email?
(mbox) Adding cc: Your Full Name Here <[email protected]> from line 'From: Your Full Name Here <[email protected]>'
(body) Adding cc: Your Full Name Here <[email protected]> from line 'Signed-off-by: Your Full Name Here <[email protected]>'
From: Your Full Name Here <[email protected]>
To: buildroot at buildroot.org
Cc: Your Full Name Here <[email protected]>
Subject: [PATCH] package/rpm: use the internal pcre when the external is not provided
Date: Tue, 25 Aug 2015 10:35:41 +0100
Message-Id: <[email protected]>
X-Mailer: git-send-email 1.7.1
Send this email? ([y]es|[n]o|[q]uit|[a]ll):
10- check that information and if everything looks fine, then press "y" so the email will be sent using the stmp server you stated in your ~/.gitconfig file.
Regards,
Vincent.
Am 25.08.2015 um 11:38 schrieb Vicente Olivert Riera:
Quoted 181 lines
Dear Andreas,
Quoted 34 lines · universe II
Am 21.08.2015 um 15:41 schrieb Vicente Olivert Riera:
Quoted 25 lines
Dear Andreas,
package/rpm/rpm.mk 2015-08-21 11:13:31.679042077 +0200 line 40
Quoted 12 lines
diff -Naur
a/package/rpm/rpm.mkb/package/rpm/rpm.mkpackage/rpm/rpm.mk 2015-08-21 11:13:31.679042077 +0200 renamed from package/rpm/rpm.mk 2015-08-07 11:38:37.559148663 +0200 +1
-1@@ -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".Quoted 8 lines
Please make your patches using git, as stated in the Buildroot manual:
http://buildroot.uclibc.org/downloads/manual/manual.html#submitting-patches
Regards,
Vincent.
Quoted 8 lines
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,
Andreasso, lets see if I can help you.
1- configure git in order to be able to use "git send-email" and also to sign your commits automatically when using "git commit -s". Here is an example of a ~/.gitconfig file:
user at localhost ~ $ cat .gitconfig [sendemail]
smtpencryption = tls
smtpserver = your.mail.server.address.here smtpuser = "your.smtp.username" smtpserverport = 25
confirm = always
[user]
name = Your Full Name Here
email = your.email at address.here
user at localhost ~ $That should be enough. But, if you need it, there is more information here:
http://git-scm.com/docs/git-send-email
2- clone the Buildroot repository:
user at localhost ~ $ git clone
git://git.busybox.net/buildroot3- make the changes your want:
user at localhost ~ $ cd buildroot
user at localhost ~ $ vimpackage/rpm/rpm.mk4- now observe how that file has been modified:
user at localhost ~ $ git status
# On branch master
# Changed but not updated:
# (use "git add <file>..." to update what will be committed)
# (use "git checkout -- <file>..." to discard changes in working
directory)
#
# modified:package/rpm/rpm.mk
#
no changes added to commit (use "git add" and/or "git commit -a")user at localhost ~ $ git diff
package/rpm/rpm.mkpackage/rpm/rpm.mk +1
-1@@ -34,7 +34,7 @@ ifeq ($(BR2_PACKAGE_PCRE),y) 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)user at localhost ~ $
5- now you need to add that modified file to the staging area:
user at localhost ~ $ git add
package/rpm/rpm.mk6- now if you check the status again, you will see how that file has been added to the staging are in order to be committed:
user at localhost ~ $ git status
# On branch master
# Changes to be committed:
# (use "git reset HEAD <file>..." to unstage)
#
# modified:package/rpm/rpm.mk
#7- now you have to "commit", so all the changes to the files in the staging area (although you only have one file) will be committed. Also pass the "-s" option to the commit so your "Signed-off-by" will be added automatically taking the value from your ~/.gitconfig file:
user at localhost ~ $ git commit -s
A text editor should have opened and now you can write a title in the first line and a comment below the title, leaving one blank line between them. Please don't write lines longer than 72 characters
(http://stackoverflow.com/questions/4297574/do-i-need-to-wrap-email-messages-longer-than-72-characters-in-a-line).8- now you can see your commit on top of the log history. Run "git log" to see the entire log history paged, or just "git log -1" to see the most recent commit (which should be yours). This in an example of how it would look like:
user at localhost ~ $ git log -1
commit8eb4fddc0ff18b51fbcc5011f1d1d159e4169922Author: Your Full Name Here <[email protected]> Date: Tue Aug 25 10:28:47 2015 +0100package/rpm: use the internal pcre when the external is not provided
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.
Signed-off-by Your Full Name Here <[email protected]>user at localhost ~ $
9- submit that commit by email using "git send-email", so it will format the patch automatically using "git format-patch" (again, this is an example of how it would look like):
user at localhost ~ $ git send-email --to=buildroot at buildroot.org -1
/tmp/s5ZjTPKm7e/0001-package-rpm-use-the-internal-pcre-when-the-external-.patchWho should the emails appear to be from? [Your Full Name Here <[email protected]>]
Emails will be sent from: Your Full Name Here <[email protected]> Message-ID to be used as In-Reply-To for the first email?
(mbox) Adding cc: Your Full Name Here <[email protected]> from line 'From: Your Full Name Here <[email protected]>'
(body) Adding cc: Your Full Name Here <[email protected]> from line 'Signed-off-by: Your Full Name Here <[email protected]>'From: Your Full Name Here <[email protected]>
To: buildroot at buildroot.org
Cc: Your Full Name Here <[email protected]>
Subject: [PATCH] package/rpm: use the internal pcre when the external is not provided
Date: Tue, 25 Aug 2015 10:35:41 +0100
Message-Id: <[email protected]>
X-Mailer: git-send-email 1.7.1Send this email? ([y]es|[n]o|[q]uit|[a]ll):
Quoted 8 lines
10- check that information and if everything looks fine, then press "y" so the email will be sent using the stmp server you stated in your ~/.gitconfig file.
Regards,
Vincent.
Dear Vincent,
thanks a lot for your support. I spent some time to google around but wasn't able to find a clue. Finally I fixed the problem by reinstalling my linux box. Don't know what the real problem was.
Now everything is working fine.
Regards,
Andreas
Andreas,
Quoted 8 lines · universe II
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
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com
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:
Quoted 33 lines
Andreas,
Quoted 8 lines · universe II
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
Dear Andreas Ehmanns,
Quoted 7 lines · Andreas Ehmanns
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
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com
A message that is not in the archive (sent off-list or not yet received): [email protected]
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:
Quoted 33 lines
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,
AndreasAm 31.08.2015 um 16:32 schrieb Thomas Petazzoni:
Quoted 20 lines
Dear Andreas Ehmanns,
Quoted 7 lines · Andreas Ehmanns
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
Hello,
Quoted 3 lines · Andreas Ehmanns
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
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com