Bug 239668 - devel/fossil needs JSON1 extension in sqlite3
Summary: devel/fossil needs JSON1 extension in sqlite3
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Pietro Cerutti
Depends on:
Reported: 2019-08-06 00:52 UTC by Bertram Scharpf
Modified: 2019-08-07 09:18 UTC (History)
0 users

See Also:
bugzilla: maintainer-feedback? (gahr)


Note You need to log in before you can comment on or make changes to this bug.
Description Bertram Scharpf 2019-08-06 00:52:35 UTC
As the subject line says.
Comment 1 Pietro Cerutti freebsd_committer 2019-08-06 09:34:29 UTC
You'll need to provide some more information regarding what you cannot do.

I have sqlite w/o JSON insalled, and fossil built against the installed sqlite:

% pkg info sqlite3 | grep JSON
        JSON1          : off
% pkg info fossil | grep SQLITE
        SQLITE         : on
% ldd /usr/local/bin/fossil  | grep sqlite
        libsqlite3.so.0 => /usr/local/lib/libsqlite3.so.0 (0x800518000)

I can run JSON commands against a local checkout of the fossil repo:

% /usr/local/bin/fossil json artifact 95a6a658d40f4d4d -R ~/fossil/fossil.fossil
                "comment":"Fix a harmless compiler warning.",
Comment 2 Bertram Scharpf 2019-08-06 18:10:47 UTC
(In reply to Pietro Cerutti from comment #1)
> You'll need to provide some more information regarding what you cannot do.

Download the sources from fossil-scm.org, unpack them, and say

  grep -rnH json_extract .
Comment 3 commit-hook freebsd_committer 2019-08-07 09:09:05 UTC
A commit references this bug:

Author: gahr
Date: Wed Aug  7 09:08:07 UTC 2019
New revision: 508305
URL: https://svnweb.freebsd.org/changeset/ports/508305

  devel/fossil: check for the JSON1 extension when using sqlite3 from ports

  PR:		239668
  Reported by:	software@bertram-scharpf.de

Comment 4 Pietro Cerutti freebsd_committer 2019-08-07 09:16:17 UTC
So, json_extract is now used for the new lock and unlock pragmas during sync. This is not a problem in the default use case, because fossil builds with its own internal sqlite3 source code.

I've added a check at configure time.
Comment 5 Pietro Cerutti freebsd_committer 2019-08-07 09:18:25 UTC
Also, reported upstream here: https://fossil-scm.org/forum/forumpost/68b692badf