Is there permanent link to the latest SQLite amalgamation source?

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Is there permanent link to the latest SQLite amalgamation source?

John Found
In order to write an autoupdater, I need to download the latest SQLite amalgamation.
Is there a permanent link to the subject, or the only way is to parse the download page
for links to "sqlite-amalgamation-*.zip" or to build it from the fossil checkout?

--
John Found
_______________________________________________
sqlite-users mailing list
[hidden email]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
Reply | Threaded
Open this post in threaded view
|

Re: Is there permanent link to the latest SQLite amalgamation source?

E.Pasma
John Found wrote:
> In order to write an autoupdater, I need to download the latest SQLite amalgamation.
> Is there a permanent link to the subject, or the only way is to parse the download page
> for links to "sqlite-amalgamation-*.zip" or to build it from the fossil checkout?

The apsw installer, setup.py, can parse the download page. This has likely been tested very well:

        # work out the version
        if self.version is None:
            write("  Getting download page to work out current SQLite version")
            page=self.download("https://sqlite.org/download.html", text=True, checksum=False)
            match=re.search(r'sqlite-amalgamation-3([0-9][0-9])([0-9][0-9])([0-9][0-9])\.zip', page)
            if match:
                self.version="3.%d.%d.%d" % tuple([int(match.group(n)) for n in range(1,4)])
                if self.version.endswith(".0"):
                    self.version=self.version[:-len(".0")]
            else:
                write("Unable to determine current SQLite version.  Use --version=VERSION", sys.stderr)


_______________________________________________
sqlite-users mailing list
[hidden email]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
Reply | Threaded
Open this post in threaded view
|

Re: Is there permanent link to the latest SQLite amalgamation source?

John Found
On Wed, 5 Sep 2018 10:42:04 +0200
"E.Pasma" <[hidden email]> wrote:

> John Found wrote:
> > In order to write an autoupdater, I need to download the latest SQLite amalgamation.
> > Is there a permanent link to the subject, or the only way is to parse the download page
> > for links to "sqlite-amalgamation-*.zip" or to build it from the fossil checkout?
>
> The apsw installer, setup.py, can parse the download page. This has likely been tested very well:
>
>         # work out the version
>         if self.version is None:
>             write("  Getting download page to work out current SQLite version")
>             page=self.download("https://sqlite.org/download.html", text=True, checksum=False)
>             match=re.search(r'sqlite-amalgamation-3([0-9][0-9])([0-9][0-9])([0-9][0-9])\.zip', page)
>             if match:
>                 self.version="3.%d.%d.%d" % tuple([int(match.group(n)) for n in range(1,4)])
>                 if self.version.endswith(".0"):
>                     self.version=self.version[:-len(".0")]
>             else:
>                 write("Unable to determine current SQLite version.  Use --version=VERSION", sys.stderr)
>
>
> _______________________________________________
> sqlite-users mailing list
> [hidden email]
> http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Well, IMHO every solution that parses the html page in order to extract the links is bad solution by definition.
I would prefer another workaround - compiling from source - much more reliable IMHO:

    echo "Downloading latest SQLite source archive..."
    { wget -q -O - https://www.sqlite.org/cgi/src/tarball/sqlite3.tar.gz?r=release | tar -xz 2> /dev/null; } || { echo >&2 "Error: Can't download SQLite sources."; exit 2;}

    cd ./sqlite3

    echo "Building the amalgamation sqlite3.c ..."
    ./configure > /dev/null 2>&1 || { echo >&2 "Error: Can't configure SQLite sources"; exit 4; }
    make sqlite3.c > /dev/null 2>&1 || { echo >&2 "Error: Can't make sqlite3.c"; exit 4; }

    cd ..
    cp ./sqlite3/sqlite3.c ./
    rm -rf ./sqlite3/ &

Unfortunately this process is pretty slow, especially on my low-end machine...
That is why I asked about permanent link that needs much less CPU cycles and network bandwidth.

Regards

--
John Found <[hidden email]>
_______________________________________________
sqlite-users mailing list
[hidden email]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
Reply | Threaded
Open this post in threaded view
|

Re: Is there permanent link to the latest SQLite amalgamation source?

Stephen Chrzanowski
I don't do the compiling, but I run this daily:

#!/bin/bash
cd /mnt/drobo/Development/SQLite3
wget --no-check-certificate -q -O - https://sqlite.org/download.html | grep
"win32\|amalgamation" | grep ";" | cut -f4 -d\' > sqlite.list
wget --no-check-certificate --no-clobber -i sqlite.list -o download.log -B
https://sqlite.org

I've started doing this back at the end of 2013.  If I ever need to go back
to a version, I've got 1.93TB of storage on my Drobo to handle it. :]

This effectively grabs the amalgamation source, the Win32DLL and the
sqlite3.exe file.

To conserve drive space, Dr Hipp could potentially create a hard link at
the filesystem to put a "sqlite-amalgamation.zip" on the site, but then
IMO, its not worth it, as you just don't get to know if you've already
grabbed the file or not, short of doing the download and recompile ignoring
that fact.


On Wed, Sep 5, 2018 at 7:28 AM, John Found <[hidden email]> wrote:

> On Wed, 5 Sep 2018 10:42:04 +0200
> "E.Pasma" <[hidden email]> wrote:
>
> > John Found wrote:
> > > In order to write an autoupdater, I need to download the latest SQLite
> amalgamation.
> > > Is there a permanent link to the subject, or the only way is to parse
> the download page
> > > for links to "sqlite-amalgamation-*.zip" or to build it from the
> fossil checkout?
> >
> > The apsw installer, setup.py, can parse the download page. This has
> likely been tested very well:
> >
> >         # work out the version
> >         if self.version is None:
> >             write("  Getting download page to work out current SQLite
> version")
> >             page=self.download("https://sqlite.org/download.html",
> text=True, checksum=False)
> >             match=re.search(r'sqlite-amalgamation-3([0-9][0-9])([0-9][0-9])([0-9][0-9])\.zip',
> page)
> >             if match:
> >                 self.version="3.%d.%d.%d" % tuple([int(match.group(n))
> for n in range(1,4)])
> >                 if self.version.endswith(".0"):
> >                     self.version=self.version[:-len(".0")]
> >             else:
> >                 write("Unable to determine current SQLite version.  Use
> --version=VERSION", sys.stderr)
> >
> >
> > _______________________________________________
> > sqlite-users mailing list
> > [hidden email]
> > http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
>
> Well, IMHO every solution that parses the html page in order to extract
> the links is bad solution by definition.
> I would prefer another workaround - compiling from source - much more
> reliable IMHO:
>
>     echo "Downloading latest SQLite source archive..."
>     { wget -q -O - https://www.sqlite.org/cgi/
> src/tarball/sqlite3.tar.gz?r=release | tar -xz 2> /dev/null; } || { echo
> >&2 "Error: Can't download SQLite sources."; exit 2;}
>
>     cd ./sqlite3
>
>     echo "Building the amalgamation sqlite3.c ..."
>     ./configure > /dev/null 2>&1 || { echo >&2 "Error: Can't configure
> SQLite sources"; exit 4; }
>     make sqlite3.c > /dev/null 2>&1 || { echo >&2 "Error: Can't make
> sqlite3.c"; exit 4; }
>
>     cd ..
>     cp ./sqlite3/sqlite3.c ./
>     rm -rf ./sqlite3/ &
>
> Unfortunately this process is pretty slow, especially on my low-end
> machine...
> That is why I asked about permanent link that needs much less CPU cycles
> and network bandwidth.
>
> Regards
>
> --
> John Found <[hidden email]>
> _______________________________________________
> sqlite-users mailing list
> [hidden email]
> http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
>
_______________________________________________
sqlite-users mailing list
[hidden email]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users