make legal-info fails when override is active
Hello all,
in my setup using the override srcdir feature for the kernel make legal-info fails.
Quoted 4 lines
make legal-info
Quoted 1 line
Quoted 1 line
Quoted 1 line
Collecting legal info
make: *** No rule to make target
linux-extract', needed bylinux-legal-info'. Stop.
Tested with actual git head (526badc94)
Kind regards
Stephan
Signature · 14 lines
reLinux - Stephan Hoffmann Am Schmidtgrund 124 50765 K?ln Tel. +49.221.95595-19 Fax: -64 www.reLinux.de sho at reLinux.de -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: defconfig URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20121011/573c0fce/attachment.ksh> -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: local.mk URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20121011/573c0fce/attachment-0001.ksh>
PATCH 1/1 pkg-infra: rename <pkg>-rsync to <pkg>-extract
The legal-info target (and possibly others as well) depends on <pkg>-extract to make sure the license file is available. However, when <PKG>_OVERRIDE_SRCDIR is active, the <pkg>-extract target doesn't exist.
To solve this, we just call the target that rsyncs the source <pkg>-extract.
While we're at it, also add a <pkg>-patch target (which is equivalent to <pkg>-extract). That avoids the same problem in the future if something starts depending on <pkg>-patch.
--- package/pkg-generic.mk | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
package/pkg-generic.mk +4 -2
@@ -378,9 +378,11 @@ else $(1)-configure: $(1)-depends \ $$($(2)_TARGET_CONFIGURE) -$(1)-depends: $(1)-rsync $$($(2)_DEPENDENCIES) +$(1)-depends: $(1)-extract $$($(2)_DEPENDENCIES) -$(1)-rsync: $$($(2)_TARGET_RSYNC) +$(1)-patch: $(1)-extract + +$(1)-extract: $$($(2)_TARGET_RSYNC) $(1)-source: $$($(2)_TARGET_RSYNC_SOURCE) endif
Signature · 1 line
tg: (0132e36..) t/rsync-add-extract-target (depends on: )
PATCH 1/1 pkg-infra: rename <pkg>-rsync to <pkg>-extract
Arnout,
Quoted 26 lines · Arnout Vandecappelle (Essensium/Mind)
The legal-info target (and possibly others as well) depends on <pkg>-extract to make sure the license file is available. However, when <PKG>_OVERRIDE_SRCDIR is active, the <pkg>-extract target doesn't exist.
To solve this, we just call the target that rsyncs the source <pkg>-extract.
While we're at it, also add a <pkg>-patch target (which is equivalent to <pkg>-extract). That avoids the same problem in the future if something starts depending on <pkg>-patch.
--- package/pkg-generic.mk | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)package/pkg-generic.mk +0
-0@@ -378,9 +378,11 @@ else $(1)-configure: $(1)-depends \ $$($(2)_TARGET_CONFIGURE)
package/pkg-generic.mk else · line 388
Quoted 10 lines
package/pkg-generic.mk +4
-2-$(1)-depends: $(1)-rsync $$($(2)_DEPENDENCIES) +$(1)-depends: $(1)-extract $$($(2)_DEPENDENCIES) -$(1)-rsync: $$($(2)_TARGET_RSYNC) +$(1)-patch: $(1)-extract + +$(1)-extract: $$($(2)_TARGET_RSYNC) $(1)-source: $$($(2)_TARGET_RSYNC_SOURCE) endif
I think I would prefer to keep the 1:1 mapping between virtual target name and real target name, and only have aliases when it makes sense. I.e:
$(1)-rsync: $$($(2)_TARGET_RSYNC)
# Possibly some comment here to explain what's going on
$(1)-extract: $(1)-rsync
$(1)-patch: $(1)-rsync
Otherwise, I'm fine with fixing this problem using this approach, looks good to me.
Thomas
Signature · 4 lines
Thomas Petazzoni, Free Electrons Kernel, drivers, real-time and embedded Linux development, consulting, training and support. http://free-electrons.com
PATCH 1/1 pkg-infra: rename <pkg>-rsync to <pkg>-extract
Quoted 4 lines · Thomas Petazzoni
I think I would prefer to keep the 1:1 mapping between virtual target name and real target name, and only have aliases when it makes sense. I.e:
Quoted 8 lines
$(1)-rsync: $$($(2)_TARGET_RSYNC)
# Possibly some comment here to explain what's going on
$(1)-extract: $(1)-rsync
$(1)-patch: $(1)-rsyncOtherwise, I'm fine with fixing this problem using this approach, looks good to me.
The reason that I choose to rename the -rsync target is that I'm hesitant
to add more targets - they slow down make.
However, this would only be for the OVERRIDE packages, so it just adds a few
targets, not 1000. So I'll take your suggestion and resend.
Regards,
Arnout
Signature · 6 lines
Arnout Vandecappelle arnout at mind be Senior Embedded Software Architect +32-16-286540 Essensium/Mind http://www.mind.be G.Geenslaan 9, 3001 Leuven, Belgium BE 872 984 063 RPR Leuven LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle GPG fingerprint: 7CB5 E4CC 6C2E EFD4 6E3D A754 F963 ECAB 2450 2F1F
PATCH 1/1 pkg-infra: rename <pkg>-rsync to <pkg>-extract
Quoted 8 lines · Arnout Vandecappelle
Quoted 2 lines
Otherwise, I'm fine with fixing this problem using this approach, looks good to me.
The reason that I choose to rename the -rsync target is that I'm hesitant
to add more targets - they slow down make.However, this would only be for the OVERRIDE packages, so it just adds a few
targets, not 1000. So I'll take your suggestion and resend.
Ok, thanks!
Thomas
Signature · 4 lines
Thomas Petazzoni, Free Electrons Kernel, drivers, real-time and embedded Linux development, consulting, training and support. http://free-electrons.com
PATCH v2 1/1 pkg-infra: add <pkg>-extract and <pkg>-patch targets to OVERRIDE support
The legal-info target (and possibly others as well) depends on <pkg>-extract to make sure the license file is available. However, when <PKG>_OVERRIDE_SRCDIR is active, the <pkg>-extract target doesn't exist.
To solve this, we add <pkg>-extract which depends on <pkg>-rsync. While we're at it,we do the same for <pkg>-patch. That avoids the same problem in the future if something starts depending on <pkg>-patch.
---
v2: As ThomasP suggested, don't remove <pkg>-rsync.
package/pkg-generic.mk | 3 +++ 1 file changed, 3 insertions(+)
package/pkg-generic.mk +3 -0
@@ -380,6 +380,9 @@ $(1)-configure: $(1)-depends \ $(1)-depends: $(1)-rsync $$($(2)_DEPENDENCIES) +$(1)-patch: $(1)-rsync +$(1)-extract: $(1)-rsync + $(1)-rsync: $$($(2)_TARGET_RSYNC) $(1)-source: $$($(2)_TARGET_RSYNC_SOURCE)
Signature · 1 line
tg: (0132e36..) t/rsync-add-extract-target (depends on: master)
PATCH v2 1/1 pkg-infra: add <pkg>-extract and <pkg>-patch targets to OVERRIDE support
Quoted 11 lines · Arnout Vandecappelle (Essensium/Mind)
The legal-info target (and possibly others as well) depends on <pkg>-extract to make sure the license file is available. However, when <PKG>_OVERRIDE_SRCDIR is active, the <pkg>-extract target doesn't exist.
To solve this, we add <pkg>-extract which depends on <pkg>-rsync. While we're at it,we do the same for <pkg>-patch. That avoids the same problem in the future if something starts depending on <pkg>-patch.
Signature · 4 lines
Thomas Petazzoni, Free Electrons Kernel, drivers, real-time and embedded Linux development, consulting, training and support. http://free-electrons.com
PATCH v2 1/1 pkg-infra: add <pkg>-extract and <pkg>-patch targets to OVERRIDE support
In reply to Arnout Vandecappelle (Essensium/Mind)Quoted 23 lines · Arnout Vandecappelle (Essensium/Mind)
The legal-info target (and possibly others as well) depends on <pkg>-extract to make sure the license file is available. However, when <PKG>_OVERRIDE_SRCDIR is active, the <pkg>-extract target doesn't exist.
To solve this, we add <pkg>-extract which depends on <pkg>-rsync. While we're at it,we do the same for <pkg>-patch. That avoids the same problem in the future if something starts depending on <pkg>-patch.
---
v2: As ThomasP suggested, don't remove <pkg>-rsync.package/pkg-generic.mk | 3 +++ 1 file changed, 3 insertions(+)package/pkg-generic.mk +0
-0
package/pkg-generic.mk $(1)-configure: $(1)-depends \ · line 388
Quoted 9 lines
package/pkg-generic.mk +3
-0@@ -380,6 +380,9 @@ $(1)-configure: $(1)-depends \ $(1)-depends: $(1)-rsync $$($(2)_DEPENDENCIES) +$(1)-patch: $(1)-rsync +$(1)-extract: $(1)-rsync + $(1)-rsync: $$($(2)_TARGET_RSYNC) $(1)-source: $$($(2)_TARGET_RSYNC_SOURCE)
PATCH 1/1 pkg-infra: rename <pkg>-rsync to <pkg>-extract
In reply to Arnout Vandecappelle (Essensium/Mind)Am 14.10.2012 16:41, schrieb Arnout Vandecappelle (Essensium/Mind):
Quoted 26 lines
The legal-info target (and possibly others as well) depends on <pkg>-extract to make sure the license file is available. However, when <PKG>_OVERRIDE_SRCDIR is active, the <pkg>-extract target doesn't exist.
To solve this, we just call the target that rsyncs the source <pkg>-extract.
While we're at it, also add a <pkg>-patch target (which is equivalent to <pkg>-extract). That avoids the same problem in the future if something starts depending on <pkg>-patch.
--- package/pkg-generic.mk | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)package/pkg-generic.mk +0
-0@@ -378,9 +378,11 @@ else $(1)-configure: $(1)-depends \ $$($(2)_TARGET_CONFIGURE)
package/pkg-generic.mk else · line 388
Quoted 10 lines
package/pkg-generic.mk +4
-2-$(1)-depends: $(1)-rsync $$($(2)_DEPENDENCIES) +$(1)-depends: $(1)-extract $$($(2)_DEPENDENCIES) -$(1)-rsync: $$($(2)_TARGET_RSYNC) +$(1)-patch: $(1)-extract + +$(1)-extract: $$($(2)_TARGET_RSYNC) $(1)-source: $$($(2)_TARGET_RSYNC_SOURCE) endif
Hello,
this does not fix my issue, not even after doing a "make clean".
Quoted 17 lines
LANG=C make legal-info
mkdir -p/home/stephan/Dokumente/BeagleBone/buildroot/output/targetif ! [ -d"/home/stephan/Dokumente/BeagleBone/buildroot/output/target/bin" ]; then \ if [ -d "/home/stephan/Dokumente/BeagleBone/buildroot/fs/skeleton" ]; then \ cp -fa /home/stephan/Dokumente/BeagleBone/buildroot/fs/skeleton/* /home/stephan/Dokumente/BeagleBone/buildroot/output/target/; \ fi; \ fifind
/home/stephan/Dokumente/BeagleBone/buildroot/output/target-type d -name CVS -print0 -o -name .svn -print0 | xargs -0 rm -rf find/home/stephan/Dokumente/BeagleBone/buildroot/output/target-type f \( -name .empty -o -name '*~' \) -print0 | xargs -0 rm -rf touch/home/stephan/Dokumente/BeagleBone/buildroot/output/build/.rootQuoted 1 line
Quoted 1 line
Quoted 1 line
Collecting legal info
<snip>
Quoted 7 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
linux custom Syncing from source dir
/home/stephan/Dokumente/BeagleBone/kernel/kernel
rsync -au/home/stephan/Dokumente/BeagleBone/kernel/kernel//home/stephan/Dokumente/BeagleBone/buildroot/output/build/linux-custom
cp: cannot stat `/home/stephan/Dokumente/dl/linux-custom.tar.gz': No such file or directory
make: *** [linux-legal-info] Error 1
Regards
Stephan
Signature · 14 lines
reLinux - Stephan Hoffmann Am Schmidtgrund 124 50765 K?ln Tel. +49.221.95595-19 Fax: -64 www.reLinux.de sho at reLinux.de -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: defconfig URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20121112/c4961bf1/attachment.ksh> -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: local.mk URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20121112/c4961bf1/attachment-0001.ksh>
PATCH 1/1 pkg-infra: rename <pkg>-rsync to <pkg>-extract
Quoted 1 line · Stephan Hoffmann
Am 14.10.2012 16:41, schrieb Arnout Vandecappelle (Essensium/Mind):
[snip]
Quoted 7 lines
Quoted 4 lines
+$(1)-extract: $$($(2)_TARGET_RSYNC)
$(1)-source: $$($(2)_TARGET_RSYNC_SOURCE) endifHello,
this does not fix my issue, not even after doing a "make clean".
[snip]
Quoted 7 lines
Quoted 7 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
linux custom Syncing from source dir
/home/stephan/Dokumente/BeagleBone/kernel/kernel
rsync -au/home/stephan/Dokumente/BeagleBone/kernel/kernel//home/stephan/Dokumente/BeagleBone/buildroot/output/build/linux-custom
cp: cannot stat `/home/stephan/Dokumente/dl/linux-custom.tar.gz': No such file or directory
make: *** [linux-legal-info] Error 1
One step at a time :-)
The .tar.gz doesn't exist for overridden packages. So what should we do -
exclude the source for overridden packages?
Regards,
Arnout
Signature · 6 lines
Arnout Vandecappelle arnout at mind be Senior Embedded Software Architect +32-16-286540 Essensium/Mind http://www.mind.be G.Geenslaan 9, 3001 Leuven, Belgium BE 872 984 063 RPR Leuven LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle GPG fingerprint: 7CB5 E4CC 6C2E EFD4 6E3D A754 F963 ECAB 2450 2F1F
PATCH 1/1 pkg-infra: rename <pkg>-rsync to <pkg>-extract
Am 14.11.2012 00:48, schrieb Arnout Vandecappelle:
Quoted 19 lines · Stephan Hoffmann
Quoted 1 line
Am 14.10.2012 16:41, schrieb Arnout Vandecappelle (Essensium/Mind):
[snip]
Quoted 7 lines
Quoted 4 lines
+$(1)-extract: $$($(2)_TARGET_RSYNC)
$(1)-source: $$($(2)_TARGET_RSYNC_SOURCE) endifHello,
this does not fix my issue, not even after doing a "make clean".
[snip]
Quoted 7 lines
Quoted 7 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
linux custom Syncing from source dir
/home/stephan/Dokumente/BeagleBone/kernel/kernel
rsync -au/home/stephan/Dokumente/BeagleBone/kernel/kernel//home/stephan/Dokumente/BeagleBone/buildroot/output/build/linux-custom
cp: cannot stat `/home/stephan/Dokumente/dl/linux-custom.tar.gz': No such file or directory
make: *** [linux-legal-info] Error 1
Quoted 5 lines
One step at a time :-)
The .tar.gz doesn't exist for overridden packages. So what should we
do -
exclude the source for overridden packages?
Good point. At the first glance, I'd suggest to create the tar.gz using the x_OVERRIDE_SRCDIR. That seems to be better than nothing.
After creating a linux-custom.tar.gz, "make legal-info" works for me, but it does not seem to make sence to copy a .tar.gz file that has not been extracted to build the packet.
Kind regards
Stephan
Quoted 4 lines
Regards,
Arnout
Signature · 4 lines
reLinux - Stephan Hoffmann Am Schmidtgrund 124 50765 K?ln Tel. +49.221.95595-19 Fax: -64 www.reLinux.de sho at reLinux.de
PATCH 1/1 pkg-infra: rename <pkg>-rsync to <pkg>-extract
Am 14.11.2012 09:20, schrieb Stephan Hoffmann:
Quoted 24 lines
Am 14.11.2012 00:48, schrieb Arnout Vandecappelle:
Quoted 18 lines · Stephan Hoffmann
Quoted 1 line
Am 14.10.2012 16:41, schrieb Arnout Vandecappelle (Essensium/Mind):
[snip]
Quoted 7 lines
Quoted 4 lines
+$(1)-extract: $$($(2)_TARGET_RSYNC)
$(1)-source: $$($(2)_TARGET_RSYNC_SOURCE) endifHello,
this does not fix my issue, not even after doing a "make clean".
[snip]
Quoted 7 lines
Quoted 7 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
linux custom Syncing from source dir
/home/stephan/Dokumente/BeagleBone/kernel/kernel
rsync -au/home/stephan/Dokumente/BeagleBone/kernel/kernel//home/stephan/Dokumente/BeagleBone/buildroot/output/build/linux-custom
cp: cannot stat `/home/stephan/Dokumente/dl/linux-custom.tar.gz': No such file or directory
make: *** [linux-legal-info] Error 1Quoted 5 lines
One step at a time :-)
The .tar.gz doesn't exist for overridden packages. So what should we
do -
exclude the source for overridden packages?
Quoted 6 lines
Good point. At the first glance, I'd suggest to create the tar.gz using the
x_OVERRIDE_SRCDIR. That seems to be better than nothing.After creating a linux-custom.tar.gz, "make legal-info" works for me, but it does not seem to make sence to copy a .tar.gz file that has not been extracted to build the packet.
Hello,
I just started looking at this again and found in package/pkg-generic.mk:
Quoted 11 lines
# legal-info: produce legally relevant info. $(1)-legal-info:
# Packages without a source are assumed to be part of Buildroot, skip them.
ifneq ($(call qstrip,$$($(2)_SOURCE)),)
ifeq ($$($(2)_SITE_METHOD),local)
# Packages without a tarball: don't save and warn@$(call legal-warning-pkg-savednothing,$$($(2)_RAWNAME),local) else ifeq ($$($(2)_SITE_METHOD),override) @$(call legal-warning-pkg-savednothing,$$($(2)_RAWNAME),override)else
So there should just be a warning, but no make failing. Obviously, the test for "override" does not work as expected. A patch changing this to
ifneq ($$($(2)_OVERRIDE_SRCDIR),)
follows, but I do not think that SITE_METHOD ever gets set to "override" at all. So other parts of pkg-generic.mk might also need a closer look.
Quoted 7 lines
Kind regards
Stephan
Quoted 3 lines
Regards,
Arnout
Signature · 4 lines
reLinux - Stephan Hoffmann Am Schmidtgrund 124 50765 K?ln Tel. +49.221.95595-19 Fax: -64 www.reLinux.de sho at reLinux.de