From patchwork Mon Dec 4 01:37:22 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 1871333 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 4Sk5rw4pHxz23mf for ; Mon, 4 Dec 2023 12:37:51 +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 1r9xtu-0002jZ-Ij; Mon, 04 Dec 2023 01:37:34 +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 1r9xtq-0002jI-0o for kernel-team@lists.ubuntu.com; Mon, 04 Dec 2023 01:37:30 +0000 Received: from mail-ot1-f70.google.com (mail-ot1-f70.google.com [209.85.210.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 9D0B93F18D for ; Mon, 4 Dec 2023 01:37:29 +0000 (UTC) Received: by mail-ot1-f70.google.com with SMTP id 46e09a7af769-6d8063d924aso3566463a34.1 for ; Sun, 03 Dec 2023 17:37:29 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701653848; x=1702258648; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=qHvpUpLNDYO6PHeWpjMJLvcUIs9jLlSWxzwBanBwa4c=; b=gtTEWSF6h1eCHOKNMixCjSHfUrI3688pto++Ju/q9egkOKdAq/YaA9AMs50tRWYKM9 e/7s03JBJYFwMm3qAu56cYMR5IS5f3JtuCmC+XcrE6dv0G1mqDHduTuwDoDSVQ2dSYic OLWKR+JgYXfF2yM/3Y2zEMF9Rrkh5jdwi9AQuaGaGGtEQ/BM7jjDjo8t4DF0GJpHNPxQ ehxeoJNDuhYOwI6SbTBi9qUpEzYKfGBR2wJGXg3+ib15gA5SUsD7CWm6gYPzMZtrwGQi QKqybLuWHt87D5u7d3/N99u7Bkb1j/muCNUtThRIJvE2GKlu7sru4dCpDwbeOr9+VG2A yusA== X-Gm-Message-State: AOJu0YxI4C25fONuFATSPEOoykkoVzTgZ7m9MBq0OKWUjO3KAr6gvJAu DOJRqHgM64l2Ak9WaGRAgyZ/iUjZNAYk3Pcy86wXB/2oRxpDJ6LVXDZY20rwD29CdiuvGnWgEV5 jMguD2OzjKmLpNuAKH7HaV2t+nGe0dkAiyLZp1vvukShr0yF+4Q== X-Received: by 2002:a05:6808:1a0c:b0:3b8:b063:5048 with SMTP id bk12-20020a0568081a0c00b003b8b0635048mr4647674oib.73.1701653848430; Sun, 03 Dec 2023 17:37:28 -0800 (PST) X-Google-Smtp-Source: AGHT+IFXJgeHbl0CxZRAcR7Pcx3d83poUi9yKKBAXSta7EAk16FbAXHLx+snA2JzPWu70wFJLXbmDg== X-Received: by 2002:a05:6808:1a0c:b0:3b8:b063:5048 with SMTP id bk12-20020a0568081a0c00b003b8b0635048mr4647668oib.73.1701653848140; Sun, 03 Dec 2023 17:37:28 -0800 (PST) Received: from zoe.. ([2001:f74:8f00:c00:6aff::1001]) by smtp.gmail.com with ESMTPSA id r17-20020a17090a941100b00263f41a655esm6619633pjo.43.2023.12.03.17.37.26 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 03 Dec 2023 17:37:27 -0800 (PST) From: Masahiro Yamada To: kernel-team@lists.ubuntu.com Subject: [noble PATCH] UBUNTU: SAUCE: do not attempt to compress modules where no module exists Date: Mon, 4 Dec 2023 10:37:22 +0900 Message-Id: <20231204013722.2032205-1-masahiro.yamada@canonical.com> X-Mailer: git-send-email 2.40.1 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" When building the Ubuntu kernel from the terminal, you will encounter a build error like follows: find debian/linux-tools-6.6.0-14 -name '*.ko' -print0 | xargs -0 -n1 -P 24 zstd -19 --quiet --rm stdout is a console, aborting make: *** [debian/rules.d/2-binary-arch.mk:802: binary-perarch] Error 123 This code is implemented in dh_all, so it is executed for all packages, even though not all of them contain modules. Without the -r option, xargs runs the given command at least once. 'zstd -19 --quiet --rm' reads from stdin, and writes to stdout, which is a terminal. The zstd command gracefully errors out instead of messing up the terminal. This issue may go unnoticed when you build the kernel in cbd or launchpad, where the stdout is redirected to a logger. You can observe garbled characters in a log file, at least. Signed-off-by: Masahiro Yamada --- debian/rules.d/2-binary-arch.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debian/rules.d/2-binary-arch.mk b/debian/rules.d/2-binary-arch.mk index 53fbb55c198a..f89efd270e1c 100644 --- a/debian/rules.d/2-binary-arch.mk +++ b/debian/rules.d/2-binary-arch.mk @@ -568,7 +568,7 @@ define dh_all dh_installdocs -p$(1) dh_compress -p$(1) # Compress kernel modules - find debian/$(1) -name '*.ko' -print0 | xargs -0 -n1 -P $(CONCURRENCY_LEVEL) zstd -19 --quiet --rm + find debian/$(1) -name '*.ko' -print0 | xargs -0 -n1 -r -P $(CONCURRENCY_LEVEL) zstd -19 --quiet --rm dh_fixperms -p$(1) -X/boot/ dh_shlibdeps -p$(1) $(shlibdeps_opts) dh_installdeb -p$(1)