Gentoo Archives: gentoo-commits

From: "Michał Górny" <mgorny@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: net-analyzer/nload/files/, net-analyzer/nload/
Date: Sun, 26 Aug 2018 07:28:14
Message-Id: 1535267926.2738de9684d3ff84302cf005c5f6302258d272c2.mgorny@gentoo
1 commit: 2738de9684d3ff84302cf005c5f6302258d272c2
2 Author: Andrey Mazo <ahippo <AT> yandex <DOT> com>
3 AuthorDate: Sun Aug 26 02:43:45 2018 +0000
4 Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
5 CommitDate: Sun Aug 26 07:18:46 2018 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2738de96
7
8 net-analyzer/nload: don't compress the man-page
9
10 As pointed out by @mgorny [1], packages should not compress their man pages on their own.
11 Instead, Portage needs to handle the compression.
12 Currently, `ecompressdir` is smart enough to recompress the man-pages as needed.
13 However, this is not a fully PMS-compliant behavior.
14
15 So, patch the Makefile.am not to compress the man-page.
16 A corresponding pull request is submitted upstream [2].
17
18 [1] https://github.com/gentoo/gentoo/pull/9543#issuecomment-415662844
19 [2] https://github.com/rolandriegel/nload/pull/4
20
21 Closes: https://github.com/gentoo/gentoo/pull/9543
22
23 ...7.4-Makefile-spec-don-t-compress-man-page.patch | 65 ++++++++++++++++++++++
24 net-analyzer/nload/nload-0.7.4-r1.ebuild | 1 +
25 2 files changed, 66 insertions(+)
26
27 diff --git a/net-analyzer/nload/files/nload-0.7.4-Makefile-spec-don-t-compress-man-page.patch b/net-analyzer/nload/files/nload-0.7.4-Makefile-spec-don-t-compress-man-page.patch
28 new file mode 100644
29 index 00000000000..705f92ea0e8
30 --- /dev/null
31 +++ b/net-analyzer/nload/files/nload-0.7.4-Makefile-spec-don-t-compress-man-page.patch
32 @@ -0,0 +1,65 @@
33 +From 04d5af489f998568553dc54f39c56ef740a27f1b Mon Sep 17 00:00:00 2001
34 +From: Andrey Mazo <ahippo@××××××.com>
35 +Date: Sun, 26 Aug 2018 00:00:35 +0300
36 +Subject: [PATCH 1/1] Makefile,spec: don't compress the man-page
37 +
38 +Package managers like to compress man-pages on their own,
39 +because the type of compression for man-pages is user-configurable.
40 +In particular, Gentoo [1] doesn't want packages to compress their man-pages.
41 +Gentoo Portage has workarounds for this,
42 +but this is not specified in Package Manager Specification and
43 +results in extra compression-decompression pass.
44 +
45 +RPM also compresses man-pages itself (in `brp-compress`)
46 +(and similarly recompresses them as needed)
47 +rather than relying on packages to install compressed man-pages.
48 +
49 +Automake can handle installation of man-pages without the explicit "install" target,
50 +so use the standard automake-provided way of installing man-pages.
51 +It's also smart enough to package `nload.1.in` automatically.
52 +
53 +Don't specify an explicit man-page extension in .spec file as recommended by Fedora.
54 +
55 +[1] https://github.com/gentoo/gentoo/pull/9543#issuecomment-415662844
56 +
57 +(cherry picked from commit 096df0d1282a8c8c535e730d28fe281ea290b58d)
58 +
59 +Upstream: https://github.com/rolandriegel/nload/pull/4
60 +---
61 + docs/Makefile.am | 10 +---------
62 + nload.spec.in | 2 +-
63 + 2 files changed, 2 insertions(+), 10 deletions(-)
64 +
65 +diff --git a/docs/Makefile.am b/docs/Makefile.am
66 +index 646d438..9032a02 100644
67 +--- a/docs/Makefile.am
68 ++++ b/docs/Makefile.am
69 +@@ -1,11 +1,3 @@
70 + ## Helder Correia <helder.correia@×××××××.pt>
71 +
72 +-man1_MAN = nload.1
73 +-
74 +-install:
75 +- $(mkinstalldirs) $(DESTDIR)$(mandir)/man1
76 +- $(INSTALL_DATA) $(top_srcdir)/docs/$(PACKAGE).1 $(DESTDIR)$(mandir)/man1
77 +- gzip -f $(DESTDIR)$(mandir)/man1/$(PACKAGE).1
78 +-
79 +-uninstall:
80 +- rm $(DESTDIR)$(mandir)/man1/$(PACKAGE).1.gz
81 ++man1_MANS = nload.1
82 +diff --git a/nload.spec.in b/nload.spec.in
83 +index 36496fd..53f6f19 100644
84 +--- a/nload.spec.in
85 ++++ b/nload.spec.in
86 +@@ -41,7 +41,7 @@ rm -rf %{buildroot}
87 + %defattr(-,root,root)
88 + %doc AUTHORS COPYING ChangeLog NEWS README
89 + %attr(0755,root,root) %{_bindir}/%{name}
90 +-%{_mandir}/man1/%{name}.1.gz
91 ++%{_mandir}/man1/%{name}.1*
92 +
93 +
94 + %changelog
95 +--
96 +2.16.4
97 +
98
99 diff --git a/net-analyzer/nload/nload-0.7.4-r1.ebuild b/net-analyzer/nload/nload-0.7.4-r1.ebuild
100 index 1de5b572103..70abf3184dd 100644
101 --- a/net-analyzer/nload/nload-0.7.4-r1.ebuild
102 +++ b/net-analyzer/nload/nload-0.7.4-r1.ebuild
103 @@ -20,6 +20,7 @@ BDEPEND="virtual/pkgconfig"
104 PATCHES=(
105 "${FILESDIR}"/${P}-tinfo.patch
106 "${FILESDIR}"/${P}-Eliminate-flicker-on-some-terminals.patch
107 + "${FILESDIR}"/${P}-Makefile-spec-don-t-compress-man-page.patch
108 )
109
110 src_prepare() {