From patchwork Fri Jun 17 15:00:55 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dimitri John Ledkov X-Patchwork-Id: 1644875 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=canonical.com header.i=@canonical.com header.a=rsa-sha256 header.s=20210705 header.b=lB8aX5j1; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.ubuntu.com (client-ip=91.189.94.19; helo=huckleberry.canonical.com; envelope-from=kernel-team-bounces@lists.ubuntu.com; receiver=) Received: from huckleberry.canonical.com (huckleberry.canonical.com [91.189.94.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4LPj0w6cDkz9sG0 for ; Sat, 18 Jun 2022 01:01:19 +1000 (AEST) Received: from localhost ([127.0.0.1] helo=huckleberry.canonical.com) by huckleberry.canonical.com with esmtp (Exim 4.86_2) (envelope-from ) id 1o2DTF-0006IX-FZ; Fri, 17 Jun 2022 15:01:13 +0000 Received: from smtp-relay-internal-1.internal ([10.131.114.114] helo=smtp-relay-internal-1.canonical.com) by huckleberry.canonical.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1o2DTB-0006H4-RF for kernel-team@lists.ubuntu.com; Fri, 17 Jun 2022 15:01:09 +0000 Received: from mail-wr1-f70.google.com (mail-wr1-f70.google.com [209.85.221.70]) (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 2D2B43F11D for ; Fri, 17 Jun 2022 15:01:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1655478069; bh=9m0K2m//ctaSkmtzQocUv0/8O45xHb59uAmF5u3ZEDs=; h=From:To:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=lB8aX5j19P08+k0lSEENsZ1YNiAFrzrtIPM+Wo7UAyt2bHMEHQRdgbJBXim9ljojZ TIY1OwT6Q8vxI8Azduo/rkuiVmNRl2b3nJ+DU4CgRapU0/m50mfMQV927UhqAkN6Ag dIkdQSpz3qPHpsm4Q9GIJaH+9K9/RLC+zryRRu1O1Qy5R+0KLHWVsQNXdYcgGkuTPa b2oQwyf2H24PonY7UBNsYLfBwZmeP/yU4doltunHjhw/mwQSryYVHkT+BdcYGkvROJ Blf990CYbNuvOHHHQKFqnoHcQelSaU4C0DzK9v1HQyuXybgZQPI1e9jtIeZm4sjwRt NHD3gy/kmc5Qg== Received: by mail-wr1-f70.google.com with SMTP id r13-20020adff10d000000b002160e9d64f8so1054508wro.0 for ; Fri, 17 Jun 2022 08:01:09 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=9m0K2m//ctaSkmtzQocUv0/8O45xHb59uAmF5u3ZEDs=; b=KH8OECO0IqjGYdFOEMcl/dG9JIVhBm6Bbfc6Xlc8VDDL+D7kS61ml7Fk+i+n695OUP cMVmHKygxP+paazR8AHZzGKqRKar+WEQ+tsUjdGDNEjszy3T+dYvA3SiqrBn2cWXV2Y6 PauelRxFX6muLwDqxDesYljkBEEJQc6SqKYgcS6dFKJt+KOsX0bHHv8mVuuZoZEuyrTV JuAT9X1zu7Q5sSUWhFkPYkSKmXrquBZlFU5vfCChR+Rqfxmnd+9Xuz6+kDS4+ENk1Ddb 9PFEZP82OuRAOEN9QwhMskeHPTjuiI4vAL3fHomPWubFujuNthPYGIQHsXlLBtA62syJ mNkQ== X-Gm-Message-State: AJIora8AS6jh/H9i2Iq3bmMWT+vIsJMgaoViquX9FmW55/ECzMHLPXTB gaV9atJVcoDedJ9b8FzdpQ5O0yq1LPKQOzkl8j+dWDh+cCFPMIh8MaSgz93DMyv3Wh5D0yShzKp JufMf+ZEFiU16tQOgJ6C1q+YjQcruoi91t/cs0E6kaQ== X-Received: by 2002:a5d:4b81:0:b0:216:592a:9775 with SMTP id b1-20020a5d4b81000000b00216592a9775mr9913110wrt.350.1655478068459; Fri, 17 Jun 2022 08:01:08 -0700 (PDT) X-Google-Smtp-Source: AGRyM1skbiymQvQthblXSDBLtaWxuRb9nnVIilQEcCzaN/HRndPLTjleLz2P289+1FWMGedeCzrFGw== X-Received: by 2002:a5d:4b81:0:b0:216:592a:9775 with SMTP id b1-20020a5d4b81000000b00216592a9775mr9913081wrt.350.1655478068147; Fri, 17 Jun 2022 08:01:08 -0700 (PDT) Received: from localhost ([2a01:4b00:85fd:d700:9cce:a6ab:7f23:ac52]) by smtp.gmail.com with ESMTPSA id n8-20020a5d4c48000000b0021b8213fa3bsm1141512wrt.19.2022.06.17.08.01.07 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 17 Jun 2022 08:01:07 -0700 (PDT) From: Dimitri John Ledkov To: kernel-team@lists.ubuntu.com Subject: [JAMMY][linux-hwe-5.17][PATCH 2/3] UBUNTU: [Packaging] Fix bashism in dkms-build script Date: Fri, 17 Jun 2022 16:00:55 +0100 Message-Id: <20220617150056.74671-3-dimitri.ledkov@canonical.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20220617150056.74671-1-dimitri.ledkov@canonical.com> References: <20220617150056.74671-1-dimitri.ledkov@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" dkms-build script uses bashism variable and test comparison, replace them with dash compatible invocations. This allows using dkms-build scripts without SHELL variable set to "bash -e", like it is done by LRM packages. Signed-off-by: Dimitri John Ledkov Acked-by: Tim Gardner Signed-off-by: Paolo Pisati Signed-off-by: Dimitri John Ledkov --- debian/scripts/dkms-build | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/debian/scripts/dkms-build b/debian/scripts/dkms-build index 9d78fc60e6..d9b580c6a7 100755 --- a/debian/scripts/dkms-build +++ b/debian/scripts/dkms-build @@ -1,4 +1,4 @@ -#!/bin/bash +#!/bin/sh set -e dkms_dir="$1" @@ -159,7 +159,7 @@ dkms_version=$( sed -ne 's/PACKAGE_VERSION="\(.*\)"/\1/p' "$dkms_conf" ) # Build the DKMS binaries. echo "II: dkms-build building $package" fakeroot="" -[[ $EUID -ne 0 ]] && fakeroot="/usr/bin/fakeroot" +[ $(id -u) -ne 0 ] && fakeroot="/usr/bin/fakeroot" rc=0 $fakeroot /usr/sbin/dkms build --no-prepare-kernel --no-clean-kernel \ -k "$abi_flavour" \