From patchwork Wed Apr 17 04:37:46 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pratham Patel X-Patchwork-Id: 13632859 Received: from mail-4323.proton.ch (mail-4323.proton.ch [185.70.43.23]) (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 3C37543AB3 for ; Wed, 17 Apr 2024 04:38:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.70.43.23 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713328689; cv=none; b=D7q6tc6xWVPhI2GxfAyzIK41/kvXS7mmhZcCffTgZoVb/LRvhNK2ar3GOT2JygROytPXP+UwdVsWAYEwGO+arU1etXQb5V2m6qKcgZQAr0EE+8RzLGB2jipd6UNYiIFXqVz6Z9LALwYVhCA20olbp4jt2gkOf5bQ3D7EvnKFyS0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713328689; c=relaxed/simple; bh=zHKzExQqZWqAwP/VxhFaDjDzbwnfwfF4YYZd/OapYkw=; h=Date:To:From:Cc:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=VuFFpG8FhAVQjjM866sVwN4oqdtVay9/G8uPtAi5ekmbBotXEZkdRfnJRMRBMBJbT6pLpjwhGUkNyOl6W6gni9g/DBzytU7mvOPh9YTNTy9L5xBVMSjs1uyIidTu7VImfSq6h4W+eJNSKH+Cgiaupneqdc9Z6rkzjXtCS13ITLA= 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.23 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-kbuild@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 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 # --------------------------------------------------------------------------- +export KBUILD_RPM_WITH_DEVEL ?= 0 + quiet_cmd_mkspec = GEN $@ cmd_mkspec = $(srctree)/scripts/package/mkspec $@ @@ -71,7 +73,8 @@ rpm-pkg srcrpm-pkg binrpm-pkg: rpmbuild/SPECS/kernel.spec +$(strip rpmbuild -b$(build-type) rpmbuild/SPECS/kernel.spec \ --define='_topdir $(abspath rpmbuild)' \ $(if $(filter a b, $(build-type)), \ - --target $(UTS_MACHINE)-linux --build-in-place --noprep --define='_smp_mflags %{nil}' \ + --target $(UTS_MACHINE)-linux --build-in-place --noprep \ + --define='_smp_mflags %{nil}' --define='with_devel $(KBUILD_RPM_WITH_DEVEL)' \ $$(rpm -q rpm >/dev/null 2>&1 || echo --nodeps)) \ $(RPMOPTS)) From patchwork Wed Apr 17 04:37:54 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pratham Patel X-Patchwork-Id: 13632858 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-kbuild@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 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 string displayed during boot and in /proc/version. The default value is the output of the commands whoami and host, respectively. +KBUILD_RPM_WITH_DEVEL +--------------------- +This variable dictates weather creating an RPM package also builds a `-devel` +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 instead