From patchwork Thu Aug 6 14:12:37 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adrian Schmutzler X-Patchwork-Id: 1341740 X-Patchwork-Delegate: freifunk@adrianschmutzler.de Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.openwrt.org (client-ip=2001:8b0:10b:1231::1; helo=merlin.infradead.org; envelope-from=openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=adrianschmutzler.de 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=merlin.20170209 header.b=mj8s1Rft; dkim-atps=neutral Received: from merlin.infradead.org (merlin.infradead.org [IPv6:2001:8b0:10b:1231::1]) (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 4BMr9g6wDXz9sTX for ; Fri, 7 Aug 2020 00:15:19 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:List-Subscribe:List-Help:List-Post:List-Archive:List-Unsubscribe :List-Id:MIME-Version:Message-Id:Date:Subject:To:From:Reply-To:Cc:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Owner; bh=3jX4Z1Me1WeoxJdeEmAPY5Sryh9SFudLqq/HXorxEXc=; b=mj8s1RftBp1HhK0P8BRJizAJey m8Dv13IV4AfspuxbZNkRPL1TfdA6J0mWbF9moyWVMuuqYcpyZ6JZGeoxz/Hp5sFSRBtux3y/nDcaW r0SJ2odNUuqCpU5Ed1uSSJdHfHYruUHXsu5hrVcIIvRrudociDa3lFK0a4mgQcCz0QjXC1hjZIjqE ept0JdZXfAXSLxqYc68Tj4hoeFHDp6KaXUjxG/LuTzXorqD7daPy8N8RBDQEE9wweAnyJI5AwkcTS mhh4RysxQdpVa9yRuKkKzIQcwsS4i0fe8GsyRmi/D8hDt7xzrgGv5zPxB/xbrREk0MBi0XZySsNIy sP1h66bg==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1k3geL-0001SF-4O; Thu, 06 Aug 2020 14:13:41 +0000 Received: from mout.kundenserver.de ([212.227.17.10]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1k3geC-0001PY-UA for openwrt-devel@lists.openwrt.org; Thu, 06 Aug 2020 14:13:35 +0000 Received: from buildfff.adridolf.com ([188.192.134.246]) by mrelayeu.kundenserver.de (mreue108 [212.227.15.183]) with ESMTPSA (Nemesis) id 1MtwMc-1krP5I0urM-00uJCi for ; Thu, 06 Aug 2020 16:13:28 +0200 From: Adrian Schmutzler To: openwrt-devel@lists.openwrt.org Subject: [PATCH 1/4] mvebu: fix sysupgrade experience for early DSA-adopters Date: Thu, 6 Aug 2020 16:12:37 +0200 Message-Id: <20200806141241.34383-1-freifunk@adrianschmutzler.de> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 X-Provags-ID: V03:K1:PsFvsESXKtiphzBhEGSXu+100TuuYmpXUTozIuuVAlk2Jp9lBIN QXFPZwCAFBICwfHmhxRt4P7ZaNNxdga6PV1wMppZIBzjaYmK+Y2V++vXDwdaC2rShQ7xjd1 JB/JczfOXoha1HzOPud1U+FYC0BdVKIsACjCpv3sBfJREncGeaJE30fx0AIUvzhzWQZcxJo 6b/oX3E9+sQvP/Gautspw== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:WftmgFuxZ3M=:eDLKoeLExHuXIAHw0QyVcl i1TaicEmbce4kMwestNIFwrPAtwmy3OR8tTsanPlYu7HNe2zw0M4jdxAUtAvfC//f9vab1KJQ tVWdw+qhHwg2Mh7styokvQePBUwEl1VUnMvaIXdQ8SSIcCQ9MYzpAG7+TpPrxIy7TxSWiRq43 xGYw4RC+s3/2nSkXHjUhIQa1WNDmYUbaW78vDnmj60sxDHrEe50akfmUKEIBb/HtT4Djo/Wx4 24lEQv9/N37upvofHh4KtdU0H1eocUbvyBb0oc4x+61cdnHawj+J/yRmWDDl9nJ4fZhPGN4FE KAjepxVhECGSnLHJZMsbjAHU6FkOod/K9rxfs5pb5HQu4i3sN/E7ZywhREuVyDRV3uY1Rshw0 09+FQq1pYjCCYkt1gn4rx8bC+CF0lsnOsOrrCMKlP1sXtlwJqBSQXFL7MiGeECFqoWbWVy21H VQ8u9yvz4xNWx6guusOHSLMBzjrClBFk06GztNkBe4/fmN302jobpq599ks/9XoG2ErCnbTzq nZwWngKDwjXpZAg/9Jr/8INVEDWVgZ3QU49M5GfBnaoVB2a0w3eSvEjj/wMeissDuBUnk6z7i qXBUYrc+utNKx2UpJb1FEI1LbJQIkeXNfgloArOkaULiLHzjTZjuoNDheZJBuJLdaHMS/LLCh Hfv4yNtxeTtteu2WbtIcxYFdDIw/9nE8CV5x7/LJ+0fS0B9vVo0xAhiEgr3Pp44RvLOgSlTt/ CAB3WWsbs7K0wiAFzTMb2aasmMse9aC8fByJ8biAqzMr4p4j1gB8H7MolZL4qJaeYDGHMqAeM PaPXjy1bkuXU4XHIF7P9+/H46mtWHk6MiPgUEcz7gxPtUz6eVQPK9yAB9yH9R6fEFPyWbgk6D eIwtyruB28O6bKDqXwCA== X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200806_101333_219386_6CA81549 X-CRM114-Status: GOOD ( 16.28 ) X-Spam-Score: -0.0 (/) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (-0.0 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [212.227.17.10 listed in wl.mailspike.net] -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [212.227.17.10 listed in list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record X-BeenThere: openwrt-devel@lists.openwrt.org X-Mailman-Version: 2.1.29 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 Conceptually, the compat-version during sysupgrade is meant to describe the config. Therefore, if somebody starts with a device on 19.07 and swconfig, and that person does a forceful upgrade into a DSA-based firmware without wiping his/her config, then the local compat-version should stay at 1.0 according to the config present (and not get updated). However, this poses a problem for those people that early-adopted DSA in master, as they already have adjusted their config for DSA, but it still is "1.0" as far as sysupgrade is concerned. This can be healed by a simple uci set system.@system[0].compat_version="1.1" uci commit system But this needs to be applied _after_ the upgrade (as the "old" fwtool on the old installation does not know about compat_version) and it requires access via SSH (i.e. no pure GUI solution is available for this group of people, apart from wiping their config _again_ for no technical reason). Despite, the situation will not become obvious to those just upgrading via GUI, they will just have the experience of a "broken upgrade". This is a conflict which cannot be resolved by achieving both goals, we have to decide to either keep the strict concept or improve the situation for early adopters. In this patch, we address the issue by providing a uci-defaults script that will raise the compat_version for _all_ people upgrading into a 1.1 image, no matter whether they have reset config or not. The idea is implement this as a _temporary_ solution, so early adopters can upgrade into the new mechanism without issues, and after a few weeks/months we could remove the uci-defaults script again. If we e.g. remove the script just before 20.xx.0-rc1, early adopters should have moved on by then, and existing stable users would still get the intended experience. Signed-off-by: Adrian Schmutzler --- .../etc/uci-defaults/05_fix-compat-version | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 target/linux/mvebu/cortexa9/base-files/etc/uci-defaults/05_fix-compat-version diff --git a/target/linux/mvebu/cortexa9/base-files/etc/uci-defaults/05_fix-compat-version b/target/linux/mvebu/cortexa9/base-files/etc/uci-defaults/05_fix-compat-version new file mode 100644 index 0000000000..5965fdc2f5 --- /dev/null +++ b/target/linux/mvebu/cortexa9/base-files/etc/uci-defaults/05_fix-compat-version @@ -0,0 +1,21 @@ +# +# Copyright (C) 2020 OpenWrt.org +# + +. /lib/functions.sh + +case "$(board_name)" in + linksys,wrt1200ac|\ + linksys,wrt1900ac-v1|\ + linksys,wrt1900ac-v2|\ + linksys,wrt1900acs|\ + linksys,wrt3200acm|\ + linksys,wrt32x|\ + solidrun,clearfog-base-a1|\ + solidrun,clearfog-pro-a1) + uci set system.@system[0].compat_version="1.1" + uci commit system + ;; +esac + +exit 0 From patchwork Thu Aug 6 14:12:38 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adrian Schmutzler X-Patchwork-Id: 1341739 X-Patchwork-Delegate: freifunk@adrianschmutzler.de Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.openwrt.org (client-ip=2001:8b0:10b:1231::1; helo=merlin.infradead.org; envelope-from=openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=adrianschmutzler.de 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=merlin.20170209 header.b=WR8xVT0I; dkim-atps=neutral Received: from merlin.infradead.org (merlin.infradead.org [IPv6:2001:8b0:10b:1231::1]) (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 4BMr9g4C8yz9sTS for ; Fri, 7 Aug 2020 00:15:19 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; 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:To:From: Reply-To:Cc:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=QLEL6b6EAkxD8Cl5Np3IHMePGqj079zIkmEitwAs44E=; b=WR8xVT0I9NBrO1Fe0vi+05BbH4 aI05XqmmV0Yr1Oq6r4o8rXhLi9DBVVxIohBiEZxDK2x4zBVuEW9vmVOBwu6hGbfvzJER7Apm2Da/w PAXal7YS4D5A3qgkO/L2BN65ESG2OKy56/yY5ZkO08lA9dqOyA1HBB+C9StxmBxXsrWiVf3qTeMfI a0LAze0lr5lGI1ESxxeTH9tPIynodgoD4c1y0ZjyWvEgtBeDYRNNHzAKZWSRZdJIfiINlt7MDEaip sXy3Qw0xTqiFlKqZW4p+BkIbh74dSEmmsad7sEN3jQVcdOcs8VkGDfAE7rGDRizrCieumf/kp7EsD DAOYB9Yg==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1k3geI-0001Rf-Sb; Thu, 06 Aug 2020 14:13:38 +0000 Received: from mout.kundenserver.de ([217.72.192.73]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1k3geC-0001PT-G1 for openwrt-devel@lists.openwrt.org; Thu, 06 Aug 2020 14:13:34 +0000 Received: from buildfff.adridolf.com ([188.192.134.246]) by mrelayeu.kundenserver.de (mreue108 [212.227.15.183]) with ESMTPSA (Nemesis) id 1MmlbE-1kTiLG1OgY-00jpco for ; Thu, 06 Aug 2020 16:13:28 +0200 From: Adrian Schmutzler To: openwrt-devel@lists.openwrt.org Subject: [PATCH 2/4] kirkwood: fix sysupgrade experience for early DSA-adopters Date: Thu, 6 Aug 2020 16:12:38 +0200 Message-Id: <20200806141241.34383-2-freifunk@adrianschmutzler.de> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200806141241.34383-1-freifunk@adrianschmutzler.de> References: <20200806141241.34383-1-freifunk@adrianschmutzler.de> MIME-Version: 1.0 X-Provags-ID: V03:K1:06J/ThmU6zn463TaFfVqlR5YYhZQ3QhhcU+OdiY4/P+WSmq5sjF MygYa3PUDZ5JUoX0UyCgExQ9isGjQ/0E7a8JYiZ6DG0M6AvfPY9gJT2ZMXPU0bATLG9S3MP WUn8hBbtkkRCFreGlmMrETPCiJdEjoa0g6mYgL2bKMyPPahAbv7Zpo1ccCUhHnVOkTQQh8Y aqcJsMfoPfBhh8WmpCYiA== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:7iCDuU4yt14=:uZcdVTSbZXhodcZfpQgUZL pLSN/5hFWFHCwUvV0PVFfFbe9RyEA0bEkbIWqJVJGvMO4lVi8ltbS8rpHjiOgtxcqnW3C4U43 SKgiUcO+hZfWNUqDLDvojXo4NNSswQcuGglyhE6cPqqxnYAGoYIW/BUanlJ2+RJ0VgAY2Z9zU oaRH+424OiJCh1SEE1D3rj8eZtaZS8Ju+Ck63hQRUIvzdFXrvK+PZiaNzfj8zr9nZHU4nwc0t qGXCKT/kaESZzboneGZay/Z4V9Kdt8PDHqMPli1KcYdQXtQJxyTQzjrGy/9MKLbXA6AzIg+TJ OF8bXRx5YCnOpQHRX1GjTm14LitvzyjBjTxIrKscG+fnC101q428cXK2N1cVsAvv0VjroAYQl bhgrXyWsA6LhVB5FNWmQUz3EIYNWmQh3XoXgLcYnSxmfTnwNs2Sux3xZGb5ZF6K07ie2yi5XB qx2QA/5BUAK5SeCS1sjyqBzfTVRdhqnjEFwx6zmsHp6/k0VsCOP589XW5OJUBcko3s3k3wmKF sJf7yfm7KCn7YDDMyb1C2WwP/UGvTyWpEh4sPdTMX5241lIcM7TRi94heNCSdHF0Mqx31k7rH jVfSXVKNOZ44rp1d289iOpNu9Z59oQ0AqekkutyIn1CUMNxBxHrEcQWblSPGSOL1nyJ5w8+a+ 4DvuzWO6O4QHm+NobtPOfXslB8aDlgotRgL2Hx18xvzNghDeVD8TAZQV7HYPlbKgUhSJN4CoX E6mxhq2vQDSoYFv1jF3d+2KiUZAPftImOj90uA0zS49KTHclzwtPx8wcLbiX+FMkQKcqONDUJ r08mQnaevV8ZJErok9BsIOQUGsK+JUQym1lWd9OedVZJnhnWHMDA1EQVOfThv/GpolLvltBuL 8/1iqvyflvwuKohROUVw== X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200806_101332_782927_94708C32 X-CRM114-Status: GOOD ( 16.59 ) X-Spam-Score: -0.0 (/) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (-0.0 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [217.72.192.73 listed in wl.mailspike.net] -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [217.72.192.73 listed in list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record X-BeenThere: openwrt-devel@lists.openwrt.org X-Mailman-Version: 2.1.29 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 Conceptually, the compat-version during sysupgrade is meant to describe the config. Therefore, if somebody starts with a device on 19.07 and swconfig, and that person does a forceful upgrade into a DSA-based firmware without wiping his/her config, then the local compat-version should stay at 1.0 according to the config present (and not get updated). However, this poses a problem for those people that early-adopted DSA in master, as they already have adjusted their config for DSA, but it still is "1.0" as far as sysupgrade is concerned. This can be healed by a simple uci set system.@system[0].compat_version="1.1" uci commit system But this needs to be applied _after_ the upgrade (as the "old" fwtool on the old installation does not know about compat_version) and it requires access via SSH (i.e. no pure GUI solution is available for this group of people, apart from wiping their config _again_ for no technical reason). Despite, the situation will not become obvious to those just upgrading via GUI, they will just have the experience of a "broken upgrade". This is a conflict which cannot be resolved by achieving both goals, we have to decide to either keep the strict concept or improve the situation for early adopters. In this patch, we address the issue by providing a uci-defaults script that will raise the compat_version for _all_ people upgrading into a 1.1 image, no matter whether they have reset config or not. The idea is implement this as a _temporary_ solution, so early adopters can upgrade into the new mechanism without issues, and after a few weeks/months we could remove the uci-defaults script again. If we e.g. remove the script just before 20.xx.0-rc1, early adopters should have moved on by then, and existing stable users would still get the intended experience. Signed-off-by: Adrian Schmutzler --- .../etc/uci-defaults/05_fix-compat-version | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 target/linux/kirkwood/base-files/etc/uci-defaults/05_fix-compat-version diff --git a/target/linux/kirkwood/base-files/etc/uci-defaults/05_fix-compat-version b/target/linux/kirkwood/base-files/etc/uci-defaults/05_fix-compat-version new file mode 100644 index 0000000000..d7f8488e88 --- /dev/null +++ b/target/linux/kirkwood/base-files/etc/uci-defaults/05_fix-compat-version @@ -0,0 +1,16 @@ +# +# Copyright (C) 2020 OpenWrt.org +# + +. /lib/functions.sh + +case "$(board_name)" in + linksys,e4200-v2|\ + linksys,ea3500|\ + linksys,ea4500) + uci set system.@system[0].compat_version="1.1" + uci commit system + ;; +esac + +exit 0 From patchwork Thu Aug 6 14:12:39 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adrian Schmutzler X-Patchwork-Id: 1341738 X-Patchwork-Delegate: freifunk@adrianschmutzler.de Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.openwrt.org (client-ip=2001:8b0:10b:1231::1; helo=merlin.infradead.org; envelope-from=openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=adrianschmutzler.de 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=merlin.20170209 header.b=WaAxVUce; dkim-atps=neutral Received: from merlin.infradead.org (merlin.infradead.org [IPv6:2001:8b0:10b:1231::1]) (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 4BMr9c3VbXz9sTM for ; Fri, 7 Aug 2020 00:15:16 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; 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:To:From: Reply-To:Cc:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=ZAvGt68c4zfT9FYJ2BQZ9y3Hz1iK81zmumpBQHALFVI=; b=WaAxVUcevTElNiP0d7HC4zz182 SGGf/0jexLgHKjh59gdsZksXCQJFyyeRFg/r+bMPKCNjaFSpOubdyY0J73Ss0Bdehqc2Woid218r7 wp5I3KWufiuDodd2qtbRefKO3JeVZ1wJPmlisP1mByoSZDEqX7tzPtw719eH3tlWRuKjnQ/ZTjpJl pQjhZW79ddOEw2E5LVNnBvnMyNTx4VLDbEJYJFKTOhdqFz7VSdpZv/ztgglSiU+VlvYoKU+l9KeHl iRklSCG0YR8ekRAuWBgry/JZjCxjrw/DqT0I3quBsc6h990W4ABuoesgmPoMS8VpqSEbgfsalcu+l OXNZeaKg==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1k3geJ-0001Rw-Tx; Thu, 06 Aug 2020 14:13:39 +0000 Received: from mout.kundenserver.de ([217.72.192.75]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1k3geD-0001Pa-DM for openwrt-devel@lists.openwrt.org; Thu, 06 Aug 2020 14:13:34 +0000 Received: from buildfff.adridolf.com ([188.192.134.246]) by mrelayeu.kundenserver.de (mreue108 [212.227.15.183]) with ESMTPSA (Nemesis) id 1Mysa4-1kzcpG1qvy-00vyhi for ; Thu, 06 Aug 2020 16:13:28 +0200 From: Adrian Schmutzler To: openwrt-devel@lists.openwrt.org Subject: [PATCH 3/4] build: image: remove strange useless comment Date: Thu, 6 Aug 2020 16:12:39 +0200 Message-Id: <20200806141241.34383-3-freifunk@adrianschmutzler.de> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200806141241.34383-1-freifunk@adrianschmutzler.de> References: <20200806141241.34383-1-freifunk@adrianschmutzler.de> MIME-Version: 1.0 X-Provags-ID: V03:K1:mGZge7I3GyIY78itV7ComWK1aIW/qLn13YTq6ZeK20dCN4Aunj5 qIX4A+uqFH1bwE04CFTyAeqEujXNp2sLUCvKy+ejb1RnZv1q30bdkTO5mnO2q1htrTpq94G uAsRkrgmTEY4OPdf0hhs90JBqgll1ozJhZzJTA4aL6NYL/dQ3sjEUEnwrmMNbG7u+iLWAsC TJ2FGSn9MlCvjxkVLPpQA== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:hJ+6fxAScaI=:lcBB42Q7WY67Jr/GyII5eq BB3M0IDD1W0ObUh/c2FY+vSF9eERGXY0cOzOAVTZoXWbshN5T7Xori9HKJLcGicBiTTC2KPlV wbVla4+ZVZM+k3/EB3AZ8Doc3tArns+cAj9MNJMFk/iAxqbtyGrOlBwWAhTytHSOydIejHV1t nXgvDCoK9DO63URA867x0wCumrSSpCNpRXAJBNj9xK0Ba3FUVrJvH1wJ0Qms3CqlNWT9FYECv X6DdF/u0vme5wczBXahvAznIb9397CUJDboBrNeslEbM7gOwobhZ7Hr0knpscJdqNraKAQI3K okLY2sHaBwLl0PV7yhQKLt3ipSzLYfiKBuADNHiS5jFgq+A+6CMaPDThBu+rhcBQICadgxqfw Z7QZjA/5v9yuG6/9JFBQdRKJwSsrDOSfIuBmPuXU3kGMttZTPWBCNzyotLsXkMUfmDqwc2mrq O79/UPRg3SL+OtG91uRwLrUR11PIRUl+Ne+zGaZh0+DGCaL1Tj+uxvxh1VOS3lj844dw4+871 4JA+JeR2U7IPl7hpjq/QXX/5W0RauUmpd27azEv73AEaQJ+lefywi2d9os4v7RPAtNugbAUcV wtEd12X2hNm1WVyW1gkxnPaGbsGgyavLO2ZbvVdpp9s2HUDBNIb8oI35hYg6K6gGmFz3qISA1 dRc/OrNebYH9PwxpNmeleUgDdHw9flR3VgveJlruWAC5UtChsSiZwa/rolTOEz6YKpv3w/Y6z /Ww0Kq9xmOykFwSYHvhF4qHJrTz9CReibphdr1XwfcgbHRx93+OS/uos3g8csiyqK8nkAI9ZF WlE4ozObZhbGtarGUOYXLCFEnLR9jhjcttiw+nB7dPchf9/AmEWNSkBbnvYI7x+uk+u6jFSuX KW5vrLIFmQAsaXxMwVUg== X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200806_101333_651952_6DAD15BA X-CRM114-Status: GOOD ( 12.38 ) X-Spam-Score: -0.0 (/) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (-0.0 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [217.72.192.75 listed in wl.mailspike.net] -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [217.72.192.75 listed in list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record X-BeenThere: openwrt-devel@lists.openwrt.org X-Mailman-Version: 2.1.29 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 This "comment" seems to be a leftover from some development work. Remove it. Fixes: 77265e00c70a ("build: add support code for appending metadata to images") Signed-off-by: Adrian Schmutzler --- include/image-commands.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/image-commands.mk b/include/image-commands.mk index 8ed705a7f4..089ed93c67 100644 --- a/include/image-commands.mk +++ b/include/image-commands.mk @@ -381,7 +381,7 @@ endef compat_version=$(if $(DEVICE_COMPAT_VERSION),$(DEVICE_COMPAT_VERSION),1.0) json_quote=$(subst ','\'',$(subst ",\",$(1))) -#")') + metadata_devices=$(if $(1),$(subst "$(space)","$(comma)",$(strip $(foreach v,$(1),"$(call json_quote,$(v))")))) metadata_json = \ '{ $(if $(IMAGE_METADATA),$(IMAGE_METADATA)$(comma)) \ From patchwork Thu Aug 6 14:12:40 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adrian Schmutzler X-Patchwork-Id: 1341737 X-Patchwork-Delegate: freifunk@adrianschmutzler.de Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.openwrt.org (client-ip=2001:8b0:10b:1231::1; helo=merlin.infradead.org; envelope-from=openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=adrianschmutzler.de 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=merlin.20170209 header.b=J3uECaiu; dkim-atps=neutral Received: from merlin.infradead.org (merlin.infradead.org [IPv6:2001:8b0:10b:1231::1]) (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 4BMr9c3Hdhz9sPC for ; Fri, 7 Aug 2020 00:15:16 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; 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:To:From: Reply-To:Cc:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=sxNL5BEO6ynfZ8ImpGuPDyXGjPDGHzCDr3LSJvn1qUs=; b=J3uECaiuGKrKSKgpwIWc3sc0qp vXJLVW0ttFlbbejY6dxnWnklWnXMJLSyNnRAfjqXCx1nf7IUoS5mQEluUFkhJcNxT0Q2UPJsWGVZU 5/JNkEjNs7iaKd8aIbTYk854j0GT2t/9sdLOsSB3boluxI+FzQajdw+GdxlYmvZjX3RFpMni04LT0 +YNyShrtUXauEDLrjRdnfhg1YyLcxB3Ok/IowL2M9/dhu/fCR9F06El9032b/JuC+Oyl+Rvg3M6QI 8QN1UXM2HjoT//EEs95mOo+KUgl3K0diqW6IPv/oTROaeqKAwJMHblsew4CVZTzB4FwiRrmhMBe1/ g9dzfywA==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1k3geH-0001RS-Qk; Thu, 06 Aug 2020 14:13:37 +0000 Received: from mout.kundenserver.de ([217.72.192.73]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1k3geC-0001PR-DD for openwrt-devel@lists.openwrt.org; Thu, 06 Aug 2020 14:13:33 +0000 Received: from buildfff.adridolf.com ([188.192.134.246]) by mrelayeu.kundenserver.de (mreue108 [212.227.15.183]) with ESMTPSA (Nemesis) id 1MIdaF-1jyU852JOf-00EdoH for ; Thu, 06 Aug 2020 16:13:28 +0200 From: Adrian Schmutzler To: openwrt-devel@lists.openwrt.org Subject: [PATCH 4/4] build: improve message for incompatible image on "legacy" devices Date: Thu, 6 Aug 2020 16:12:40 +0200 Message-Id: <20200806141241.34383-4-freifunk@adrianschmutzler.de> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200806141241.34383-1-freifunk@adrianschmutzler.de> References: <20200806141241.34383-1-freifunk@adrianschmutzler.de> MIME-Version: 1.0 X-Provags-ID: V03:K1:yu5yWYQdwZKVtUaIE6Yrtwy1jN2bTHNy993iQZIKH5zUfSey5pL tB/F8SvFDVTIbvX0d4ccuSlJl41/RgOEbHmXHNB48uSX8qCLmhez9DKqfCE4ABfOh1+HBcI SjUoErOtlh6I+8P3R77h8v9uJKlTi8DvxltWv/+4rVmmVJSJNm0zox58DEeK2IR0TNK88mb frAZJL1Axko7rqSD2ZLfQ== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:JNraairPc3U=:GPx+Hz4TOIS4dgQi/HilXr rhDKdpwGmbe1O7mZO7UXTHwbELLHR9t+rdc6oa59wA8OeQHoYyOcRuZQPgg7XHxYxx6Sjaq2I MORDQpOubiI9UCqwifemDRGLMDMwjDx1PAZapqOPwgYkJ+71Su2E+m5DpU/0fnefKLR8rOxv8 a/RjsWuoMfb5mc/9C/0fwbTPPsj7VTOeHyZU7SNmstbKCORZLguNMaScif5u7H1W8vj+RPUNv 2HpzqMwstiXxunRBF8wM9Ur5FUlLOL2VfMubYV1M56ot9YQO0yyeNOM5aygbcvY/rv0JLFpy3 td73HqxqReb6vCgjfs/Jx4KREVvsWrTNmSjt+gLFwdSH2u6yQiVkxGnJSuWtjJ3bVrmryiVvj BglTDqMvxBf/iLLSkAHs2tOuBL4a9ZWObfbWbynt+aSLi92i80qM6jLY7CFSy6u4pwe4CWJIz VvCrOg9f1CtqCCA2CmcwkZOJ+TzF2lSBzKK5VEQF8nHVi/YOwgkuab74n+8GM704efqKU3aBf 8ZczJFw96ksH8TDk4aZrZ4xRMxl4h53JPIx/ENN4L9chJmPmS64vFaLpt2LMzqDRv/t0k3TjK iDSVq/HN5ZpXqfwuafJMyW8G5VQ6Gwa1GgxUgkHNGJdhCihW3f5zpSyJPnhItEJjGXFR1jxZm N8DHfHAZHH1WWpQRjSLaeIPZX9ZRKA6SZJBhYVDoc+6nRmRcQ0O2CnkI4kZ8OLDn3XqblbjHh +LkWB/qWJpDn0nW3Du2MgoZbPbXF8rPRyR0OhscBveKDDLa+QK/PzQILrFVbyfQllrVHS7Hsv xrG3bPNcN2JPRSJW3o67Roa7jc2sKsHkfnCtvKHSW67tnSA6ANzBEPh4mte4bbRh5TnbZKGLk AlGAdRcOVhxpcikveB/Q== X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200806_101332_657843_B6BEC699 X-CRM114-Status: GOOD ( 14.18 ) X-Spam-Score: -0.0 (/) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (-0.0 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [217.72.192.73 listed in wl.mailspike.net] -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [217.72.192.73 listed in list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record X-BeenThere: openwrt-devel@lists.openwrt.org X-Mailman-Version: 2.1.29 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 It has been reported that the current message displayed during upgrade with compat_version change is misleading for "legacy" devices, i.e. those without the "new" fwtool. This is partially caused by the fact that we need to exploit the supported_devices string to get some message text displayed for these devices. This patch modifies the message to make it more helpful and include additional information, e.g. Device linksys,wrt3200acm not supported by this image Supported devices: linksys,wrt3200acm linksys-whateverelse - Image version mismatch: image 1.1, device 1.0. Please wipe config during upgrade (force required) or reinstall. Reason: Config cannot be migrated from swconfig to DSA Note that the line breaks (except the one before Supported devices) are added manually here, I hesitate to hack \n into the supported_devices as well. The "Reason:" will only be displayed if DEVICE_COMPAT_MESSAGE is set for the device, otherwise "Please check documentation ..." will be shown instead. While at it, also rearrange the code in image-commands.mk to make lines shorter and remove the double filter-out command. Signed-off-by: Adrian Schmutzler --- include/image-commands.mk | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/include/image-commands.mk b/include/image-commands.mk index 089ed93c67..74d9877698 100644 --- a/include/image-commands.mk +++ b/include/image-commands.mk @@ -382,15 +382,19 @@ endef compat_version=$(if $(DEVICE_COMPAT_VERSION),$(DEVICE_COMPAT_VERSION),1.0) json_quote=$(subst ','\'',$(subst ",\",$(1))) +legacy_supported_message=$(SUPPORTED_DEVICES) - Image version mismatch: image $(compat_version), \ + device 1.0. Please wipe config during upgrade (force required) or reinstall. \ + $(if $(DEVICE_COMPAT_MESSAGE),Reason: $(DEVICE_COMPAT_MESSAGE),Please check documentation ...) + metadata_devices=$(if $(1),$(subst "$(space)","$(comma)",$(strip $(foreach v,$(1),"$(call json_quote,$(v))")))) metadata_json = \ '{ $(if $(IMAGE_METADATA),$(IMAGE_METADATA)$(comma)) \ "metadata_version": "1.1", \ "compat_version": "$(call json_quote,$(compat_version))", \ $(if $(DEVICE_COMPAT_MESSAGE),"compat_message": "$(call json_quote,$(DEVICE_COMPAT_MESSAGE))"$(comma)) \ - $(if $(filter-out 1.0,$(compat_version)),"new_supported_devices":[$(call metadata_devices,$(SUPPORTED_DEVICES))]$(comma)) \ - $(if $(filter-out 1.0,$(compat_version)),"supported_devices": \ - ["$(call json_quote,Image version $(compat_version) incompatible to device: $(if $(DEVICE_COMPAT_MESSAGE),$(DEVICE_COMPAT_MESSAGE),Please check documentation ...))"]$(comma)) \ + $(if $(filter-out 1.0,$(compat_version)),"new_supported_devices": \ + [$(call metadata_devices,$(SUPPORTED_DEVICES))]$(comma) \ + "supported_devices": ["$(call json_quote,$(legacy_supported_message))"]$(comma)) \ $(if $(filter 1.0,$(compat_version)),"supported_devices":[$(call metadata_devices,$(SUPPORTED_DEVICES))]$(comma)) \ "version": { \ "dist": "$(call json_quote,$(VERSION_DIST))", \