mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
* [ptxdist] [PATCH] image: Create root.tgz with label
@ 2014-01-19  8:35 jon
  2014-01-20 11:07 ` Michael Olbrich
  0 siblings, 1 reply; 2+ messages in thread
From: jon @ 2014-01-19  8:35 UTC (permalink / raw)
  To: ptxdist; +Cc: Jon Ringle

From: Jon Ringle <jringle@gridpoint.com>

Create the root.tgz with a label in the form:
${PTXCONF_PROJECT_VENDOR}-${PTXCONF_PROJECT}${PTXCONF_PROJECT_VERSION}

This is useful for an automated install script to verify quickly that the
tar is of the right type by doing:

tar --test-label -f root.tgz

Signed-off-by: Jon Ringle <jringle@gridpoint.com>
---
 rules/post/image_tgz.make |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/rules/post/image_tgz.make b/rules/post/image_tgz.make
index 5318143..f7e71d1 100644
--- a/rules/post/image_tgz.make
+++ b/rules/post/image_tgz.make
@@ -12,10 +12,10 @@ SEL_ROOTFS-$(PTXCONF_IMAGE_TGZ)		+= $(IMAGEDIR)/root.tgz
 
 ifdef PTXCONF_IMAGE_TGZ
 $(IMAGEDIR)/root.tgz: $(STATEDIR)/image_working_dir
-	@echo -n "Creating root.tgz from working dir..."
+	@echo -n "Creating root.tgz from working dir with label..."
 	@cd $(image/work_dir);							\
 	(awk -F: $(DOPERMISSIONS) $(image/permissions) &&		\
-	(	echo -n "tar -zcf ";					\
+	(	echo -n "tar --label \"${PTXCONF_PROJECT_VENDOR}-${PTXCONF_PROJECT}${PTXCONF_PROJECT_VERSION}\" -zcf ";					\
 		echo -n "$@ ." )					\
 	) | $(FAKEROOT) --
 	@echo "done."
-- 
1.7.10.4


-- 
ptxdist mailing list
ptxdist@pengutronix.de

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [ptxdist] [PATCH] image: Create root.tgz with label
  2014-01-19  8:35 [ptxdist] [PATCH] image: Create root.tgz with label jon
@ 2014-01-20 11:07 ` Michael Olbrich
  0 siblings, 0 replies; 2+ messages in thread
From: Michael Olbrich @ 2014-01-20 11:07 UTC (permalink / raw)
  To: ptxdist

On Sun, Jan 19, 2014 at 03:35:58AM -0500, jon@ringle.org wrote:
> From: Jon Ringle <jringle@gridpoint.com>
> 
> Create the root.tgz with a label in the form:
> ${PTXCONF_PROJECT_VENDOR}-${PTXCONF_PROJECT}${PTXCONF_PROJECT_VERSION}
> 
> This is useful for an automated install script to verify quickly that the
> tar is of the right type by doing:
> 
> tar --test-label -f root.tgz
> 
> Signed-off-by: Jon Ringle <jringle@gridpoint.com>
> ---
>  rules/post/image_tgz.make |    4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/rules/post/image_tgz.make b/rules/post/image_tgz.make
> index 5318143..f7e71d1 100644
> --- a/rules/post/image_tgz.make
> +++ b/rules/post/image_tgz.make
> @@ -12,10 +12,10 @@ SEL_ROOTFS-$(PTXCONF_IMAGE_TGZ)		+= $(IMAGEDIR)/root.tgz
>  
>  ifdef PTXCONF_IMAGE_TGZ
>  $(IMAGEDIR)/root.tgz: $(STATEDIR)/image_working_dir
> -	@echo -n "Creating root.tgz from working dir..."
> +	@echo -n "Creating root.tgz from working dir with label..."
>  	@cd $(image/work_dir);							\
>  	(awk -F: $(DOPERMISSIONS) $(image/permissions) &&		\
> -	(	echo -n "tar -zcf ";					\
> +	(	echo -n "tar --label \"${PTXCONF_PROJECT_VENDOR}-${PTXCONF_PROJECT}${PTXCONF_PROJECT_VERSION}\" -zcf ";					\

I've changed this to use single quotes to avoid possible shell expansion,
and applied it.

Michael

>  		echo -n "$@ ." )					\
>  	) | $(FAKEROOT) --
>  	@echo "done."
> -- 
> 1.7.10.4
> 
> 
> -- 
> ptxdist mailing list
> ptxdist@pengutronix.de
> 

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

-- 
ptxdist mailing list
ptxdist@pengutronix.de

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-01-20 11:07 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-01-19  8:35 [ptxdist] [PATCH] image: Create root.tgz with label jon
2014-01-20 11:07 ` Michael Olbrich

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox