[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: [PATCH/RFC v3] Optionally allow binaries to run against older SQLite

From: Daniel Shahaf <d.s_at_daniel.shahaf.name>
Date: Sun, 13 Nov 2011 13:40:39 +0200

On Sunday, November 06, 2011 9:28 AM, "Daniel Shahaf" <d.s_at_daniel.shahaf.name> wrote:
> On Friday, November 04, 2011 1:24 AM, "Jonathan Nieder" <jrnieder_at_gmail.com> wrote:
> > [[[
> > Introduce a --enable-sqlite-compatibility-version=X.Y.Z option for
> > ./configure to allow people building Subversion to specify how old the
...
> > +++ subversion/include/private/svn_dep_compat.h (working copy)
> > @@ -107,6 +107,32 @@
> > #endif /* SERF_VERSION_AT_LEAST */
> >
> > +/**
> > + * By default, if libsvn is built against one version of SQLite
> > + * and then run using an older version, svn will error out:
> ...
> > +#ifndef SVN_SQLITE_MIN_VERSION_NUMBER
> > +#define SVN_SQLITE_MIN_VERSION_NUMBER SQLITE_VERSION_NUMBER
> > +#define SVN_SQLITE_MIN_VERSION SQLITE_VERSION
> > +#endif /* SVN_SQLITE_MIN_VERSION_NUMBER */
> > +
>
> Hmm. I wonder if we should be more paranoid here when checking/defining
> the macros. Probably I'm just being overly careful.
>

I put myself to rest by documenting this in notes/knobs.

> > +++ configure.ac (working copy)
> > @@ -172,6 +172,18 @@
> > +AC_ARG_ENABLE(sqlite-compatibility-version,
> > + AS_HELP_STRING([--enable-sqlite-compatibility-version=X.Y.Z],
> > + [Allow binary to run against older SQLite]),
>
> Perhaps have the help string mention how ARG is used?
> "Allow binary to run against SQLite as old as ARG"
>

Done.

> Also, should you forbid passing this arg when linking against a static SQLite?
>

I still think that's a good idea: if svn isn't built to support shared
libraries, then the new configure switch should cause an error. (Or, at least,
should cause an error if the static SQLite library is older than ARG.)

> > + [sqlite_compat_ver=$enableval],[sqlite_compat_ver=no])
> > +
> > +if test -n "$sqlite_compat_ver" && test "$sqlite_compat_ver" != no; then
> > + SVN_SQLITE_VERNUM_PARSE([$sqlite_compat_ver],
> > + [sqlite_compat_ver_num])
> > + CFLAGS="-DSVN_SQLITE_MIN_VERSION='\"$sqlite_compat_ver\"' $CFLAGS"
> > + CFLAGS="-DSVN_SQLITE_MIN_VERSION_NUMBER=$sqlite_compat_ver_num $CFLAGS"
> > +fi
> > +
> > dnl Set up a number of directories ---------------------
> >
> > dnl Create SVN_BINDIR for proper substitution
>
> I've committed the sqlite3.m4 part in r1198169. The rest looks good
> too, but I'm going to wait a day or two before committing the remainder,
> to let people join the conversation if they have feedback.

That took more than "a day or two" :-(. Anyway, committed this in
r1201421, after some minor tweaks.

Thanks!

Daniel
Received on 2011-11-13 12:41:13 CET

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.