From patchwork Sat Jul 23 20:53:18 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jan Hoffmann X-Patchwork-Id: 1659985 X-Patchwork-Delegate: daniel@makrotopia.org Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=EIaA2AmD; dkim=fail reason="signature verification failed" (2048-bit key; secure) header.d=3e8.eu header.i=@3e8.eu header.a=rsa-sha256 header.s=mail20211217 header.b=n8CpXxc1; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.openwrt.org (client-ip=2607:7c80:54:3::133; helo=bombadil.infradead.org; envelope-from=openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org; receiver=) Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4Lqzgc329tz9sR4 for ; Sun, 24 Jul 2022 07:18:36 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=WnLyFh1nSQWapEmYD/0B/LLJpBq6m3booIuJR4QSa6s=; b=EIaA2AmDLw2+I4 yddtZHRKM4GNIZDrV4YcuoIxP6KVJ6EYP8IMp+jmeopyEWgMPrxO39BiL+6NFgbOpoPZktGf+l/37 zTN6Q8RJPDsxD/Chy22sWfNWHVV4MPnT1zTbgd7T7F/JOVrbXS4HT1PfnLcmSYuM8VPL995X8s1MT SNXemvXulJRBPDqwZEl23swXri5YkkJAEz+zaUWWQvkvs//LBp4ZXvS573HjliNN9I7Qs1p4NHXAC Pv9mb0p07gq/kE5MbFL3tbam8wUZh5z166vySVgjQvjmlEeImMGBQfa5WwhdqX1GysTb0imcD3S0X jUqCupSu9URMzMMxc+4A==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oFMUE-007P6k-Re; Sat, 23 Jul 2022 21:16:35 +0000 Received: from srv4.3e8.eu ([2001:67c:12a0:200::2]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oFM86-007Df0-0L for openwrt-devel@lists.openwrt.org; Sat, 23 Jul 2022 20:53:44 +0000 Received: from localhost.localdomain (p200300c6cf1309a09555e5d92b92c48c.dip0.t-ipconnect.de [IPv6:2003:c6:cf13:9a0:9555:e5d9:2b92:c48c]) (using TLSv1.3 with cipher TLS_CHACHA20_POLY1305_SHA256 (256/256 bits)) (No client certificate requested) by srv4.3e8.eu (Postfix) with ESMTPSA id 52EEB600B5; Sat, 23 Jul 2022 22:53:40 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=3e8.eu; s=mail20211217; t=1658609620; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=AohhWsNmhA4wou9FGAoAaZ3YMi65EHPXmkSJiAOyVaA=; b=n8CpXxc1d2MMvIK2gQT/EwAcYSuM1r13TTunt4NsxmlA5dSs5cUtkVuEo+yguuY9L0mIOc 5pOmt91oYaaadqh8fsbCefWw3SwIejEjk+TgIklxPCHaRF7u+EmT+sj+XcrAOz14QXzV0N 36amucHGSFI0yd+W6MxF0+DFIQ0RdVggN8Mi2H0CKRtpLm2uoXk4zQXSjil74NFDrRZePd 5R48fI/uUgsoJZ4elVDxoNS5VjadaQhyoJCKnaWBhzpnbKH2BTrWZiSdUhKkVhrsYkY8GD 9XaWCVu+ABDJLh8jF7N1oPzj5l7J9P/YQ2KlUoJ7hD+NeZwwozS2jRtrE5iepA== From: Jan Hoffmann To: openwrt-devel@lists.openwrt.org Cc: Birger Koblitz , Sander Vanheule , Jan Hoffmann Subject: [PATCH 6/7] tools: add 7z host package Date: Sat, 23 Jul 2022 22:53:18 +0200 Message-Id: <20220723205319.3326374-7-jan@3e8.eu> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220723205319.3326374-1-jan@3e8.eu> References: <20220723205319.3326374-1-jan@3e8.eu> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220723_135342_272042_4F3817C2 X-CRM114-Status: GOOD ( 14.44 ) X-Spam-Score: -0.2 (/) X-Spam-Report: Spam detection software, running on the system "bombadil.infradead.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Add the 7zr command line tool, which is a version of the 7z application that only supports 7z archives. 7z is one of the two compression formats supported in H3C firmware images (the alternative would be ARJ). Content analysis details: (-0.2 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 SPF_NONE SPF: sender does not publish an SPF Record -0.0 SPF_HELO_PASS SPF: HELO matches SPF record -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain X-BeenThere: openwrt-devel@lists.openwrt.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: OpenWrt Development List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "openwrt-devel" Errors-To: openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org Add the 7zr command line tool, which is a version of the 7z application that only supports 7z archives. 7z is one of the two compression formats supported in H3C firmware images (the alternative would be ARJ). (Alternatively, the 7zr command line tool could also be built from a current version of the public-domain LZMA SDK. That would require repackaging the source package, as it is only provided in 7z format.) Signed-off-by: Jan Hoffmann --- tools/7z/Makefile | 36 ++++++++++++++++++++++++++++++++++++ tools/Makefile | 1 + 2 files changed, 37 insertions(+) create mode 100644 tools/7z/Makefile diff --git a/tools/7z/Makefile b/tools/7z/Makefile new file mode 100644 index 000000000000..c94d746c6489 --- /dev/null +++ b/tools/7z/Makefile @@ -0,0 +1,36 @@ +include $(TOPDIR)/rules.mk + +PKG_NAME:=7z +PKG_VERSION:=22.00 +PKG_SOURCE_VERSION:=2200 + +PKG_SOURCE:=$(PKG_NAME)$(PKG_SOURCE_VERSION)-src.tar.xz +PKG_SOURCE_URL:=https://7-zip.org/a/ +PKG_HASH:=40969f601e86aff49aaa0ba0df5ce6fd397cf7e2683a84b591b0081e461ef675 + +# This builds the 7zr variant which supports only 7z, so no non-LGPL code should be included +PKG_LICENSE:=LGPL-2.1-or-later +PKG_LICENSE_FILES:=DOC/License.txt DOC/copying.txt + +HOST_BUILD_DIR:=$(BUILD_DIR_HOST)/$(PKG_NAME)-$(PKG_VERSION) + +include $(INCLUDE_DIR)/host-build.mk + +TAR_CMD=$(HOST_TAR) -C $(1) $(TAR_OPTIONS) + +ALONE_DIR=$(HOST_BUILD_DIR)/CPP/7zip/Bundles/Alone7z + +define Host/Compile + $(MAKE) -C $(ALONE_DIR) -f makefile.gcc +endef + +define Host/Install + $(INSTALL_DIR) $(STAGING_DIR_HOST)/bin + $(INSTALL_BIN) $(ALONE_DIR)/_o/7zr $(STAGING_DIR_HOST)/bin/7zr +endef + +define Host/Clean + rm -f $(STAGING_DIR_HOST)/bin/7zr +endef + +$(eval $(call HostBuild)) diff --git a/tools/Makefile b/tools/Makefile index be1a23ed512f..0d6e675d4ceb 100644 --- a/tools/Makefile +++ b/tools/Makefile @@ -32,6 +32,7 @@ tools-$(BUILD_TOOLCHAIN) += expat gmp mpc mpfr tools-$(CONFIG_TARGET_apm821xx)$(CONFIG_TARGET_gemini) += genext2fs tools-$(CONFIG_TARGET_ath79) += lzma-old squashfs tools-$(CONFIG_TARGET_mxs) += elftosb sdimage +tools-$(CONFIG_TARGET_realtek) += 7z tools-$(CONFIG_TARGET_tegra) += cbootimage cbootimage-configs tools-$(CONFIG_USES_MINOR) += kernel2minor tools-$(CONFIG_USE_SPARSE) += sparse