OLD | NEW |
---|---|
1 Instructions for importing a new release of sqlite from sqlite.org. | 1 Instructions for importing a new release of SQLite from sqlite.org. |
2 | 2 |
3 First, you need to be on Linux. | 3 First, you need to be on Linux. |
4 | 4 |
5 Find the release you want at: | 5 # Determine the versions of the release you want and the release we currently |
6 http://www.sqlite.org/cvstrac/timeline | 6 # have. (See the VERSION file to determine which release we currently have.) |
7 # You may wish to consult http://www.sqlite.org/changes.html to find out what | |
8 # changes have been made in each release. | |
9 # Set some variables to remember the versions, e.g.: | |
10 BASE=3.6.1 | |
11 LATEST=3.6.18 | |
7 | 12 |
8 Search for "Milestone", and find the appropriate release. Click | 13 # Get to the src/third_party directory in your Chromium client: |
9 through, and snag the "Date" for use in DATE line below. | 14 cd src/third_party |
10 Unfortunately, the actual displayed date string on that page will not | |
11 work, you have to make it YYYY/MM/DD. [TODO(shess) Determine if the | |
12 fact that sqlite.org thinks it's running under UTC is relevant.] | |
13 | 15 |
14 DATE='2007/01/24 09:54:56' | 16 # Download the .tar.gz files for the releases: |
17 # (If the URL changes you might need to find the new one.) | |
18 wget http://www.sqlite.org/sqlite-$BASE.tar.gz | |
19 wget http://www.sqlite.org/sqlite-$LATEST.tar.gz | |
15 | 20 |
16 # Get to the third_party/sqlite directory in your Chromium client. | 21 # Extract the vanilla current and desired versions: |
17 cd ../third_party/sqlite | 22 tar xzf sqlite-$BASE.tar.gz |
23 tar xzf sqlite-$LATEST.tar.gz | |
18 | 24 |
19 # Run the super awesome automatic merge tool (requires kdiff3). | 25 # Use kdiff3 to merge the changes: |
20 # NOTE(shess): The following (which runs google_generate_preprocessed.sh) will | 26 kdiff3 -m sqlite-$BASE sqlite-$LATEST sqlite |
21 # produce different output on grhat versus goobuntu; I've been running it on | |
22 # goobuntu. | |
23 ./google_update_sqlite.sh "$DATE" | |
24 | 27 |
25 # Resolve any conflicts. Figure out if we've got everything we should | 28 # Resolve any conflicts. Figure out if we've got everything we should |
26 # have (see below), or if we can omit any changes we no longer need. | 29 # have (see below), or if we can omit any changes we no longer need. |
27 | 30 |
31 # Change to the sqlite directory: | |
32 cd sqlite | |
33 | |
34 # Run the google_generate_preprocessed.sh script: | |
35 ./google_generate_preprocessed.sh | |
36 | |
28 # Find a sucker. Send review. | 37 # Find a sucker. Send review. |
29 # TODO(shess) Describe an appropriate comment style. Seems like it | 38 # TODO(shess) Describe an appropriate comment style. Seems like it |
30 # should include the DATE line, and the sqlite version number. | 39 # should at least include the SQLite version number. |
31 | |
32 | 40 |
33 -------------------------------------------- | 41 -------------------------------------------- |
34 | 42 |
43 For reference, all of our local patches are also kept as .patch files in the | |
44 sqlite directory. Here is a list of the patches, in the order they should be | |
45 applied to a vanilla SQLite (of the version we currently have) to get, in | |
46 principle, exactly what is checked in: | |
47 | |
48 misc.patch | |
49 preload-cache.patch | |
50 safe-tolower.patch | |
51 sqlite-poison.patch | |
52 | |
53 So, e.g. you could do this to apply all our patches to vanilla SQLite: | |
54 | |
55 cd sqlite-$LATEST | |
56 patch -p0 < ../sqlite/misc.patch | |
57 patch -p0 < ../sqlite/preload-cache.patch | |
58 patch -p0 < ../sqlite/safe-tolower.patch | |
59 patch -p0 < ../sqlite/sqlite-poison.patch | |
60 | |
61 This will only be the case if all changes we make also update the corresponding | |
62 patch files. Therefore please try to do that whenever you make a change! | |
63 | |
64 Descriptions of the changes we've made can be found at the bottom of this file. | |
65 | |
66 -------------------------------------------- | |
67 | |
68 The following notes are old but you can get the idea: | |
Scott Hess - ex-Googler
2009/09/23 20:54:30
I think this section is irrelevant. Gears lived i
| |
69 | |
35 Why all this convolution? The problem being solved is that we want to | 70 Why all this convolution? The problem being solved is that we want to |
36 harvest changes from the sqlite CVS tree, and merge them with any | 71 harvest changes from the sqlite CVS tree, and merge them with any |
37 local changes we make. In CVS, you would do this using a "vendor | 72 local changes we make. In CVS, you would do this using a "vendor |
38 import", which is essentially a branch dedictated to the vendor | 73 import", which is essentially a branch dedictated to the vendor |
39 version which is merged with local changes. | 74 version which is merged with local changes. |
40 | 75 |
41 third_party/sqlite_vendor/... is the CVS checkout for a particular | 76 third_party/sqlite_vendor/... is the CVS checkout for a particular |
42 build from sqlite.org. third_party/sqlite_google/... is the local | 77 build from sqlite.org. third_party/sqlite_google/... is the local |
43 version, with our local modifications. So we update the sqlite_vendor | 78 version, with our local modifications. So we update the sqlite_vendor |
44 tree, then use subversion to downintegrate changes into our | 79 tree, then use subversion to downintegrate changes into our |
45 locally-modified tree. The downintegrate will call out any | 80 locally-modified tree. The downintegrate will call out any |
46 conflicting changes, but will otherwise just merge things together. | 81 conflicting changes, but will otherwise just merge things together. |
47 Basically, sqlite_vendor is a gateway between CVS and subversion. | 82 Basically, sqlite_vendor is a gateway between CVS and subversion. |
48 | 83 |
49 Scott Hess <shess@google.com>, April 9, 2007. | 84 Scott Hess <shess@google.com>, April 9, 2007. |
50 [Updated September 14, 2009.] | 85 [Slightly updated September 14, 2009.] |
51 | 86 |
52 -------------------------------------------- | 87 -------------------------------------------- |
53 | 88 |
54 How to run the SQLite tests for the Gears version of SQLite on Linux. | 89 How to run the SQLite tests for the Gears version of SQLite on Linux. |
55 | 90 |
56 cd ../third_party/sqlite_google/ | 91 cd ../third_party/sqlite_google/ |
57 mkdir build | 92 mkdir build |
58 cd build | 93 cd build |
59 make -f ../Makefile.linux-gcc testfixture | 94 make -f ../Makefile.linux-gcc testfixture |
60 make -f ../Makefile.linux-gcc test > /tmp/test.log | 95 make -f ../Makefile.linux-gcc test > /tmp/test.log |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
103 allows much faster performance by reading the file in one contiguous | 138 allows much faster performance by reading the file in one contiguous |
104 operation rather than bringing it in organically, which involves a lot of | 139 operation rather than bringing it in organically, which involves a lot of |
105 seeking. This change also required sqlite3PcacheGetCachesize to be compiled | 140 seeking. This change also required sqlite3PcacheGetCachesize to be compiled |
106 even outside SQLITE_TEST. | 141 even outside SQLITE_TEST. |
107 - Added a new function chromium_sqlite3_initialize_win_sqlite3_file() | 142 - Added a new function chromium_sqlite3_initialize_win_sqlite3_file() |
108 at the end of os_win.c. It allows the Windows-specific Chromium VFS | 143 at the end of os_win.c. It allows the Windows-specific Chromium VFS |
109 to reuse most of the win32 SQLite VFS. | 144 to reuse most of the win32 SQLite VFS. |
110 - Added a new function initUnixFile() and made fillInUnixFile() | 145 - Added a new function initUnixFile() and made fillInUnixFile() |
111 non-static in os_unix.c. It allows the Linux-specific Chromium VFS | 146 non-static in os_unix.c. It allows the Linux-specific Chromium VFS |
112 to reuse most of the unix SQLite VFS. | 147 to reuse most of the unix SQLite VFS. |
OLD | NEW |