Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751269AbdGPH3v convert rfc822-to-8bit (ORCPT ); Sun, 16 Jul 2017 03:29:51 -0400 Received: from smtp1.goneo.de ([85.220.129.30]:39162 "EHLO smtp1.goneo.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750945AbdGPH3t (ORCPT ); Sun, 16 Jul 2017 03:29:49 -0400 X-Spam-Flag: NO X-Spam-Score: -2.799 Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 10.3 \(3273\)) Subject: Re: [PATCH RFC] scripts/sphinx-pre-install: add a script to check Sphinx install From: Markus Heiser In-Reply-To: <20170715094940.2bcd7eab@vento.lan> Date: Sun, 16 Jul 2017 09:29:35 +0200 Cc: Linux Doc Mailing List , Mauro Carvalho Chehab , linux-kernel@vger.kernel.org, Jonathan Corbet Content-Transfer-Encoding: 8BIT Message-Id: References: <7ab9f1045ad103f1da56cb6b19948ea107fdb272.1500050599.git.mchehab@s-opensource.com> <042D234A-6B3D-43D4-84BA-8332C0596AA4@darmarit.de> <20170714232140.0608da3c@vento.lan> <1719549A-CDF5-4448-8CD6-28B52802E00A@darmarit.de> <20170715094940.2bcd7eab@vento.lan> To: Mauro Carvalho Chehab X-Mailer: Apple Mail (2.3273) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 3498 Lines: 114 Hy Mauro, thanks a lot for your RFC, your patch consolidate a lot of knowledge around Sphinx build requirements and brings a huge value I will no longer miss. I tested v6 of this patch on ubuntu and there is only some conceptual bikeshedding I can do. > Am 15.07.2017 um 14:49 schrieb Mauro Carvalho Chehab : > > As I said, the idea is to let the user to decide what it wants. > > I focused on the packaging approach first because such logic > is required for other packages. Now that it is working, just > sent a version 5 that will use virtualenv for Sphinx by default. Thanks! .. I don't know how I can make it better (I'am not a perl programmer) but it seems, that global my @missing; my @opt_missing; and the "sub add_package" is dominant, while the 'virtaulenv' is glued in .. may we can find a better structure (later). > Yet, before spending more time on such script, I'd like to have > more feedback if: > > - is this approach acceptable? Truly Yes! I see, there is a value in the the "OS-packaging approach" even if I prefer the "native-packaging approach". Last means I like to use the native packaging tools from python and LiveTeX. For python, instead of : printf "\t$virtualenv sphinx_1.4\n"; printf "\tpip install 'docutils==0.12'\n"; printf "\tpip install 'Sphinx==1.4.9'\n"; printf "\tpip install sphinx_rtd_theme\n"; add Documentation/sphinx/requirements.txt: --- docutils==0.12 Sphinx==1.4.9 sphinx_rtd_theme --------------------- And the print ... printf "\t$virtualenv sphinx_1.4\n"; printf "\tpip install -r Documentation/sphinx/requirements.txt\n"; For TexLive: ATM I have no idea how to set up a *requierements* file and install everything without sudo. But I have seen your 'kpsewhich' approach which is very interesting for me. I suppose a solution for this will end in a combination of 'kpsewhich' and 'tlmgr'. But for this I have to do more investigations / sorry that I can't spend more time on this task right now. > - should it have an optional argument that will make the > script to run the needed commands; No. We can do this later upstream. > - should it be integrated at the Documentation/Makefile? No. > - what's the best name/location for such script? I like to see the script under Documentation/sphinx > I guess it could also use kpsewhich to check if the needed > texlive packages are installed. However, the problem with such > approach is that texlive-kpathsea-bin package should be installed > first, in order to provide such command. I see you have solved it in v6 .. Thanks! > > So, installing PDF and math dependencies would require two steps. > >> I tested sphinx-pre-install and it works fine for me, thats not the >> point. The point is: what do we recommend? E.g. for me it advices me >> to run: >> >> sudo apt-get install python3-sphinx python3-sphinx-rtd-theme >> >> We should not assume that the developer (better: the build-user) owns the >> privilege to install fine grained OS packages. There is a admin-part and >> a user-part: > > That's not relevant. Typically, anyone that is building a Kernel has > admin privileges, otherwise it can't actually test the Kernel that was > built. Hmm .. buildbots and Continuous Integration (CI)? > Ok, there are exceptions to that, but, on such case, the user should > be able to request the admin to install whatever packages are needed > to build the Kernel. > > Thanks, > Mauro