Re: Include SQLite3 source upon buildworld

Xin LI <[email protected]> Tue, 15 Nov 2022 09:47:52 -0800
Newsgroups gmane.os.freebsd.devel.database,gmane.os.freebsd.questions
Message-ID <CAGMYy3u3ocKJ713m=m2qHXBTQxynMt=LWQiN99yYDo6KQuDTGg@mail.gmail.com>
--00000000000040f09b05ed85f534
Content-Type: text/plain; charset="UTF-8"

On Tue, Nov 15, 2022 at 5:16 AM Archimedes Gaviola <
[email protected]> wrote:

> Hi,
>
> There's an SQLite3 source located in the /usr/src/contrib/sqlite3. Is
> there a way to include this upon buildworld so that I can run the binary
> after compiling?
>

Yes and no.

Yes -- you can always compile shell.c source and link against the library;
the code is there, just the BSD make build glues are missing.

No -- the omission is intentional: the library is meant to be used by the
base system as a "private library", which gives us the flexibility to not
give a stable API/ABI promise and to only build with options that the base
system needed (to reduce attack surface), so that when we make an update,
it will be a "wholesale" update and user applications are not broken, even
if sqlite3 update have introduced one.  Users who want sqlite3 should
really install it from ports (databases/sqlite3) or package.

--00000000000040f09b05ed85f534
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div dir=3D"ltr"><div class=3D"gmail_default" style=3D"fon=
t-family:monospace,monospace"><br></div></div><br><div class=3D"gmail_quote=
"><div dir=3D"ltr" class=3D"gmail_attr">On Tue, Nov 15, 2022 at 5:16 AM Arc=
himedes Gaviola &lt;<a href=3D"mailto:[email protected]">archime=
[email protected]</a>&gt; wrote:<br></div><blockquote class=3D"gmail_qu=
ote" style=3D"margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,20=
4);padding-left:1ex"><div dir=3D"ltr"><div>Hi,</div><div><br></div><div>The=
re&#39;s an SQLite3 source located in the=20
/usr/src/contrib/sqlite3. Is there a way to include this upon buildworld so=
 that I can run the binary after compiling?</div></div></blockquote><div><b=
r></div><div class=3D"gmail_default" style=3D"font-family:monospace,monospa=
ce">Yes and no.</div><div class=3D"gmail_default" style=3D"font-family:mono=
space,monospace"><br></div><div class=3D"gmail_default" style=3D"font-famil=
y:monospace,monospace">Yes -- you can always compile shell.c source and lin=
k against the library; the code is there, just the BSD make build glues are=
 missing.</div><div class=3D"gmail_default" style=3D"font-family:monospace,=
monospace"><br></div><div class=3D"gmail_default" style=3D"font-family:mono=
space,monospace">No -- the omission is intentional: the library is meant to=
 be used by the base system as a &quot;private library&quot;, which gives u=
s the flexibility to not give a stable API/ABI promise and to only build wi=
th options that the base system needed (to reduce attack surface), so that =
when we make an update, it will be a &quot;wholesale&quot; update and user =
applications are not broken, even if sqlite3 update have introduced one.=C2=
=A0 Users who want sqlite3 should really install it from ports (databases/s=
qlite3) or package.</div></div></div>

--00000000000040f09b05ed85f534--