mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
* [ptxdist] [PATCH v3] image_tgz: Make label optional
@ 2014-04-17 15:11 jon
  2014-04-22 15:58 ` Jon Ringle
  2014-04-22 16:08 ` Michael Olbrich
  0 siblings, 2 replies; 9+ messages in thread
From: jon @ 2014-04-17 15:11 UTC (permalink / raw)
  To: ptxdist; +Cc: Jon Ringle

From: Jon Ringle <jringle@gridpoint.com>

Signed-off-by: Jon Ringle <jringle@gridpoint.com>
---
 platforms/image_tgz.in    | 23 +++++++++++++++++++++--
 rules/post/image_tgz.make |  8 ++++++--
 2 files changed, 27 insertions(+), 4 deletions(-)

diff --git a/platforms/image_tgz.in b/platforms/image_tgz.in
index 17b0aed..c583bbc 100644
--- a/platforms/image_tgz.in
+++ b/platforms/image_tgz.in
@@ -1,8 +1,27 @@
 ## SECTION=image
 
-config IMAGE_TGZ
+menuconfig IMAGE_TGZ
 	bool
-	prompt "Generate images/root.tgz"
+	prompt "Generate images/root.tgz      "
 	help
 	  Build a tar.gz archive of the root filesystem, containing the
 	  right owner/group and access permissions.
+
+if IMAGE_TGZ
+
+config IMAGE_TGZ_INCLUDE_LABEL
+	bool
+	prompt "Include label"
+	help
+	  Create tgz image with a label
+
+if IMAGE_TGZ_INCLUDE_LABEL
+config IMAGE_TGZ_LABEL
+	string
+	prompt "label"
+	default "${PTXCONF_PROJECT_VENDOR}-${PTXCONF_PROJECT}${PTXCONF_PROJECT_VERSION}"
+	help
+	  This string gets expanded to form the label. An empty string produces no label.
+
+endif
+endif
diff --git a/rules/post/image_tgz.make b/rules/post/image_tgz.make
index 019077d..6211822 100644
--- a/rules/post/image_tgz.make
+++ b/rules/post/image_tgz.make
@@ -10,12 +10,16 @@
 
 SEL_ROOTFS-$(PTXCONF_IMAGE_TGZ)		+= $(IMAGEDIR)/root.tgz
 
+ifdef PTXCONF_IMAGE_TGZ_LABEL
+IMAGE_TGZ_LABEL="--label $(PTXCONF_IMAGE_TGZ_LABEL)"
+endif
+
 ifdef PTXCONF_IMAGE_TGZ
 $(IMAGEDIR)/root.tgz: $(STATEDIR)/image_working_dir
-	@echo -n "Creating root.tgz from working dir with label..."
+	@echo -n "Creating root.tgz from working dir: ${IMAGE_TGZ_LABEL} "
 	@cd $(image/work_dir);							\
 	(awk -F: $(DOPERMISSIONS) $(image/permissions) &&		\
-	(	echo -n "tar --label '${PTXCONF_PROJECT_VENDOR}-${PTXCONF_PROJECT}${PTXCONF_PROJECT_VERSION}' -zcf ";	\
+	(	echo -n "tar ${IMAGE_TGZ_LABEL} -zcf ";	\
 		echo -n "$@ ." )					\
 	) | $(FAKEROOT) --
 	@echo "done."
-- 
1.8.5.4


-- 
ptxdist mailing list
ptxdist@pengutronix.de

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

* Re: [ptxdist] [PATCH v3] image_tgz: Make label optional
  2014-04-17 15:11 [ptxdist] [PATCH v3] image_tgz: Make label optional jon
@ 2014-04-22 15:58 ` Jon Ringle
  2014-04-22 16:08 ` Michael Olbrich
  1 sibling, 0 replies; 9+ messages in thread
From: Jon Ringle @ 2014-04-22 15:58 UTC (permalink / raw)
  To: ptxdist

ping...

On Thu, Apr 17, 2014 at 11:11 AM,  <jon@ringle.org> wrote:
> From: Jon Ringle <jringle@gridpoint.com>
>
> Signed-off-by: Jon Ringle <jringle@gridpoint.com>
> ---
>  platforms/image_tgz.in    | 23 +++++++++++++++++++++--
>  rules/post/image_tgz.make |  8 ++++++--
>  2 files changed, 27 insertions(+), 4 deletions(-)
>
> diff --git a/platforms/image_tgz.in b/platforms/image_tgz.in
> index 17b0aed..c583bbc 100644
> --- a/platforms/image_tgz.in
> +++ b/platforms/image_tgz.in
> @@ -1,8 +1,27 @@
>  ## SECTION=image
>
> -config IMAGE_TGZ
> +menuconfig IMAGE_TGZ
>         bool
> -       prompt "Generate images/root.tgz"
> +       prompt "Generate images/root.tgz      "
>         help
>           Build a tar.gz archive of the root filesystem, containing the
>           right owner/group and access permissions.
> +
> +if IMAGE_TGZ
> +
> +config IMAGE_TGZ_INCLUDE_LABEL
> +       bool
> +       prompt "Include label"
> +       help
> +         Create tgz image with a label
> +
> +if IMAGE_TGZ_INCLUDE_LABEL
> +config IMAGE_TGZ_LABEL
> +       string
> +       prompt "label"
> +       default "${PTXCONF_PROJECT_VENDOR}-${PTXCONF_PROJECT}${PTXCONF_PROJECT_VERSION}"
> +       help
> +         This string gets expanded to form the label. An empty string produces no label.
> +
> +endif
> +endif
> diff --git a/rules/post/image_tgz.make b/rules/post/image_tgz.make
> index 019077d..6211822 100644
> --- a/rules/post/image_tgz.make
> +++ b/rules/post/image_tgz.make
> @@ -10,12 +10,16 @@
>
>  SEL_ROOTFS-$(PTXCONF_IMAGE_TGZ)                += $(IMAGEDIR)/root.tgz
>
> +ifdef PTXCONF_IMAGE_TGZ_LABEL
> +IMAGE_TGZ_LABEL="--label $(PTXCONF_IMAGE_TGZ_LABEL)"
> +endif
> +
>  ifdef PTXCONF_IMAGE_TGZ
>  $(IMAGEDIR)/root.tgz: $(STATEDIR)/image_working_dir
> -       @echo -n "Creating root.tgz from working dir with label..."
> +       @echo -n "Creating root.tgz from working dir: ${IMAGE_TGZ_LABEL} "
>         @cd $(image/work_dir);                                                  \
>         (awk -F: $(DOPERMISSIONS) $(image/permissions) &&               \
> -       (       echo -n "tar --label '${PTXCONF_PROJECT_VENDOR}-${PTXCONF_PROJECT}${PTXCONF_PROJECT_VERSION}' -zcf ";   \
> +       (       echo -n "tar ${IMAGE_TGZ_LABEL} -zcf "; \
>                 echo -n "$@ ." )                                        \
>         ) | $(FAKEROOT) --
>         @echo "done."
> --
> 1.8.5.4
>

-- 
ptxdist mailing list
ptxdist@pengutronix.de

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

* Re: [ptxdist] [PATCH v3] image_tgz: Make label optional
  2014-04-17 15:11 [ptxdist] [PATCH v3] image_tgz: Make label optional jon
  2014-04-22 15:58 ` Jon Ringle
@ 2014-04-22 16:08 ` Michael Olbrich
  1 sibling, 0 replies; 9+ messages in thread
From: Michael Olbrich @ 2014-04-22 16:08 UTC (permalink / raw)
  To: ptxdist

On Thu, Apr 17, 2014 at 11:11:31AM -0400, jon@ringle.org wrote:
> From: Jon Ringle <jringle@gridpoint.com>
> 
> Signed-off-by: Jon Ringle <jringle@gridpoint.com>
> ---
>  platforms/image_tgz.in    | 23 +++++++++++++++++++++--
>  rules/post/image_tgz.make |  8 ++++++--
>  2 files changed, 27 insertions(+), 4 deletions(-)
> 
> diff --git a/platforms/image_tgz.in b/platforms/image_tgz.in
> index 17b0aed..c583bbc 100644
> --- a/platforms/image_tgz.in
> +++ b/platforms/image_tgz.in
> @@ -1,8 +1,27 @@
>  ## SECTION=image
>  
> -config IMAGE_TGZ
> +menuconfig IMAGE_TGZ
>  	bool
> -	prompt "Generate images/root.tgz"
> +	prompt "Generate images/root.tgz      "
>  	help
>  	  Build a tar.gz archive of the root filesystem, containing the
>  	  right owner/group and access permissions.
> +
> +if IMAGE_TGZ
> +
> +config IMAGE_TGZ_INCLUDE_LABEL
> +	bool
> +	prompt "Include label"
> +	help
> +	  Create tgz image with a label

You misunderstood. What I meant was to drop this option, and then...

> +
> +if IMAGE_TGZ_INCLUDE_LABEL
> +config IMAGE_TGZ_LABEL
> +	string
> +	prompt "label"
> +	default "${PTXCONF_PROJECT_VENDOR}-${PTXCONF_PROJECT}${PTXCONF_PROJECT_VERSION}"
> +	help
> +	  This string gets expanded to form the label. An empty string produces no label.
> +
> +endif
> +endif
> diff --git a/rules/post/image_tgz.make b/rules/post/image_tgz.make
> index 019077d..6211822 100644
> --- a/rules/post/image_tgz.make
> +++ b/rules/post/image_tgz.make
> @@ -10,12 +10,16 @@
>  
>  SEL_ROOTFS-$(PTXCONF_IMAGE_TGZ)		+= $(IMAGEDIR)/root.tgz
>  

... check for an empty string here:

ifneq ($(call remove_quotes,$(PTXCONF_IMAGE_TGZ_LABEL)),)

Michael

> +ifdef PTXCONF_IMAGE_TGZ_LABEL
> +IMAGE_TGZ_LABEL="--label $(PTXCONF_IMAGE_TGZ_LABEL)"
> +endif
> +
>  ifdef PTXCONF_IMAGE_TGZ
>  $(IMAGEDIR)/root.tgz: $(STATEDIR)/image_working_dir
> -	@echo -n "Creating root.tgz from working dir with label..."
> +	@echo -n "Creating root.tgz from working dir: ${IMAGE_TGZ_LABEL} "
>  	@cd $(image/work_dir);							\
>  	(awk -F: $(DOPERMISSIONS) $(image/permissions) &&		\
> -	(	echo -n "tar --label '${PTXCONF_PROJECT_VENDOR}-${PTXCONF_PROJECT}${PTXCONF_PROJECT_VERSION}' -zcf ";	\
> +	(	echo -n "tar ${IMAGE_TGZ_LABEL} -zcf ";	\
>  		echo -n "$@ ." )					\
>  	) | $(FAKEROOT) --
>  	@echo "done."
> -- 
> 1.8.5.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] 9+ messages in thread

* Re: [ptxdist] [PATCH v3] image_tgz: Make label optional
  2014-05-26  7:13     ` Alexander Dahl
@ 2014-06-02  9:17       ` Michael Olbrich
  0 siblings, 0 replies; 9+ messages in thread
From: Michael Olbrich @ 2014-06-02  9:17 UTC (permalink / raw)
  To: ptxdist

On Mon, May 26, 2014 at 09:13:25AM +0200, Alexander Dahl wrote:
> Am 2014-05-21 17:03, schrieb Alexander Dahl:
> > I'm not sure how to fix this, no time anymore today, so I let you know
> > this way.
> 
> Though I'm not entirely certain about some things in Makefiles I have a
> solution which works for me:
> 
> 
> % colordiff -bus ~/src/ptxdist/rules/post/image_tgz.make
> rules/post/image_tgz.make                                        :(
> --- /home/adahl/src/ptxdist/rules/post/image_tgz.make   2014-04-28
> 12:59:13.430666724 +0200
> +++ rules/post/image_tgz.make   2014-05-26 09:00:10.981436285 +0200
> @@ -13,7 +13,7 @@
>  ifdef PTXCONF_IMAGE_TGZ
>  IMAGE_TGZ_LABEL := $(call remove_quotes,$(PTXCONF_IMAGE_TGZ_LABEL))
>  ifneq ($(IMAGE_TGZ_LABEL),)
> -IMAGE_TGZ_LABEL_ARGS="--label '$(IMAGE_TGZ_LABEL)'"
> +IMAGE_TGZ_LABEL_ARGS=--label '$(IMAGE_TGZ_LABEL)'
>  endif
> 
>  $(IMAGEDIR)/root.tgz: $(STATEDIR)/image_working_dir
> 
> 
> So I removed the quotes when assigning IMAGE_TGZ_LABEL_ARGS because
> later in line 23 ${IMAGE_TGZ_LABEL_ARGS} was expanded to "something"
> which led to 
> 
> echo -n "tar "--label 'foo bar baz-myproject-2014.03.1'" -zcf ";
> 
> which is obviously wrong. With my change this is
> 
> echo -n "tar --label 'foo bar baz-myproject-2014.03.1' -zcf ";
> 
> But as I said, I'm not sure if this assignement is valid in Makefiles
> and I don't know (yet) what's the difference between $(something) and
> ${something} in a Makefile.

I don't think there is a difference between $(something) and ${something}
in a Makefile. This is the correct fix. I've pushed it.

Thanks,
Michael

-- 
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] 9+ messages in thread

* Re: [ptxdist] [PATCH v3] image_tgz: Make label optional
  2014-05-21 15:03   ` Alexander Dahl
@ 2014-05-26  7:13     ` Alexander Dahl
  2014-06-02  9:17       ` Michael Olbrich
  0 siblings, 1 reply; 9+ messages in thread
From: Alexander Dahl @ 2014-05-26  7:13 UTC (permalink / raw)
  To: ptxdist

Hello, 

Am 2014-05-21 17:03, schrieb Alexander Dahl:
> I'm not sure how to fix this, no time anymore today, so I let you know
> this way.

Though I'm not entirely certain about some things in Makefiles I have a
solution which works for me:


% colordiff -bus ~/src/ptxdist/rules/post/image_tgz.make
rules/post/image_tgz.make                                        :(
--- /home/adahl/src/ptxdist/rules/post/image_tgz.make   2014-04-28
12:59:13.430666724 +0200
+++ rules/post/image_tgz.make   2014-05-26 09:00:10.981436285 +0200
@@ -13,7 +13,7 @@
 ifdef PTXCONF_IMAGE_TGZ
 IMAGE_TGZ_LABEL := $(call remove_quotes,$(PTXCONF_IMAGE_TGZ_LABEL))
 ifneq ($(IMAGE_TGZ_LABEL),)
-IMAGE_TGZ_LABEL_ARGS="--label '$(IMAGE_TGZ_LABEL)'"
+IMAGE_TGZ_LABEL_ARGS=--label '$(IMAGE_TGZ_LABEL)'
 endif

 $(IMAGEDIR)/root.tgz: $(STATEDIR)/image_working_dir


So I removed the quotes when assigning IMAGE_TGZ_LABEL_ARGS because
later in line 23 ${IMAGE_TGZ_LABEL_ARGS} was expanded to "something"
which led to 

echo -n "tar "--label 'foo bar baz-myproject-2014.03.1'" -zcf ";

which is obviously wrong. With my change this is

echo -n "tar --label 'foo bar baz-myproject-2014.03.1' -zcf ";

But as I said, I'm not sure if this assignement is valid in Makefiles
and I don't know (yet) what's the difference between $(something) and
${something} in a Makefile.

Greets
Alex

-- 
»With the first link, the chain is forged. The first speech censured,
the first thought forbidden, the first freedom denied, chains us all
irrevocably.« (Jean-Luc Picard, quoting Judge Aaron Satie)
*** GnuPG-FP: 02C8 A590 7FE5 CA5F 3601  D1D5 8FBA 7744 CC87 10D0 ***

-- 
ptxdist mailing list
ptxdist@pengutronix.de

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

* Re: [ptxdist] [PATCH v3] image_tgz: Make label optional
  2014-04-23  6:52 ` Michael Olbrich
  2014-04-23 12:00   ` Jon Ringle
@ 2014-05-21 15:03   ` Alexander Dahl
  2014-05-26  7:13     ` Alexander Dahl
  1 sibling, 1 reply; 9+ messages in thread
From: Alexander Dahl @ 2014-05-21 15:03 UTC (permalink / raw)
  To: ptxdist

Hei hei, 

Am 2014-04-23 08:52, schrieb Michael Olbrich:
> On Tue, Apr 22, 2014 at 12:21:59PM -0400, jon@ringle.org wrote:
>> From: Jon Ringle <jringle@gridpoint.com>
>>
>> Signed-off-by: Jon Ringle <jringle@gridpoint.com>
> 
> Thanks, applied with a followup patch. It still looks good here. Can you
> check that I didn't break anything for you?

Breaks here. Introduced after nigration to ptxdist 2014.05.0 is

PTXCONF_IMAGE_TGZ_LABEL="${PTXCONF_PROJECT_VENDOR}-${PTXCONF_PROJECT}${PTXCONF_PROJECT_VERSION}"

${PTXCONF_PROJECT_VENDOR} contains spaces here.

Although in rules/post/image_tgz.make line 16 there are single quotes
around the argument to label, the output of `ptxdist images` is
something like:


Creating root.tgz from working dir with label "foo bar
baz-myproject-2014.03.1"... tar: bar: Cannot stat: No such file or
directory
tar: baz-myproject-2014.03.1: Cannot stat: No such file or directory
tar: Exiting with failure status due to previous errors


I'm not sure how to fix this, no time anymore today, so I let you know
this way.

Greets
Alex

-- 
»With the first link, the chain is forged. The first speech censured,
the first thought forbidden, the first freedom denied, chains us all
irrevocably.« (Jean-Luc Picard, quoting Judge Aaron Satie)
*** GnuPG-FP: 02C8 A590 7FE5 CA5F 3601  D1D5 8FBA 7744 CC87 10D0 ***

-- 
ptxdist mailing list
ptxdist@pengutronix.de

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

* Re: [ptxdist] [PATCH v3] image_tgz: Make label optional
  2014-04-23  6:52 ` Michael Olbrich
@ 2014-04-23 12:00   ` Jon Ringle
  2014-05-21 15:03   ` Alexander Dahl
  1 sibling, 0 replies; 9+ messages in thread
From: Jon Ringle @ 2014-04-23 12:00 UTC (permalink / raw)
  To: ptxdist

On Wed, Apr 23, 2014 at 2:52 AM, Michael Olbrich
<m.olbrich@pengutronix.de> wrote:
> On Tue, Apr 22, 2014 at 12:21:59PM -0400, jon@ringle.org wrote:
>> From: Jon Ringle <jringle@gridpoint.com>
>>
>> Signed-off-by: Jon Ringle <jringle@gridpoint.com>
>
> Thanks, applied with a followup patch. It still looks good here. Can you
> check that I didn't break anything for you?

Tested with and w/o label and working as expected.
Thanks!

>
> Michael
>
>> ---
>>  platforms/image_tgz.in    | 14 ++++++++++++--
>>  rules/post/image_tgz.make |  8 ++++++--
>>  2 files changed, 18 insertions(+), 4 deletions(-)
>>
>> diff --git a/platforms/image_tgz.in b/platforms/image_tgz.in
>> index 17b0aed..8cda6f6 100644
>> --- a/platforms/image_tgz.in
>> +++ b/platforms/image_tgz.in
>> @@ -1,8 +1,18 @@
>>  ## SECTION=image
>>
>> -config IMAGE_TGZ
>> +menuconfig IMAGE_TGZ
>>       bool
>> -     prompt "Generate images/root.tgz"
>> +     prompt "Generate images/root.tgz      "
>>       help
>>         Build a tar.gz archive of the root filesystem, containing the
>>         right owner/group and access permissions.
>> +
>> +if IMAGE_TGZ
>> +config IMAGE_TGZ_LABEL
>> +     string
>> +     prompt "label"
>> +     default "${PTXCONF_PROJECT_VENDOR}-${PTXCONF_PROJECT}${PTXCONF_PROJECT_VERSION}"
>> +     help
>> +       This string gets expanded to form the label. An empty string produces no label.
>> +
>> +endif
>> diff --git a/rules/post/image_tgz.make b/rules/post/image_tgz.make
>> index 019077d..bbf3edf 100644
>> --- a/rules/post/image_tgz.make
>> +++ b/rules/post/image_tgz.make
>> @@ -11,11 +11,15 @@
>>  SEL_ROOTFS-$(PTXCONF_IMAGE_TGZ)              += $(IMAGEDIR)/root.tgz
>>
>>  ifdef PTXCONF_IMAGE_TGZ
>> +ifneq ($(call remove_quotes,$(PTXCONF_IMAGE_TGZ_LABEL)),)
>> +IMAGE_TGZ_LABEL="--label $(PTXCONF_IMAGE_TGZ_LABEL)"
>> +endif
>> +
>>  $(IMAGEDIR)/root.tgz: $(STATEDIR)/image_working_dir
>> -     @echo -n "Creating root.tgz from working dir with label..."
>> +     @echo -n "Creating root.tgz from working dir: ${IMAGE_TGZ_LABEL} "
>>       @cd $(image/work_dir);                                                  \
>>       (awk -F: $(DOPERMISSIONS) $(image/permissions) &&               \
>> -     (       echo -n "tar --label '${PTXCONF_PROJECT_VENDOR}-${PTXCONF_PROJECT}${PTXCONF_PROJECT_VERSION}' -zcf ";   \
>> +     (       echo -n "tar ${IMAGE_TGZ_LABEL} -zcf "; \
>>               echo -n "$@ ." )                                        \
>>       ) | $(FAKEROOT) --
>>       @echo "done."
>> --
>> 1.8.5.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

-- 
ptxdist mailing list
ptxdist@pengutronix.de

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

* Re: [ptxdist] [PATCH v3] image_tgz: Make label optional
  2014-04-22 16:21 jon
@ 2014-04-23  6:52 ` Michael Olbrich
  2014-04-23 12:00   ` Jon Ringle
  2014-05-21 15:03   ` Alexander Dahl
  0 siblings, 2 replies; 9+ messages in thread
From: Michael Olbrich @ 2014-04-23  6:52 UTC (permalink / raw)
  To: ptxdist

On Tue, Apr 22, 2014 at 12:21:59PM -0400, jon@ringle.org wrote:
> From: Jon Ringle <jringle@gridpoint.com>
> 
> Signed-off-by: Jon Ringle <jringle@gridpoint.com>

Thanks, applied with a followup patch. It still looks good here. Can you
check that I didn't break anything for you?

Michael

> ---
>  platforms/image_tgz.in    | 14 ++++++++++++--
>  rules/post/image_tgz.make |  8 ++++++--
>  2 files changed, 18 insertions(+), 4 deletions(-)
> 
> diff --git a/platforms/image_tgz.in b/platforms/image_tgz.in
> index 17b0aed..8cda6f6 100644
> --- a/platforms/image_tgz.in
> +++ b/platforms/image_tgz.in
> @@ -1,8 +1,18 @@
>  ## SECTION=image
>  
> -config IMAGE_TGZ
> +menuconfig IMAGE_TGZ
>  	bool
> -	prompt "Generate images/root.tgz"
> +	prompt "Generate images/root.tgz      "
>  	help
>  	  Build a tar.gz archive of the root filesystem, containing the
>  	  right owner/group and access permissions.
> +
> +if IMAGE_TGZ
> +config IMAGE_TGZ_LABEL
> +	string
> +	prompt "label"
> +	default "${PTXCONF_PROJECT_VENDOR}-${PTXCONF_PROJECT}${PTXCONF_PROJECT_VERSION}"
> +	help
> +	  This string gets expanded to form the label. An empty string produces no label.
> +
> +endif
> diff --git a/rules/post/image_tgz.make b/rules/post/image_tgz.make
> index 019077d..bbf3edf 100644
> --- a/rules/post/image_tgz.make
> +++ b/rules/post/image_tgz.make
> @@ -11,11 +11,15 @@
>  SEL_ROOTFS-$(PTXCONF_IMAGE_TGZ)		+= $(IMAGEDIR)/root.tgz
>  
>  ifdef PTXCONF_IMAGE_TGZ
> +ifneq ($(call remove_quotes,$(PTXCONF_IMAGE_TGZ_LABEL)),)
> +IMAGE_TGZ_LABEL="--label $(PTXCONF_IMAGE_TGZ_LABEL)"
> +endif
> +
>  $(IMAGEDIR)/root.tgz: $(STATEDIR)/image_working_dir
> -	@echo -n "Creating root.tgz from working dir with label..."
> +	@echo -n "Creating root.tgz from working dir: ${IMAGE_TGZ_LABEL} "
>  	@cd $(image/work_dir);							\
>  	(awk -F: $(DOPERMISSIONS) $(image/permissions) &&		\
> -	(	echo -n "tar --label '${PTXCONF_PROJECT_VENDOR}-${PTXCONF_PROJECT}${PTXCONF_PROJECT_VERSION}' -zcf ";	\
> +	(	echo -n "tar ${IMAGE_TGZ_LABEL} -zcf ";	\
>  		echo -n "$@ ." )					\
>  	) | $(FAKEROOT) --
>  	@echo "done."
> -- 
> 1.8.5.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] 9+ messages in thread

* [ptxdist] [PATCH v3] image_tgz: Make label optional
@ 2014-04-22 16:21 jon
  2014-04-23  6:52 ` Michael Olbrich
  0 siblings, 1 reply; 9+ messages in thread
From: jon @ 2014-04-22 16:21 UTC (permalink / raw)
  To: ptxdist; +Cc: Jon Ringle

From: Jon Ringle <jringle@gridpoint.com>

Signed-off-by: Jon Ringle <jringle@gridpoint.com>
---
 platforms/image_tgz.in    | 14 ++++++++++++--
 rules/post/image_tgz.make |  8 ++++++--
 2 files changed, 18 insertions(+), 4 deletions(-)

diff --git a/platforms/image_tgz.in b/platforms/image_tgz.in
index 17b0aed..8cda6f6 100644
--- a/platforms/image_tgz.in
+++ b/platforms/image_tgz.in
@@ -1,8 +1,18 @@
 ## SECTION=image
 
-config IMAGE_TGZ
+menuconfig IMAGE_TGZ
 	bool
-	prompt "Generate images/root.tgz"
+	prompt "Generate images/root.tgz      "
 	help
 	  Build a tar.gz archive of the root filesystem, containing the
 	  right owner/group and access permissions.
+
+if IMAGE_TGZ
+config IMAGE_TGZ_LABEL
+	string
+	prompt "label"
+	default "${PTXCONF_PROJECT_VENDOR}-${PTXCONF_PROJECT}${PTXCONF_PROJECT_VERSION}"
+	help
+	  This string gets expanded to form the label. An empty string produces no label.
+
+endif
diff --git a/rules/post/image_tgz.make b/rules/post/image_tgz.make
index 019077d..bbf3edf 100644
--- a/rules/post/image_tgz.make
+++ b/rules/post/image_tgz.make
@@ -11,11 +11,15 @@
 SEL_ROOTFS-$(PTXCONF_IMAGE_TGZ)		+= $(IMAGEDIR)/root.tgz
 
 ifdef PTXCONF_IMAGE_TGZ
+ifneq ($(call remove_quotes,$(PTXCONF_IMAGE_TGZ_LABEL)),)
+IMAGE_TGZ_LABEL="--label $(PTXCONF_IMAGE_TGZ_LABEL)"
+endif
+
 $(IMAGEDIR)/root.tgz: $(STATEDIR)/image_working_dir
-	@echo -n "Creating root.tgz from working dir with label..."
+	@echo -n "Creating root.tgz from working dir: ${IMAGE_TGZ_LABEL} "
 	@cd $(image/work_dir);							\
 	(awk -F: $(DOPERMISSIONS) $(image/permissions) &&		\
-	(	echo -n "tar --label '${PTXCONF_PROJECT_VENDOR}-${PTXCONF_PROJECT}${PTXCONF_PROJECT_VERSION}' -zcf ";	\
+	(	echo -n "tar ${IMAGE_TGZ_LABEL} -zcf ";	\
 		echo -n "$@ ." )					\
 	) | $(FAKEROOT) --
 	@echo "done."
-- 
1.8.5.4


-- 
ptxdist mailing list
ptxdist@pengutronix.de

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

end of thread, other threads:[~2014-06-02  9:17 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-04-17 15:11 [ptxdist] [PATCH v3] image_tgz: Make label optional jon
2014-04-22 15:58 ` Jon Ringle
2014-04-22 16:08 ` Michael Olbrich
2014-04-22 16:21 jon
2014-04-23  6:52 ` Michael Olbrich
2014-04-23 12:00   ` Jon Ringle
2014-05-21 15:03   ` Alexander Dahl
2014-05-26  7:13     ` Alexander Dahl
2014-06-02  9:17       ` Michael Olbrich

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