From patchwork Fri Nov 24 10:51:38 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Juerg Haefliger X-Patchwork-Id: 1868113 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 4ScBcw6BCLz1yRy for ; Fri, 24 Nov 2023 21:52:00 +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 1r6Tmj-00008D-I4; Fri, 24 Nov 2023 10:51:45 +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 1r6Tmf-00007y-Ao for kernel-team@lists.ubuntu.com; Fri, 24 Nov 2023 10:51:41 +0000 Received: from mail-lf1-f72.google.com (mail-lf1-f72.google.com [209.85.167.72]) (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 D8B0A40614 for ; Fri, 24 Nov 2023 10:51:40 +0000 (UTC) Received: by mail-lf1-f72.google.com with SMTP id 2adb3069b0e04-50aa6bdf168so1804984e87.1 for ; Fri, 24 Nov 2023 02:51:40 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700823100; x=1701427900; 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=rKe3zLnrXcx93VmoxGu7z13BjlJqR7PJjN85aoc2RPQ=; b=Tqe0DHE2zTqMHAH86eOXokKyOPcd6xVT3gYlR1qA+sVKlCsDBxlN+s6SXrdc63kyYF wHFKzfvj2wSLXQPRNg2EyWnZDqVTBbG6BDP7/yaQe/EhFxTEG8xFCj/xFfPDd2uCGzTf epWd6bOaf5SdrBs/CL6zUAPmGF33dYo5sBm3Q8ZofRto6qEscpGyrUImYzzOAdBxdAwz OUYnuJMnMkTehBUKA5L27d5IpiAcobmYAmHz8wTW4yHWK+GYK++OCkwyc+mSwjPXv4+G d2wPiYNfkrkDH1/Yes0M4t8gHuswGZLDqkmBtboC3efj+IpAt/9DmDKEb1Id72HoJagV OTDg== X-Gm-Message-State: AOJu0YwX963sv9ztFwL0iMxvYNgoXH8xPSnxmTDxFVItdQP/mjA+r44j 82EmwYEgiNgdzdxg65+g7dZJNrwMEJ0wKly+RYEvoxJiV3tiXNDDgnf+a8t7MxMIKZWMMaNSasj PTn1erONUnaW0TtQQlmQTR3jbto2UyW3h7OVpRYM9Z+DtTxBQZg== X-Received: by 2002:a19:ee01:0:b0:500:9214:b308 with SMTP id g1-20020a19ee01000000b005009214b308mr1182920lfb.65.1700823100261; Fri, 24 Nov 2023 02:51:40 -0800 (PST) X-Google-Smtp-Source: AGHT+IGatubhWSKTgqEG+DkljNcAMZmiqqjBjIJHhxP9cXJ6hjbn3UlN6BytQ8hsgNtEzfAvAcXQlg== X-Received: by 2002:a19:ee01:0:b0:500:9214:b308 with SMTP id g1-20020a19ee01000000b005009214b308mr1182907lfb.65.1700823099885; Fri, 24 Nov 2023 02:51:39 -0800 (PST) Received: from localhost ([194.191.244.86]) by smtp.gmail.com with ESMTPSA id d11-20020a056402000b00b0054851cd28d2sm1637959edu.79.2023.11.24.02.51.39 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 24 Nov 2023 02:51:39 -0800 (PST) From: Juerg Haefliger To: kernel-team@lists.ubuntu.com Subject: [Mantic/Noble/Unstable][SRU][PATCH] UBUNTU: [Packaging] Fix kernel module compression failures Date: Fri, 24 Nov 2023 11:51:38 +0100 Message-Id: <20231124105138.86008-1-juerg.haefliger@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" BugLink: https://bugs.launchpad.net/bugs/2044512 The kernel module compression step is run for every binary package, not just the modules packages. This results in a build failure when run in a console for packages that don't contain any .ko files: \# Compress kernel modules find debian/linux-unstable-tools-6.6.0-12 -name '*.ko' -print0 | xargs -0 -n1 -P 8 zstd -19 --quiet --rm stdout is a console, aborting make: *** [debian/rules.d/2-binary-arch.mk:769: binary-perarch] Error 123 Basically, if find returns nothing, zstd tries to read from stdin: $ echo | xargs zstd stdout is a console, aborting $ echo $? 123 To fix that, tell xargs not to run the command if stdin is empty: $ echo | xargs -r zstd $ echo $? 0 Signed-off-by: Juerg Haefliger Acked-by: Manuel Diewald Acked-by: Thibault Ferrante Acked-by: Dimitri John Ledkov Acked-by: Agathe Porte --- 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 79e3e857e2c8..f1950bbdcb92 100644 --- a/debian/rules.d/2-binary-arch.mk +++ b/debian/rules.d/2-binary-arch.mk @@ -542,7 +542,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 -P $(CONCURRENCY_LEVEL) -r zstd -19 --quiet --rm dh_fixperms -p$(1) -X/boot/ dh_shlibdeps -p$(1) $(shlibdeps_opts) dh_installdeb -p$(1)