* [ptxdist] [PATCH] image_tgz: Make label optional
@ 2014-04-16 13:12 jon
0 siblings, 0 replies; 3+ messages in thread
From: jon @ 2014-04-16 13:12 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 | 17 +++++++++++++++++
rules/post/image_tgz.make | 8 ++++++--
2 files changed, 23 insertions(+), 2 deletions(-)
diff --git a/platforms/image_tgz.in b/platforms/image_tgz.in
index 17b0aed..5843168 100644
--- a/platforms/image_tgz.in
+++ b/platforms/image_tgz.in
@@ -6,3 +6,20 @@ config IMAGE_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}"
+
+endif
+endif
diff --git a/rules/post/image_tgz.make b/rules/post/image_tgz.make
index 019077d..f72b244 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] 3+ messages in thread
* [ptxdist] [PATCH] image_tgz: Make label optional
@ 2014-04-16 12:37 jon
2014-04-17 6:24 ` Michael Olbrich
0 siblings, 1 reply; 3+ messages in thread
From: jon @ 2014-04-16 12:37 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 | 17 +++++++++++++++++
rules/post/image_tgz.make | 8 ++++++--
2 files changed, 23 insertions(+), 2 deletions(-)
diff --git a/platforms/image_tgz.in b/platforms/image_tgz.in
index 17b0aed..5843168 100644
--- a/platforms/image_tgz.in
+++ b/platforms/image_tgz.in
@@ -6,3 +6,20 @@ config IMAGE_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}"
+
+endif
+endif
diff --git a/rules/post/image_tgz.make b/rules/post/image_tgz.make
index 019077d..f72b244 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] 3+ messages in thread
* Re: [ptxdist] [PATCH] image_tgz: Make label optional
2014-04-16 12:37 jon
@ 2014-04-17 6:24 ` Michael Olbrich
0 siblings, 0 replies; 3+ messages in thread
From: Michael Olbrich @ 2014-04-17 6:24 UTC (permalink / raw)
To: ptxdist
On Wed, Apr 16, 2014 at 08:37:22AM -0400, jon@ringle.org wrote:
> From: Jon Ringle <jringle@gridpoint.com>
>
> Signed-off-by: Jon Ringle <jringle@gridpoint.com>
> ---
> platforms/image_tgz.in | 17 +++++++++++++++++
> rules/post/image_tgz.make | 8 ++++++--
> 2 files changed, 23 insertions(+), 2 deletions(-)
>
> diff --git a/platforms/image_tgz.in b/platforms/image_tgz.in
> index 17b0aed..5843168 100644
> --- a/platforms/image_tgz.in
> +++ b/platforms/image_tgz.in
> @@ -6,3 +6,20 @@ config IMAGE_TGZ
> help
> Build a tar.gz archive of the root filesystem, containing the
> right owner/group and access permissions.
> +
> +if IMAGE_TGZ
With sub-options IMAGE_TGZ should become a menuconfig
> +
> +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}"
Just one option. Use the help text to clarify that an empty string means no
label.
> +
> +endif
> +endif
> diff --git a/rules/post/image_tgz.make b/rules/post/image_tgz.make
> index 019077d..f72b244 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)\""
I'm pretty sure this is wrong. PTXCONF_IMAGE_TGZ_LABEL already contains
quotes.
Michael
> +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] 3+ messages in thread
end of thread, other threads:[~2014-04-17 6:24 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-04-16 13:12 [ptxdist] [PATCH] image_tgz: Make label optional jon
-- strict thread matches above, loose matches on Subject: below --
2014-04-16 12:37 jon
2014-04-17 6:24 ` Michael Olbrich
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox