From patchwork Tue Feb 8 13:28:30 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rui Salvaterra X-Patchwork-Id: 1589832 X-Patchwork-Delegate: rsalvaterra@gmail.com 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=u/u3JBS1; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20210112 header.b=aH74SHWI; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.openwrt.org (client-ip=2607:7c80:54:e::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:e::133]) (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 bilbo.ozlabs.org (Postfix) with ESMTPS id 4JtP9w11zYz9s09 for ; Wed, 9 Feb 2022 00:34:12 +1100 (AEDT) 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: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:In-Reply-To:References: List-Owner; bh=BJJMurnT4Y67zhhmsXBVWAjbNkQTVWlIvtQCTWPliXQ=; b=u/u3JBS1Lihlzq LcolMfj0+gJq2lQ3rkV6RPVe8fIhWobT58LAkLJT27zjVeNIeahVHT7AMWBBkrp0cIPQj7RS5jeY9 sWvikxQGuHRF24TFwTax04r2C0LkEO6bwgXGbBoY0POnNo+IvHS5zi31oAucrYsy0Oy/1nCUSBnnj ukhNVBGWEgQflOBMQoILea8zVzm5/Rdx7HGL9vstP8OxvFUb9AaGzdWF4rWuuu+gT1cgU/AARCP3m NGspmDsPTiw0cEaNc1nkQkNOmnZZ+JNhR9K5TEOho7rRqWcSIg0cWMT/ElXrrgtIKsvAdWo8VQ73/ vXGiFePdrNvAZ33zBy8g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nHQav-00E7kl-66; Tue, 08 Feb 2022 13:31:45 +0000 Received: from mail-lf1-x12a.google.com ([2a00:1450:4864:20::12a]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nHQXu-00E6dA-9c for openwrt-devel@lists.openwrt.org; Tue, 08 Feb 2022 13:28:39 +0000 Received: by mail-lf1-x12a.google.com with SMTP id b9so33256617lfq.6 for ; Tue, 08 Feb 2022 05:28:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=VfGYEmhR2rpJCo1C8LJZwtxr5PS4J2f6f+OnzxgjCiA=; b=aH74SHWIee+a06ldSc/116QvFikwk3EZmtKn56uUmXdN2HheVdgX4GLV6lK/Uy5240 DvvNFLD4NXbPJh7WoCJo9+9MXRgvf9w3PsyK3iC0k77JUwbItIKOT6sUFKcia0ZgkxEo QM9AmkIXH+2qFqVVSLVUs0XCj41eK6/KyBTQL0MWweKtM2e7KWxN/nebbG+Zr0mtrtO6 b1szMpc2QHhRG5EQHfizw2QfmA8e/HOjHjMzhLI1sM6bnqEMO7OIeKr+cmo5GVyAwcDI HzL2enygc21KPPz6xGec322cxRGgNimXKGaLZ4t2bWfhZlt6CpQXz/dLgPL2ag9Mi6TR ixnw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=VfGYEmhR2rpJCo1C8LJZwtxr5PS4J2f6f+OnzxgjCiA=; b=XOYftlpSXWwOj215WKTKSzO92qFow46hetzYtjPaVFbPr2sCUWqBZOODKG1qeqG6Lu zCQASylYYi9ftkFW1g+yfIvHnQPkCaDxwcyyNILplN3CaxhtNDPtfDboXthmPP/1ltL+ 3uxFBACuT+GqlwXL0a9ywNdErL3ytosn9RYTz/4INbMKWE1a2/q6u9JEPr//H4NUdlTD X2TI2gFv8Wtr4iaFrCqsme0p6vvMVJ27mUkBnLu4RBI01lUqQTtG5GmhHWGlBnmZ/HTA SEZD6LvQKnGjY2aIPmJR6HS+othoandnzTWfhxlDUeHyCK+gdlKJHDVM1UYSsEMIeP2Z Ji7Q== X-Gm-Message-State: AOAM530XVFfd8Kp2lCkDDwha3oEhYSdahToSMIYB57EOBsgZRl2/8GJd Tqn4zjSq/cJucrG5W9joeOKdvrg84Q== X-Google-Smtp-Source: ABdhPJzhIHtUwEMDvkwaGNewd8ME744hYwiHfb5zDiB1T/Wso/9IhsXlrXSmbYMTqb8/1dVmvLKt+g== X-Received: by 2002:a05:6512:10ce:: with SMTP id k14mr2901018lfg.210.1644326915655; Tue, 08 Feb 2022 05:28:35 -0800 (PST) Received: from crystalwell.adg.lan (a109-49-8-180.cpe.netcabo.pt. [109.49.8.180]) by smtp.gmail.com with ESMTPSA id b20sm1918824lfb.51.2022.02.08.05.28.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 08 Feb 2022 05:28:35 -0800 (PST) From: Rui Salvaterra To: openwrt-devel@lists.openwrt.org Cc: ansuelsmth@gmail.com, jo@mein.io, ynezz@true.cz, Rui Salvaterra Subject: [PATCH] update_kernel.sh: fix unified version file updates Date: Tue, 8 Feb 2022 13:28:30 +0000 Message-Id: <20220208132830.914-1-rsalvaterra@gmail.com> X-Mailer: git-send-email 2.35.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220208_052838_382535_614BF6DC X-CRM114-Status: GOOD ( 10.34 ) 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: The previous commit broke the kernel-version.mk automated update, since the kernel version files are now split. However, older branches still use the unified file, so compatibility must be kept. Check for the presence of the kernel version-specific file. If it doesn't exist, assume we're using the unified file and do the version update accordingly. Content analysis details: (-0.2 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2a00:1450:4864:20:0:0:0:12a 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 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider [rsalvaterra[at]gmail.com] -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 The previous commit broke the kernel-version.mk automated update, since the kernel version files are now split. However, older branches still use the unified file, so compatibility must be kept. Check for the presence of the kernel version-specific file. If it doesn't exist, assume we're using the unified file and do the version update accordingly. Fixes: cbb9d08 ("update_kernel.sh: update it to new kernel hash/version file way") Signed-off-by: Rui Salvaterra --- update_kernel.sh | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/update_kernel.sh b/update_kernel.sh index 2c4bb09..a74f91d 100755 --- a/update_kernel.sh +++ b/update_kernel.sh @@ -155,7 +155,15 @@ if [ "$UPDATE" -eq 1 ]; then CHECKSUM=$(./staging_dir/host/bin/mkhash sha256 dl/linux-$PATCHVER.tar.xz) fi - $CMD ./staging_dir/host/bin/sed -i include/kernel-${KERNEL} \ + if [ -f include/kernel-${KERNEL} ]; then + # split version files + KERNEL_VERSION_FILE=include/kernel-${KERNEL} + else + # unified version file + KERNEL_VERSION_FILE=include/kernel-version.mk + fi + + $CMD ./staging_dir/host/bin/sed -i ${KERNEL_VERSION_FILE} \ -e "s|LINUX_VERSION-${KERNEL} =.*|LINUX_VERSION-${KERNEL} = ${NEWVER}|" \ -e "s|LINUX_KERNEL_HASH-${KERNEL}.*|LINUX_KERNEL_HASH-${PATCHVER} = ${CHECKSUM}|" fi