1 |
commit: dacff66592c1745927caea717211fc7b78e3cdc2 |
2 |
Author: Lars Wendler <polynomial-c <AT> gentoo <DOT> org> |
3 |
AuthorDate: Tue Feb 9 09:19:29 2021 +0000 |
4 |
Commit: Lars Wendler <polynomial-c <AT> gentoo <DOT> org> |
5 |
CommitDate: Tue Feb 9 09:20:52 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=dacff665 |
7 |
|
8 |
sys-apps/man-db: Bump to version 2.9.4 |
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/Manifest | 1 + |
14 |
sys-apps/man-db/man-db-2.9.4.ebuild | 199 ++++++++++++++++++++++++++++++++++++ |
15 |
2 files changed, 200 insertions(+) |
16 |
|
17 |
diff --git a/sys-apps/man-db/Manifest b/sys-apps/man-db/Manifest |
18 |
index 80770634388..b8b41064b44 100644 |
19 |
--- a/sys-apps/man-db/Manifest |
20 |
+++ b/sys-apps/man-db/Manifest |
21 |
@@ -1 +1,2 @@ |
22 |
DIST man-db-2.9.3.tar.xz 1885840 BLAKE2B 6163660af60a2900220d7b1de74caa9cb9e5764cc5da20469a8fb08e19ee1948937916664fdc493b89da8fd829aa512877892245fabc00fb586c7754c0da3d53 SHA512 ca1c1214753483f6e22efe69a9df9852e0de01a9ad3b9950dcbbc9f38e6060100b98a84333256f8c734002e66e2fd6256bc017a31bd9acfc42002dca2c0f879b |
23 |
+DIST man-db-2.9.4.tar.xz 1909020 BLAKE2B 43427e851f0e661ca1cee55211dd7636f4ffde067c75de7715f525029b22c205728f8e86ac49abff60e47a4a4c9e1fbd78e2c87e70bd37778b88594a3897275f SHA512 169f091dd0a1d0dbd1583366f8257afb8f57e030d0f7d4213c14ce0b1fc5debf8b9cf2731de503830cb2826b3a22b3cff7da993d44ec18557935bd293529133c |
24 |
|
25 |
diff --git a/sys-apps/man-db/man-db-2.9.4.ebuild b/sys-apps/man-db/man-db-2.9.4.ebuild |
26 |
new file mode 100644 |
27 |
index 00000000000..f5b96175573 |
28 |
--- /dev/null |
29 |
+++ b/sys-apps/man-db/man-db-2.9.4.ebuild |
30 |
@@ -0,0 +1,199 @@ |
31 |
+# Copyright 1999-2021 Gentoo Authors |
32 |
+# Distributed under the terms of the GNU General Public License v2 |
33 |
+ |
34 |
+EAPI=7 |
35 |
+ |
36 |
+inherit systemd prefix |
37 |
+ |
38 |
+DESCRIPTION="a man replacement that utilizes berkdb instead of flat files" |
39 |
+HOMEPAGE="http://www.nongnu.org/man-db/" |
40 |
+if [[ "${PV}" = 9999* ]] ; then |
41 |
+ inherit autotools git-r3 |
42 |
+ EGIT_REPO_URI="https://git.savannah.gnu.org/git/man-db.git" |
43 |
+else |
44 |
+ SRC_URI="mirror://nongnu/${PN}/${P}.tar.xz" |
45 |
+ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux" |
46 |
+fi |
47 |
+ |
48 |
+LICENSE="GPL-3" |
49 |
+SLOT="0" |
50 |
+IUSE="berkdb +gdbm +manpager nls +seccomp selinux static-libs zlib" |
51 |
+ |
52 |
+CDEPEND=" |
53 |
+ !sys-apps/man |
54 |
+ >=dev-libs/libpipeline-1.5.0 |
55 |
+ sys-apps/groff |
56 |
+ gdbm? ( sys-libs/gdbm:= ) |
57 |
+ !gdbm? ( berkdb? ( sys-libs/db:= ) ) |
58 |
+ !berkdb? ( !gdbm? ( sys-libs/gdbm:= ) ) |
59 |
+ seccomp? ( sys-libs/libseccomp ) |
60 |
+ zlib? ( sys-libs/zlib ) |
61 |
+" |
62 |
+DEPEND="${CDEPEND}" |
63 |
+BDEPEND=" |
64 |
+ app-arch/xz-utils |
65 |
+ virtual/pkgconfig |
66 |
+ nls? ( |
67 |
+ >=app-text/po4a-0.45 |
68 |
+ sys-devel/gettext |
69 |
+ virtual/libiconv |
70 |
+ virtual/libintl |
71 |
+ ) |
72 |
+" |
73 |
+RDEPEND=" |
74 |
+ ${CDEPEND} |
75 |
+ acct-group/man |
76 |
+ acct-user/man |
77 |
+ selinux? ( sec-policy/selinux-mandb ) |
78 |
+" |
79 |
+PDEPEND="manpager? ( app-text/manpager )" |
80 |
+ |
81 |
+PATCHES=( |
82 |
+ "${FILESDIR}"/man-db-2.9.3-sandbox-env-tests.patch |
83 |
+ "${FILESDIR}"/man-db-2.9.3-darwin-libdb-intl.patch |
84 |
+) |
85 |
+ |
86 |
+pkg_setup() { |
87 |
+ if (use gdbm && use berkdb) || (use !gdbm && use !berkdb) ; then #496150 |
88 |
+ ewarn "Defaulting to USE=gdbm due to ambiguous berkdb/gdbm USE flag settings" |
89 |
+ fi |
90 |
+} |
91 |
+ |
92 |
+src_unpack() { |
93 |
+ if [[ "${PV}" == *9999 ]] ; then |
94 |
+ git-r3_src_unpack |
95 |
+ |
96 |
+ # We need to mess with gnulib :-/ |
97 |
+ EGIT_REPO_URI="https://git.savannah.gnu.org/r/gnulib.git" \ |
98 |
+ EGIT_CHECKOUT_DIR="${WORKDIR}/gnulib" \ |
99 |
+ git-r3_src_unpack |
100 |
+ else |
101 |
+ default |
102 |
+ fi |
103 |
+} |
104 |
+ |
105 |
+src_prepare() { |
106 |
+ default |
107 |
+ if [[ "${PV}" == *9999 ]] ; then |
108 |
+ local bootstrap_opts=( |
109 |
+ --gnulib-srcdir=../gnulib |
110 |
+ --no-bootstrap-sync |
111 |
+ --copy |
112 |
+ --no-git |
113 |
+ ) |
114 |
+ AUTORECONF="/bin/true" \ |
115 |
+ LIBTOOLIZE="/bin/true" \ |
116 |
+ sh ./bootstrap "${bootstrap_opts[@]}" || die |
117 |
+ |
118 |
+ eautoreconf |
119 |
+ fi |
120 |
+ |
121 |
+ hprefixify src/man_db.conf.in |
122 |
+ if use prefix ; then |
123 |
+ { |
124 |
+ echo "#" |
125 |
+ echo "# Added settings for Gentoo Prefix" |
126 |
+ [[ ${CHOST} == *-darwin* ]] && \ |
127 |
+ echo "MANDATORY_MANPATH ${EPREFIX}/MacOSX.sdk/usr/share/man" |
128 |
+ echo "MANDATORY_MANPATH /usr/share/man" |
129 |
+ } >> src/man_db.conf.in |
130 |
+ fi |
131 |
+} |
132 |
+ |
133 |
+src_configure() { |
134 |
+ # set sections we want to search by default |
135 |
+ local sections="1 1p 8 2 3 3p 4 5 6 7 9 0p tcl n l p o" |
136 |
+ sections+=" 1x 2x 3x 4x 5x 6x 7x 8x" |
137 |
+ case ${CHOST} in |
138 |
+ *-solaris*) |
139 |
+ # Solaris tends to use sections named after the pkgs that |
140 |
+ # owns them, in particular for libc functions we want those |
141 |
+ # sections |
142 |
+ local s |
143 |
+ for s in $(cd /usr/share/man/ && echo man*) ; do |
144 |
+ s=${s#man} |
145 |
+ [[ " ${sections} " != *" ${s} "* ]] && sections+=" ${s}" |
146 |
+ done |
147 |
+ ;; |
148 |
+ esac |
149 |
+ |
150 |
+ export ac_cv_lib_z_gzopen=$(usex zlib) |
151 |
+ local myeconfargs=( |
152 |
+ --with-systemdtmpfilesdir="${EPREFIX}"/usr/lib/tmpfiles.d |
153 |
+ --with-systemdsystemunitdir="$(systemd_get_systemunitdir)" |
154 |
+ --disable-setuid #662438 |
155 |
+ --enable-cache-owner=man |
156 |
+ --with-sections="${sections}" |
157 |
+ $(use_enable nls) |
158 |
+ $(use_enable static-libs static) |
159 |
+ $(use_with seccomp libseccomp) |
160 |
+ --with-db=$(usex gdbm gdbm $(usex berkdb db gdbm)) |
161 |
+ ) |
162 |
+ case ${CHOST} in |
163 |
+ *-solaris*|*-darwin*) |
164 |
+ myeconfargs+=( |
165 |
+ $(use_with nls libiconv-prefix ${EPREFIX}/usr) |
166 |
+ $(use_with nls libintl-prefix ${EPREFIX}/usr) |
167 |
+ ) |
168 |
+ ;; |
169 |
+ esac |
170 |
+ econf "${myeconfargs[@]}" |
171 |
+ |
172 |
+ # Disable color output from groff so that the manpager can add it. #184604 |
173 |
+ sed -i \ |
174 |
+ -e '/^#DEFINE.*\<[nt]roff\>/{s:^#::;s:$: -c:}' \ |
175 |
+ src/man_db.conf || die |
176 |
+ |
177 |
+ cat > 15man-db <<-EOF || die |
178 |
+ SANDBOX_PREDICT="/var/cache/man" |
179 |
+ EOF |
180 |
+} |
181 |
+ |
182 |
+src_install() { |
183 |
+ default |
184 |
+ dodoc docs/{HACKING,TODO} |
185 |
+ find "${ED}" -type f -name "*.la" -delete || die |
186 |
+ |
187 |
+ exeinto /etc/cron.daily |
188 |
+ newexe "${FILESDIR}"/man-db.cron-r1 man-db #289884 |
189 |
+ |
190 |
+ insinto /etc/sandbox.d |
191 |
+ doins 15man-db |
192 |
+} |
193 |
+ |
194 |
+pkg_preinst() { |
195 |
+ local cachedir="${EROOT}/var/cache/man" |
196 |
+ # If the system was already exploited, and the attacker is hiding in the |
197 |
+ # cachedir of the old man-db, let's wipe them out. |
198 |
+ # see bug #602588 comment 18 |
199 |
+ local _replacing_version= |
200 |
+ local _setgid_vuln=0 |
201 |
+ for _replacing_version in ${REPLACING_VERSIONS}; do |
202 |
+ if ver_test '2.7.6.1-r2' -le "${_replacing_version}"; then |
203 |
+ debug-print "Skipping security bug #602588 ... existing installation (${_replacing_version}) should not be affected!" |
204 |
+ else |
205 |
+ _setgid_vuln=1 |
206 |
+ debug-print "Applying cleanup for security bug #602588" |
207 |
+ fi |
208 |
+ done |
209 |
+ [[ ${_setgid_vuln} -eq 1 ]] && rm -rf "${cachedir}" |
210 |
+ |
211 |
+ # Fall back to recreating the cachedir |
212 |
+ if [[ ! -d ${cachedir} ]] ; then |
213 |
+ mkdir -p "${cachedir}" || die |
214 |
+ chown man:man "${cachedir}" || die |
215 |
+ fi |
216 |
+ |
217 |
+ # Update the whatis cache |
218 |
+ if [[ -f ${cachedir}/whatis ]] ; then |
219 |
+ einfo "Cleaning ${cachedir} from sys-apps/man" |
220 |
+ find "${cachedir}" -type f '!' '(' -name index.bt -o -name index.db ')' -delete |
221 |
+ fi |
222 |
+} |
223 |
+ |
224 |
+pkg_postinst() { |
225 |
+ if [[ $(ver_cut 2 ${REPLACING_VERSIONS}) -lt 7 ]] ; then |
226 |
+ einfo "Rebuilding man-db from scratch with new database format!" |
227 |
+ su man -s /bin/sh -c 'mandb --quiet --create' 2>/dev/null |
228 |
+ fi |
229 |
+} |