Bug 200853

Summary: databases/sqlite3: enable DBSTAT by default for firefox 41+
Product: Ports & Packages Reporter: Jan Beich <jbeich>
Component: Individual Port(s)Assignee: Jan Beich <jbeich>
Status: Closed FIXED    
Severity: Affects Only Me CC: gecko, jensh604, milios, pavelivolkov
Priority: --- Keywords: easy, feature, needs-qa, patch
Version: LatestFlags: pavelivolkov: maintainer-feedback+
Hardware: Any   
OS: Any   
Attachments:
Description Flags
v1
none
v2
none
v3 jbeich: maintainer-approval? (pavelivolkov)

Description Jan Beich freebsd_committer freebsd_triage 2015-06-14 15:39:01 UTC
Created attachment 157729 [details]
v1

At 41.0 or maybe earlier www/firefox is going to require DBSTAT=on in order to continue using --enable-system-sqlite. Can you enable the option by default?

https://bugzilla.mozilla.org/show_bug.cgi?id=1162643
https://wiki.mozilla.org/RapidRelease/Calendar#Future_branch_dates

  $ make -C www/firefox-nightly
  [...]
  checking for sqlite3 >= 3.8.10.2... yes
  checking SQLITE_CFLAGS... -I/usr/local/include  
  checking SQLITE_LIBS... -L/usr/local/lib -lsqlite3  
  checking for SQLITE_SECURE_DELETE support in system SQLite... yes
  checking for SQLITE_THREADSAFE support in system SQLite... yes
  checking for SQLITE_ENABLE_FTS3 support in system SQLite... yes
  checking for SQLITE_ENABLE_UNLOCK_NOTIFY support in system SQLite... yes
  checking for SQLITE_ENABLE_DBSTAT_VTAB support in system SQLite... no
  configure: error: System SQLite library is not compiled with SQLITE_ENABLE_DBSTAT_VTAB.
  ------ config.log ------
  configure:24314: checking for tar
  configure:24354: checking for wget
  configure:24844: checking for sqlite3 >= 3.8.10.2
  configure:24851: checking SQLITE_CFLAGS
  configure:24856: checking SQLITE_LIBS
  configure:24887: checking for SQLITE_SECURE_DELETE support in system SQLite
  configure:24910: cc -o conftest ...
  configure:24933: checking for SQLITE_THREADSAFE support in system SQLite
  configure:24956: cc -o conftest ...
  configure:24979: checking for SQLITE_ENABLE_FTS3 support in system SQLite
  configure:25002: cc -o conftest ...
  configure:25025: checking for SQLITE_ENABLE_UNLOCK_NOTIFY support in system SQLite
  configure:25048: cc -o conftest ...
  configure:25071: checking for SQLITE_ENABLE_DBSTAT_VTAB support in system SQLite
  configure:25094: cc -o conftest ...
  configure: failed program was:
  #line 25085 "configure"
  #include "confdefs.h"

              #include "sqlite3.h"

              int main(int argc, char **argv){
                return !sqlite3_compileoption_used("SQLITE_ENABLE_DBSTAT_VTAB");
              }
  configure: error: System SQLite library is not compiled with SQLITE_ENABLE_DBSTAT_VTAB.
  *** Fix above errors and then restart with\
                 "gmake -f client.mk build"
Comment 1 Jan Beich freebsd_committer freebsd_triage 2015-06-14 15:44:34 UTC
Created attachment 157730 [details]
v2

Oops, I didn't notice the comment about www/firefox.
Comment 2 Jan Beich freebsd_committer freebsd_triage 2015-06-14 15:51:35 UTC
Created attachment 157731 [details]
v3

+ PORTREVISION bump
Comment 3 Kubilay Kocak freebsd_committer freebsd_triage 2015-06-15 06:53:53 UTC
Reporter is committer, assign accordingly. CC gecko@ for reference.
Comment 4 Pavel Volkov 2015-06-16 03:27:14 UTC
Hello.
I'm approved this.
Thank all.
Comment 5 Pavel Volkov 2015-06-16 03:28:32 UTC
Comment on attachment 157731 [details]
v3

approved
Comment 6 Pavel Volkov 2015-06-29 07:08:38 UTC
Comment on attachment 157731 [details]
v3

Hello. I'm approved this path (v3). Please, apply it. Thank you.
Comment 7 Jan Beich freebsd_committer freebsd_triage 2015-08-31 02:37:10 UTC
Resetting assignee as the state of approval is no longer clear.
Comment 8 Jan Beich freebsd_committer freebsd_triage 2015-08-31 02:54:06 UTC
Actually, I don't have time to investigate ABI/API impact of the switch. And coupled with my burnout from gecko@ makes firefox 41+ fate unclear.
Comment 9 Chad Jacob Milios 2015-09-27 00:15:11 UTC
it's my understanding that the ABI/API impact should be none. furthermore, an application must explicitly ask for this virtual table to be created before using it so there shouldn't be any namespace collisions. i have not done any comparative benchmarks but at a glance it seems to me this dbstat.c module is, upon being queried, only extracting and presenting information already in core rather than stashing additional data at runtime, so the performance impact should also be zero or near-zero to apps not using it. it does increase the size of the lib by about 1.0 percent.

perhaps maintainer reversed his approval on Aug 10 due to issues which were later fixed here https://www.sqlite.org/src/info/6beb512c7a3c3649 and included in port here https://svnweb.freebsd.org/ports?view=revision&revision=395101 . i've just emailed him asking for a clarification.

i am no expert. these comments are my own, not my employer's.
Comment 10 commit-hook freebsd_committer freebsd_triage 2015-09-27 21:59:34 UTC
A commit references this bug:

Author: jbeich
Date: Sun Sep 27 21:58:44 UTC 2015
New revision: 398061
URL: https://svnweb.freebsd.org/changeset/ports/398061

Log:
  databases/sqlite3: enable DBSTAT by default for firefox 41+

  PR:		200853
  Reviewed by:	milios@ccsys.com
  Approved by:	Pavel Volkov <pavelivolkov@gmail.com> (maintainer)

Changes:
  head/databases/sqlite3/Makefile
Comment 11 Jan Beich freebsd_committer freebsd_triage 2015-09-27 22:02:43 UTC
Thanks. Committed.
Comment 12 jensh604 2015-10-10 04:57:51 UTC
I belive DBSTAT_VTAB in sqlite3 sqlite-autoconf-3081101.tar.gz also is required by firefox 41.

OPTIONS_DEFINE= FTS4 UPD_DEL_LIMIT URI URI_AUTHORITY SOUNDEX METADATA \
                DIRECT_READ MEMMAN SECURE_DELETE UNLOCK_NOTIFY THREADS \
                EXTENSION READLINE ARMOR STMT DBSTAT DBSTAT_VTAB
Comment 13 jensh604 2015-10-10 05:04:11 UTC
same same sorry about the noise