Gentoo Archives: gentoo-commits

From: Lars Wendler <polynomial-c@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: sys-apps/man-db/
Date: Tue, 09 Feb 2021 09:27:14
Message-Id: 1612862453.e76d6f4f4b35ea47d5928aa1347ffc49bc08d4d8.polynomial-c@gentoo
1 commit: e76d6f4f4b35ea47d5928aa1347ffc49bc08d4d8
2 Author: Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
3 AuthorDate: Tue Feb 9 09:20:37 2021 +0000
4 Commit: Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
5 CommitDate: Tue Feb 9 09:20:53 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e76d6f4f
7
8 sys-apps/man-db: Removed old
9
10 Package-Manager: Portage-3.0.14, Repoman-3.0.2
11 Signed-off-by: Lars Wendler <polynomial-c <AT> gentoo.org>
12
13 sys-apps/man-db/man-db-2.9.3.ebuild | 159 ------------------------------------
14 1 file changed, 159 deletions(-)
15
16 diff --git a/sys-apps/man-db/man-db-2.9.3.ebuild b/sys-apps/man-db/man-db-2.9.3.ebuild
17 deleted file mode 100644
18 index 70728d70369..00000000000
19 --- a/sys-apps/man-db/man-db-2.9.3.ebuild
20 +++ /dev/null
21 @@ -1,159 +0,0 @@
22 -# Copyright 1999-2020 Gentoo Authors
23 -# Distributed under the terms of the GNU General Public License v2
24 -
25 -EAPI=7
26 -
27 -inherit systemd
28 -
29 -DESCRIPTION="a man replacement that utilizes berkdb instead of flat files"
30 -HOMEPAGE="http://www.nongnu.org/man-db/"
31 -if [[ "${PV}" = 9999* ]] ; then
32 - inherit autotools git-r3
33 - EGIT_REPO_URI="https://git.savannah.gnu.org/git/man-db.git"
34 -else
35 - SRC_URI="mirror://nongnu/${PN}/${P}.tar.xz"
36 - KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv s390 sparc x86 ~amd64-linux ~x86-linux"
37 -fi
38 -
39 -LICENSE="GPL-3"
40 -SLOT="0"
41 -IUSE="berkdb +gdbm +manpager nls +seccomp selinux static-libs zlib"
42 -
43 -CDEPEND="
44 - !sys-apps/man
45 - >=dev-libs/libpipeline-1.5.0
46 - sys-apps/groff
47 - gdbm? ( sys-libs/gdbm:= )
48 - !gdbm? ( berkdb? ( sys-libs/db:= ) )
49 - !berkdb? ( !gdbm? ( sys-libs/gdbm:= ) )
50 - seccomp? ( sys-libs/libseccomp )
51 - zlib? ( sys-libs/zlib )
52 -"
53 -DEPEND="${CDEPEND}"
54 -BDEPEND="
55 - app-arch/xz-utils
56 - virtual/pkgconfig
57 - nls? (
58 - >=app-text/po4a-0.45
59 - sys-devel/gettext
60 - )
61 -"
62 -RDEPEND="
63 - ${CDEPEND}
64 - acct-group/man
65 - acct-user/man
66 - selinux? ( sec-policy/selinux-mandb )
67 -"
68 -PDEPEND="manpager? ( app-text/manpager )"
69 -
70 -PATCHES=( "${FILESDIR}"/${PN}-2.9.3-sandbox-env-tests.patch )
71 -
72 -pkg_setup() {
73 - if (use gdbm && use berkdb) || (use !gdbm && use !berkdb) ; then #496150
74 - ewarn "Defaulting to USE=gdbm due to ambiguous berkdb/gdbm USE flag settings"
75 - fi
76 -}
77 -
78 -src_unpack() {
79 - if [[ "${PV}" == *9999 ]] ; then
80 - git-r3_src_unpack
81 -
82 - # We need to mess with gnulib :-/
83 - EGIT_REPO_URI="https://git.savannah.gnu.org/r/gnulib.git" \
84 - EGIT_CHECKOUT_DIR="${WORKDIR}/gnulib" \
85 - git-r3_src_unpack
86 - else
87 - default
88 - fi
89 -}
90 -
91 -src_prepare() {
92 - default
93 - if [[ "${PV}" == *9999 ]] ; then
94 - local bootstrap_opts=(
95 - --gnulib-srcdir=../gnulib
96 - --no-bootstrap-sync
97 - --copy
98 - --no-git
99 - )
100 - AUTORECONF="/bin/true" \
101 - LIBTOOLIZE="/bin/true" \
102 - sh ./bootstrap "${bootstrap_opts[@]}" || die
103 -
104 - eautoreconf
105 - fi
106 -}
107 -
108 -src_configure() {
109 - export ac_cv_lib_z_gzopen=$(usex zlib)
110 - local myeconfargs=(
111 - --with-systemdtmpfilesdir="${EPREFIX}"/usr/lib/tmpfiles.d
112 - --with-systemdsystemunitdir="$(systemd_get_systemunitdir)"
113 - --disable-setuid #662438
114 - --enable-cache-owner=man
115 - --with-sections="1 1p 8 2 3 3p 4 5 6 7 9 0p tcl n l p o 1x 2x 3x 4x 5x 6x 7x 8x"
116 - $(use_enable nls)
117 - $(use_enable static-libs static)
118 - $(use_with seccomp libseccomp)
119 - --with-db=$(usex gdbm gdbm $(usex berkdb db gdbm))
120 - )
121 - econf "${myeconfargs[@]}"
122 -
123 - # Disable color output from groff so that the manpager can add it. #184604
124 - sed -i \
125 - -e '/^#DEFINE.*\<[nt]roff\>/{s:^#::;s:$: -c:}' \
126 - src/man_db.conf || die
127 -
128 - cat > 15man-db <<-EOF || die
129 - SANDBOX_PREDICT="/var/cache/man"
130 - EOF
131 -}
132 -
133 -src_install() {
134 - default
135 - dodoc docs/{HACKING,TODO}
136 - find "${ED}" -type f -name "*.la" -delete || die
137 -
138 - exeinto /etc/cron.daily
139 - newexe "${FILESDIR}"/man-db.cron-r1 man-db #289884
140 -
141 - insinto /etc/sandbox.d
142 - doins 15man-db
143 -}
144 -
145 -pkg_preinst() {
146 - local cachedir="${EROOT}/var/cache/man"
147 - # If the system was already exploited, and the attacker is hiding in the
148 - # cachedir of the old man-db, let's wipe them out.
149 - # see bug #602588 comment 18
150 - local _replacing_version=
151 - local _setgid_vuln=0
152 - for _replacing_version in ${REPLACING_VERSIONS}; do
153 - if ver_test '2.7.6.1-r2' -le "${_replacing_version}"; then
154 - debug-print "Skipping security bug #602588 ... existing installation (${_replacing_version}) should not be affected!"
155 - else
156 - _setgid_vuln=1
157 - debug-print "Applying cleanup for security bug #602588"
158 - fi
159 - done
160 - [[ ${_setgid_vuln} -eq 1 ]] && rm -rf "${cachedir}"
161 -
162 - # Fall back to recreating the cachedir
163 - if [[ ! -d ${cachedir} ]] ; then
164 - mkdir -p "${cachedir}" || die
165 - chown man:man "${cachedir}" || die
166 - fi
167 -
168 - # Update the whatis cache
169 - if [[ -f ${cachedir}/whatis ]] ; then
170 - einfo "Cleaning ${cachedir} from sys-apps/man"
171 - find "${cachedir}" -type f '!' '(' -name index.bt -o -name index.db ')' -delete
172 - fi
173 -}
174 -
175 -pkg_postinst() {
176 - if [[ $(ver_cut 2 ${REPLACING_VERSIONS}) -lt 7 ]] ; then
177 - einfo "Rebuilding man-db from scratch with new database format!"
178 - su man -s /bin/sh -c 'mandb --quiet --create' 2>/dev/null
179 - fi
180 -}