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
URL:
Keywords:
Depends on:
Blocks:
 
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)


Attachments

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
{
        "fossil":"0fd79a3e0918611c70a7ec6b610cb4dfc401a2bc9b2c79fa22bb56dde5b1cb96",
        "timestamp":1565084028,
        "command":"artifact",
        "procTimeUs":3424,
        "procTimeMs":3,
        "payload":{
                "type":"checkin",
                "uuid":"95a6a658d40f4d4d7d77a37a68578ec5961ec298a332f3a901cd1e9267376c70",
                "isLeaf":false,
                "timestamp":1564950399,
                "user":"drh",
                "comment":"Fix a harmless compiler warning.",
                "parents":["a3bc6552eea4676d3bb55ed5b40ab608570e30b618d9edc3f2f6ce6ae4a77187"],
                "tags":["trunk"],
                "files":[{
                                "name":"src/main.c",
                                "uuid":"0cbe4118ce096d4316903a69189a064c9161d39d8c48744520ec2e4f4583bf6c",
                                "parent":"e5266b41aab678c165363d831718e9eff61e8a6851dec72582f18dff4f37d78c",
                                "size":99434,
                                "state":"modified",
                                "downloadPath":"/raw/src/main.c?name=0cbe4118ce096d4316903a69189a064c9161d39d8c48744520ec2e4f4583bf6c"
                        }]
        }
}
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

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

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

Changes:
  head/devel/fossil/files/patch-auto.def
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