Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 913087 - sys-libs/pam: useless doc tarball downloaded / doesn't install docs?
Summary: sys-libs/pam: useless doc tarball downloaded / doesn't install docs?
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords: PullRequest
Depends on:
Blocks: CVE-2024-10041
  Show dependency tree
 
Reported: 2023-08-26 23:59 UTC by Sam James
Modified: 2025-01-08 08:42 UTC (History)
4 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-08-26 23:59:10 UTC
See https://github.com/gentoo/gentoo/pull/32424#discussion_r1306177444.

The pam ebuild downloads a docs tarball which extracts into docs/ in the source tree but the tarball only seems to contain HTML which we don't seem to install.

Not sure if in the past it had man pages too (they seem to be in the src tarball itself now).

We should either wire up USE=doc here so it actually installs these, install them unconditionally (meh given it's pam and always around), or stop downloading it.
Comment 1 Larry the Git Cow gentoo-dev 2025-01-08 04:56:17 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1ee6803c33c392115b1003013553b8cc9b98d3ce

commit 1ee6803c33c392115b1003013553b8cc9b98d3ce
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2025-01-08 04:55:06 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2025-01-08 04:55:44 +0000

    sys-libs/pam: unkeyword 1.7.0_p20241230
    
    We're missing man pages too which isn't acceptable, so we need to
    figure out docbook5 (?). Unkeyword until that's sorted.
    
    Bug: https://bugs.gentoo.org/913087
    Signed-off-by: Sam James <sam@gentoo.org>

 sys-libs/pam/pam-1.7.0_p20241230.ebuild | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=eb07a754c3ef70e7165adb2e0800050d95dc10ee

commit eb07a754c3ef70e7165adb2e0800050d95dc10ee
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2025-01-08 04:15:54 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2025-01-08 04:55:44 +0000

    sys-libs/pam: add 1.7.0_p20241230
    
    * Switch to Meson
    * Wire up elogind+logind support (bug #931115) as it's now available
      upstream
    * Docs are hard-disabled for now, but that's sort of fine (enough) for now
      given that we had bug #913087 for the previous ebuild
    * Using a snapshot as there's a few build system patches post-tag and
      some other generally noteworthy patches we'd have to pull in manually
      otherwise
    * Wire up verify-sig for the next release (but not used for this ebuild
      as took a snapshot)
    
    Bug: https://bugs.gentoo.org/913087
    Bug: https://bugs.gentoo.org/942075
    Closes: https://bugs.gentoo.org/929970
    Closes: https://bugs.gentoo.org/925334
    Closes: https://bugs.gentoo.org/931115
    Signed-off-by: Sam James <sam@gentoo.org>

 sys-libs/pam/Manifest                   |   1 +
 sys-libs/pam/pam-1.7.0_p20241230.ebuild | 165 ++++++++++++++++++++++++++++++++
 2 files changed, 166 insertions(+)
Comment 2 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2025-01-08 04:58:51 UTC
OK, problem: new pam (meson-based) doesn't have a docs tarball *or* man pags included in the dist anymore.

To build them, it needs "docbookxi.rng". I can't figure out what package, if any, provides that.

I found app-emacs/nxml-docbook5-schemas but trying to make the ebuild use that (just for local experimentation, we couldn't have pam BDEPEND on emacs of course ;)) failed, so I've no idea if I'm barking up the wrong tree there.

ulm (as app-emacs/* person), or mgorny (as partial docbook maint): help?
Comment 3 Ulrich Müller gentoo-dev 2025-01-08 06:48:05 UTC
app-emacs/nxml-gentoo-schemas installs docbookxi.rnc which contains the same infomation but in RELAX NG Compact format. AFAICS pam needs the .rng (not compact) file for xmllint. In principle, it is possible to convert it using app-text/trang or app-text/rnc2rng but I guess we don't want such dependencies for a system package.

So: The relevant file is at https://docbook.org/xml/5.0/rng/docbookxi.rng (or contained in https://docbook.org/xml/5.0/docbook-5.0.zip), maybe the way forward is to make a tiny package for it? It must also be added to the XML catalog, see app-text/gentoo-dtd for an example how to do this.
Comment 4 Ulrich Müller gentoo-dev 2025-01-08 06:58:19 UTC
It looks like that RNG file is only needed for verification with xmllint, but not for the actual build. So maybe one could avoid the hassle by providing /bin/true as a fake prog_xmllint.
Comment 5 Larry the Git Cow gentoo-dev 2025-01-08 08:42:42 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=551ca582792c16b7c07273f1dec03fd3ec523a35

commit 551ca582792c16b7c07273f1dec03fd3ec523a35
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2025-01-08 08:35:47 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2025-01-08 08:42:24 +0000

    sys-libs/pam: stub out xmllint/xmlcatalog use
    
    We don't have docbook5 packaged and it appears to have A Whole History
    with a blogpost dating back to even 2008 from flameeyes. Anyway, it's
    only needed for validation of output here, so we can stub it out and
    stick our heads in the sand.
    
    Thanks to ulm for the help.
    
    Closes: https://bugs.gentoo.org/913087
    Thanks-to: Ulrich Müller <ulm@gentoo.org>
    Signed-off-by: Sam James <sam@gentoo.org>

 sys-libs/pam/pam-1.7.0_p20241230.ebuild | 29 ++++++++++++++++-------------
 1 file changed, 16 insertions(+), 13 deletions(-)

Additionally, it has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c7fb98a8b358d45b4c9d359a1c50ccabed33f36e

commit c7fb98a8b358d45b4c9d359a1c50ccabed33f36e
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2025-01-08 08:37:36 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2025-01-08 08:42:25 +0000

    sys-libs/pam: keyword 1.7.0_p20241230, stub out w3m/elinks too
    
    The doc issue is now fixed.
    
    Bug: https://bugs.gentoo.org/913087
    Signed-off-by: Sam James <sam@gentoo.org>

 sys-libs/pam/pam-1.7.0_p20241230.ebuild | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)