From patchwork Wed May 4 17:28:16 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pushpal Sidhu X-Patchwork-Id: 618565 X-Patchwork-Delegate: blogic@openwrt.org Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from arrakis.dune.hu (caladan.dune.hu [78.24.191.180]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3r0Q4N6G89z9snm for ; Thu, 5 May 2016 03:28:36 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gateworks-com.20150623.gappssmtp.com header.i=@gateworks-com.20150623.gappssmtp.com header.b=xiVeJiY1; dkim-atps=neutral Received: from arrakis.dune.hu (localhost [127.0.0.1]) by arrakis.dune.hu (Postfix) with ESMTP id 71E36B913C0; Wed, 4 May 2016 19:28:28 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on arrakis.dune.hu X-Spam-Level: X-Spam-Status: No, score=-1.5 required=5.0 tests=BAYES_00,T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.1 Received: from arrakis.dune.hu (localhost [127.0.0.1]) by arrakis.dune.hu (Postfix) with ESMTP; Wed, 4 May 2016 19:28:28 +0200 (CEST) Received: from arrakis.dune.hu (localhost [127.0.0.1]) by arrakis.dune.hu (Postfix) with ESMTP id 8F47FB913A0 for ; Wed, 4 May 2016 19:28:26 +0200 (CEST) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 CL_IP_EQ_HELO_IP=-2 (check from: .gateworks. - helo: .mail-pf0-f169.google. - helo-domain: .google.) FROM/MX_MATCHES_NOT_HELO(DOMAIN)=1; rate: -4 Received: from mail-pf0-f169.google.com (mail-pf0-f169.google.com [209.85.192.169]) by arrakis.dune.hu (Postfix) with ESMTPS for ; Wed, 4 May 2016 19:28:25 +0200 (CEST) Received: by mail-pf0-f169.google.com with SMTP id 206so27699500pfu.0 for ; Wed, 04 May 2016 10:28:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gateworks-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id; bh=OSP0tSEhjluNAM469WogpIBZ9j/2pKyW4nS8ye08frc=; b=xiVeJiY1/wdq2DC0WoM/WTFda5Tc7yZGMu933aUIiLbbNWy9QgG9ck9uKbEmrzZHMA QpA64mcZIMW0gCenZC1Lw+96X9TMwxOrL3gTIECm7FuAbqbp9Jg2F5OBEgUABpkgnMnY XokfGJ7KlvT135ge9h4ay1yNGdK4qw3u3COmGF1Q9qOcExlBsE83+At8FXIupO+kb+NZ 9SMsv2tQ/CKZV7nvOrl5dISVNRaqsSJ8gm4Zcw5U4rAVyZbEksZhmfHGH9N8eEUhNKyu WxA3BFUCKAJKTIO7OZP9tlriHj8oV9lQvJPd5ZkmmSFqjxyPjwAYyx+mySzZLAiu0sOS n/OA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=OSP0tSEhjluNAM469WogpIBZ9j/2pKyW4nS8ye08frc=; b=iM1QEnFjw6rF4IwidBRqvPnM/nTJhDIjCuemFZvjGjt29uaTpnB7sZ9tDqq/rQ48cK bw48rLG9EjZw/ZAdm19woR30Y91Ye5c4p7DpLcnHlibZ0D2Yxaz+YFei8tPrAoixQkQg /aAa6Tyci8GtLlIUuh6KcCwge/ZjJDf3LcwR7nHW/L3cQgcRzEGZz7+GJYdYLTFBNPo7 CcZftpLUQPIGg89RYxmVlF9sy4an0hOzqtuILIs7j5UQX3twfC+TGVjolfy/A0st5Qr+ 84Qjsfqjf4KEs3OGPkkCGZroEaqYOQiw91b01BCZJL7ZQiuNLVK7+n18e31UjkyLyP7k 8BSQ== X-Gm-Message-State: AOPr4FUTMAAKGiskk7+aS3N7wqjuXC6QzE3/9fYBvaInqhOHOiMVUG0wEJ4mNGU22wjtwg== X-Received: by 10.98.55.129 with SMTP id e123mr13814830pfa.4.1462382903943; Wed, 04 May 2016 10:28:23 -0700 (PDT) Received: from psidhu.pdc.gateworks.com (68-189-91-139.static.snlo.ca.charter.com. [68.189.91.139]) by smtp.gmail.com with ESMTPSA id zs16sm7546682pab.13.2016.05.04.10.28.23 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 04 May 2016 10:28:23 -0700 (PDT) From: Pushpal Sidhu To: John Crispin Date: Wed, 4 May 2016 10:28:16 -0700 Message-Id: <1462382896-15469-1-git-send-email-psidhu@gateworks.com> X-Mailer: git-send-email 2.8.1 Subject: [OpenWrt-Devel] [PATCH v2] image.mk: Create a manifest file of installed packages as a build artifact X-BeenThere: openwrt-devel@lists.openwrt.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: OpenWrt Development List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: openwrt-devel@lists.openwrt.org MIME-Version: 1.0 Errors-To: openwrt-devel-bounces@lists.openwrt.org Sender: "openwrt-devel" A few linux BSP's create a manifest file of installed packages for a given target in order to help them understand exactly what's on their images. Create one for OpenWrt as well as a build artifact since many users have an affinity to prune down on packages to save valuable flash space. Signed-off-by: Pushpal Sidhu --- include/image.mk | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/include/image.mk b/include/image.mk index bc383e6..2606c77 100644 --- a/include/image.mk +++ b/include/image.mk @@ -280,6 +280,13 @@ define Image/mkfs/prepare $(call Image/mkfs/prepare/default) endef +define Image/Manifest + $(STAGING_DIR_HOST)/bin/opkg \ + --offline-root $(TARGET_DIR) \ + --add-arch all:100 \ + --add-arch $(if $(ARCH_PACKAGES),$(ARCH_PACKAGES),$(BOARD)):200 list-installed > \ + $(BIN_DIR)/$(IMG_PREFIX)$(if $(PROFILE_SANITIZED),-$(PROFILE_SANITIZED)).manifest +endef define Image/Checksum ( cd ${BIN_DIR} ; \ @@ -597,6 +604,7 @@ define BuildImage $(call Image/Build,$(fs)) ) $(call Image/mkfs/ubifs) + $(call Image/Manifest) $(call Image/Checksum,md5sum --binary,md5sums) $(call Image/Checksum,openssl dgst -sha256,sha256sums)