From patchwork Wed Feb 6 13:23:59 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Angelo Compagnucci X-Patchwork-Id: 1037532 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=busybox.net (client-ip=140.211.166.138; helo=whitealder.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=amarulasolutions.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=amarulasolutions.com header.i=@amarulasolutions.com header.b="SxhMaSvs"; dkim-atps=neutral Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 43vj4h1plmz9sML for ; Thu, 7 Feb 2019 00:30:44 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id BE8BD8685D; Wed, 6 Feb 2019 13:30:42 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id ybkTfm82-5lu; Wed, 6 Feb 2019 13:30:41 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by whitealder.osuosl.org (Postfix) with ESMTP id 3FEF386E1F; Wed, 6 Feb 2019 13:30:41 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) by ash.osuosl.org (Postfix) with ESMTP id AECF41BF868 for ; Wed, 6 Feb 2019 13:30:39 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id A98DE22849 for ; Wed, 6 Feb 2019 13:30:39 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id KmTFqz8lL9DC for ; Wed, 6 Feb 2019 13:30:38 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from mail-ed1-f66.google.com (mail-ed1-f66.google.com [209.85.208.66]) by silver.osuosl.org (Postfix) with ESMTPS id C2BFE22668 for ; Wed, 6 Feb 2019 13:30:37 +0000 (UTC) Received: by mail-ed1-f66.google.com with SMTP id y56so5844100edd.11 for ; Wed, 06 Feb 2019 05:30:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=iTbj6pZi9WHpaCsccAAgm8XZm+PNvmo7zNV8QTHUJco=; b=SxhMaSvsC/KzpcJS+jEz2ImO2IpeYVAiEcyRuzdf89NwR0pinqHKOI4p9OmT0ob0tQ 1B5l6ru1gLA7SQrv6/JW6Md2eaChtHABWoD7c5KrnO1TWzcMvkch4m0D7k5/3yc0xJ9M gda52Cnp3phn/XVcXl/jx2ulYtPMrWO4AHw3M= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=iTbj6pZi9WHpaCsccAAgm8XZm+PNvmo7zNV8QTHUJco=; b=HZahPPsVs5nIS6437r6O6ine+IrwxqxGjFdeCGWBBohWoZFe1P3BMwSe0Su4V/bCar WK1TQFlRbCxvGf4CWpPmP2A6W8+tWcmMVfx22XLNdZT9M0AWSVGak6DpT9JC3edNaDAL GJYn6jeZONbLC77m0/19qDvRU4e5J02dnHTxRPkj9WBGwh7t3N6HeIbMWHakYEcTSCue rJV+e1dEu2qOO0z9ypBKa24Yhz+8U7Tvz2rtHvF0a30pGzwH3/frIhJzVOlr2hABaLs7 cdHHD/5y26/aViTfOJb5Yg6FyBCz4qlWi2ic1Mi9CsEoHAIato4FgBmCnaNTI0k/Aq/T NGQA== X-Gm-Message-State: AHQUAuZ+lKp8Ck31VLO8WZA1SI7cXmIPpdPmmTd/bPMDVXODp/V8xKsS YMgCAmFUO8zox4lb5WCHs4v68zSKIebGyQ== X-Google-Smtp-Source: AHgI3IbkCM2g079C4FiR/Mbas0rbuxJlnTFe4Du97qRpxKKJvZf0c7L16BLvwzd6+pjsKvcpdvbLqg== X-Received: by 2002:a50:87a7:: with SMTP id a36mr8331788eda.96.1549459452978; Wed, 06 Feb 2019 05:24:12 -0800 (PST) Received: from angelo-ThinkPad-T470p.t-mobile.de ([88.128.80.15]) by smtp.gmail.com with ESMTPSA id p7sm3626174ejb.15.2019.02.06.05.24.11 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 06 Feb 2019 05:24:11 -0800 (PST) From: Angelo Compagnucci To: buildroot@buildroot.org Date: Wed, 6 Feb 2019 14:23:59 +0100 Message-Id: <1549459439-2260-4-git-send-email-angelo@amarulasolutions.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1549459439-2260-1-git-send-email-angelo@amarulasolutions.com> References: <1549459439-2260-1-git-send-email-angelo@amarulasolutions.com> Subject: [Buildroot] [PATCH v3 3/3] package/mender-artifact: new package X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Angelo Compagnucci MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" mender-artifact is a host tool to generate update images in the Mender artifact file format. This package uses the binary archive from github because it bundles the external dependencies. Example usage: $ mender-artifact write rootfs-image \ --update rootfs.ext4 \ --output-path rootfs.mender \ --artifact-name "release-v1.0.0" \ --device-type "beaglebone" Above will generate a Mender artifact called "rootfs.mender" containing the "rootfs.ext4" image along with meta-data. One can read-out the meta-data with the following command: $ mender-artifact read rootfs.mender Mender artifact: Name: release-v1.0.0 Format: mender Version: 2 Signature: no signature Compatible devices: '[beaglebone]' Updates: 0000: Type: rootfs-image Files: name: rootfs.ext4 size: 52428800 modified: 2018-08-27 09:10:55 +0200 CEST checksum: e70b113fb0964a810a3043586eb4fc1c48e684ba78b02ba65fead4aa3e540d87 Signed-off-by: Angelo Compagnucci Tested-by: Adam Duskett --- DEVELOPERS | 1 + package/Config.in.host | 1 + package/mender-artifact/Config.in.host | 18 ++++++++++++++++ package/mender-artifact/mender-artifact.hash | 28 ++++++++++++++++++++++++ package/mender-artifact/mender-artifact.mk | 32 ++++++++++++++++++++++++++++ 5 files changed, 80 insertions(+) create mode 100644 package/mender-artifact/Config.in.host create mode 100644 package/mender-artifact/mender-artifact.hash create mode 100644 package/mender-artifact/mender-artifact.mk diff --git a/DEVELOPERS b/DEVELOPERS index 59e1f32..7a3147d 100644 --- a/DEVELOPERS +++ b/DEVELOPERS @@ -152,6 +152,7 @@ F: package/corkscrew/ F: package/fail2ban/ F: package/i2c-tools/ F: package/mender/ +F: package/mender-artifact/ F: package/mono/ F: package/mono-gtksharp3/ F: package/monolite/ diff --git a/package/Config.in.host b/package/Config.in.host index 3b75f23..9916114 100644 --- a/package/Config.in.host +++ b/package/Config.in.host @@ -33,6 +33,7 @@ menu "Host utilities" source "package/jsmin/Config.in.host" source "package/lpc3250loader/Config.in.host" source "package/lttng-babeltrace/Config.in.host" + source "package/mender-artifact/Config.in.host" source "package/mfgtools/Config.in.host" source "package/mkpasswd/Config.in.host" source "package/mtd/Config.in.host" diff --git a/package/mender-artifact/Config.in.host b/package/mender-artifact/Config.in.host new file mode 100644 index 0000000..c7be0ed --- /dev/null +++ b/package/mender-artifact/Config.in.host @@ -0,0 +1,18 @@ +config BR2_PACKAGE_HOST_MENDER_ARTIFACT + bool "host mender-artifact" + depends on BR2_PACKAGE_HOST_GO_HOST_ARCH_SUPPORTS + help + The mender-artifact tool is a CLI implementation of the + Mender artifacts library. + + A Mender artifact can be recognized by its .mender suffix. + Mender artifacts can contain binaries, metadata, checksums, + signatures and scripts that are used during a deployment. + The artifact format acts as a wrapper, and uses the tar + format to bundle several files into one. + + In its simplest form, an artifact contains just a rootfs + image, along with its checksum, id and device type + compatibility. + + https://github.com/mendersoftware/mender-artifact diff --git a/package/mender-artifact/mender-artifact.hash b/package/mender-artifact/mender-artifact.hash new file mode 100644 index 0000000..d44244d --- /dev/null +++ b/package/mender-artifact/mender-artifact.hash @@ -0,0 +1,28 @@ +# Locally computed: +sha256 fde448af4811600a130b243d59e21b1f9cdd60fd991bd418246c913ebf945206 2.4.0.tar.gz + +# License hash extracted from LIC_FILES_CHKSUM.sha256 using the +# following command: +# +# sed '/^[A-Za-z0-9_]/s/^/sha256 /' LIC_FILES_CHKSUM.sha256 + +# Apache 2.0 licenses. +sha256 98ed35b5a138f58164b5c0dbccd9d7f01ef4d84b9dba01e896f0a3241c50c0f7 LICENSE +sha256 ceb1b36ff073bd13d9806d4615b931707768ca9023805620acc32dd1cfc2f680 vendor/github.com/mendersoftware/mendertesting/LICENSE +# +# BSD 2 Clause licenses. +sha256 8d427fd87bc9579ea368fde3d49f9ca22eac857f91a9dec7e3004bdfab7dee86 vendor/github.com/pkg/errors/LICENSE +# +# BSD 3 Clause licenses. +sha256 2eb550be6801c1ea434feba53bf6d12e7c71c90253e0a9de4a4f46cf88b56477 vendor/github.com/pmezard/go-difflib/LICENSE +sha256 2d36597f7117c38b006835ae7f537487207d8ec407aa9d9980794b2030cbc067 vendor/golang.org/x/sys/LICENSE +sha256 2d36597f7117c38b006835ae7f537487207d8ec407aa9d9980794b2030cbc067 vendor/golang.org/x/crypto/LICENSE +# +# ISC licenses. +sha256 3525392c6db3b804af76980b2c560ee9ec1abdadd907d76a26091df7c78f3a25 vendor/github.com/davecgh/go-spew/LICENSE +# +# MIT licenses. +sha256 402f39eed8a1851385d0703999aa9f23d067c2ea3e15c63c074e389cbf8f8f8f vendor/github.com/stretchr/testify/LICENSE +sha256 402f39eed8a1851385d0703999aa9f23d067c2ea3e15c63c074e389cbf8f8f8f vendor/github.com/stretchr/testify/LICENSE +sha256 da277af11b85227490377fbcac6afccc68be560c4fff36ac05ca62de55345fd7 vendor/github.com/urfave/cli/LICENSE +sha256 51a0c9ec7f8b7634181b8d4c03e5b5d204ac21d6e72f46c313973424664b2e6b vendor/github.com/sirupsen/logrus/LICENSE diff --git a/package/mender-artifact/mender-artifact.mk b/package/mender-artifact/mender-artifact.mk new file mode 100644 index 0000000..90d0071 --- /dev/null +++ b/package/mender-artifact/mender-artifact.mk @@ -0,0 +1,32 @@ +################################################################################ +# +# host-mender-artifact +# +################################################################################ + +HOST_MENDER_ARTIFACT_VERSION = 2.4.0 +HOST_MENDER_ARTIFACT_SITE = https://github.com/mendersoftware/mender-artifact/archive +HOST_MENDER_ARTIFACT_SOURCE = $(HOST_MENDER_ARTIFACT_VERSION).tar.gz +HOST_MENDER_ARTIFACT_LICENSE = Apache2.0, BSD-2-Clause, BSD-3-Clause, ISC, MIT +HOST_MENDER_ARTIFACT_LICENSE_FILES = \ + LICENSE \ + LIC_FILES_CHKSUM.sha256 \ + vendor/github.com/mendersoftware/mendertesting/LICENSE \ + vendor/github.com/pkg/errors/LICENSE \ + vendor/github.com/pmezard/go-difflib/LICENSE \ + vendor/golang.org/x/sys/LICENSE \ + vendor/golang.org/x/crypto/LICENSE \ + vendor/github.com/davecgh/go-spew/LICENSE \ + vendor/github.com/stretchr/testify/LICENSE \ + vendor/github.com/stretchr/testify/LICENSE \ + vendor/github.com/urfave/cli/LICENSE \ + vendor/github.com/sirupsen/logrus/LICENSE + +HOST_MENDER_ARTIFACT_LDFLAGS = -X main.Version=$(HOST_MENDER_ARTIFACT_VERSION) + +HOST_MENDER_ARTIFACT_BUILD_TARGETS = cli/mender-artifact + +HOST_MENDER_ARTIFACT_BIN_NAME = mender-artifact +HOST_MENDER_ARTIFACT_INSTALL_BINS = $(HOST_MENDER_ARTIFACT_BIN_NAME) + +$(eval $(host-golang-package))