27 Jan, 2022

2 commits

  • commit 87d6576ddf8ac25f36597bc93ca17f6628289c16 upstream.

    The name of the package with ctexhook.sty is different on
    Debian/Ubuntu.

    Reported-by: Akira Yokosawa
    Signed-off-by: Mauro Carvalho Chehab
    Tested-by: Akira Yokosawa
    Link: https://lore.kernel.org/r/63882425609a2820fac78f5e94620abeb7ed5f6f.1641429634.git.mchehab@kernel.org
    Signed-off-by: Jonathan Corbet
    Signed-off-by: Greg Kroah-Hartman

    Mauro Carvalho Chehab
     
  • commit 7baab965896eaeea60a54b8fe742feea2f79060f upstream.

    After a change meant to fix support for oriental characters
    (Chinese, Japanese, Korean), ctex stylesheet is now a requirement
    for PDF output.

    Reported-by: Christoph Hellwig
    Signed-off-by: Mauro Carvalho Chehab
    Link: https://lore.kernel.org/r/165aa6167f21e3892a6e308688c93c756e94f4e0.1641243581.git.mchehab@kernel.org
    Signed-off-by: Jonathan Corbet
    Signed-off-by: Greg Kroah-Hartman

    Mauro Carvalho Chehab
     

02 Jun, 2021

2 commits

  • The pip packages are only needed when the distro-provided
    Sphinx version is not good enough.

    Don't recommend installing it if not needed.

    Signed-off-by: Mauro Carvalho Chehab
    Link: https://lore.kernel.org/r/04ce53b77b37f1e495c3abc39c2d3dc407895dc0.1621949137.git.mchehab+huawei@kernel.org
    Signed-off-by: Jonathan Corbet

    Mauro Carvalho Chehab
     
  • The sphinx-pre-install supports installing sphinx via a virtual
    environment using pip/pypi or directly from the distribution's
    package, when --no-virtualenv is used.

    However, even when --no-virtualenv, the current logic is
    still recomending to install a virtual env, due to a regression.

    It turns that the logic there is complex, as it depends on
    several different conditions.

    Split the code which recommends Sphinx on two separate
    functions, in order to clean up the code.

    Signed-off-by: Mauro Carvalho Chehab
    Link: https://lore.kernel.org/r/9dedaec201803017b7a7dc24a074f3a4f040b72a.1621949137.git.mchehab+huawei@kernel.org
    Signed-off-by: Jonathan Corbet

    Mauro Carvalho Chehab
     

16 Apr, 2021

1 commit


02 Feb, 2021

1 commit

  • The kernel build system as a whole is dropping support for Python 2, so we
    should do the same. The effects are rather small, especially considering
    that much of the deleted code was not doing anything under any version of
    Python anyway.

    Signed-off-by: Jonathan Corbet

    Jonathan Corbet
     

08 Dec, 2020

1 commit

  • Change every shebang which does not need an argument to use /usr/bin/env.
    This is needed as not every distro has everything under /usr/bin,
    sometimes not even bash.

    Signed-off-by: Finn Behrens
    Signed-off-by: Masahiro Yamada

    Finn Behrens
     

26 Jun, 2020

1 commit

  • The sphinx-pre-install script will put out a verbose message recommending
    an upgrade for anybody running less than 2.4.4 - which was only released in
    March. So *everybody* will see that warning at this point. Let's only
    warn if the user is below our generally recommended version (1.7.9
    currently).

    It might be good to put out a warning if people are explicitly making PDF
    files, but would need to be done in a different place and relatively few
    people do that.

    Signed-off-by: Jonathan Corbet

    Jonathan Corbet
     

29 Apr, 2020

5 commits

  • When the script detects the need for an upgrade, it will
    print either a warning or a note.

    Let's change a little bit the order where messages will be
    displayed, in order to make easier for the user to identify
    the more important messages.

    It should now be like this:

    Detected OS: Fedora release 31 (Thirty One).
    Sphinx version: 1.7.9

    Note: It is recommended at least Sphinx version 2.4.4 if you need PDF support.
    To upgrade Sphinx, use:

    /usr/bin/python3 -m venv sphinx_2.4.4
    . sphinx_2.4.4/bin/activate
    pip install -r ./Documentation/sphinx/requirements.txt

    If you want to exit the virtualenv, you can use:
    deactivate

    All optional dependencies are met.
    Needed package dependencies are met.

    Signed-off-by: Mauro Carvalho Chehab
    Link: https://lore.kernel.org/r/20200421182758.04e0a53e@coco.lan
    Signed-off-by: Jonathan Corbet

    Mauro Carvalho Chehab
     
  • When python3 creates a venv, it adds python into it!

    This causes any upgrade recommendation to look like this:

    /devel/v4l/docs/sphinx_1.7.9/bin/python3 -m venv sphinx_2.4.4
    . sphinx_2.4.4/bin/activate
    pip install -r ./Documentation/sphinx/requirements.txt

    With is wrong (and it may not work). So, when recomending
    an upgrade, exclude the venv dir from the search path, and
    get the system's python.

    Signed-off-by: Mauro Carvalho Chehab
    Link: https://lore.kernel.org/r/aa622ff71bebf6960fc0262fb90e7ebc7a999a02.1587478901.git.mchehab+huawei@kernel.org
    Signed-off-by: Jonathan Corbet

    Mauro Carvalho Chehab
     
  • If one is running a Sphinx version older than what's recommended,
    but there's already a newer working virtual env, change the
    text, as it is just a matter of switching to the new venv, instead
    of creating a new one from scratch.

    Signed-off-by: Mauro Carvalho Chehab
    Link: https://lore.kernel.org/r/bcf79d0399a1c3444ca938dcdce599c3273980ab.1587478901.git.mchehab+huawei@kernel.org
    Signed-off-by: Jonathan Corbet

    Mauro Carvalho Chehab
     
  • As requested by Jon, change the version check, in order to not
    emit a warning if version is >= 1.7.9, but below 2.4.4.

    After this patch, if someone used an older version, it will
    say:

    ./scripts/sphinx-pre-install
    Sphinx version 1.7.9
    Note: It is recommended at least Sphinx version 2.4.4 if you need PDF support.
    Detected OS: Fedora release 31 (Thirty One).

    To upgrade Sphinx, use:

    /devel/v4l/docs/sphinx_1.7.9/bin/python3 -m venv sphinx_2.4.4
    . sphinx_2.4.4/bin/activate
    pip install -r ./Documentation/sphinx/requirements.txt

    If you want to exit the virtualenv, you can use:
    deactivate

    All optional dependencies are met.
    Needed package dependencies are met.

    If Sphinx is not detected at all, it

    Signed-off-by: Mauro Carvalho Chehab
    Link: https://lore.kernel.org/r/79584d317ba16f5d4f37801c5ee57cf04085f962.1587478901.git.mchehab+huawei@kernel.org
    Signed-off-by: Jonathan Corbet

    Mauro Carvalho Chehab
     
  • If a venv doesn't contain Sphinx, or has an older Sphinx
    version, ignore it.

    Signed-off-by: Mauro Carvalho Chehab
    Link: https://lore.kernel.org/r/d11a00d88514e8a0357e1b0a05ebd518952a1d39.1587478901.git.mchehab+huawei@kernel.org
    Signed-off-by: Jonathan Corbet

    Mauro Carvalho Chehab
     

21 Apr, 2020

6 commits

  • Since python 3.3, the recommended way to setup a virtual env is
    via "python -m venv".

    Set this as a default, if python version is compatible with
    such feature.

    While here, add more comments to it, as the script is
    getting more complex. So, better to add more things, to avoid
    accidentally breaking it while improving it.

    Signed-off-by: Mauro Carvalho Chehab
    Link: https://lore.kernel.org/r/252cc849c79527ad496247e4c481961478adf41c.1586883286.git.mchehab+huawei@kernel.org
    Signed-off-by: Jonathan Corbet

    Mauro Carvalho Chehab
     
  • It seems that Mageia and OpenMandriva will reunite on a single
    distribution. In any case, both came from Mandriva. So, it is
    close enough to use the same logic.

    So, add support for it.

    Tested with OpenMandriva 4.1 and with Mageia 7.1.

    Signed-off-by: Mauro Carvalho Chehab
    Link: https://lore.kernel.org/r/692809729c6818a0b0f75513da15970c53d5565c.1586883286.git.mchehab+huawei@kernel.org
    Signed-off-by: Jonathan Corbet

    Mauro Carvalho Chehab
     
  • There are some small misdetections with Gentoo. While they
    don't cause too much trouble, it keeps recomending to
    install things that are already there.

    Signed-off-by: Mauro Carvalho Chehab
    Link: https://lore.kernel.org/r/7f631edce102b02ccbdbfb18be1376a86b41373d.1586883286.git.mchehab+huawei@kernel.org
    Signed-off-by: Jonathan Corbet

    Mauro Carvalho Chehab
     
  • Avoid the scripts to keep asking to install fonts-noto-cjk
    on Ubuntu 16.04.

    Signed-off-by: Mauro Carvalho Chehab
    Link: https://lore.kernel.org/r/912b664a8ca54e8c5c5767c3fe9171973eeddd6b.1586883286.git.mchehab+huawei@kernel.org
    Signed-off-by: Jonathan Corbet

    Mauro Carvalho Chehab
     
  • Currently, with openSUSE Tumbleweed 20200303, it keeps
    recommending this forever:

    sudo zypper install --no-recommends rsvg-view

    This dependency will never be fulfilled there, as the package
    now is named as on other distros: rsvg-convert.

    So, improve the detection to avoid such issue.

    Signed-off-by: Mauro Carvalho Chehab
    Link: https://lore.kernel.org/r/c3774f72ac36c5e5b5f446ae5db5b795d1f274f4.1586883286.git.mchehab+huawei@kernel.org
    Signed-off-by: Jonathan Corbet

    Mauro Carvalho Chehab
     
  • The Arch-linux detection is hit by catting /etc/issue, whose
    contents is (nowadays):

    Arch Linux \r (\l)

    It sounds a little ackward to print such string, so,
    instead, let's use the /etc/os-release file, with exists
    on lots of distributions and should provide a more reliable
    result.

    We'll keep the old tests before it, in order to avoid possible
    regressions with the other distros, although the new way should
    probably work on all the currently supported distributions.

    Signed-off-by: Mauro Carvalho Chehab
    Link: https://lore.kernel.org/r/472924557afdf2b5492ae2a48c5ecfae216d54e2.1586883286.git.mchehab+huawei@kernel.org
    Signed-off-by: Jonathan Corbet

    Mauro Carvalho Chehab
     

03 Mar, 2020

1 commit

  • With Ubuntu 16.04 (and presumably Debian distros of the same age),
    the instructions for setting up a python virtual environment should
    do so with the python 3 interpreter. On these older distros, the
    default python (and virtualenv command) might be python2 based.

    Some of the packages that sphinx relies on are now only available
    for python3. If you don't specify the python3 interpreter for
    the virtualenv, you get errors when doing the pip installs for
    various packages

    Fix this by adding '-p python3' to the virtualenv recommendation
    line.

    Signed-off-by: Tim Bird
    Link: https://lore.kernel.org/r/1582594481-23221-1-git-send-email-tim.bird@sony.com
    Signed-off-by: Jonathan Corbet

    Tim Bird
     

06 Feb, 2020

1 commit

  • When using a non-release version of Sphinx, from a local build (with
    improvements for kernel doc handling, why not),

    sphinx-build --version

    reports versions of the form

    sphinx-build 3.0.0+/4703d9119972

    i.e. base version, a plus symbol, slash, and the start of the git hash
    of whatever repository the command is run in (no, not the hash that
    was used to build Sphinx!).

    This patch fixes the installation check in sphinx-pre-install to
    recognise such version output.

    Signed-off-by: Stephen Kitt
    Link: https://lore.kernel.org/r/20200124183316.1719218-1-steve@sk2.org
    Signed-off-by: Jonathan Corbet

    Stephen Kitt
     

08 Nov, 2019

1 commit


04 Oct, 2019

2 commits


01 Oct, 2019

1 commit


17 Jul, 2019

5 commits


27 Jun, 2019

1 commit

  • Build of htmldocs fails for out-of-tree builds:

    $ make V=1 O=~/build/kernel/ htmldocs
    make -C /home/rppt/build/kernel -f /home/rppt/git/linux-docs/Makefile htmldocs
    make[1]: Entering directory '/home/rppt/build/kernel'
    make -f /home/rppt/git/linux-docs/scripts/Makefile.build obj=scripts/basic
    rm -f .tmp_quiet_recordmcount
    make -f /home/rppt/git/linux-docs/scripts/Makefile.build obj=Documentation htmldocs
    Can't open Documentation/conf.py at /home/rppt/git/linux-docs/scripts/sphinx-pre-install line 230.
    /home/rppt/git/linux-docs/Documentation/Makefile:80: recipe for target 'htmldocs' failed
    make[2]: *** [htmldocs] Error 2

    The scripts/sphinx-pre-install is trying to open files in the current
    directory which is $KBUILD_OUTPUT rather than in $srctree.

    Fix it.

    Signed-off-by: Mike Rapoport
    Reviewed-by: Mauro Carvalho Chehab
    Signed-off-by: Jonathan Corbet

    Mike Rapoport
     

15 Jun, 2019

1 commit


08 Jun, 2019

1 commit


31 May, 2019

5 commits

  • Pull yet more SPDX updates from Greg KH:
    "Here is another set of reviewed patches that adds SPDX tags to
    different kernel files, based on a set of rules that are being used to
    parse the comments to try to determine that the license of the file is
    "GPL-2.0-or-later" or "GPL-2.0-only". Only the "obvious" versions of
    these matches are included here, a number of "non-obvious" variants of
    text have been found but those have been postponed for later review
    and analysis.

    There is also a patch in here to add the proper SPDX header to a bunch
    of Kbuild files that we have missed in the past due to new files being
    added and forgetting that Kbuild uses two different file names for
    Makefiles. This issue was reported by the Kbuild maintainer.

    These patches have been out for review on the linux-spdx@vger mailing
    list, and while they were created by automatic tools, they were
    hand-verified by a bunch of different people, all whom names are on
    the patches are reviewers"

    * tag 'spdx-5.2-rc3-1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core: (82 commits)
    treewide: Add SPDX license identifier - Kbuild
    treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 225
    treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 224
    treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 223
    treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 222
    treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 221
    treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 220
    treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 218
    treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 217
    treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 216
    treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 215
    treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 214
    treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 213
    treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 211
    treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 210
    treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 209
    treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 207
    treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 206
    treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 203
    treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 201
    ...

    Linus Torvalds
     
  • Based on 3 normalized pattern(s):

    this program is free software you can redistribute it and or modify
    it under the terms of the gnu general public license as published by
    the free software foundation either version 2 of the license or at
    your option any later version this program is distributed in the
    hope that it will be useful but without any warranty without even
    the implied warranty of merchantability or fitness for a particular
    purpose see the gnu general public license for more details

    this program is free software you can redistribute it and or modify
    it under the terms of the gnu general public license as published by
    the free software foundation either version 2 of the license or at
    your option any later version [author] [kishon] [vijay] [abraham]
    [i] [kishon]@[ti] [com] this program is distributed in the hope that
    it will be useful but without any warranty without even the implied
    warranty of merchantability or fitness for a particular purpose see
    the gnu general public license for more details

    this program is free software you can redistribute it and or modify
    it under the terms of the gnu general public license as published by
    the free software foundation either version 2 of the license or at
    your option any later version [author] [graeme] [gregory]
    [gg]@[slimlogic] [co] [uk] [author] [kishon] [vijay] [abraham] [i]
    [kishon]@[ti] [com] [based] [on] [twl6030]_[usb] [c] [author] [hema]
    [hk] [hemahk]@[ti] [com] this program is distributed in the hope
    that it will be useful but without any warranty without even the
    implied warranty of merchantability or fitness for a particular
    purpose see the gnu general public license for more details

    extracted by the scancode license scanner the SPDX license identifier

    GPL-2.0-or-later

    has been chosen to replace the boilerplate/reference in 1105 file(s).

    Signed-off-by: Thomas Gleixner
    Reviewed-by: Allison Randal
    Reviewed-by: Richard Fontana
    Reviewed-by: Kate Stewart
    Cc: linux-spdx@vger.kernel.org
    Link: https://lkml.kernel.org/r/20190527070033.202006027@linutronix.de
    Signed-off-by: Greg Kroah-Hartman

    Thomas Gleixner
     
  • Call the script every time a make docs target is selected, on
    a simplified check mode.

    With this change, the script will set two vars:

    $min_version - obtained from `needs_sphinx` var inside
    conf.py (currently, '1.3')

    $rec_version - obtained from sphinx/requirements.txt.

    With those changes, a target like "make htmldocs" will do:

    1) If no sphinx-build/sphinx-build3 is found, it will run
    the script on normal mode as before, checking for all
    system dependencies and providing install hints for the
    needed programs and will abort the build;

    2) If no sphinx-build/sphinx-build3 is found, but there is
    a sphinx_${VER}/bin/activate file, and if
    ${VER} >= $min_version (string comparation), it will
    run in full mode, and will recommend to activate the
    virtualenv. If there are multiple virtualenvs, it
    will string sort the versions, recommending the
    highest version and will abort the build;

    3) If Sphinx is detected but has a version lower than
    $min_version, it will run in full mode - with will
    recommend creating a virtual env using sphinx/requirements.txt,
    and will abort the build.

    4) If Sphinx is detected and version is lower than
    $rec_version, it will run in full mode and will
    recommend creating a virtual env using sphinx/requirements.txt.

    In this case, it **won't** abort the build.

    5) If Sphinx is detected and version is equal or righer than
    $rec_version it will return just after detecting the
    version ("quick mode"), not checking if are there any
    missing dependencies.

    Just like before, if one wants to install Sphinx from the
    distro, it has to call the script manually and use `--no-virtualenv`
    argument to get the hints for his OS:

    You should run:

    sudo dnf install -y python3-sphinx python3-sphinx_rtd_theme

    While here, add a small help for the three optional arguments
    for the script.

    Signed-off-by: Mauro Carvalho Chehab
    Signed-off-by: Jonathan Corbet

    Mauro Carvalho Chehab
     
  • RHEL8 was already launched. This test won't get it, and will
    do the wrong thing. Ok, we could fix it, but now we check
    Sphinx version to ensure that it matches the minimal (1.3),
    so there's no need for an explicit check there.

    Signed-off-by: Mauro Carvalho Chehab
    Signed-off-by: Jonathan Corbet

    Mauro Carvalho Chehab
     
  • It is possible that multiple Sphinx virtualenvs are installed
    on a given kernel tree. Change the logic to get the latest
    version of those, as this is probably what the user wants.

    Signed-off-by: Mauro Carvalho Chehab
    Signed-off-by: Jonathan Corbet

    Mauro Carvalho Chehab
     

24 May, 2019

1 commit


02 Apr, 2019

1 commit