package/pkg-generic.mk: legal-info: create redist directory for override
PATCH 1/4 package/pkg-generic.mk: legal-info: create redist directory for override
Commit aacca7f0639bac6bb3fb262d0b1738c4387edeb0 introduced the possibility to also create tarballs for packages that are local or overridden (i.e., with a custom version). However, it forgot to create the directory in which that tarball is stored. The original patch did, but it was reworked by Arnout to use mk_tar_gz instead of tar directly, and the mkdir was dropped there.
This failure was silent because the mk_tar_gz function doesn't exit on error. The following error was printed but ignored:
support/download/helpers: line 68: .../legal-info/sources/busybox-custom/busybox-custom.tar.gz: No such file or directory
Create the directory before calling mk_tar_gz.
--- package/pkg-generic.mk | 1 + 1 file changed, 1 insertion(+)
package/pkg-generic.mk +1 -0
@@ -1163,6 +1163,7 @@ ifneq ($$($(2)_OVERRIDE_SRCDIR),) $$(Q)rsync -au --chmod=u=rwX,go=rX $$(RSYNC_VCS_EXCLUSIONS) \ $(call qstrip,$$($(2)_OVERRIDE_SRCDIR))/ \ $$($(2)_BUILDDIR)/.legal-info-rsync/ + $$(Q)mkdir -p $$($(2)_REDIST_SOURCES_DIR) $$(Q). support/download/helpers; set -x; cd $$($(2)_BUILDDIR); TAR=$$(TAR) mk_tar_gz \ $$($(2)_BUILDDIR)/.legal-info-rsync/ \ $$($(2)_BASENAME_RAW) \
Signature · 6 lines
2.46.0 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
PATCH 2/4 package/pkg-generic.mk: legal-info: make sure host-tar is available
Commit aacca7f0639bac6bb3fb262d0b1738c4387edeb0 introduced the possibility to also create tarballs for packages that are local or overridden (i.e., with a custom version). However, it doesn't work correctly for PPD, because the PPD-host-tar and gzip are not available.
This failure was silent because the mk_tar_gz function doesn't exit on error. The following error was printed but ignored:
support/download/helpers: line 62: .../per-package/busybox/host/bin/tar: No such file or directory
Call prepare-per-package-directory before calling mk_tar_gz which uses it. Note that we use only tar and gzip here, not all of DOWNLOAD_DEPENDENCIES, because tar and gzip are the only ones we really use.
Also add this dependency to the legal-info target. We use an order-only dependency even though that makes not difference for a phony target, but this makes it similar to how it's done for the stamp targets. Note also that this dependency is redundant, because there is already a dependency on the foo-rsync target which does depend on DOWNLOAD_DEPENDENCIES. We still add the dependency explicitly in case things change with the foo-rsync target in the future.
--- package/pkg-generic.mk | 4 ++++ 1 file changed, 4 insertions(+)
package/pkg-generic.mk +4 -0
@@ -1008,6 +1008,9 @@ $(1)-rsync: $$($(2)_TARGET_RSYNC) $(1)-source: $(1)-legal-source: +# For override, legal-info uses host-tar and host-gzip +$(1)-legal-info: | $(BR2_GZIP_HOST_DEPENDENCY) $(BR2_TAR_HOST_DEPENDENCY) + $(1)-external-deps: @echo "file://$$($(2)_OVERRIDE_SRCDIR)"
@@ -1163,6 +1166,7 @@ ifneq ($$($(2)_OVERRIDE_SRCDIR),) $$(Q)rsync -au --chmod=u=rwX,go=rX $$(RSYNC_VCS_EXCLUSIONS) \ $(call qstrip,$$($(2)_OVERRIDE_SRCDIR))/ \ $$($(2)_BUILDDIR)/.legal-info-rsync/ + $$(call prepare-per-package-directory,$$(BR2_GZIP_HOST_DEPENDENCY) $$(BR2_TAR_HOST_DEPENDENCY)) $$(Q)mkdir -p $$($(2)_REDIST_SOURCES_DIR) $$(Q). support/download/helpers; set -x; cd $$($(2)_BUILDDIR); TAR=$$(TAR) mk_tar_gz \ $$($(2)_BUILDDIR)/.legal-info-rsync/ \
Signature · 6 lines
2.46.0 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Re: [Buildroot] [PATCH 2/4] package/pkg-generic.mk: legal-info: make sure host-tar is available
Quoted 25 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Arnout" == Arnout Vandecappelle via buildroot <[email protected]> writes:
Commit
aacca7f0639bac6bb3fb262d0b1738c4387edeb0introduced the possibility to also create tarballs for packages that are local or overridden (i.e., with a custom version). However, it doesn't work correctly for PPD, because the PPD-host-tar and gzip are not available.This failure was silent because the
mk_tar_gzfunction doesn't exit on error. The following error was printed but ignored:support/download/helpers: line 62: .../per-package/busybox/host/bin/tar: No such file or directory
Call prepare-per-package-directory before calling
mk_tar_gzwhich uses it. Note that we use only tar and gzip here, not all ofDOWNLOAD_DEPENDENCIES, because tar and gzip are the only ones we really use.Also add this dependency to the legal-info target. We use an order-only dependency even though that makes not difference for a phony target, but this makes it similar to how it's done for the stamp targets. Note also that this dependency is redundant, because there is already a dependency on the foo-rsync target which does depend on
DOWNLOAD_DEPENDENCIES. We still add the dependency explicitly in case things change with the foo-rsync target in the future.
Quoted 3 lines
Signed-off-by Arnout Vandecappelle <[email protected]>Cc Nicolas Carrier <[email protected]>Reported-by Yann E. MORIN <[email protected]>
Committed to 2024.08.x, thanks.
Signature · 5 lines
Bye, Peter Korsgaard _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
PATCH 3/4 package/pkg-generic.mk: legal-info: proper double-dollar
In reply to Arnout Vandecappelle via buildrootEverything inside the generic-package macro should be double-dollared, except for $(1) $(2) etc. There was still a $(call ...) that was not double-dollared in the legal-info target. The result is that OVERRIDE_SRCDIR isn't actually qstrip'ed.
Double dollar the $(call ...) like everywhere else.
--- package/pkg-generic.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
package/pkg-generic.mk +1 -1
@@ -1164,7 +1164,7 @@ ifneq ($$($(2)_OVERRIDE_SRCDIR),) $$(Q)rm -rf $$($(2)_BUILDDIR)/.legal-info-rsync $$(Q)mkdir -p $$($(2)_BUILDDIR)/.legal-info-rsync $$(Q)rsync -au --chmod=u=rwX,go=rX $$(RSYNC_VCS_EXCLUSIONS) \ - $(call qstrip,$$($(2)_OVERRIDE_SRCDIR))/ \ + $$(call qstrip,$$($(2)_OVERRIDE_SRCDIR))/ \ $$($(2)_BUILDDIR)/.legal-info-rsync/ $$(call prepare-per-package-directory,$$(BR2_GZIP_HOST_DEPENDENCY) $$(BR2_TAR_HOST_DEPENDENCY)) $$(Q)mkdir -p $$($(2)_REDIST_SOURCES_DIR)
Signature · 6 lines
2.46.0 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Re: [Buildroot] [PATCH 3/4] package/pkg-generic.mk: legal-info: proper double-dollar
Quoted 7 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Arnout" == Arnout Vandecappelle via buildroot <[email protected]> writes:
Everything inside the generic-package macro should be double-dollared, except for $(1) $(2) etc. There was still a $(call ...) that was not double-dollared in the legal-info target. The result is that
OVERRIDE_SRCDIRisn't actually qstrip'ed.
Quoted 5 lines
Double dollar the $(call ...) like everywhere else.
Signed-off-by Arnout Vandecappelle <[email protected]>Cc Nicolas Carrier <[email protected]>Reported-by Yann E. MORIN <[email protected]>
Committed to 2024.08.x, thanks.
Signature · 5 lines
Bye, Peter Korsgaard _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
PATCH 4/4 package/pkg-generic.mk: remove set -x in mk_tar_gz call
In reply to Arnout Vandecappelle via buildrootThe set -x was added for debugging, and forgotten to be removed afterwards. Remove it now.
--- package/pkg-generic.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
package/pkg-generic.mk +1 -1
@@ -1168,7 +1168,7 @@ ifneq ($$($(2)_OVERRIDE_SRCDIR),) $$($(2)_BUILDDIR)/.legal-info-rsync/ $$(call prepare-per-package-directory,$$(BR2_GZIP_HOST_DEPENDENCY) $$(BR2_TAR_HOST_DEPENDENCY)) $$(Q)mkdir -p $$($(2)_REDIST_SOURCES_DIR) - $$(Q). support/download/helpers; set -x; cd $$($(2)_BUILDDIR); TAR=$$(TAR) mk_tar_gz \ + $$(Q). support/download/helpers; cd $$($(2)_BUILDDIR); TAR=$$(TAR) mk_tar_gz \ $$($(2)_BUILDDIR)/.legal-info-rsync/ \ $$($(2)_BASENAME_RAW) \ @0 \
Signature · 6 lines
2.46.0 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Re: [Buildroot] [PATCH 4/4] package/pkg-generic.mk: remove set -x in mk_tar_gz call
Quoted 6 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Arnout" == Arnout Vandecappelle via buildroot <[email protected]> writes:
The set -x was added for debugging, and forgotten to be removed afterwards. Remove it now.
Signed-off-by Arnout Vandecappelle <[email protected]>
Committed to 2024.08.x, thanks.
Signature · 5 lines
Bye, Peter Korsgaard _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Yann E. MORIN
AppliedArnout, All,
On 2024-09-14 11:54 +0200, Arnout Vandecappelle via buildroot spake thusly:
Quoted 10 lines
Commit
aacca7f0639bac6bb3fb262d0b1738c4387edeb0introduced the possibility to also create tarballs for packages that are local or overridden (i.e., with a custom version). However, it forgot to create the directory in which that tarball is stored. The original patch did, but it was reworked by Arnout to usemk_tar_gzinstead of tar directly, and the mkdir was dropped there.This failure was silent because the
mk_tar_gzfunction doesn't exit on error. The following error was printed but ignored:
Quoted 7 lines
support/download/helpers: line 68: .../legal-info/sources/busybox-custom/busybox-custom.tar.gz: No such file or directory
Create the directory before calling
mk_tar_gz.Signed-off-by Arnout Vandecappelle <[email protected]>Cc Nicolas Carrier <[email protected]>Reported-by Yann E. MORIN <[email protected]>
You confused me with the other me. ;-)
Applied to master with the proper reported-by assignment, thanks.
Regards,
Yann E. MORIN.
Quoted 23 lines
--- package/pkg-generic.mk | 1 + 1 file changed, 1 insertion(+)package/pkg-generic.mk +1
-0@@ -1163,6 +1163,7 @@ ifneq ($$($(2)_OVERRIDE_SRCDIR),) $$(Q)rsync -au --chmod=u=rwX,go=rX $$(RSYNC_VCS_EXCLUSIONS) \ $(call qstrip,$$($(2)_OVERRIDE_SRCDIR))/ \ $$($(2)_BUILDDIR)/.legal-info-rsync/ + $$(Q)mkdir -p $$($(2)_REDIST_SOURCES_DIR) $$(Q). support/download/helpers; set -x; cd $$($(2)_BUILDDIR); TAR=$$(TAR) mk_tar_gz \ $$($(2)_BUILDDIR)/.legal-info-rsync/ \ $$($(2)_BASENAME_RAW) \Signature · 6 lines
2.46.0 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Signature · 10 lines
.-----------------.--------------------.------------------.--------------------. | Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: | | +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ | | +33 561 099 427 `------------.-------: X AGAINST | \e/ There is no | | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. | '------------------------------^-------^------------------^--------------------' _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Quoted 12 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Arnout" == Arnout Vandecappelle via buildroot <[email protected]> writes:
Commit
aacca7f0639bac6bb3fb262d0b1738c4387edeb0introduced the possibility to also create tarballs for packages that are local or overridden (i.e., with a custom version). However, it forgot to create the directory in which that tarball is stored. The original patch did, but it was reworked by Arnout to usemk_tar_gzinstead of tar directly, and the mkdir was dropped there.This failure was silent because the
mk_tar_gzfunction doesn't exit on error. The following error was printed but ignored:
Quoted 7 lines
support/download/helpers: line 68: .../legal-info/sources/busybox-custom/busybox-custom.tar.gz: No such file or directory
Create the directory before calling
mk_tar_gz.Signed-off-by Arnout Vandecappelle <[email protected]>Cc Nicolas Carrier <[email protected]>Reported-by Yann E. MORIN <[email protected]>
Committed to 2024.08.x, thanks.
Signature · 5 lines
Bye, Peter Korsgaard _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot