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-libs/db/, sys-libs/db/files/
Date: Fri, 25 Jan 2019 14:47:56
Message-Id: 1548427654.79b63b3ecbf9298268529709d1129d11a230ebe8.polynomial-c@gentoo
1 commit: 79b63b3ecbf9298268529709d1129d11a230ebe8
2 Author: Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
3 AuthorDate: Fri Jan 25 14:34:17 2019 +0000
4 Commit: Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
5 CommitDate: Fri Jan 25 14:47:34 2019 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=79b63b3e
7
8 sys-libs/db: Bump to version 18.1.25
9
10 Closes: https://bugs.gentoo.org/675202
11 Package-Manager: Portage-2.3.58, Repoman-2.3.12
12 Signed-off-by: Lars Wendler <polynomial-c <AT> gentoo.org>
13
14 sys-libs/db/Manifest | 1 +
15 sys-libs/db/db-18.1.25.ebuild | 244 +++++++++++++++++++++
16 .../files/db-18.1.25-sqlite-configure-path.patch | 11 +
17 sys-libs/db/files/db-18.1.25-test-link.patch | 38 ++++
18 4 files changed, 294 insertions(+)
19
20 diff --git a/sys-libs/db/Manifest b/sys-libs/db/Manifest
21 index 0fa279baf2d..c06e3e1b641 100644
22 --- a/sys-libs/db/Manifest
23 +++ b/sys-libs/db/Manifest
24 @@ -1,4 +1,5 @@
25 DIST db-1.85-r3.1.patch.bz2 14641 BLAKE2B 5ca59487a433a5e5b5fed7a8737c20df041be56733fe9209047f9e53845fa034576c29ad74407509ab96473e4eef0138a3a47de6c348d27209f0e39df85b9f5f SHA512 32b1810515476758ece7415f241378460a4051bf5ee23fb464748f84a90a56ff2c5119ed93028114d64f1b1691b1c694c2301ff825edd89cdee90a870a68b6f4
26 +DIST db-18.1.25.tar.gz 43980391 BLAKE2B 364f023809d9d68d58879dda80e5a6a1826db261ac371d63151278731a777c6ca629b051df3c1430f1c049fcc7e4ddfe041522e891290a43aba051b519b28523 SHA512 30a0508dc7eb92adb56bdc881cedf179e901f888c776bc515b342ae585168521fa9f3c763f438d0e8a008e7cc779b3f40a7385285d724f8494d25d3652e6f1c9
27 DIST db-3.2.9.tar.gz 2085238 BLAKE2B 10cb1c102bf5db52ec16181ccbb02a8c4560f42afd2382689ee4903fcd63bf3ab4802482a065a85b1d34c8fb9f620fceb985155b1390de7ca404c121b6b4b6bc SHA512 5f07b27ae0cbd2832e5db9473cd4f2d4aebeee25ed8245ebd2c297a576571635ca5cf75e63e0967b1e90978128a5b6f5d8112559c56927d5bc5eb0d9fd3a2e95
28 DIST db-4.2.52.tar.gz 4073147 BLAKE2B 0bb9649a08df9b425f28471eb65c0efac0b7833b4c5c841b9ef53a142669b549e1f1b78cf42eeceea05ebb271aacd513d115070ea028f77fb1830bb9fcc7c8a9 SHA512 47a4e1353fe4f5c2160952a8f7a09b73fdf2dfcd222a8214e12630cec3139a624907bba83a06f10f8492b4dce328a979e9155ee049b9a88798edaca62cfe60d1
29 DIST db-4.3.29.tar.gz 6103264 BLAKE2B eda13cd5c8b9421044f6c8b6b41ec318ff33e19da15f8d5e3075612186e60cfce30069078f712841058224ed58caf69d43960156ac645651670665390eae28e1 SHA512 93d36c040b25739b92c52504e117a9c7f4b671463d61d00029e70d0bc8171311f5d04211f7d966b8a9ef8c2a85a5ebe8cc55e4469c3c7c0e468caa4221f691fc
30
31 diff --git a/sys-libs/db/db-18.1.25.ebuild b/sys-libs/db/db-18.1.25.ebuild
32 new file mode 100644
33 index 00000000000..ff6f5d1ca7d
34 --- /dev/null
35 +++ b/sys-libs/db/db-18.1.25.ebuild
36 @@ -0,0 +1,244 @@
37 +# Copyright 1999-2019 Gentoo Authors
38 +# Distributed under the terms of the GNU General Public License v2
39 +
40 +EAPI=6
41 +inherit db flag-o-matic java-pkg-opt-2 autotools multilib multilib-minimal eapi7-ver toolchain-funcs
42 +
43 +#Number of official patches
44 +#PATCHNO=`echo ${PV}|sed -e "s,\(.*_p\)\([0-9]*\),\2,"`
45 +PATCHNO=${PV/*.*.*_p}
46 +if [[ ${PATCHNO} == "${PV}" ]] ; then
47 + MY_PV=${PV}
48 + MY_P=${P}
49 + PATCHNO=0
50 +else
51 + MY_PV=${PV/_p${PATCHNO}}
52 + MY_P=${PN}-${MY_PV}
53 +fi
54 +
55 +S_BASE="${WORKDIR}/${MY_P}"
56 +S="${S_BASE}/dist"
57 +DESCRIPTION="Oracle Berkeley DB"
58 +HOMEPAGE="http://www.oracle.com/technetwork/database/database-technologies/berkeleydb/overview/index.html"
59 +SRC_URI="http://download.oracle.com/berkeley-db/${MY_P}.tar.gz"
60 +for (( i=1 ; i<=${PATCHNO} ; i++ )) ; do
61 + export SRC_URI="${SRC_URI} http://www.oracle.com/technology/products/berkeley-db/db/update/${MY_PV}/patch.${MY_PV}.${i}"
62 +done
63 +
64 +LICENSE="AGPL-3"
65 +SLOT="$(ver_cut 1-2)"
66 +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~x86-fbsd"
67 +IUSE="doc java cxx tcl test"
68 +
69 +REQUIRED_USE="test? ( tcl )"
70 +
71 +# the entire testsuite needs the TCL functionality
72 +DEPEND="tcl? ( >=dev-lang/tcl-8.5.15-r1:0=[${MULTILIB_USEDEP}] )
73 + test? ( >=dev-lang/tcl-8.5.15-r1:0=[${MULTILIB_USEDEP}] )
74 + java? ( >=virtual/jdk-1.5 )
75 + >=sys-devel/binutils-2.16.1"
76 +RDEPEND="tcl? ( >=dev-lang/tcl-8.5.15-r1:0=[${MULTILIB_USEDEP}] )
77 + java? ( >=virtual/jre-1.5 )"
78 +
79 +MULTILIB_WRAPPED_HEADERS=(
80 + /usr/include/db$(ver_cut 1-2)/db.h
81 +)
82 +
83 +PATCHES=(
84 + # bug #510506
85 + "${FILESDIR}"/${PN}-4.8.24-java-manifest-location.patch
86 +
87 + # use the includes from the prefix
88 + "${FILESDIR}"/${PN}-6.2.32-jni-check-prefix-first.patch
89 + "${FILESDIR}"/${PN}-4.3-listen-to-java-options.patch
90 +
91 + # sqlite configure call has an extra leading ..
92 + # upstreamed:5.2.36, missing in 5.3.x/6.x
93 + # still needs to be patched in 6.0.20
94 + "${FILESDIR}"/${PN}-18.1.25-sqlite-configure-path.patch
95 +
96 + # The upstream testsuite copies .lib and the binaries for each parallel test
97 + # core, ~300MB each. This patch uses links instead, saves a lot of space.
98 + "${FILESDIR}"/${PN}-18.1.25-test-link.patch
99 +)
100 +
101 +src_prepare() {
102 + cd "${WORKDIR}"/"${MY_P}"
103 + for (( i=1 ; i<=${PATCHNO} ; i++ ))
104 + do
105 + eapply "${DISTDIR}"/patch."${MY_PV}"."${i}"
106 + done
107 +
108 + default
109 +
110 + # Upstream release script grabs the dates when the script was run, so lets
111 + # end-run them to keep the date the same.
112 + export REAL_DB_RELEASE_DATE="$(awk \
113 + '/^DB_VERSION_STRING=/{ gsub(".*\\(|\\).*","",$0); print $0; }' \
114 + "${S_BASE}"/dist/configure)"
115 + sed -r -i \
116 + -e "/^DB_RELEASE_DATE=/s~=.*~='${REAL_DB_RELEASE_DATE}'~g" \
117 + "${S_BASE}"/dist/RELEASE || die
118 +
119 + # Include the SLOT for Java JAR files
120 + # This supersedes the unused jarlocation patches.
121 + sed -r -i \
122 + -e '/jarfile=.*\.jar$/s,(.jar$),-$(LIBVERSION)\1,g' \
123 + "${S_BASE}"/dist/Makefile.in || die
124 +
125 + cd "${S_BASE}"/dist || die
126 + rm -f aclocal/libtool.m4
127 + sed -i \
128 + -e '/AC_PROG_LIBTOOL$/aLT_OUTPUT' \
129 + configure.ac || die
130 + sed -i \
131 + -e '/^AC_PATH_TOOL/s/ sh, none/ bash, none/' \
132 + aclocal/programs.m4 || die
133 + AT_M4DIR="aclocal aclocal_java" eautoreconf
134 + # Upstream sucks - they do autoconf and THEN replace the version variables.
135 + . ./RELEASE
136 + for v in \
137 + DB_VERSION_{FAMILY,LETTER,RELEASE,MAJOR,MINOR} \
138 + DB_VERSION_{PATCH,FULL,UNIQUE_NAME,STRING,FULL_STRING} \
139 + DB_VERSION \
140 + DB_RELEASE_DATE ; do
141 + local ev="__EDIT_${v}__"
142 + sed -i -e "s/${ev}/${!v}/g" configure || die
143 + done
144 +
145 + # This is a false positive skip in the tests as the test-reviewer code
146 + # looks for 'Skipping\s'
147 + sed -i \
148 + -e '/db_repsite/s,Skipping:,Skipping,g' \
149 + "${S_BASE}"/test/tcl/reputils.tcl || die
150 +}
151 +
152 +multilib_src_configure() {
153 + # sql_compat will cause a collision with sqlite3
154 + # --enable-sql_compat
155 + # Don't --enable-sql* because we don't want to use bundled sqlite.
156 + # See Gentoo bug #605688
157 + local myeconfargs=(
158 + --enable-compat185
159 + --enable-dbm
160 + --enable-o_direct
161 + # Requires openssl-1.0
162 + --with-repmgr-ssl=no
163 + --without-uniquename
164 + --disable-sql
165 + --disable-sql_codegen
166 + --disable-sql_compat
167 + $([[ ${ABI} == arm ]] && echo --with-mutex=ARM/gcc-assembly)
168 + $([[ ${ABI} == amd64 ]] && echo --with-mutex=x86/gcc-assembly)
169 + $(use_enable cxx)
170 + $(use_enable cxx stl)
171 + $(multilib_native_use_enable java)
172 + $(use_enable test)
173 + )
174 +
175 + tc-ld-disable-gold #470634
176 +
177 + # compilation with -O0 fails on amd64, see bug #171231
178 + if [[ ${ABI} == amd64 ]]; then
179 + local CFLAGS=${CFLAGS} CXXFLAGS=${CXXFLAGS}
180 + replace-flags -O0 -O2
181 + is-flagq -O[s123] || append-flags -O2
182 + fi
183 +
184 + # Add linker versions to the symbols. Easier to do, and safer than header file
185 + # mumbo jumbo.
186 + if use userland_GNU ; then
187 + append-ldflags -Wl,--default-symver
188 + fi
189 +
190 + # use `set` here since the java opts will contain whitespace
191 + if multilib_is_native_abi && use java ; then
192 + myconf+=(
193 + --with-java-prefix="${JAVA_HOME}"
194 + --with-javac-flags="$(java-pkg_javac-args)"
195 + )
196 + fi
197 +
198 + # Bug #270851: test needs TCL support
199 + if use tcl || use test ; then
200 + myeconfargs+=(
201 + --enable-tcl
202 + --with-tcl="${EPREFIX}/usr/$(get_libdir)"
203 + )
204 + else
205 + myeconfargs+=(--disable-tcl )
206 + fi
207 +
208 + ECONF_SOURCE="${S_BASE}"/dist \
209 + STRIP="true" \
210 + econf "${myeconfargs[@]}"
211 +}
212 +
213 +multilib_src_install() {
214 + emake install DESTDIR="${D}"
215 +
216 + db_src_install_headerslot
217 +
218 + db_src_install_usrlibcleanup
219 +
220 + if multilib_is_native_abi && use java; then
221 + java-pkg_regso "${ED%/}"/usr/"$(get_libdir)"/libdb_java*.so
222 + java-pkg_dojar "${ED%/}"/usr/"$(get_libdir)"/*.jar
223 + rm -f "${ED%/}"/usr/"$(get_libdir)"/*.jar
224 + fi
225 +}
226 +
227 +multilib_src_install_all() {
228 + db_src_install_usrbinslot
229 +
230 + db_src_install_doc
231 +
232 + dodir /usr/sbin
233 + # This file is not always built, and no longer exists as of db-4.8
234 + if [[ -f "${ED%/}"/usr/bin/berkeley_db_svc ]] ; then
235 + mv "${ED%/}"/usr/bin/berkeley_db_svc \
236 + "${ED%/}"/usr/sbin/berkeley_db"${SLOT/./}"_svc || die
237 + fi
238 +}
239 +
240 +pkg_postinst() {
241 + multilib_foreach_abi db_fix_so
242 +}
243 +
244 +pkg_postrm() {
245 + multilib_foreach_abi db_fix_so
246 +}
247 +
248 +src_test() {
249 + # db_repsite is impossible to build, as upstream strips those sources.
250 + # db_repsite is used directly in the setup_site_prog,
251 + # setup_site_prog is called from open_site_prog
252 + # which is called only from tests in the multi_repmgr group.
253 + #sed -ri \
254 + # -e '/set subs/s,multi_repmgr,,g' \
255 + # "${S_BASE}/test/testparams.tcl"
256 + sed -ri \
257 + -e '/multi_repmgr/d' \
258 + "${S_BASE}/test/tcl/test.tcl" || die
259 +
260 + # This is the only failure in 5.2.28 so far, and looks like a false positive.
261 + # Repmgr018 (btree): Test of repmgr stats.
262 + # Repmgr018.a: Start a master.
263 + # Repmgr018.b: Start a client.
264 + # Repmgr018.c: Run some transactions at master.
265 + # Rep_test: btree 20 key/data pairs starting at 0
266 + # Rep_test.a: put/get loop
267 + # FAIL:07:05:59 (00:00:00) perm_no_failed_stat: expected 0, got 1
268 + sed -ri \
269 + -e '/set parms.*repmgr018/d' \
270 + -e 's/repmgr018//g' \
271 + "${S_BASE}/test/tcl/test.tcl" || die
272 +
273 + multilib-minimal_src_test
274 +}
275 +
276 +multilib_src_test() {
277 + multilib_is_native_abi || return
278 +
279 + S=${BUILD_DIR} db_src_test
280 +}
281
282 diff --git a/sys-libs/db/files/db-18.1.25-sqlite-configure-path.patch b/sys-libs/db/files/db-18.1.25-sqlite-configure-path.patch
283 new file mode 100644
284 index 00000000000..40570cafe21
285 --- /dev/null
286 +++ b/sys-libs/db/files/db-18.1.25-sqlite-configure-path.patch
287 @@ -0,0 +1,11 @@
288 +--- db-18.1.25/dist/aclocal/sql.m4
289 ++++ db-18.1.25/dist/aclocal/sql.m4
290 +@@ -99,7 +99,7 @@
291 + if test "$db_cv_debug" = "yes"; then
292 + CPPFLAGS="$CPPFLAGS -g"
293 + fi
294 +-(cd sql && eval "\$SHELL ../$sqlite_dir/configure --disable-option-checking $ac_sub_configure_args CPPFLAGS=\"-I.. $CPPFLAGS\" --enable-amalgamation=$db_cv_sql_amalgamation --enable-readline=$with_readline --enable-editline=$with_editline" && cat build_config.h >> config.h) || exit 1
295 ++(cd sql && eval "\$SHELL $sqlite_dir/configure --disable-option-checking $ac_sub_configure_args CPPFLAGS=\"-I.. $CPPFLAGS\" --enable-amalgamation=$db_cv_sql_amalgamation --enable-readline=$with_readline --enable-editline=$with_editline" && cat build_config.h >> config.h) || exit 1
296 +
297 + # Configure JDBC if --enable-jdbc
298 + if test "$db_cv_jdbc" != "no"; then
299
300 diff --git a/sys-libs/db/files/db-18.1.25-test-link.patch b/sys-libs/db/files/db-18.1.25-test-link.patch
301 new file mode 100644
302 index 00000000000..dc3d8ae93c5
303 --- /dev/null
304 +++ b/sys-libs/db/files/db-18.1.25-test-link.patch
305 @@ -0,0 +1,38 @@
306 +--- db-18.1.25/test/tcl/parallel.tcl
307 ++++ db-18.1.25/test/tcl/parallel.tcl
308 +@@ -296,17 +296,26 @@
309 + [eval glob -nocomplain {$dir/$buildpath/db_{reptest,repsite,replicate}$EXE}] \
310 + $destdir/$buildpath}
311 + }
312 ++ catch {
313 ++ set l [eval glob {$dir/.libs} {$dir/db_{checkpoint,deadlock}$EXE} \
314 ++ {$dir/db_{dump,load,printlog,recover,stat,upgrade}$EXE} \
315 ++ {$dir/db_{archive,verify,hotbackup,log_verify}$EXE}]
316 ++ foreach fn $l {
317 ++ set fbasename [file tail $fn]
318 ++ eval file link {$destdir/$fbasename} $fn
319 ++ }
320 ++ }
321 ++ # we will be modifying this file, so we must copy, not link
322 + catch {eval file copy \
323 +- [eval glob {$dir/{.libs,include.tcl}}] $destdir}
324 ++ [eval glob {$dir/include.tcl}] $destdir}
325 + # catch {eval file copy $dir/$queuedir $destdir}
326 +- catch {eval file copy \
327 +- [eval glob {$dir/db_{checkpoint,deadlock}$EXE} \
328 +- {$dir/db_{dump,load,printlog,recover}$EXE} \
329 +- {$dir/db_{stat,upgrade,archive,verify}$EXE} \
330 +- {$dir/db_{hotbackup,log_verify,tuner}$EXE}] \
331 +- $destdir}
332 +- catch {eval file copy \
333 +- [eval glob -nocomplain {$dir/db_{reptest,repsite,replicate}$EXE}] $destdir}
334 ++ catch {
335 ++ set l [eval glob -nocomplain {$dir/db_{reptest,repsite,replicate}$EXE}]
336 ++ foreach fn $l {
337 ++ set fbasename [file tail $fn]
338 ++ eval file link {$destdir/$fbasename} $fn
339 ++ }
340 ++ }
341 +
342 + # Create modified copies of include.tcl in parallel
343 + # directories so paths still work.