Skip to contentSkip to conversation

New: Usage of $($(PKG)_DIR_PREFIX) is an issue with linux package

Buildroot bugzilla at busybox.net 1 participant 14 messages Dec 4, 2013 – Feb 7, 2014

lore
Share & tools
lore
#0 lore raw

https://bugs.busybox.net/show_bug.cgi?id=6722

Summary: Usage of $($(PKG)_DIR_PREFIX) is an issue with linux
package
Product: buildroot
Version: unspecified
Platform: PC
OS/Version: Linux
Status: NEW
Severity: minor
Priority: P5
Component: Other
AssignedTo: unassigned at buildroot.uclibc.org
ReportedBy: rjbarnet at rockwellcollins.com
CC: buildroot at uclibc.org
Estimated Hours: 0.0

The usage of the following:

$($(PKG)_DIR_PREFIX)/$(RAWNAME)

in package/pkg-generic could cause a potential issue with the linux package if there were patches to ever be placed there. This is highly unlikely for the linux package itself but if there was to be another package added to the top level of BR and packages be applied, this could be an issue.

From build git source version 931b73e5eae4a3ba6b2e37db526fd7243a139e64, the following are where $($(PKG)_DIR_PREFIX) is used.

$ grep -r \$\(\$\(PKG\)_DIR_PREFIX\) .
./package/dhrystone/dhrystone.mk:13
./package/pkg-generic.mk:92

I don't really know how to best fix this issue so this is more of an FYI.

Signature · 3 lines
Configure bugmail: https://bugs.busybox.net/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
#1 lore raw

[Buildroot] [Bug 6722] Usage of $($(PKG)_DIR_PREFIX) is an issue with linux package

https://bugs.busybox.net/show_bug.cgi?id=6722

--- Comment #1 from Thomas De Schampheleire <[email protected]> 2013-12-04 20:55:06 UTC --- I have a patch series in the queue (new version to be sent) that should
address this issue...

Signature · 3 lines
Configure bugmail: https://bugs.busybox.net/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
#2 lore raw

[Buildroot] [Bug 6722] Usage of $($(PKG)_DIR_PREFIX) is an issue with linux package

In reply to bugzilla at busybox.net

https://bugs.busybox.net/show_bug.cgi?id=6722

--- Comment #2 from Ryan Barnett <[email protected]> 2013-12-05 07:30:55 UTC --- Thomas D - has this patch been sent? If so, can you provide a link?

Signature · 3 lines
Configure bugmail: https://bugs.busybox.net/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
#3 lore raw

[Buildroot] [Bug 6722] Usage of $($(PKG)_DIR_PREFIX) is an issue with linux package

In reply to bugzilla at busybox.net

https://bugs.busybox.net/show_bug.cgi?id=6722

--- Comment #3 from Thomas De Schampheleire <[email protected]> 2013-12-05 08:46:09 UTC --- See
http://patchwork.ozlabs.org/patch/290253/
http://patchwork.ozlabs.org/patch/290254/

As said, there needs to be some changes on the second patch (see the discussion there, I thought it was mainly the naming of the DIR_PREFIX variable).

Signature · 3 lines
Configure bugmail: https://bugs.busybox.net/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
#4 lore raw

[Buildroot] [Bug 6722] Usage of $($(PKG)_DIR_PREFIX) is an issue with linux package

In reply to bugzilla at busybox.net

https://bugs.busybox.net/show_bug.cgi?id=6722

--- Comment #4 from Thomas De Schampheleire <[email protected]> 2013-12-05 14:43:44 UTC --- You did also see this committed patch, right?
http://git.buildroot.net/buildroot/commit/?id=9e7e9b215017ee91c9369f01476bb4b4fc5f2484

Signature · 3 lines
Configure bugmail: https://bugs.busybox.net/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
#5 lore raw

[Buildroot] [Bug 6722] Usage of $($(PKG)_DIR_PREFIX) is an issue with linux package

In reply to bugzilla at busybox.net

https://bugs.busybox.net/show_bug.cgi?id=6722

--- Comment #5 from Ryan Barnett <[email protected]> 2013-12-05 16:22:55 UTC --- Are you saying that this could be causing the issue? I don't have time to figure out if it really does.

All I was doing was playing around with trying to add the ability to specify multiple BR2_GLOBAL_PATCH_DIR for performing builds and I accidentally ran across when I was printing out PATCH_BASE_DIRS in the patching step and noticed that /linux was being printed out.

Thomas Petazzoni was next to me and told me to submit a bug for it since I wasn't really intending (more so don't have time) to fix this issue.

I hope I made it clear that this is in no way an issue for me but rather something I noticed when doing some development.

Signature · 3 lines
Configure bugmail: https://bugs.busybox.net/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
#6 lore raw

[Buildroot] [Bug 6722] Usage of $($(PKG)_DIR_PREFIX) is an issue with linux package

In reply to bugzilla at busybox.net

https://bugs.busybox.net/show_bug.cgi?id=6722

--- Comment #6 from Thomas Petazzoni <[email protected]> 2013-12-05 16:28:57 UTC --- Ryan, can you confirm to Thomas DS which Buildroot version you were using? I
believe you were using the latest master, i.e a Buildroot version that does
include the
http://git.buildroot.net/buildroot/commit/?id=9e7e9b215017ee91c9369f01476bb4b4fc5f2484
commit that Thomas DS pointed out.

So I believe the issue that Ryan is reporting still exists in the current Buildroot master.

Signature · 3 lines
Configure bugmail: https://bugs.busybox.net/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
#7 lore raw

[Buildroot] [Bug 6722] Usage of $($(PKG)_DIR_PREFIX) is an issue with linux package

In reply to bugzilla at busybox.net

https://bugs.busybox.net/show_bug.cgi?id=6722

--- Comment #7 from Ryan Barnett <[email protected]> 2013-12-06 11:26:32 UTC --- As I stated in the original message of this bug report - I was using commit 931b73e5eae4a3ba6b2e37db526fd7243a139e64 as my head which is from 29 Nov 2013. This means that the patch that Thomas D mention above was included in my testing. Thus I believe that this is still an issue even with the patch Thomas D mentioned.

The tree that I was using was this -
http://git.buildroot.net/buildroot/tree/?id=931b73e5eae4a3ba6b2e37db526fd7243a139e64.

Signature · 3 lines
Configure bugmail: https://bugs.busybox.net/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
#8 lore raw

[Buildroot] [Bug 6722] Usage of $($(PKG)_DIR_PREFIX) is an issue with linux package

In reply to bugzilla at busybox.net

https://bugs.busybox.net/show_bug.cgi?id=6722

--- Comment #8 from Thomas De Schampheleire <[email protected]> 2013-12-06 11:58:49 UTC --- Thanks Ryan.

If I understand the problem correctly, then it will be fixed with my additional patches. In the current code, if you print out PATCH_BASE_DIRS for busybox and linux, you get:

Quoted 2 lines
Quoted 2 lines
Quoted 2 lines

busybox 1.21.1 Patching PATCH_BASE_DIRS='package//busybox /busybox' linux 3.10.2 Patching PATCH_BASE_DIRS='/linux /linux'

with PATCH_BASE_DIRS calculated as:
PATCH_BASE_DIRS = $($(PKG)_DIR_PREFIX)/$(RAWNAME) $(call qstrip,$(BR2_GLOBAL_PATCH_DIR))/$(RAWNAME)

and with my modified code, it becomes:

Quoted 2 lines
Quoted 2 lines
Quoted 2 lines

busybox 1.21.1 Patching PATCH_BASE_DIRS='package/busybox/ /busybox' linux 3.10.4 Patching PATCH_BASE_DIRS='linux/ /linux'

with PATCH_BASE_DIRS calculated as:
PATCH_BASE_DIRS = $($(PKG)_DIR_PREFIX) $(call
qstrip,$(BR2_GLOBAL_PATCH_DIR))/$(RAWNAME)

Ryan, can you confirm that what I describe above is the problem you have seen, and that the 'fixed' output is indeed what you expect?

Signature · 3 lines
Configure bugmail: https://bugs.busybox.net/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
#9 lore raw

[Buildroot] [Bug 6722] Usage of $($(PKG)_DIR_PREFIX) is an issue with linux package

In reply to bugzilla at busybox.net

https://bugs.busybox.net/show_bug.cgi?id=6722

--- Comment #9 from Ryan Barnett <[email protected]> 2013-12-06 12:40:06 UTC --- (In reply to comment #8)

Quoted 8 lines

Thanks Ryan.

If I understand the problem correctly, then it will be fixed with my additional patches. In the current code, if you print out PATCH_BASE_DIRS for busybox and linux, you get:

Quoted 2 lines
Quoted 2 lines
Quoted 2 lines

busybox 1.21.1 Patching PATCH_BASE_DIRS='package//busybox /busybox' linux 3.10.2 Patching PATCH_BASE_DIRS='/linux /linux'

                                             ^^^^^^

Yes this is the problem I'm was trying to communicate. The first instance of /linux is incorrect. Sorry for the confusion.

Quoted 9 lines

with PATCH_BASE_DIRS calculated as:
PATCH_BASE_DIRS = $($(PKG)_DIR_PREFIX)/$(RAWNAME) $(call qstrip,$(BR2_GLOBAL_PATCH_DIR))/$(RAWNAME)

and with my modified code, it becomes:

Quoted 2 lines
Quoted 2 lines
Quoted 2 lines

busybox 1.21.1 Patching PATCH_BASE_DIRS='package/busybox/ /busybox' linux 3.10.4 Patching PATCH_BASE_DIRS='linux/ /linux'

Quoted 7 lines

with PATCH_BASE_DIRS calculated as:
PATCH_BASE_DIRS = $($(PKG)_DIR_PREFIX) $(call
qstrip,$(BR2_GLOBAL_PATCH_DIR))/$(RAWNAME)

Ryan, can you confirm that what I describe above is the problem you have seen, and that the 'fixed' output is indeed what you expect?

Yes this is my problem and your patchset fixes it! Too much email traffic to keep up on this stuff.

This brings up another interesting point. Should we make the $(call qstrip,$(BR2_GLOBAL_PATCH_DIR))/$(RAWNAME) conditional on BR2_GLOBAL_PATCH_DIR being defined?

Are you going submit a new version of your patches soon? I'm working on trying to make BR2_GLOBAL_PATCH have the ability to have multiple directories specified.

Signature · 3 lines
Configure bugmail: https://bugs.busybox.net/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
#10 lore raw

[Buildroot] [Bug 6722] Usage of $($(PKG)_DIR_PREFIX) is an issue with linux package

In reply to bugzilla at busybox.net

https://bugs.busybox.net/show_bug.cgi?id=6722

--- Comment #10 from Thomas De Schampheleire <[email protected]> 2013-12-06 12:46:06 UTC --- (In reply to comment #9)

Quoted 4 lines

(In reply to comment #8)
This brings up another interesting point. Should we make the $(call qstrip,$(BR2_GLOBAL_PATCH_DIR))/$(RAWNAME) conditional on BR2_GLOBAL_PATCH_DIR being defined?

That sounds like a good idea to me...

Quoted 4 lines

Are you going submit a new version of your patches soon? I'm working on trying to make BR2_GLOBAL_PATCH have the ability to have multiple directories specified.

'soon' is relative :-)
In the mail thread of this patch, Arnout mentioned that ThomasP had a patchset introducing a split SRC / BUILDDIR definition, which is partially related to my patch. Just this week I asked Thomas what the status of this patch was. I'm willing to adopt that patchset (but I haven't found it yet).

Signature · 3 lines
Configure bugmail: https://bugs.busybox.net/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
#11 lore raw

[Buildroot] [Bug 6722] Usage of $($(PKG)_DIR_PREFIX) is an issue with linux package

In reply to bugzilla at busybox.net

https://bugs.busybox.net/show_bug.cgi?id=6722

--- Comment #11 from Ryan Barnett <[email protected]> 2013-12-07 11:19:49 UTC --- (In reply to comment #10)

Quoted 10 lines

(In reply to comment #9)

Quoted 3 lines

Are you going submit a new version of your patches soon? I'm working on trying to make BR2_GLOBAL_PATCH have the ability to have multiple directories specified.

'soon' is relative :-)
In the mail thread of this patch, Arnout mentioned that ThomasP had a patchset introducing a split SRC / BUILDDIR definition, which is partially related to my patch. Just this week I asked Thomas what the status of this patch was. I'm willing to adopt that patchset (but I haven't found it yet).

As I mentioned, I'm working on BR2_GLOBAL_PATCH_DIR have the ability to have multiple directories which will conflict with the patches you mentioned earlier. I will see if I can poke Thomas P on your behalf so we can figure out a way to coordinate my changes with yours since they will be conflicting.

Here is an early preview of what I've been working on.

https://github.com/rjbarnet/buildroot/compare/master...multiple-patch-dir

Signature · 3 lines
Configure bugmail: https://bugs.busybox.net/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
#12 lore raw

[Buildroot] [Bug 6722] Usage of $($(PKG)_DIR_PREFIX) is an issue with linux package

In reply to bugzilla at busybox.net

https://bugs.busybox.net/show_bug.cgi?id=6722

--- Comment #12 from Thomas De Schampheleire <[email protected]> 2013-12-07 20:11:49 UTC --- Hi Ryan,

Just to make sure I understand you correctly: when you write "... which will conflict with the patches you mentioned earlier" you are talking about the fact that one of us will have to rebase his patch on top of the other one's, right? From a functional point of view, there should be no conflict.

Thanks,
Thomas

Signature · 3 lines
Configure bugmail: https://bugs.busybox.net/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
#13 lore raw

[Buildroot] [Bug 6722] Usage of $($(PKG)_DIR_PREFIX) is an issue with linux package

In reply to bugzilla at busybox.net

https://bugs.busybox.net/show_bug.cgi?id=6722

Thomas De Schampheleire <[email protected]> changed:

What |Removed |Added
----------------------------------------------------------------------------

             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED

--- Comment #13 from Thomas De Schampheleire <[email protected]> 2014-02-07 08:10:34 UTC --- This problem is solved in 2014.02.

Signature · 3 lines
Configure bugmail: https://bugs.busybox.net/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.