Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 627418

Summary: sys-fs/btrfs-progs-4.12: reduce dependencies by using prebuilt man pages
Product: Gentoo Linux Reporter: Holger Hoffstätte <holger>
Component: Current packagesAssignee: Sergei Trofimovich (RETIRED) <slyfox>
Status: RESOLVED FIXED    
Severity: enhancement CC: floppym, gentoo, hydrapolic, slyfox
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: Patch to install prebuilt man pages

Description Holger Hoffstätte 2017-08-09 15:55:44 UTC
Since btrfs-progs-4.12 the man pages are prebuilt and bundled. Until now generating them required asciidoc, which in turn pulled in a sizable amount of dependencies (xml, graphviz, maybe even X and whatnot). These build-time dependencies are no longer necessary.

Reproducible: Always

Steps to Reproduce:
1. build btrfs-progs on minimal/headless/embedded system
2. watch asciidoc & friends come in
3. :(


Expected Results:  
Fewer build dependencies.
Comment 1 Holger Hoffstätte 2017-08-09 16:00:13 UTC
Created attachment 488466 [details, diff]
Patch to install prebuilt man pages

Attached is the patch to remove build dependencies and instead install the prebuilt man pages. With this applied a sizeable number of build dependences can be depcleaned.
Comment 2 Sergei Trofimovich (RETIRED) gentoo-dev 2017-08-09 20:47:20 UTC
The change makes sense. It does not yield equivalent tarball though.
AFAIU at least the following symlinks will be missing:

/usr/share/man/man8/btrfsck.8.bz2 -> btrfs-check.8.bz2
/usr/share/man/man8/btrfs-zero-log.8.bz2 -> btrfs-rescue.8.bz2
/usr/share/man/man8/btrfs-debug-tree.8.bz2 -> btrfs-inspect-internal.8.bz2
/usr/share/man/man8/btrfs-show-super.8.bz2 -> btrfs-inspect-internal.8.bz2

Perhaps it's worth upstreaming optional docs regeneration first?
The goal would be to make 'make install' do the right thing by
default for eveyone.
Comment 3 Holger Hoffstätte 2017-08-10 14:02:17 UTC
(In reply to Sergei Trofimovich from comment #2)
> The change makes sense. It does not yield equivalent tarball though.
> AFAIU at least the following symlinks will be missing:
> 
> /usr/share/man/man8/btrfsck.8.bz2 -> btrfs-check.8.bz2
> /usr/share/man/man8/btrfs-zero-log.8.bz2 -> btrfs-rescue.8.bz2
> /usr/share/man/man8/btrfs-debug-tree.8.bz2 -> btrfs-inspect-internal.8.bz2
> /usr/share/man/man8/btrfs-show-super.8.bz2 -> btrfs-inspect-internal.8.bz2

These all exist in the installation, but are now copies, though with
the correct content. Not sure if that is worth the trouble.

It seems doman turns those symlinks from the source tarball into copies.
Any suggestion for a better way to copy them? This seems more like a
potential improvement to doman.

> Perhaps it's worth upstreaming optional docs regeneration first?

Not sure what you mean by this? Either you build the documentation or you don't and use the prebuilt man pages instead.
Comment 4 Mike Gilbert gentoo-dev 2017-08-10 16:54:28 UTC
Instead of installing them manually, we should be able to do:

emake -C Documentation DESTDIR="${D}" install-man

Unfortunately, btrfs-man5.5.gz is missing from the tarball, so that results in the following error:

% make -C Documentation install-man DESTDIR="$PWD/image"
make: Entering directory '/home/floppym/tmp/btrfs-progs-v4.12/Documentation'
make: -n: Command not found
    [ASCII]  btrfs-man5.xml
/bin/sh: line 1: -b: command not found
make: *** [Makefile:117: btrfs-man5.xml] Error 127
make: Leaving directory '/home/floppym/tmp/btrfs-progs-v4.12/Documentation'


This should be fixed upstream.
Comment 5 Daniel Kenzelmann 2018-06-11 07:10:20 UTC
Any update on this?
The asciidoc dependencies are really a pain due to the python2 dependency.
If there's no activity on upstream maybe we should fix this in the ebuild for now?
Comment 6 Ingo Brunberg 2019-04-02 09:09:53 UTC
Starting with btrfs-progs-4.15.1 there is support for using asciidoctor as a drop in replacement for asciidoc. I have not yet tested this myself, but requiring only one of both in the ebuild would allow at least to get rid of asciidoc (and python-2.7).
Comment 7 Ingo Brunberg 2019-04-02 10:59:47 UTC
I installed asciidoctor, uninstalled asciidoc, put asciidoc in package.provided and reinstalled btrfs-progs-4.20.2 without a problem. asciidoctor was picked up by configure.

So I ask to put that "asciidoc OR asciidoctor" dependency into at least the ebuild for btrfs-progs-4.20.2.
Comment 8 Ingo Brunberg 2019-05-19 08:12:29 UTC
btrfs-progs-5.1 is in the tree now. Sadly the maintainer did ignore that possibility to make asciidoctor an alternative to asciidoc. I can confirm that 5.1 builds just fine with only asciidoctor.
Comment 9 Larry the Git Cow gentoo-dev 2019-06-01 17:21:21 UTC
The bug has been closed via the following commit(s):

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

commit 048b8a49b5918cb878f67a75ec23aa5c9e9fb54d
Author:     Sergei Trofimovich <slyfox@gentoo.org>
AuthorDate: 2019-06-01 17:20:56 +0000
Commit:     Sergei Trofimovich <slyfox@gentoo.org>
CommitDate: 2019-06-01 17:21:14 +0000

    sys-fs/btrfs-progs: add USE=doc, bug #627418
    
    USE=-doc will install manpages shipped in tarball,
    USE=doc will regenerate manpages locally.
    
    Reported-by: Holger Hoffstätte
    Closes: https://bugs.gentoo.org/627418
    Package-Manager: Portage-2.3.67, Repoman-2.3.13
    Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>

 sys-fs/btrfs-progs/btrfs-progs-5.1-r1.ebuild | 14 ++++++++++----
 sys-fs/btrfs-progs/btrfs-progs-9999.ebuild   | 14 ++++++++++----
 2 files changed, 20 insertions(+), 8 deletions(-)

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

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

commit a16067303536e1ead968a4556bbcd1a7f9fb5852
Author:     Sergei Trofimovich <slyfox@gentoo.org>
AuthorDate: 2019-06-01 17:05:07 +0000
Commit:     Sergei Trofimovich <slyfox@gentoo.org>
CommitDate: 2019-06-01 17:21:14 +0000

    sys-fs/btrfs-progs: allow asciidoc as an alternative to asciidoctor
    
    Reported-by: Ingo Brunberg
    Bug: https://bugs.gentoo.org/627418
    Package-Manager: Portage-2.3.67, Repoman-2.3.13
    Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>

 sys-fs/btrfs-progs/btrfs-progs-5.1-r1.ebuild | 2 +-
 sys-fs/btrfs-progs/btrfs-progs-9999.ebuild   | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)