From nobody Fri May 17 08:39:15 2024 Received: from mail-4317.proton.ch (mail-4317.proton.ch [185.70.43.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 30B5F44C60; Wed, 17 Apr 2024 04:38:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.70.43.17 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713328688; cv=none; b=pF34WATojBQ7qRczFDO89B/bzLn9fbh45FhVI5su+RQ+2geByD7W4mpwooiQEn4SPz1T9WAPyLLXaLCUbCa5Kvd7aEVX7C+Es9OA7TSvSWfQfnc1hJPTK632YUeRDYJYeQnoWKPt0qLOE6iQfz31yj5v7JA6nCkwQGqNpQiUHAA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713328688; c=relaxed/simple; bh=zHKzExQqZWqAwP/VxhFaDjDzbwnfwfF4YYZd/OapYkw=; h=Date:To:From:Cc:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=WdjzeVIKHU5shOYKfxtLfV/SjisgLoMUOX3tfJuNkz+W8TqGOzMZCNjR3VF+D7Isy2nALzp/OOJkPlhBdR4HOQ2sSUdYHjmseuYNBfLDW4wT0VKdqNV3iHAdthZpUliSOOv+Ab7Lm40/KFlIJfhidrfAoliVRt96ibXT5plYTsU= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=thefossguy.com; spf=pass smtp.mailfrom=thefossguy.com; dkim=pass (2048-bit key) header.d=thefossguy.com header.i=@thefossguy.com header.b=TsUJBHv6; arc=none smtp.client-ip=185.70.43.17 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=thefossguy.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=thefossguy.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=thefossguy.com header.i=@thefossguy.com header.b="TsUJBHv6" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=thefossguy.com; s=protonmail; t=1713328680; x=1713587880; bh=pp8p9HGXXcoQWS31K5FE4IE/aNjWd3ZLRLc51c+yVfg=; h=Date:To:From:Cc:Subject:Message-ID:In-Reply-To:References: Feedback-ID:From:To:Cc:Date:Subject:Reply-To:Feedback-ID: Message-ID:BIMI-Selector; b=TsUJBHv6UtUA1uWa0BoAuYeveWbqs9SvbmqunDKvIqL4yRFsKZ24bt0ybsToYzUip UIoAMC8/5ZC7fUNjY/UV/rHCljRY8/P2uSIH7pHvR3rYigwQpU96ipHwgiU4zv85mv E+ilSnfuFSP+wUpfwrwoMmk9EzDta+ps9oCB9D495gAdRL4o90r1+bxQ9kb7HCqON3 R31vONCuiV+Eg3wsL6ZuaOQ0+opEec/qws9gQIITXyQVmf+hnsXoapH3AObiW2jWiK w1Q0PdpSrJijH0lSQ9N57pQKtokigKU6GsrWsMMdC+C1AxnFeeAIkJtwU4Va4sX1dK WnwtY5pcmZP8g== Date: Wed, 17 Apr 2024 04:37:46 +0000 To: Masahiro Yamada , Nathan Chancellor , Nicolas Schier , Jonathan Corbet From: Pratham Patel Cc: linux-kbuild@vger.kernel.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, Pratham Patel , thefirst1322@gmail.com Subject: [PATCH 1/2] kbuild: allow toggling the `with_devel` RPM macro Message-ID: <20240417043654.60662-2-prathampatel@thefossguy.com> In-Reply-To: <20240417043654.60662-1-prathampatel@thefossguy.com> References: <20240417043654.60662-1-prathampatel@thefossguy.com> Feedback-ID: 104309535:user:proton Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" As it stands, there is no way to toggle the `with_devel` RPM macro that is defined in the scripts/package/kernel.spec file, without manually building the RPM. Introduce the Kbuild variable KBUILD_RPM_WITH_DEVEL to toggle the `with_devel` macro when building the binary PRM package. The prior default of not building the `-devel` RPM package is preserved. Signed-off-by: Pratham Patel --- scripts/Makefile.package | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/scripts/Makefile.package b/scripts/Makefile.package index 38653f3e8108..715e068eae60 100644 --- a/scripts/Makefile.package +++ b/scripts/Makefile.package @@ -47,6 +47,8 @@ $(linux-tarballs): .tmp_HEAD FORCE # rpm-pkg srcrpm-pkg binrpm-pkg # ------------------------------------------------------------------------= --- =20 +export KBUILD_RPM_WITH_DEVEL ?=3D 0 + quiet_cmd_mkspec =3D GEN $@ cmd_mkspec =3D $(srctree)/scripts/package/mkspec $@ =20 @@ -71,7 +73,8 @@ rpm-pkg srcrpm-pkg binrpm-pkg: rpmbuild/SPECS/kernel.spec +$(strip rpmbuild -b$(build-type) rpmbuild/SPECS/kernel.spec \ --define=3D'_topdir $(abspath rpmbuild)' \ $(if $(filter a b, $(build-type)), \ - --target $(UTS_MACHINE)-linux --build-in-place --noprep --define=3D'_smp= _mflags %{nil}' \ + --target $(UTS_MACHINE)-linux --build-in-place --noprep \ + --define=3D'_smp_mflags %{nil}' --define=3D'with_devel $(KBUILD_RPM_WITH= _DEVEL)' \ $$(rpm -q rpm >/dev/null 2>&1 || echo --nodeps)) \ $(RPMOPTS)) =20 --=20 2.42.0 From nobody Fri May 17 08:39:15 2024 Received: from mail-4022.proton.ch (mail-4022.proton.ch [185.70.40.22]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D7AA2249FF; Wed, 17 Apr 2024 04:37:59 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.70.40.22 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713328681; cv=none; b=DXuILphBTfCbwGkMbYi5WoOx8RURokxhykKVcLpyjQ5JlDRAd5WrLiLOlGIV5wwvm1n8URcqbpD0IYe7bax3zgkypwAzarXObCFihGL8U2AMxa16WDFCzD1D0Xg2glus+I8AOaURekfxiQgKYtvAkmlEOZUDCiew8Cnq8V6LmMU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713328681; c=relaxed/simple; bh=KX5dGt60kRXkSBH8M6UZCTSOzlReUUj2VrWu2VzGTP8=; h=Date:To:From:Cc:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=flDM29dy3Kye4oowssiB/SG9JB2NDdWj+qPVjBw7s+FTawcPVAgTIM7V7dABC5gLUYOWz9ubr54Cy+ONmjgOzuljqQCNVVNlKubH24jBeSfnY2gRsJ9EZMLcCyb78f57ykntL9N7E2w5ZOQ1PgLHrbZAv/LJdttMjE3gIoe/wsk= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=thefossguy.com; spf=pass smtp.mailfrom=thefossguy.com; dkim=pass (2048-bit key) header.d=thefossguy.com header.i=@thefossguy.com header.b=Hn0Cnc4P; arc=none smtp.client-ip=185.70.40.22 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=thefossguy.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=thefossguy.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=thefossguy.com header.i=@thefossguy.com header.b="Hn0Cnc4P" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=thefossguy.com; s=protonmail; t=1713328677; x=1713587877; bh=KX5dGt60kRXkSBH8M6UZCTSOzlReUUj2VrWu2VzGTP8=; h=Date:To:From:Cc:Subject:Message-ID:In-Reply-To:References: Feedback-ID:From:To:Cc:Date:Subject:Reply-To:Feedback-ID: Message-ID:BIMI-Selector; b=Hn0Cnc4Pkbu6KMaU1AGxgDMbM5vaIPjmlxIdYfg3zIHx+5PBIIOSEyNZ6CGF7Uifi pLQe/89ehnOmoWS9KG2VKKEausXHxGZkMuigygbEVsSaU4sK49wsGt5DhDVRFs7CRa 4UlUrf9iCRvqZsmP0ORdXPJAZbp6cGw8SJ9AJhTXdFOi712Ugca8/JmvzLC+KW+OjW 27FjH64l324YsHH4fYlLrbpw1TjDymKmw3jpHiSBHdnjG7Kftxz3PK73Ohpd3cF1FB 5pp0FQ2VPRJcR3hI9e4QZkmOUzVriCnuKVlJ7saaiTTNuK+OHI0rWL72LivZlycMc8 uw4ZAelDRwVqg== Date: Wed, 17 Apr 2024 04:37:54 +0000 To: Masahiro Yamada , Nathan Chancellor , Nicolas Schier , Jonathan Corbet From: Pratham Patel Cc: linux-kbuild@vger.kernel.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, Pratham Patel , thefirst1322@gmail.com Subject: [PATCH 2/2] docs: kbuild: document KBUILD_RPM_WITH_DEVEL Message-ID: <20240417043654.60662-3-prathampatel@thefossguy.com> In-Reply-To: <20240417043654.60662-1-prathampatel@thefossguy.com> References: <20240417043654.60662-1-prathampatel@thefossguy.com> Feedback-ID: 104309535:user:proton Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" KBUILD_RPM_WITH_DEVEL was added to toggle the `with_devel` RPM macro. Add brief documentation on its usage. Signed-off-by: Pratham Patel --- Documentation/kbuild/kbuild.rst | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Documentation/kbuild/kbuild.rst b/Documentation/kbuild/kbuild.= rst index 9c8d1d046ea5..0b7ae268ac67 100644 --- a/Documentation/kbuild/kbuild.rst +++ b/Documentation/kbuild/kbuild.rst @@ -310,6 +310,12 @@ These two variables allow to override the user@host st= ring displayed during boot and in /proc/version. The default value is the output of the commands whoami and host, respectively. =20 +KBUILD_RPM_WITH_DEVEL +--------------------- +This variable dictates weather creating an RPM package also builds a `-dev= el` +package or not. Set to 1 if you want a `-devel` package. The default value +is 0. + LLVM ---- If this variable is set to 1, Kbuild will use Clang and LLVM utilities ins= tead --=20 2.42.0