Skip to content
Snippets Groups Projects
  1. Oct 13, 2022
  2. Aug 18, 2022
  3. Jul 07, 2022
  4. May 17, 2022
  5. Mar 30, 2022
  6. Mar 28, 2022
  7. Feb 24, 2022
  8. Feb 10, 2022
    • Akira Yokosawa's avatar
      docs: sphinx/kfigure.py: Delegate inkscape msg to kernellog.verbose · f30a7ac8
      Akira Yokosawa authored
      
      Depending on its version, distro config, and system-setup type,
      inkscape(1) emits various warning messages which are harmless in
      command-line uses.
      
      List of such warning messages (incomplete, long ones wrapped):
      
        - Gtk-Message: hh:mm:ss.nnn: Failed to load module "canberra-gtk-module"
        - Unable to init server: Could not connect: Connection refused
        - Failed to get connection
        - ** (inkscape:xxx): CRITICAL **: hh:mm:ss.nnn: dbus_g_proxy_new_for_name:
          assertion 'connection != NULL' failed
        - ** (inkscape:xxx): CRITICAL **: hh:mm:ss.nnn: dbus_g_proxy_call:
          assertion 'DBUS_IS_G_PROXY (proxy)' failed
        - ** (inkscape:xxx): CRITICAL **: hh:mm:ss.nnn: dbus_g_connection_register_g_object:
          assertion 'connection != NULL' failed
        - ** (inkscape:xxx): WARNING **: hh:mm:ss.nnn:
          Fonts dir '/usr/share/inkscape/fonts' does not exist and will be ignored.
      
      To avoid unnecessary anxiety, capture the message and output it via
      kernellog.verbose or kernellog.warn depending on the exit code.
      
      Signed-off-by: default avatarAkira Yokosawa <akiyks@gmail.com>
      Cc: Jonathan Corbet <corbet@lwn.net>
      Cc: Mauro Carvalho Chehab <mchehab@kernel.org>
      Cc: Randy Dunlap <rdunlap@infradead.org>
      Link: https://lore.kernel.org/r/e26a7b53-9155-8394-4a31-6006379b65a5@gmail.com
      
      
      Signed-off-by: default avatarJonathan Corbet <corbet@lwn.net>
      f30a7ac8
    • Akira Yokosawa's avatar
      docs: sphinx/kfigure.py: Use inkscape(1) for SVG -> PDF conversion · 8ccd0569
      Akira Yokosawa authored
      
      Using convert(1) of ImageMagick for SVG -> PDF conversion results in
      PDFs containing raster (bitmap) images which sometimes look blurry.
      
      Ideally speaking, SVG to PDF conversion should retain vector graphics
      in SVG.
      
      rsvg-convert(1) can do such conversions with regard to SVG files
      generated by dot(1).
      
      Unfortunately, rsvg-convert(1) does not cover some of SVG features
      specific to Inkscape.
      inkscape(1) of Inkscape naturally covers such SVG features.
      
      So add a route in svg2pdf() so that inkscape(1) is used when it is
      available.
      
      Note:
          After this change, if you have Inkscape installed, ImageMagick nor
          librsvg are not required.
      
      Signed-off-by: default avatarAkira Yokosawa <akiyks@gmail.com>
      Cc: Jonathan Corbet <corbet@lwn.net>
      Cc: Mauro Carvalho Chehab <mchehab@kernel.org>
      Link: https://lore.kernel.org/r/3eea2a8d-c52d-ee07-cf7b-83784c6f6e4b@gmail.com
      
      
      Signed-off-by: default avatarJonathan Corbet <corbet@lwn.net>
      8ccd0569
    • Akira Yokosawa's avatar
      docs: sphinx/kfigure.py: Add check of 'dot -Tpdf' · ecf5fb58
      Akira Yokosawa authored
      
      To prevent any regression on existing build systems, limit the
      fallback of converting DOT -> raster PDF only when both of the
      following conditions are met.
      
       o dot(1) doesn't support -Tpdf
       o rsvg-convert(1) is not found
      
      While we are here, add kernellog.verbose messages related to
      rsvg-convert, 'dot -Tpdf', and 'dot -Tsvg' commands.
      
      Suggested-by: default avatarMauro Carvalho Chehab <mchehab@kernel.org>
      Signed-off-by: default avatarAkira Yokosawa <akiyks@gmail.com>
      Cc: Jonathan Corbet <corbet@lwn.net>
      Link: https://lore.kernel.org/r/e76f61e1-7366-ba00-b119-8ea6a2499861@gmail.com
      
      
      Signed-off-by: default avatarJonathan Corbet <corbet@lwn.net>
      ecf5fb58
    • Akira Yokosawa's avatar
      docs: sphinx/kfigure.py: Use rsvg-convert(1) for DOT -> PDF conversion · c9edbe1e
      Akira Yokosawa authored
      
      On openSUSE, dot(1) command does not support direct PDF output.
      On other distros, generated PDF images have unnecessarily wide margins,
      especially for small graphs.
      
      By using dot(1) for DOT -> SVG, then rsvg-convert(1) for SVG -> PDF,
      more optimal PDF images can be obtained, with the bonus of improved
      portability across various distros.
      
      Add rules in kfigure.py so that the above mentioned route is taken
      when rsvg-convert(1) is available.
      
      Note that rsvg-convert(1) is recommended by sphinx_pre_install.
      So it is most likely that existing systems for building pdfdocs have
      rsvg-convert(1) installed.
      
      Note:
          SVG features supported by rsvg-convert(1) vary depending on its
          version and distro config.
          For example, the one found on Ubuntu Bionic (version 2.40.20) does
          poor job in rendering some of SVG files drawn by Inkscape.
          SVG files generated by dot(1) are converted nicely even with such
          old versions of rsvg-convert.
      
          So this change does not affect the quality of such figures in any
          way.
      
      Signed-off-by: default avatarAkira Yokosawa <akiyks@gmail.com>
      Cc: Jonathan Corbet <corbet@lwn.net>
      Cc: Mauro Carvalho Chehab <mchehab@kernel.org>
      Link: https://lore.kernel.org/r/15b56dd3-081a-2469-c3a4-dfc1ca4c6c2d@gmail.com
      
      
      Signed-off-by: default avatarJonathan Corbet <corbet@lwn.net>
      c9edbe1e
  9. Jan 07, 2022
    • James Clark's avatar
      docs: automarkup.py: Fix invalid HTML link output and broken URI fragments · 7cc4c092
      James Clark authored
      
      Since commit d18b0178 ("docs: Add automatic cross-reference for
      documentation pages"), references that were already explicitly defined
      with "ref:" and referred to other pages with a path have been doubled.
      This is reported as the following error by Firefox:
      
        Start tag "a" seen but an element of the same type was already open.
        End tag "a" violates nesting rules.
      
      As well as the invalid HTML, this also obscures the URI fragment links
      to subsections because the second link overrides the first. For example
      on the page admin-guide/hw-vuln/mds.html the last link should be to the
      "Default Mitigations" subsection using a # URI fragment:
      
        admin-guide/hw-vuln/l1tf.html#default-mitigations
      
      But it is obsured by a second link to the whole page:
      
        admin-guide/hw-vuln/l1tf.html
      
      The full HTML with the double <a> tags looks like this:
      
        <a class="reference internal" href="l1tf.html#default-mitigations">
          <span class="std std-ref">
            <a class="reference internal" href="l1tf.html">
              <span class="doc">L1TF - L1 Terminal Fault</span>
            </a>
          </span>
        </a>
      
      After this commit, there is only a single link:
      
        <a class="reference internal" href="l1tf.html#default-mitigations">
          <span class="std std-ref">Documentation/admin-guide/hw-vuln//l1tf.rst</span>
        </a>
      
      Now that the second link is removed, the browser correctly jumps to the
      default-mitigations subsection when clicking the link.
      
      The fix is to check that nodes in the document to be modified are not
      already references. A reference is counted as any text that is a
      descendant of a reference type node. Only plain text should be converted
      to new references, otherwise the doubling occurs.
      
      Testing
      =======
      
       * Test that the build stdout is the same (ignoring ordering), and that
         no new warnings are printed.
      
       * Diff all .html files and check that the only modifications occur
         to the bad double links.
      
       * The auto linking of bare references to pages without "ref:" is still
         working.
      
      Fixes: d18b0178 ("docs: Add automatic cross-reference for documentation pages")
      Reviewed-by: default avatarNícolas F. R. A. Prado <n@nfraprado.net>
      Signed-off-by: default avatarJames Clark <james.clark@arm.com>
      Link: https://lore.kernel.org/r/20220105143640.330602-2-james.clark@arm.com
      
      
      Signed-off-by: default avatarJonathan Corbet <corbet@lwn.net>
      7cc4c092
  10. Dec 23, 2021
  11. Aug 12, 2021
  12. Mar 07, 2021
  13. Feb 04, 2021
  14. Feb 02, 2021
    • Jonathan Corbet's avatar
      Docs: drop Python 2 support · 4217e507
      Jonathan Corbet authored
      
      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: default avatarJonathan Corbet <corbet@lwn.net>
      4217e507
  15. Feb 01, 2021
  16. Dec 10, 2020
  17. Dec 08, 2020
  18. Dec 03, 2020
  19. Nov 30, 2020
  20. Nov 03, 2020
  21. Oct 30, 2020
  22. Oct 15, 2020
Loading