From patchwork Fri Mar 1 08:25:52 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 1906582 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.ubuntu.com (client-ip=185.125.189.65; helo=lists.ubuntu.com; envelope-from=kernel-team-bounces@lists.ubuntu.com; receiver=patchwork.ozlabs.org) Received: from lists.ubuntu.com (lists.ubuntu.com [185.125.189.65]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4TmLlX173Lz23fC for ; Fri, 1 Mar 2024 19:26:16 +1100 (AEDT) Received: from localhost ([127.0.0.1] helo=lists.ubuntu.com) by lists.ubuntu.com with esmtp (Exim 4.86_2) (envelope-from ) id 1rfyDV-0001XN-B2; Fri, 01 Mar 2024 08:26:05 +0000 Received: from smtp-relay-internal-0.internal ([10.131.114.225] helo=smtp-relay-internal-0.canonical.com) by lists.ubuntu.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1rfyDR-0001Vk-IU for kernel-team@lists.ubuntu.com; Fri, 01 Mar 2024 08:26:01 +0000 Received: from mail-pf1-f200.google.com (mail-pf1-f200.google.com [209.85.210.200]) (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 smtp-relay-internal-0.canonical.com (Postfix) with ESMTPS id 2EC6C3F275 for ; Fri, 1 Mar 2024 08:26:01 +0000 (UTC) Received: by mail-pf1-f200.google.com with SMTP id d2e1a72fcca58-6e5a145ab89so1013801b3a.0 for ; Fri, 01 Mar 2024 00:26:01 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709281559; x=1709886359; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=eBlYlfHdvlJ5PxWjCBy+at1vasIsjLv6BbUz9Glv8Go=; b=sgvw2LqlnuxtJlYC9fgA5CX/IT5zuL4e6zbhRhK0bSs/9TyelGkZtz5Glc0mn3M6rC X7ZiqEO92k5VUMRwFlAm0K5xVVKby+UZQqxtPm5+zcFM9Vc8fBPta6c52oJxBTE9OHhW pf8EpROx12I6FikRPtScZbwKBBKtUacTLLqG43XMz5ih7P5p7SzDKixfVFUCYiDqynkb iKGiq+wlWdBCmH1UPhyPKKi24B7ayZOBS+OdnfrC7zizXC5gmeqO0NaiR+bEAnsqYfoy 0rj4jaM5QLkB1Uc5HDKRef6ssweAGtsb2mqwsMTn+FHl5VyB03xLOER7q0kyGaQLKYmJ rdrA== X-Gm-Message-State: AOJu0YymU1y3/Py03LgNOmyKlLf6F//IF1YCFrPeARz8LIVDk7+c710R 1nFByVofOFCPR18tDUB0kLRZ4HK4tX9bOC+rQwwgPGOV6q4gzTbePIYGV5MxxyXsavWYEZ3GkOY /eWaRh8K/QaUY54+J9Za4bxLozmI5ZuU32dANPoztfSkaiwDlTDaOrQQi/I8stYdGj2EggbjfXX fJHhz9R9mcMA== X-Received: by 2002:a05:6a20:3c8d:b0:19c:ad6b:e1c2 with SMTP id b13-20020a056a203c8d00b0019cad6be1c2mr905721pzj.12.1709281559430; Fri, 01 Mar 2024 00:25:59 -0800 (PST) X-Google-Smtp-Source: AGHT+IF7qnaeEANpqsEqkdzSSfNtDTm+dr4Pgzu4wqmddHHoBz7BmH10SEjaXy3rx/imUh8EWX8Cow== X-Received: by 2002:a05:6a20:3c8d:b0:19c:ad6b:e1c2 with SMTP id b13-20020a056a203c8d00b0019cad6be1c2mr905705pzj.12.1709281559096; Fri, 01 Mar 2024 00:25:59 -0800 (PST) Received: from zoe.. ([2001:f74:8f00:c00:6aff::1001]) by smtp.gmail.com with ESMTPSA id e3-20020aa79803000000b006e5667793d4sm2444568pfl.66.2024.03.01.00.25.58 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 01 Mar 2024 00:25:58 -0800 (PST) From: Masahiro Yamada To: kernel-team@lists.ubuntu.com Subject: [Unstable/Noble PATCH 1/2] UBUNTU: [packaging] do not use 'return' outside functions of shell script Date: Fri, 1 Mar 2024 17:25:52 +0900 Message-Id: <20240301082553.1138917-2-masahiro.yamada@canonical.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20240301082553.1138917-1-masahiro.yamada@canonical.com> References: <20240301082553.1138917-1-masahiro.yamada@canonical.com> MIME-Version: 1.0 X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.20 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: kernel-team-bounces@lists.ubuntu.com Sender: "kernel-team" On Ubuntu, /bin/sh is a symlink to /bin/dash by default. While this is a rare use case, when /bin/sh is a symlink to /bin/bash, the annotation check fails due to a mismatch of CONFIG_UBUNTU_ODM_DRIVERS. debian/scripts/misc/arch-has-odm-enabled.sh always fails with bash. You can see it if you directly execute it. [with dash] $ dash debian/scripts/misc/arch-has-odm-enabled.sh amd64 cat: debian/scripts/misc/../../../debian.master/rules.d/hooks.mk: No such file or directory $ echo $? 0 [with bash] $ bash debian/scripts/misc/arch-has-odm-enabled.sh amd64 cat: debian/scripts/misc/../../../debian.master/rules.d/hooks.mk: No such file or directory debian/scripts/misc/arch-has-odm-enabled.sh: line 26: return: can only `return' from a function or sourced script $ echo $? 2 Bash provides stricter checks, hence the 'return' statement outside a function leads to an error. Replace or remove inappropriate 'return'. Signed-off-by: Masahiro Yamada --- debian/scripts/misc/arch-has-odm-enabled.sh | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/debian/scripts/misc/arch-has-odm-enabled.sh b/debian/scripts/misc/arch-has-odm-enabled.sh index b812cc091983..b71e55620963 100755 --- a/debian/scripts/misc/arch-has-odm-enabled.sh +++ b/debian/scripts/misc/arch-has-odm-enabled.sh @@ -20,7 +20,5 @@ for f in $ARCH.mk hooks.mk; do eval $(cat $RULESDIR/$f | sed -n -e '/do_odm_drivers/s/ \+//gp') done if [ "$do_odm_drivers" != "true" ]; then - return 1 + exit 1 fi - -return 0 From patchwork Fri Mar 1 08:25:53 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 1906583 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.ubuntu.com (client-ip=185.125.189.65; helo=lists.ubuntu.com; envelope-from=kernel-team-bounces@lists.ubuntu.com; receiver=patchwork.ozlabs.org) Received: from lists.ubuntu.com (lists.ubuntu.com [185.125.189.65]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4TmLlc585Jz23l2 for ; Fri, 1 Mar 2024 19:26:20 +1100 (AEDT) Received: from localhost ([127.0.0.1] helo=lists.ubuntu.com) by lists.ubuntu.com with esmtp (Exim 4.86_2) (envelope-from ) id 1rfyDb-0001Ye-Ob; Fri, 01 Mar 2024 08:26:11 +0000 Received: from smtp-relay-internal-1.internal ([10.131.114.114] helo=smtp-relay-internal-1.canonical.com) by lists.ubuntu.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1rfyDT-0001Wq-M4 for kernel-team@lists.ubuntu.com; Fri, 01 Mar 2024 08:26:04 +0000 Received: from mail-il1-f200.google.com (mail-il1-f200.google.com [209.85.166.200]) (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 smtp-relay-internal-1.canonical.com (Postfix) with ESMTPS id 133433F281 for ; Fri, 1 Mar 2024 08:26:02 +0000 (UTC) Received: by mail-il1-f200.google.com with SMTP id e9e14a558f8ab-3651d2b88aeso18812585ab.1 for ; Fri, 01 Mar 2024 00:26:02 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709281560; x=1709886360; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=zUD/uqij7zFV6j1I8Vh7Mu0hAGzIWKUUf3r8okLOEdc=; b=DGbrkfv+1dy6k6QgGXpdh1CVjhtmYu6LVRobSP2Dlh6YDfsX4uS65y9D+LE7yRCcv2 2k2MIlLSaIQmr106ekRONicOu01UunyPwEZUhQ+CDN78M3qzyvO93ebSzPSY7Hh7XqGY b8puCRnXsQMycJsSp1a7IRqVbY2TjnJ4VDE4w8y/XBrQzQB1o5xSrIjLw3UMAL2Bbrmi UMMDUf47UV6DmLVvO939ZcM1eXR7JwPtF43Wi86EDeDeMO+WzGMTemDNxHgeoaHis5gx /FmooOEZjQ35z0j0PZ7nFUA/kgXo7T48HAA03kzo6Cad8D5v/n4N/PBcvbMc0fRsMTX1 3+EA== X-Gm-Message-State: AOJu0YyFTQwDefOwmRN+5ndds8BKtowq32ebsZnr6dDHDZbMVhNxqRqm Xqb/ooCeohS9xWJQfqZ1XZ40aVB13ncbcrnBkYpEnLOGuAa3Asi9w+B7eHPdC5McaDGHHbnAmzv +GwmFzUHWudHVehQvb2iNuwi5c2T3wCM5eSlKYO5L22s6NWJ7BIDXaVe7NSE9jUdBOxatr/Wr2Z caQfrOjjScFg== X-Received: by 2002:a05:6e02:1cae:b0:364:4c:8dc4 with SMTP id x14-20020a056e021cae00b00364004c8dc4mr942648ill.6.1709281560616; Fri, 01 Mar 2024 00:26:00 -0800 (PST) X-Google-Smtp-Source: AGHT+IHO4Huy62jwJgqkoIHtBkekoxTMAp62XTE1QMltFTibPFn6w2iGQr+2curM6rbepD658jEQXQ== X-Received: by 2002:a05:6e02:1cae:b0:364:4c:8dc4 with SMTP id x14-20020a056e021cae00b00364004c8dc4mr942643ill.6.1709281560346; Fri, 01 Mar 2024 00:26:00 -0800 (PST) Received: from zoe.. ([2001:f74:8f00:c00:6aff::1001]) by smtp.gmail.com with ESMTPSA id e3-20020aa79803000000b006e5667793d4sm2444568pfl.66.2024.03.01.00.25.59 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 01 Mar 2024 00:25:59 -0800 (PST) From: Masahiro Yamada To: kernel-team@lists.ubuntu.com Subject: [Unstable/Noble PATCH 2/2] UBUNTU: [packaging] do not parse removed debian.*/rules.d/hooks.mk Date: Fri, 1 Mar 2024 17:25:53 +0900 Message-Id: <20240301082553.1138917-3-masahiro.yamada@canonical.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20240301082553.1138917-1-masahiro.yamada@canonical.com> References: <20240301082553.1138917-1-masahiro.yamada@canonical.com> MIME-Version: 1.0 X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.20 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: kernel-team-bounces@lists.ubuntu.com Sender: "kernel-team" Commit "UBUNTU: [Packaging] Remove do_enforce_all variable" removed debian.master/rules.d/hooks.mk. Since then, debian/scripts/misc/arch-has-odm-enabled.sh, if executed directly, emits the following error: $ dash debian/scripts/misc/arch-has-odm-enabled.sh amd64 cat: debian/scripts/misc/../../../debian.master/rules.d/hooks.mk: No such file or directory This is harmless because the error in a piped command is ignored, and people are not even aware of it because stderr from this script is suppressed by default. Just a trivial cleanup. Signed-off-by: Masahiro Yamada --- debian/scripts/misc/arch-has-odm-enabled.sh | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/debian/scripts/misc/arch-has-odm-enabled.sh b/debian/scripts/misc/arch-has-odm-enabled.sh index b71e55620963..d18611cdf923 100755 --- a/debian/scripts/misc/arch-has-odm-enabled.sh +++ b/debian/scripts/misc/arch-has-odm-enabled.sh @@ -13,12 +13,9 @@ fi TOPDIR=$(dirname $0)/../../.. . $TOPDIR/debian/debian.env -RULESDIR=$TOPDIR/$DEBIAN/rules.d do_odm_drivers=false -for f in $ARCH.mk hooks.mk; do - eval $(cat $RULESDIR/$f | sed -n -e '/do_odm_drivers/s/ \+//gp') -done +eval $(cat "$TOPDIR/$DEBIAN/rules.d/$ARCH.mk" | sed -n -e '/do_odm_drivers/s/ \+//gp') if [ "$do_odm_drivers" != "true" ]; then exit 1 fi