All of lore.kernel.org
 help / color / mirror / Atom feed
From: Florian Fainelli <f.fainelli@gmail.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH RFC] legal-info: add option to store manifest in rootfs
Date: Thu, 26 Apr 2018 14:47:15 -0700	[thread overview]
Message-ID: <a0f7d1db-a941-85cd-e8c6-a1f56c61860f@gmail.com> (raw)
In-Reply-To: <20180426193252.19616-1-yann.morin.1998@free.fr>

Hi Yann,

On 04/26/2018 12:32 PM, Yann E. MORIN wrote:
> Some users want to be able to easily ship the manifest of the legal-info
> directly in the target filesystem.
> 
> Those users currently hack their ways around, usign a post-build script
> that calls back to generate legal-info; this is a bit hackish...
> 
> Add an option to that effect.
> 
> Reported-by: Florian Fainelli <f.fainelli@gmail.com>
> Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
> Cc: Florian Fainelli <f.fainelli@gmail.com>
> Cc: Luca Ceresoli <luca@lucaceresoli.net>
> Cc: Thomas Petazzoni <thomas.petazzoni@bootlin.com>

Tested-by: Florian Fainelli <f.fainelli@gmail.com>

Thanks for the quick patch!

> ---
>  Config.in | 8 ++++++++
>  Makefile  | 7 ++++++-
>  2 files changed, 14 insertions(+), 1 deletion(-)
> 
> diff --git a/Config.in b/Config.in
> index 62d2dc3473..d6a2c8930c 100644
> --- a/Config.in
> +++ b/Config.in
> @@ -692,6 +692,14 @@ config BR2_REPRODUCIBLE
>  	  This is labeled as an experimental feature, as not all
>  	  packages behave properly to ensure reproducibility.
>  
> +config BR2_LEGAL_IN_TARGET
> +	bool "Include legal-info manifest in target"
> +	help
> +	  If you say 'y' here, then the listing of all the packages
> +	  included in the build, as well as their version, license(s),
> +	  upstrem URL, etc.. will be stored in a manifest file in the
> +	  rootfs, in the file: /usr/share/doc/legal-info/manifest.csv
> +
>  endmenu
>  
>  comment "Security Hardening Options"
> diff --git a/Makefile b/Makefile
> index 54f940659c..7bff89a36f 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -688,7 +688,7 @@ $(TARGETS_ROOTFS): target-finalize
>  target-finalize: ROOTFS=
>  
>  .PHONY: target-finalize
> -target-finalize: $(PACKAGES)
> +target-finalize: $(PACKAGES) $(if $(BR2_LEGAL_IN_TARGET),legal-info)
>  	@$(call MESSAGE,"Finalizing target directory")
>  	# Check files that are touched by more than one package
>  	./support/scripts/check-uniq-files -t target $(BUILD_DIR)/packages-file-list.txt
> @@ -746,6 +746,11 @@ endif
>  	@$(call MESSAGE,"Sanitizing RPATH in target tree")
>  	$(TOPDIR)/support/scripts/fix-rpath target
>  
> +ifeq ($(BR2_LEGAL_IN_TARGET),y)
> +	$(INSTALL) -D -m 0644 $(LEGAL_MANIFEST_CSV_TARGET) \
> +		$(TARGET_DIR)/usr/share/doc/legal-info/$(notdir $(LEGAL_MANIFEST_CSV_TARGET))
> +endif
> +
>  	@$(foreach d, $(call qstrip,$(BR2_ROOTFS_OVERLAY)), \
>  		$(call MESSAGE,"Copying overlay $(d)"); \
>  		rsync -a --ignore-times --keep-dirlinks $(RSYNC_VCS_EXCLUSIONS) \
> 


-- 
Florian

  reply	other threads:[~2018-04-26 21:47 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-26 19:32 [Buildroot] [PATCH RFC] legal-info: add option to store manifest in rootfs Yann E. MORIN
2018-04-26 21:47 ` Florian Fainelli [this message]
2018-04-27 13:46 ` Thomas Petazzoni
2018-04-27 16:14   ` Florian Fainelli
2018-04-27 16:31     ` Yann E. MORIN
2018-04-27 16:41       ` Florian Fainelli
2018-04-27 16:33   ` Luca Ceresoli
2018-04-27 16:45     ` Florian Fainelli
2018-04-27 20:02     ` Yann E. MORIN
2018-04-27 21:23       ` Luca Ceresoli
2018-04-27 21:39         ` Florian Fainelli
2018-04-28 10:20           ` Thomas Petazzoni
2018-04-30 19:16             ` Florian Fainelli
2018-04-28 15:15           ` Yann E. MORIN

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=a0f7d1db-a941-85cd-e8c6-a1f56c61860f@gmail.com \
    --to=f.fainelli@gmail.com \
    --cc=buildroot@busybox.net \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.