|Summary:||databases/db[5-6]: enable Tcl extension, modernize Makefile|
|Product:||Ports & Packages||Reporter:||Pietro Cerutti <gahr>|
|Component:||Individual Port(s)||Assignee:||Matthias Andree <mandree>|
|Severity:||Affects Only Me||CC:||gahr|
Description Pietro Cerutti 2016-04-12 10:04:50 UTC
Created attachment 169236 [details] enable Tcl extension, modernize Makefile
Comment 1 Pietro Cerutti 2016-04-12 14:25:50 UTC
Created attachment 169239 [details] Updated patch to include pkgIndex.tcl
Comment 2 Pietro Cerutti 2016-04-13 07:23:35 UTC
Created attachment 169276 [details] Updated patch to fix JAVA_VARS
Comment 3 Pietro Cerutti 2016-04-13 07:44:45 UTC
Created attachment 169277 [details] Changes for db5
Comment 4 Pietro Cerutti 2016-04-13 07:47:09 UTC
I have added a patch to apply the same changes to databases/db5. Also, I have shuffled a few blocks around to minimize the diff between db5/Makefile and db6/Makefile.
Comment 5 commit-hook 2016-05-23 20:18:42 UTC
A commit references this bug: Author: mandree Date: Mon May 23 20:18:25 UTC 2016 New revision: 415741 URL: https://svnweb.freebsd.org/changeset/ports/415741 Log: Update to 6.2.23. Add TCL option. Cleanup. Changes submitted by gahr@: Enable a new TCL option, adding a pkgIndex.tcl file. Modernize Makefile.  Changes by mandree@: Fix installation of TCL API docs if TCL option is enabled. Update to new upstream release 6.2.23. Install the upgrade61.sh script if SQL option is enabled, with additional fixes distributed as a patch to avoid licensing concerns. Add an UPDATING entry. Add changes in Mk/Uses/bdb.mk. db5 parts of PR 208740 to be committed in a separate transaction later. PR: 208740 Submitted by: gahr@ Changes: head/Mk/Uses/bdb.mk head/UPDATING head/databases/db6/Makefile head/databases/db6/distinfo head/databases/db6/files/patch-lang_sql_upgrade61.sh head/databases/db6/pkg-plist
Comment 6 Matthias Andree 2016-05-23 21:53:13 UTC
Pietro, I have committed the db6 update, and I will commit a subset of your proposed db5 changes (namely, the Makefile cleanup), but since I've received scary compiler warnings on 10.3-RELEASE amd64 such as this one (and there are also examples with variables as source argument): ../lang/tcl/tcl_db.c:3711:30: warning: the value of the size argument in 'strncat' is too large, might lead to a buffer overflow [-Wstrncat-size] (void)strncat(buf, " ", sizeof(buf)); ../lang/tcl/tcl_db.c:3711:30: note: change the argument to be the free space in the destination buffer minus the terminating null byte I will refrain from enabling TCL, this seems unsafe. If you think we would want TCL in db5, I need a patch that fully reviews the corresponding strncat use, and possibly patches this to use strlcat, or backports the differences from db6. I'll also mark Java 8 incompatible while I'm here, if someone can fix the incompatibility between db5 and openjdk8, I'll happily take patches, other than that, I'm a Java noob and cannot help here for now.
Comment 7 Matthias Andree 2016-05-23 21:53:56 UTC
(In reply to Matthias Andree from comment #6) (Java 8 incompatible with db5 only, db6 seems OK with OpenJDK 8)
Comment 8 commit-hook 2016-05-23 22:07:50 UTC
A commit references this bug: Author: mandree Date: Mon May 23 22:07:25 UTC 2016 New revision: 415749 URL: https://svnweb.freebsd.org/changeset/ports/415749 Log: Modernize Makefile and chase new requisites. * Modernize Makefile . * The Tcl changes suggested in the PR  are applied but commented out because the code causes scary "warning: the value of the size argument in 'strncat' is too large, might lead to a buffer overflow [-Wstrncat-size]" in lang/tcl/tcl_*.c on FreeBSD 10.3 amd64. * Other than what is suggested in the PR, refuse to add the TCL option, and leave --disable-tcl in. * JAVA option: restrict to Java versions 1.6 and 1.7 because the port fails to compile with JAVA option enabled and openjdk8 (IllegalArgument exception). portlint cleanups: * Set PATCH_WRKSRC, and refresh patches with "make makepatch". * Use Space (not HTab) after WWW: tag in pkg-descr * Drop "The" from COMMENT. PR: 208740  Submitted by: gahr@  Changes: head/databases/db5/Makefile head/databases/db5/files/patch-dbinc_mutex_int.h head/databases/db5/files/patch-dist_configure head/databases/db5/files/patch-src_dbinc_atomic.h head/databases/db5/files/patch-src_dbinc_mutex__int.h head/databases/db5/pkg-plist
Comment 9 Matthias Andree 2016-05-23 22:09:27 UTC
If someone comes up with patches to make db5 compatible with Java 8, or patches to make the Tcl code safe, please file new PRs and only reference this (208740).