Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp1792096rwb; Tue, 27 Sep 2022 19:21:29 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4gNPdRwP6SMdrFxkHrsOMo+DHBN664uLyoTAZ88Dp8FZQXIWppxlQG5fr3DOCA0emBLiyH X-Received: by 2002:a05:6402:1911:b0:451:6e0b:7eee with SMTP id e17-20020a056402191100b004516e0b7eeemr31102567edz.170.1664331688902; Tue, 27 Sep 2022 19:21:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1664331688; cv=none; d=google.com; s=arc-20160816; b=UpGSYiS0CgHu3SGdau1T1YhRDK/1hX228PnqYJWc4nt1Em62piHpdFcxIQwLYd8561 o9Dvla/bHBWi4t2Ea4G9oZjwewcWTvsKqMWm9dc4jUDYmTZj4kp48EZ/R6T7LDXg2vXz 5LLGiFQDsS3DZoHmdjneiKoQzCCmG560R/eywUmtlRZ00cwaPCLkXsxqHWOFKwP+ohJw F6d4BiC54ksyCLN8HW8e81ZUN/FLfGMIU/GmEYbXRE1MoEnvLMNmVRhwqTKG8QYPW6KU b01meJM9a65Q6Xpt+16u9citpqJ60qGs0ovMSkcMnvF1r/CgIM3LMBkWO5cnnTIeDWdz HWsA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature:dkim-filter; bh=XeKuSPgnAvNWCpG2G8pV3A3pJK6QQf7sh1aj1viXMjo=; b=D9xxzyZTtCXKJF9eA8K/E8Us+oq9LIshrf0oRXsspLf3xSEzwz9MARXotqqv3xQzkE mW/8c1xK4vaVHWP0X5WB+Zv0Mof2ClXjAO7dXw3i/cwuzNS/nwnF4HYzaWeiwDRwQXPN Eki4Or7Zv/SGkr6KmQoQKjhNkGnE+ZDozoPE5t4WXVrhFHS+IXtHZaKjHbvL1j9+nYJ9 ZyrUNqRTHSSep4/bm/q4bTdr9eNPs/jQp+W4wBKTMuhIs25cXF91dG59pnhViYmTICEB rVu9OjQKa9/mEKugePldp5i4nhIBW+ZYCZSXhKI4HgPXzdlC3rmgNNiXf+5Q4ibCOPHW bvIA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=Jw35+SYS; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id h1-20020a170906110100b00741c0bd7061si3004785eja.644.2022.09.27.19.21.03; Tue, 27 Sep 2022 19:21:28 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=Jw35+SYS; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232726AbiI1CG3 (ORCPT + 99 others); Tue, 27 Sep 2022 22:06:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40132 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232667AbiI1CG1 (ORCPT ); Tue, 27 Sep 2022 22:06:27 -0400 Received: from conssluserg-04.nifty.com (conssluserg-04.nifty.com [210.131.2.83]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5CB67F508A; Tue, 27 Sep 2022 19:06:23 -0700 (PDT) Received: from mail-oi1-f181.google.com (mail-oi1-f181.google.com [209.85.167.181]) (authenticated) by conssluserg-04.nifty.com with ESMTP id 28S2614p026989; Wed, 28 Sep 2022 11:06:01 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conssluserg-04.nifty.com 28S2614p026989 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1664330761; bh=XeKuSPgnAvNWCpG2G8pV3A3pJK6QQf7sh1aj1viXMjo=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=Jw35+SYSAy/axTS2k4slHRA1Zrc62wXTc6WR7S/ZuLXoNSA+eVT0j2D+buoBB/PC4 S3lY2oSpJdml8cRbng5Y2BdX4ku7L3xaBk0vlg20slt+PsKEFCmdgqsITR46505PwJ psruxj5qQADp09Awktq8vbPMccFLGFWwut7f+AJUXeCIGinRMvA6V/OmX4OqYoJrtX mVWOQESdNkB7SbQ2+wdOtZn+BJCumrFcREJoTfzgJg0/pxdR4vgALNbJnjajn1GtPP qkIsJ7rwBLatYMlJjKztOFZLZtxeTGhOraL6Yq1qR/0U/KT5HTFO1pngmtLP5Wk2z2 Va5NxY1LQWU9g== X-Nifty-SrcIP: [209.85.167.181] Received: by mail-oi1-f181.google.com with SMTP id w13so2041599oiw.8; Tue, 27 Sep 2022 19:06:01 -0700 (PDT) X-Gm-Message-State: ACrzQf0wW7prWSAP9Cv+p9AHYSs9aeRrF3EFcQ6f+azgnIBBjcv9npTn +yrQEdOOSSXUOfHlBGKDlesfnzo7kGwduaam7Rc= X-Received: by 2002:a54:400c:0:b0:34f:9913:262 with SMTP id x12-20020a54400c000000b0034f99130262mr3145596oie.287.1664330760371; Tue, 27 Sep 2022 19:06:00 -0700 (PDT) MIME-Version: 1.0 References: <20220922184525.3021522-1-zack@kde.org> In-Reply-To: From: Masahiro Yamada Date: Wed, 28 Sep 2022 11:05:24 +0900 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH] kbuild: Add an option to skip vmlinux.bz2 in the rpm's To: Zack Rusin Cc: "michal.lkml@markovi.net" , "ndesaulniers@google.com" , "linux-kbuild@vger.kernel.org" , "linux-kernel@vger.kernel.org" Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-1.2 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_SOFTFAIL autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Sep 28, 2022 at 10:09 AM Zack Rusin wrote: > > On Tue, 2022-09-27 at 02:38 +0900, Masahiro Yamada wrote: > > =E2=9A=A0 External Email > > > > On Fri, Sep 23, 2022 at 3:45 AM Zack Rusin wrote: > > > > > > From: Zack Rusin > > > > > > The debug vmlinux takes up the vast majority of space in the built > > > rpm's. While having it enabled by default is a good idea because it > > > makes debugging easier, having an option to skip it is highly valuabl= e > > > for CI/CD systems where small packages are a lot easier to deal with > > > e.g. kernel rpm built using binrpm-pkg on Fedora 36 default 5.19.8 ke= rnel > > > config and localmodconfig goes from 255MB to 65MB which is an almost > > > 4x difference. > > > > > > To skip adding vmlinux.bz2 to the built rpm add SKIP_RPM_VMLINUX > > > environment variable which when set to "y", e.g. via > > > "SKIP_RPM_VMLINUX=3Dy make binrpm-pkg" won't include vmlinux.bz2 in t= he > > > built rpm. > > > > > > Signed-off-by: Zack Rusin > > > Cc: Masahiro Yamada > > > Cc: Michal Marek > > > Cc: Nick Desaulniers > > > Cc: linux-kbuild@vger.kernel.org > > > Cc: linux-kernel@vger.kernel.org > > > --- > > > scripts/package/mkspec | 10 ++++++++-- > > > 1 file changed, 8 insertions(+), 2 deletions(-) > > > > > > diff --git a/scripts/package/mkspec b/scripts/package/mkspec > > > index 7c477ca7dc98..5a71fc0852b0 100755 > > > --- a/scripts/package/mkspec > > > +++ b/scripts/package/mkspec > > > @@ -23,6 +23,12 @@ else > > > M=3DDEL > > > fi > > > > > > +if [ "$RPM_SKIP_VMLINUX" =3D y ]; then > > > + D=3DDEL > > > +else > > > + D=3D > > > +fi > > > + > > > if grep -q CONFIG_DRM=3Dy .config; then > > > PROVIDES=3Dkernel-drm > > > fi > > > @@ -94,8 +100,8 @@ $M $MAKE %{?_smp_mflags} INSTALL_MOD_PATH=3D%{bu= ildroot} modules_install > > > $MAKE %{?_smp_mflags} INSTALL_HDR_PATH=3D%{buildroot}/usr hea= ders_install > > > cp System.map %{buildroot}/boot/System.map-$KERNELRELEASE > > > cp .config %{buildroot}/boot/config-$KERNELRELEASE > > > - bzip2 -9 --keep vmlinux > > > - mv vmlinux.bz2 %{buildroot}/boot/vmlinux-$KERNELRELEASE.bz2 > > > +$D bzip2 -9 --keep vmlinux > > > +$D mv vmlinux.bz2 %{buildroot}/boot/vmlinux-$KERNELRELEASE.bz2 > > > $S$M rm -f %{buildroot}/lib/modules/$KERNELRELEASE/build > > > $S$M rm -f %{buildroot}/lib/modules/$KERNELRELEASE/source > > > $S$M mkdir -p %{buildroot}/usr/src/kernels/$KERNELRELEASE > > > -- > > > 2.34.1 > > > > > > > > > > > > > This came from fc370ecfdb37b853bd8e2118c7ad9f99fa9ac5cd > > I do not know how useful or annoying it is. > > Presumably, it was a cheesy work, and rather annoying than useful. > > > > > > In debian (scripts/package/mkdebian), this kind of stuff is > > a separate debug package, and only built when CONFIG_DEBUG_INFO=3Dy. > > > > > > Take more time in case somebody may come up with a better idea. > > I'd be happy to rework it in whatever way would be more convenient. Becau= se rpm > builds already depend on environment vars due to RPMOPTS I thought this a= pproach was > fitting but I'm not particularly attached to it. The important thing is t= he the end > result of not including vmlinux.bz2 in the rpm itself. > > I think the other reasonable question to ask is: is anyone still using vm= linux.bz2 > from rpms? Because maybe just removing that code completely is the better= option > here. Yes, I like it. --=20 Best Regards Masahiro Yamada