From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from mail-qc0-x22a.google.com ([2607:f8b0:400d:c01::22a]) by metis.ext.pengutronix.de with esmtp (Exim 4.72) (envelope-from ) id 1WaPdm-0000FQ-UE for ptxdist@pengutronix.de; Wed, 16 Apr 2014 15:12:39 +0200 Received: by mail-qc0-f170.google.com with SMTP id x13so12208768qcv.29 for ; Wed, 16 Apr 2014 06:12:32 -0700 (PDT) From: jon@ringle.org Date: Wed, 16 Apr 2014 09:12:24 -0400 Message-Id: <1397653944-29276-1-git-send-email-jon@ringle.org> Subject: [ptxdist] [PATCH] image_tgz: Make label optional Reply-To: ptxdist@pengutronix.de List-Id: PTXdist Development Mailing List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: ptxdist-bounces@pengutronix.de Errors-To: ptxdist-bounces@pengutronix.de To: ptxdist@pengutronix.de Cc: Jon Ringle From: Jon Ringle Signed-off-by: Jon Ringle --- 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