From: Thomas Petazzoni via buildroot <buildroot@buildroot.org>
To: "Yann E. MORIN" <yann.morin.1998@free.fr>
Cc: Herve Codina <herve.codina@bootlin.com>, buildroot@buildroot.org
Subject: Re: [Buildroot] [RFC PATCH 1/1] support/download: allow to use part of file in checksum checking
Date: Thu, 27 Jul 2023 22:59:50 +0200 [thread overview]
Message-ID: <20230727225950.22bf4c14@windsurf> (raw)
In-Reply-To: <20230727155944.GF3544423@scaer>
On Thu, 27 Jul 2023 17:59:44 +0200
"Yann E. MORIN" <yann.morin.1998@free.fr> wrote:
> 2. for such packages, add a post-extract hook that prepares the license
> file(s), and register those as _FOO_LICENSE_FILES instead. By using
> code, you can search for patterns rather than depend on constant
> line numbers.
Like:
# The Github repository doesn't contain the source code as-is: it
# contains a tarball with the kernel driver source code, and a
# self-extractible binary for the user-space parts. So we extract both
# below, and also extract the EULA text from the self-extractible binary
define GCNANO_BINARIES_EXTRACT_HELPER
tar --strip-components=1 -xJf $(@D)/gcnano-driver-$(GCNANO_BINARIES_DRIVER_VERSION).tar.xz -C $(@D)
awk 'BEGIN { start = 0; } \
/^EOEULA/ { start = 0; } \
{ if (start) print; } \
/<<EOEULA/ { start = 1; }' \
$(@D)/gcnano-userland-multi-$(GCNANO_BINARIES_USERLAND_VERSION).bin > $(@D)/EULA
cd $(@D) && sh gcnano-userland-multi-$(GCNANO_BINARIES_USERLAND_VERSION).bin --auto-accept
endef
GCNANO_BINARIES_POST_EXTRACT_HOOKS += GCNANO_BINARIES_EXTRACT_HELPER
(which among other things extracts the EULA file, that is used as a
license file)
Best regards,
Thomas
--
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
next prev parent reply other threads:[~2023-07-27 21:00 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-27 12:51 [Buildroot] [RFC PATCH 1/1] support/download: allow to use part of file in checksum checking Herve Codina via buildroot
2023-07-27 15:59 ` Yann E. MORIN
2023-07-27 20:59 ` Thomas Petazzoni via buildroot [this message]
2023-07-28 7:04 ` Herve Codina via buildroot
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230727225950.22bf4c14@windsurf \
--to=buildroot@buildroot.org \
--cc=herve.codina@bootlin.com \
--cc=thomas.petazzoni@bootlin.com \
--cc=yann.morin.1998@free.fr \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox