From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=45.79.88.28 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796240514; b=dKOOcm5q1hWg+6kIpAkjhKV+E4VWGQKduPyZ6NuVNFFS/TXhndoIrMXDAhEH2TNVNyrU gXP5wXUD8GtEex1BBvNKJHrLtn8BDCrmH5XoXRW7OAYP0cjMQGwr/9L09+XLy+RBSFAx8 /R7ntmGWuzYW6LuBBiBNMbukQGG0kj+yhMlPDRUMMpF1jWQYjdgTO+wgGFw+tP+Pz2jfp GDAd6Suo0SFYN19hv/Y6wU3DdtS4ghdQ2qJKDgnlRX+uXMw60OwGBpIHi1FERwkhjBW1Y Wt0hHj4LWZPeigaSmae67yAGAp/HAy+cKQ95F672/zLR4vD0R2qiugt4lZ6FqVBlIOA== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796240514; h=DMARC-Filter:DKIM-Filter:DKIM-Signature:Received:From:To:Cc:Subject: In-Reply-To:References:Date:Message-ID:MIME-Version:Content-Type; bh=+Q3WQmqBOaZkGx8MIZWQIrCanPDYMgoqwNu5LelO4co=; b=qChHiyS69VggpcyKqSK0nx8on8AwvZ/ivWAYH2I8Zz+bXCGTvqUSk84Wcl89NEK6m+yt hUYoQCRqHXbj5JpLN/EjSCV1phdUNebNb8xDRvyDacg2+mGT3gockr3USGkGN0hM9h1z9 9mNO94waejBOhiLHEP+wczPge1PmJCSNgcwvmTUQU02etVQoygEZ0XcB/VodjUe6rPE2e SS3jFKNMSOPS0x+S/Tz+sHoTJOeaJCFOQ8XVSnp7GZxDNWxozrTH75QJiOVrSIJ4PNibx hjHnAfYZH1oqSqqntDGFxaULLP0UyjHPE/ZGeRBirrPquSPzoXsC0MmvNOQmxs3vvLw== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=lwn.net; spf=pass smtp.mailfrom=lwn.net; dkim=pass header.d=lwn.net header.i=@lwn.net header.a=rsa-sha256 header.s=20201203 header.b=PJeSxAlk; arc=none smtp.remote-ip=45.79.88.28 Received: from ms.lwn.net (ms.lwn.net [45.79.88.28]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4324B606A322 for ; Wed, 2 Dec 2026 19:41:53 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 4324B606A322 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=lwn.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=lwn.net Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=lwn.net header.i=@lwn.net header.a=rsa-sha256 header.s=20201203 header.b=PJeSxAlk DKIM-Filter: OpenDKIM Filter v2.11.0 ms.lwn.net 2728140904 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=lwn.net; s=20201203; t=1796240513; bh=+Q3WQmqBOaZkGx8MIZWQIrCanPDYMgoqwNu5LelO4co=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=PJeSxAlkw2FA2opOiAjsX2AG3bWd9kf11TrY8pJLTQiyVy9t4M2/eYvS28D0GgqsS M1VkmZeI4MlIBjazJqdr0oCSRnj4g2wwzyEFhiD4jpMPbJY7Hlm/hDrw1C73xaErJP JucjjvFmRBHE/+UNeInDPfwFvkdaO6QupA00zsK4b6AuAd0RY7Bphzt3ONmtzGP8Ie LjGzPRhAvez47AfRtmx66BqSoP2oV3A5FBV//m5hg5+/hmFbQkCSBjEfs9Xx8gOxnd a+XPA7QyXF9EAlI8dMlZ5evR+sBUwLhpC8ew4vDdm5S4RmNrseNxKtNIx4Acq+0mdI oCDmBr3oicvaw== Received: from localhost (unknown [IPv6:2601:280:4600:9f::1fe]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (prime256v1) server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by ms.lwn.net (Postfix) with ESMTPSA id 2728140904; Wed, 2 Dec 2026 19:41:53 +0000 (UTC) From: Jonathan Corbet To: Jani Nikula , linux-doc@vger.kernel.org Cc: jani.nikula@intel.com Subject: Re: [PATCH] docs: conf.py: use master_doc instead of hardcoding index In-Reply-To: <20261124163820.1587424-1-jani.nikula@intel.com> References: <20261124163820.1587424-1-jani.nikula@intel.com> Date: Wed, 02 Dec 2026 12:41:52 -0700 Message-ID: <87ld67bhbz.fsf@trenco.lwn.net> X-Mailing-List: linux-doc@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain Jani Nikula writes: > The name of the root document is specified by the master_doc > configuration option. Use that instead of hardcoding "index" in conf.py. > > It would be preferrable to use root_doc, but that was only introduced in > Sphinx 4.0. While at it, add a FIXME comment next to master_doc about > it. It's probably time to consider our minimal Sphinx requirement. Some of those older versions are painful enough to use that *not* supporting them is likely to be a service to humanity. > Signed-off-by: Jani Nikula > --- > Documentation/conf.py | 8 ++++---- > 1 file changed, 4 insertions(+), 4 deletions(-) > > diff --git a/Documentation/conf.py b/Documentation/conf.py > index 5ab26ce89daf..6c986f64f764 100644 > --- a/Documentation/conf.py > +++ b/Documentation/conf.py > @@ -103,9 +103,8 @@ def config_init(app, config): > > # get index.rst, if it exists > doc = os.path.basename(app.srcdir) > - fname = "index" > - if os.path.exists(os.path.join(app.srcdir, fname + ".rst")): > - latex_documents.append((fname, doc + ".tex", > + if os.path.exists(os.path.join(app.srcdir, master_doc + ".rst")): > + latex_documents.append((master_doc, doc + ".tex", > "Linux %s Documentation" % doc.capitalize(), > "The kernel development community", > "manual")) > @@ -114,7 +113,7 @@ def config_init(app, config): > # When building all docs, or when a main index.rst doesn't exist, seek > # for it on subdirectories > for doc in os.listdir(app.srcdir): > - fname = os.path.join(doc, "index") > + fname = os.path.join(doc, master_doc) > if not os.path.exists(os.path.join(app.srcdir, fname + ".rst")): > continue > > @@ -267,6 +266,7 @@ source_suffix = { > # source_encoding = 'utf-8-sig' > > # The master toctree document. > +# FIXME: switch to root_doc when needs_sphinx gets bumped to >= 4.0. > master_doc = "index" Applied, thanks. jon