7 1. Add new "Users" table login date column:
10 ALTER TABLE Users ADD COLUMN LastLogin BIGINT NOT NULL DEFAULT 0;
11 ALTER TABLE Users ADD COLUMN PGPKey VARCHAR(40) NULL DEFAULT NULL;
14 2. Merge "web/lib/config.inc.php.proto" with "web/lib/config.inc.php".
16 3. Update Archive_Tar to version greater than 1.3.7.
21 1. Merge "web/lib/config.inc.php.proto" with "web/lib/config.inc.php".
23 2. Install translations by running `make install` in "po/".
28 1. Translation files are now gettext compatible and need to be compiled after
29 each AUR upgrade by running `make install` in the "po/" directory.
31 2. Remove the "NewPkgNotify" column from the "Users" table:
33 ALTER TABLE Users DROP COLUMN NewPkgNotify;
35 3. Fix up issues with depends performance on large dataset.
37 ALTER TABLE PackageDepends ADD INDEX (DepName);
39 4. Rename "web/lib/config.inc" to "web/lib/config.inc.php".
41 5. Merge "web/lib/config.inc.php.proto" with "web/lib/config.inc.php".
43 6. Run the upload directory transform script ("scripts/uploadbuckets.sh") and
44 rotate the converted directory structure into place.
46 7. In order to to provide backward compatible package URLs, enable mod_rewrite
47 and add the following to your Apache configuration (inside the "VirtualHost"
48 container or optionally create a ".htaccess" file in the upload directory):
52 RewriteRule ^/packages/([^/]{1,2})([^/]*/(PKGBUILD|[^/]*\.tar\.gz|))$ /packages/$1/$1$2
55 The following equivalent rule can be used for lighttpd setups:
58 url.rewrite-once = ( "^/packages/([^/]{1,2})([^/]*/(PKGBUILD|[^/]*\.tar\.gz|))$" => "/packages/$1/$1$2" )
61 If you use a non-standard URL_DIR, slight modifications might be necessary.
63 8. Merge "scripts/aurblup/config.h.proto" with "scripts/aurblup/config.h".
68 1. Update the modified package timestamp for new packages.
70 UPDATE Packages SET ModifiedTS = SubmittedTS WHERE ModifiedTS = 0;
72 2. Move to new method of storing package depends.
75 ALTER TABLE PackageDepends ADD COLUMN DepName VARCHAR(64) NOT NULL DEFAULT '' AFTER PackageID;
76 UPDATE PackageDepends SET DepName = (SELECT Name FROM Packages WHERE ID = DepPkgID);
77 ALTER TABLE PackageDepends MODIFY DepName VARCHAR(64) NOT NULL;
78 ALTER TABLE PackageDepends DROP FOREIGN KEY `PackageDepends_ibfk_2`;
79 ALTER TABLE PackageDepends DROP COLUMN DepPkgID;
80 DELETE FROM Packages WHERE DummyPkg = 1;
81 ALTER TABLE Packages DROP COLUMN DummyPkg;
84 3. The File_Find PEAR module is no longer required. You can safely uninstall it
85 if nothing else depends on it.
90 1. Drop foreign keys from the "Sessions" table:
92 `ALTER TABLE Sessions DROP FOREIGN KEY Sessions_ibfk_1;` should work in most
93 cases. Otherwise, check the output of `SHOW CREATE TABLE Sessions;` and use the
94 foreign key name shown there.
96 2. Run the following MySQL statements:
100 ADD FOREIGN KEY (UsersID) REFERENCES Users(ID) ON DELETE CASCADE;
101 ALTER TABLE PackageDepends
102 ADD FOREIGN KEY (PackageID) REFERENCES Packages(ID) ON DELETE CASCADE,
103 ADD FOREIGN KEY (DepPkgID) REFERENCES Packages(ID) ON DELETE CASCADE;
104 ALTER TABLE PackageSources
105 ADD FOREIGN KEY (PackageID) REFERENCES Packages(ID) ON DELETE CASCADE;
106 ALTER TABLE TU_VoteInfo
107 ADD FOREIGN KEY (SubmitterID) REFERENCES Users(ID) ON DELETE CASCADE;
109 ADD FOREIGN KEY (VoteID) REFERENCES TU_VoteInfo(ID) ON DELETE CASCADE,
110 ADD FOREIGN KEY (UserID) REFERENCES Users(ID) ON DELETE CASCADE;
111 ALTER TABLE PackageComments
112 MODIFY DelUsersID INTEGER UNSIGNED NULL DEFAULT NULL;
113 UPDATE PackageComments SET DelUsersID = NULL WHERE DelUsersID = 0;
115 MODIFY SubmitterUID INTEGER UNSIGNED NULL DEFAULT NULL,
116 MODIFY MaintainerUID INTEGER UNSIGNED NULL DEFAULT NULL;
117 UPDATE Packages SET SubmitterUID = NULL WHERE SubmitterUID = 0;
118 UPDATE Packages SET MaintainerUID = NULL WHERE MaintainerUID = 0;
121 3. (optional) If you converted your database from MyISAM to InnoDB during the
122 upgrade process from 1.7.0 to 1.8.0 or from 1.8.0 to 1.8.1 without completely
123 rebuilding the database from the MySQL schema, you should additionally run the
124 following MySQL statements to add missing foreign keys:
128 ADD FOREIGN KEY (AccountTypeID) REFERENCES AccountTypes(ID) ON DELETE NO ACTION;
130 ADD FOREIGN KEY (CategoryID) REFERENCES PackageCategories(ID) ON DELETE NO ACTION,
131 ADD FOREIGN KEY (SubmitterUID) REFERENCES Users(ID) ON DELETE NO ACTION,
132 ADD FOREIGN KEY (MaintainerUID) REFERENCES Users(ID) ON DELETE NO ACTION;
133 ALTER TABLE PackageVotes
134 ADD FOREIGN KEY (UsersID) REFERENCES Users(ID) ON DELETE CASCADE,
135 ADD FOREIGN KEY (PackageID) REFERENCES Packages(ID) ON DELETE CASCADE;
136 ALTER TABLE PackageComments
137 ADD FOREIGN KEY (UsersID) REFERENCES Users(ID) ON DELETE CASCADE,
138 ADD FOREIGN KEY (DelUsersID) REFERENCES Users(ID) ON DELETE CASCADE,
139 ADD FOREIGN KEY (PackageID) REFERENCES Packages(ID) ON DELETE CASCADE;
140 ALTER TABLE CommentNotify
141 ADD FOREIGN KEY (PkgID) REFERENCES Packages(ID) ON DELETE CASCADE,
142 ADD FOREIGN KEY (UserID) REFERENCES Users(ID) ON DELETE CASCADE;
145 4. Merge "web/lib/config.inc.proto" with "web/lib/config.inc".
150 1. Run the following MySQL statements:
153 ALTER TABLE Packages ADD OutOfDateTS BIGINT UNSIGNED NULL DEFAULT NULL;
154 UPDATE Packages SET OutOfDateTS = UNIX_TIMESTAMP() WHERE OutOfDate = 1;
155 ALTER TABLE Packages DROP OutOfDate, DROP FSPath, DROP URLPath, DROP LocationID;
156 DROP TABLE PackageLocations, PackageContents;
157 ALTER TABLE AccountTypes MODIFY AccountType VARCHAR(32) NOT NULL DEFAULT '';
158 ALTER TABLE Users MODIFY Username VARCHAR(32) NOT NULL,
159 MODIFY Email VARCHAR(64) NOT NULL,
160 MODIFY RealName VARCHAR(64) NOT NULL DEFAULT '',
161 MODIFY LangPreference VARCHAR(5) NOT NULL DEFAULT 'en',
162 MODIFY IRCNick VARCHAR(32) NOT NULL DEFAULT '';
163 ALTER TABLE PackageCategories MODIFY Category VARCHAR(32) NOT NULL;
164 ALTER TABLE Packages MODIFY Name VARCHAR(64) NOT NULL,
165 MODIFY Version VARCHAR(32) NOT NULL DEFAULT '',
166 MODIFY Description VARCHAR(255) NOT NULL DEFAULT "An Arch Package",
167 MODIFY URL VARCHAR(255) NOT NULL DEFAULT "http://www.archlinux.org",
168 MODIFY License VARCHAR(40) NOT NULL DEFAULT '';
169 ALTER TABLE PackageSources
170 MODIFY Source VARCHAR(255) NOT NULL DEFAULT "/dev/null";
171 ALTER TABLE TU_VoteInfo
172 MODIFY User VARCHAR(32) collate latin1_general_ci NOT NULL;
173 CREATE TABLE PackageBlacklist (
174 ID INTEGER UNSIGNED NOT NULL AUTO_INCREMENT,
175 Name VARCHAR(64) NOT NULL,
181 2. Drop all fulltext indexes from the "Packages" table:
183 Please do this with care. `ALTER TABLE Packages DROP INDEX Name;` will work in
184 most cases but might remove the wrong index if your indexes have been created
185 in a non-standard order (e.g. during some update process). You'd better run
186 `SHOW INDEX FROM Packages;` before to ensure that your setup doesn't use a
189 3. You will need to update all packages which are stored in the incoming dir as
190 in 1.8.0, source tarballs are no longer extracted automatically and PKGBUILDs
191 are from now on located in the same subdirectories as the tarballs themselves.
192 The following script will do the conversion automatically when being run inside
199 if [ -d "${pkg}" -a ! -f "${pkg}/PKGBUILD" ]; then
200 pkgbuild_file=$(find -P "${pkg}" -name PKGBUILD)
201 [ -n "${pkgbuild_file}" ] && \
202 cp "${pkgbuild_file}" "${pkg}/PKGBUILD"
207 4. (optional): 1.8.0 includes a helper utility called "aurblup" that can be
208 used to prevent users from uploading source packages with names identical to
209 packages in predefined binary repos, e.g. the official repositories of your
210 distribution. In order to build and install aurblup, enter the following
216 make install # as root
218 Add something like "0 * * * * /usr/local/bin/aurblup" to root's crontab to make
219 aurblup update the package blacklist every hour.
221 NOTE: You can run aurblup as non-privileged user as well. Make sure that the
222 user has read-write access to "/var/lib/aurblup/" (or whatever you defined with
225 5. (optional): As of 1.8.0, all MySQL tables should be InnoDB compatible. To
226 convert a table, you can use this statement: `ALTER TABLE $foo ENGINE=InnoDB;`.
227 If you want to stick with MyISAM or another storage engine that doesn't support
228 transactions, you will need to disable the "MYSQL_USE_TRANSACTIONS" setting in
229 "config.h" when setting up aurblup.
233 ALTER TABLE Users ADD Salt CHAR(32) NOT NULL DEFAULT '';
234 ALTER TABLE Users ADD ResetKey CHAR(32) NOT NULL DEFAULT '';
235 ALTER TABLE Users MODIFY LangPreference CHAR(5) NOT NULL DEFAULT 'en';
240 1. Ensure this appears in config.inc:
241 define("DEFAULT_LANG", "en");
246 1. Ensure Pear and File/Find.php are in the path. See web/README.txt.
248 2. Update your running copy of support/scripts/newpackage-notify.
250 3. Run this in web/lib:
253 # Run the script from within lib
254 include('config.inc');
257 $query = "UPDATE Packages SET " .
258 "FSPath = CONCAT('" . INCOMING_DIR . "', Name, '/', Name,
260 "URLPath = CONCAT('" . URL_DIR . "', Name, '/', Name, '.tar.gz') " .
261 "WHERE DummyPKG = 0 AND LocationID = 2;";
264 db_query($query, $dbh);
266 $query = "ALTER TABLE Packages DROP COLUMN AURMaintainerUID;";
267 db_query($query, $dbh);
272 ALTER TABLE PackageDepends ADD COLUMN DepCondition VARCHAR(20) AFTER DepPkgID;
273 ALTER TABLE Packages ADD License CHAR(40) NOT NULL DEFAULT '';
278 ALTER TABLE Packages MODIFY Description CHAR(255) NOT NULL DEFAULT "An Arch Package";
283 ALTER TABLE Packages MODIFY Name CHAR(64) NOT NULL;