From patchwork Mon Mar 8 04:28:52 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Spooren X-Patchwork-Id: 1448844 X-Patchwork-Delegate: mail@aparcar.org Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.openwrt.org (client-ip=2001:8b0:10b:1:d65d:64ff:fe57:4e05; helo=desiato.infradead.org; envelope-from=openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org; receiver=) Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=desiato.20200630 header.b=PmDUOHmS; dkim-atps=neutral Received: from desiato.infradead.org (desiato.infradead.org [IPv6:2001:8b0:10b:1:d65d:64ff:fe57:4e05]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4Dv55g1Bwhz9sSC for ; Mon, 8 Mar 2021 15:31:50 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=desiato.20200630; 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=Cq4kzVHKUufIf6fjD95MwmazVMDoXPhrAgX9tjUkdeo=; b=PmDUOHmSAXvnhSxSixAn8kY1w zxTXkugkUSgV9kBCAdt6TlpcBuCvv861RAyi7AAHouTy23GkEcYageXQs3aG5Cc+MhgHNfsh/WZm/ l5NyY+5AFeW/H4tRxpTmZCUW+UnXOjeub3IIEUUww8qprzV25IBWB5l2EyaG02AbMKGkFpoA4527x PdFoEMbMtCpNfxo+pzRTth4JyqZz0L7zGusmCg2gWr2RdFBaGse7t6zAesvcsIavPAbC9zz1/dyus khreB8lhTd7nme8BbgxelYTnqlC/CatviA8Yr3xGMO3Wco4eEdIk2jXqFHkus8TT0cZjrp/sZBObC mz6DyDLgQ==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lJ7Wo-00F5It-Pq; Mon, 08 Mar 2021 04:29:58 +0000 Received: from relay4-d.mail.gandi.net ([217.70.183.196]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lJ7WF-00F5BG-Gv for openwrt-devel@lists.openwrt.org; Mon, 08 Mar 2021 04:29:28 +0000 X-Originating-IP: 72.235.130.177 Received: from dawn.lan (udp102715uds.hawaiiantel.net [72.235.130.177]) (Authenticated sender: mail@aparcar.org) by relay4-d.mail.gandi.net (Postfix) with ESMTPA id 65B12E0004; Mon, 8 Mar 2021 04:29:20 +0000 (UTC) From: Paul Spooren To: openwrt-devel@lists.openwrt.org Cc: ~aparcar/openwrt-devel-test@lists.sr.ht, Paul Spooren Subject: [PATCH 1/2] package: store SourceName in Packages index Date: Sun, 7 Mar 2021 18:28:52 -1000 Message-Id: <20210308042852.1263328-2-mail@aparcar.org> X-Mailer: git-send-email 2.30.1 In-Reply-To: <20210308042852.1263328-1-mail@aparcar.org> References: <20210308042852.1263328-1-mail@aparcar.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210308_042924_571795_307C904E X-CRM114-Status: GOOD ( 10.65 ) X-Spam-Score: -0.7 (/) X-Spam-Report: Spam detection software, running on the system "desiato.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: With the existence of ABI versions there is no clean way to determine the package name without an attached ABI version. The Packages index is stored on device to know what packages are installed. As SourceName is filtered out the real package names are unknown to a running device. This becomes a problem if a user tries toexport installed packages via `ubus call rpcd-sys packagelist` which woul [...] Content analysis details: (-0.7 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_MSPIKE_H3 RBL: Good reputation (+3) [217.70.183.196 listed in wl.mailspike.net] -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at https://www.dnswl.org/, low trust [217.70.183.196 listed in list.dnswl.org] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record -0.0 RCVD_IN_MSPIKE_WL Mailspike good senders 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 With the existence of ABI versions there is no clean way to determine the package name without an attached ABI version. The Packages index is stored on device to know what packages are installed. As SourceName is filtered out the real package names are unknown to a running device. This becomes a problem if a user tries toexport installed packages via `ubus call rpcd-sys packagelist` which would return package names including the ABI version. Trying to find these packages in a later release with changes ABI version is impossible. This patch stops filtering out the SourceName so it is available on device. Signed-off-by: Paul Spooren --- package/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package/Makefile b/package/Makefile index a89a6068fa..802100838c 100644 --- a/package/Makefile +++ b/package/Makefile @@ -87,7 +87,7 @@ $(curdir)/index: FORCE cd $$d || continue; \ $(SCRIPT_DIR)/apk-make-index.sh . 2>&1; \ $(SCRIPT_DIR)/ipkg-make-index.sh . 2>&1 > Packages.manifest; \ - grep -vE '^(Maintainer|LicenseFiles|Source|SourceName|Require|SourceDateEpoch)' Packages.manifest > Packages; \ + grep -vE '^(Maintainer|LicenseFiles|Source:|Require|SourceDateEpoch)' Packages.manifest > Packages; \ case "$$(((64 + $$(stat -L -c%s Packages)) % 128))" in 110|111) \ $(call ERROR_MESSAGE,WARNING: Applying padding in $$d/Packages to workaround usign SHA-512 bug!); \ { echo ""; echo ""; } >> Packages;; \ From patchwork Mon Mar 8 04:28:53 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Spooren X-Patchwork-Id: 1448843 X-Patchwork-Delegate: mail@aparcar.org Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.openwrt.org (client-ip=2001:8b0:10b:1:d65d:64ff:fe57:4e05; helo=desiato.infradead.org; envelope-from=openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org; receiver=) Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=desiato.20200630 header.b=hJrHwz7+; dkim-atps=neutral Received: from desiato.infradead.org (desiato.infradead.org [IPv6:2001:8b0:10b:1:d65d:64ff:fe57:4e05]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4Dv55f2F2Tz9sWF for ; Mon, 8 Mar 2021 15:31:49 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=desiato.20200630; 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=MB7ObrPpw+D4JpAMg4zuv5ElDVG/WU9LPrNhzB4CVP0=; b=hJrHwz7+pwlB3ao7B9kHqB8jM QMeTbnLihj3yOsyKI//Tn2SzH54NYUZI5TNSvKC73Injb1zPsBUOMFS/cucv+iuLxsF5S0i/0xFXa 3UGlmtChS2vqpf+Wv2aIVtNYb4zx3OoW2fFwXTM6ZGayd1jtVaJpevjyIfUCvpFEJ4V1mjjKCCac3 dG+c7MYLl1Z/TKXygY5zPWq96Bpbkwsoa1szs8uEtTI4es+CCqEl/WicePc/H/Z6JVWPiIVgYdaFK 7Nt0T9Pduvnd+rwenBXd0JFXF53RmpGpCKiDiDIdhPYuYnLm60nVbNpOwTzVO+xB0jKuIDwSytSP8 V13WBdLmA==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lJ7Wx-00F5Lt-02; Mon, 08 Mar 2021 04:30:07 +0000 Received: from relay4-d.mail.gandi.net ([217.70.183.196]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lJ7WF-00F5Ba-Su for openwrt-devel@lists.openwrt.org; Mon, 08 Mar 2021 04:29:28 +0000 X-Originating-IP: 72.235.130.177 Received: from dawn.lan (udp102715uds.hawaiiantel.net [72.235.130.177]) (Authenticated sender: mail@aparcar.org) by relay4-d.mail.gandi.net (Postfix) with ESMTPA id 4A52AE0007; Mon, 8 Mar 2021 04:29:21 +0000 (UTC) From: Paul Spooren To: openwrt-devel@lists.openwrt.org Cc: ~aparcar/openwrt-devel-test@lists.sr.ht, Paul Spooren Subject: [PATCH 2/2] include: store ABIVersion in Packages index Date: Sun, 7 Mar 2021 18:28:53 -1000 Message-Id: <20210308042852.1263328-3-mail@aparcar.org> X-Mailer: git-send-email 2.30.1 In-Reply-To: <20210308042852.1263328-1-mail@aparcar.org> References: <20210308042852.1263328-1-mail@aparcar.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210308_042925_048210_ECBE032D X-CRM114-Status: UNSURE ( 9.42 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -0.7 (/) X-Spam-Report: Spam detection software, running on the system "desiato.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: With the existence of ABI versions there is no clean way to determine the package name without an attached ABI version. The Packages index is stored on device to know what packages are installed. The ABIVersion was recently removed in c921650382 "build: drop ABI version from metadata", while ABI versions still exists. This becomes a problem if a user tries to export installed packages via `ubu [...] Content analysis details: (-0.7 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_MSPIKE_H3 RBL: Good reputation (+3) [217.70.183.196 listed in wl.mailspike.net] -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at https://www.dnswl.org/, low trust [217.70.183.196 listed in list.dnswl.org] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record -0.0 RCVD_IN_MSPIKE_WL Mailspike good senders 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 With the existence of ABI versions there is no clean way to determine the package name without an attached ABI version. The Packages index is stored on device to know what packages are installed. The ABIVersion was recently removed in c921650382 "build: drop ABI version from metadata", while ABI versions still exists. This becomes a problem if a user tries to export installed packages via `ubus call rpcd-sys packagelist` which would return package names including the ABI version. Trying to find these packages in a later release with changes ABI version is impossible. This commits adds the `ABIVersion` field again. Knowing both the combined (SourceName + ABIVersion) and the `ABIVersion` it is possible to calculate the package `SourceName` without storing it in the on-device package list. Signed-off-by: Paul Spooren --- include/package-ipkg.mk | 1 + 1 file changed, 1 insertion(+) diff --git a/include/package-ipkg.mk b/include/package-ipkg.mk index 082196ccf8..c536999d02 100644 --- a/include/package-ipkg.mk +++ b/include/package-ipkg.mk @@ -184,6 +184,7 @@ $$(call addfield,Depends,$$(Package/$(1)/DEPENDS) )$$(call addfield,Section,$(SECTION) )$$(call addfield,Require-User,$(USERID) )$$(call addfield,SourceDateEpoch,$(PKG_SOURCE_DATE_EPOCH) +)$$(if $$(ABIV_$(1)),ABIVersion: $$(ABIV_$(1)) )$(if $(PKG_CPE_ID),CPE-ID: $(PKG_CPE_ID) )$(if $(filter hold,$(PKG_FLAGS)),Status: unknown hold not-installed )$(if $(filter essential,$(PKG_FLAGS)),Essential: yes