7 1. Add new "Users" table login IP address column:
11 ADD COLUMN LastLoginIPAddress INTEGER UNSIGNED NOT NULL DEFAULT 0;
14 2. Add a new "Bans" table:
18 IPAddress INTEGER UNSIGNED NOT NULL DEFAULT 0,
19 BanTS TIMESTAMP NOT NULL,
20 PRIMARY KEY (IPAddress)
27 1. Update your aurblup setup to match configuration changes. See commit
28 6dc61e7d9e87ad6821869dab61e5f005af2e0252 for details.
33 1. Add new "Users" table login date and PGP key columns:
36 ALTER TABLE Users ADD COLUMN LastLogin BIGINT NOT NULL DEFAULT 0;
37 ALTER TABLE Users ADD COLUMN PGPKey VARCHAR(40) NULL DEFAULT NULL;
40 2. Merge "web/lib/config.inc.php.proto" with "web/lib/config.inc.php".
42 3. Enable the PDO MySQL extension (pdo_mysql.so) in "php.ini".
44 4. Upgrade to PHP>=5.4.0 or enable "short_open_tag" in "php.ini".
46 5. Install translations by running `make install` in "po/".
51 1. Merge "web/lib/config.inc.php.proto" with "web/lib/config.inc.php".
53 2. Install translations by running `make install` in "po/".
58 1. Translation files are now gettext compatible and need to be compiled after
59 each AUR upgrade by running `make install` in the "po/" directory.
61 2. Remove the "NewPkgNotify" column from the "Users" table:
63 ALTER TABLE Users DROP COLUMN NewPkgNotify;
65 3. Fix up issues with depends performance on large dataset.
67 ALTER TABLE PackageDepends ADD INDEX (DepName);
69 4. Rename "web/lib/config.inc" to "web/lib/config.inc.php".
71 5. Merge "web/lib/config.inc.php.proto" with "web/lib/config.inc.php".
73 6. Run the upload directory transform script ("scripts/uploadbuckets.sh") and
74 rotate the converted directory structure into place.
76 7. In order to to provide backward compatible package URLs, enable mod_rewrite
77 and add the following to your Apache configuration (inside the "VirtualHost"
78 container or optionally create a ".htaccess" file in the upload directory):
82 RewriteRule ^/packages/([^/]{1,2})([^/]*/(PKGBUILD|[^/]*\.tar\.gz|))$ /packages/$1/$1$2
85 The following equivalent rule can be used for lighttpd setups:
88 url.rewrite-once = ( "^/packages/([^/]{1,2})([^/]*/(PKGBUILD|[^/]*\.tar\.gz|))$" => "/packages/$1/$1$2" )
91 If you use a non-standard URL_DIR, slight modifications might be necessary.
93 8. Merge "scripts/aurblup/config.h.proto" with "scripts/aurblup/config.h".
98 1. Update the modified package timestamp for new packages.
100 UPDATE Packages SET ModifiedTS = SubmittedTS WHERE ModifiedTS = 0;
102 2. Move to new method of storing package depends.
105 ALTER TABLE PackageDepends ADD COLUMN DepName VARCHAR(64) NOT NULL DEFAULT '' AFTER PackageID;
106 UPDATE PackageDepends SET DepName = (SELECT Name FROM Packages WHERE ID = DepPkgID);
107 ALTER TABLE PackageDepends MODIFY DepName VARCHAR(64) NOT NULL;
108 ALTER TABLE PackageDepends DROP FOREIGN KEY `PackageDepends_ibfk_2`;
109 ALTER TABLE PackageDepends DROP COLUMN DepPkgID;
110 DELETE FROM Packages WHERE DummyPkg = 1;
111 ALTER TABLE Packages DROP COLUMN DummyPkg;
114 3. The File_Find PEAR module is no longer required. You can safely uninstall it
115 if nothing else depends on it.
120 1. Drop foreign keys from the "Sessions" table:
122 `ALTER TABLE Sessions DROP FOREIGN KEY Sessions_ibfk_1;` should work in most
123 cases. Otherwise, check the output of `SHOW CREATE TABLE Sessions;` and use the
124 foreign key name shown there.
126 2. Run the following MySQL statements:
130 ADD FOREIGN KEY (UsersID) REFERENCES Users(ID) ON DELETE CASCADE;
131 ALTER TABLE PackageDepends
132 ADD FOREIGN KEY (PackageID) REFERENCES Packages(ID) ON DELETE CASCADE,
133 ADD FOREIGN KEY (DepPkgID) REFERENCES Packages(ID) ON DELETE CASCADE;
134 ALTER TABLE PackageSources
135 ADD FOREIGN KEY (PackageID) REFERENCES Packages(ID) ON DELETE CASCADE;
136 ALTER TABLE TU_VoteInfo
137 ADD FOREIGN KEY (SubmitterID) REFERENCES Users(ID) ON DELETE CASCADE;
139 ADD FOREIGN KEY (VoteID) REFERENCES TU_VoteInfo(ID) ON DELETE CASCADE,
140 ADD FOREIGN KEY (UserID) REFERENCES Users(ID) ON DELETE CASCADE;
141 ALTER TABLE PackageComments
142 MODIFY DelUsersID INTEGER UNSIGNED NULL DEFAULT NULL;
143 UPDATE PackageComments SET DelUsersID = NULL WHERE DelUsersID = 0;
145 MODIFY SubmitterUID INTEGER UNSIGNED NULL DEFAULT NULL,
146 MODIFY MaintainerUID INTEGER UNSIGNED NULL DEFAULT NULL;
147 UPDATE Packages SET SubmitterUID = NULL WHERE SubmitterUID = 0;
148 UPDATE Packages SET MaintainerUID = NULL WHERE MaintainerUID = 0;
151 3. (optional) If you converted your database from MyISAM to InnoDB during the
152 upgrade process from 1.7.0 to 1.8.0 or from 1.8.0 to 1.8.1 without completely
153 rebuilding the database from the MySQL schema, you should additionally run the
154 following MySQL statements to add missing foreign keys:
158 ADD FOREIGN KEY (AccountTypeID) REFERENCES AccountTypes(ID) ON DELETE NO ACTION;
160 ADD FOREIGN KEY (CategoryID) REFERENCES PackageCategories(ID) ON DELETE NO ACTION,
161 ADD FOREIGN KEY (SubmitterUID) REFERENCES Users(ID) ON DELETE NO ACTION,
162 ADD FOREIGN KEY (MaintainerUID) REFERENCES Users(ID) ON DELETE NO ACTION;
163 ALTER TABLE PackageVotes
164 ADD FOREIGN KEY (UsersID) REFERENCES Users(ID) ON DELETE CASCADE,
165 ADD FOREIGN KEY (PackageID) REFERENCES Packages(ID) ON DELETE CASCADE;
166 ALTER TABLE PackageComments
167 ADD FOREIGN KEY (UsersID) REFERENCES Users(ID) ON DELETE CASCADE,
168 ADD FOREIGN KEY (DelUsersID) REFERENCES Users(ID) ON DELETE CASCADE,
169 ADD FOREIGN KEY (PackageID) REFERENCES Packages(ID) ON DELETE CASCADE;
170 ALTER TABLE CommentNotify
171 ADD FOREIGN KEY (PkgID) REFERENCES Packages(ID) ON DELETE CASCADE,
172 ADD FOREIGN KEY (UserID) REFERENCES Users(ID) ON DELETE CASCADE;
175 4. Merge "web/lib/config.inc.proto" with "web/lib/config.inc".
180 1. Run the following MySQL statements:
183 ALTER TABLE Packages ADD OutOfDateTS BIGINT UNSIGNED NULL DEFAULT NULL;
184 UPDATE Packages SET OutOfDateTS = UNIX_TIMESTAMP() WHERE OutOfDate = 1;
185 ALTER TABLE Packages DROP OutOfDate, DROP FSPath, DROP URLPath, DROP LocationID;
186 DROP TABLE PackageLocations, PackageContents;
187 ALTER TABLE AccountTypes MODIFY AccountType VARCHAR(32) NOT NULL DEFAULT '';
188 ALTER TABLE Users MODIFY Username VARCHAR(32) NOT NULL,
189 MODIFY Email VARCHAR(64) NOT NULL,
190 MODIFY RealName VARCHAR(64) NOT NULL DEFAULT '',
191 MODIFY LangPreference VARCHAR(5) NOT NULL DEFAULT 'en',
192 MODIFY IRCNick VARCHAR(32) NOT NULL DEFAULT '';
193 ALTER TABLE PackageCategories MODIFY Category VARCHAR(32) NOT NULL;
194 ALTER TABLE Packages MODIFY Name VARCHAR(64) NOT NULL,
195 MODIFY Version VARCHAR(32) NOT NULL DEFAULT '',
196 MODIFY Description VARCHAR(255) NOT NULL DEFAULT "An Arch Package",
197 MODIFY URL VARCHAR(255) NOT NULL DEFAULT "https://www.archlinux.org",
198 MODIFY License VARCHAR(40) NOT NULL DEFAULT '';
199 ALTER TABLE PackageSources
200 MODIFY Source VARCHAR(255) NOT NULL DEFAULT "/dev/null";
201 ALTER TABLE TU_VoteInfo
202 MODIFY User VARCHAR(32) collate latin1_general_ci NOT NULL;
203 CREATE TABLE PackageBlacklist (
204 ID INTEGER UNSIGNED NOT NULL AUTO_INCREMENT,
205 Name VARCHAR(64) NOT NULL,
211 2. Drop all fulltext indexes from the "Packages" table:
213 Please do this with care. `ALTER TABLE Packages DROP INDEX Name;` will work in
214 most cases but might remove the wrong index if your indexes have been created
215 in a non-standard order (e.g. during some update process). You'd better run
216 `SHOW INDEX FROM Packages;` before to ensure that your setup doesn't use a
219 3. You will need to update all packages which are stored in the incoming dir as
220 in 1.8.0, source tarballs are no longer extracted automatically and PKGBUILDs
221 are from now on located in the same subdirectories as the tarballs themselves.
222 The following script will do the conversion automatically when being run inside
229 if [ -d "${pkg}" -a ! -f "${pkg}/PKGBUILD" ]; then
230 pkgbuild_file=$(find -P "${pkg}" -name PKGBUILD)
231 [ -n "${pkgbuild_file}" ] && \
232 cp "${pkgbuild_file}" "${pkg}/PKGBUILD"
237 4. (optional): 1.8.0 includes a helper utility called "aurblup" that can be
238 used to prevent users from uploading source packages with names identical to
239 packages in predefined binary repos, e.g. the official repositories of your
240 distribution. In order to build and install aurblup, enter the following
246 make install # as root
248 Add something like "0 * * * * /usr/local/bin/aurblup" to root's crontab to make
249 aurblup update the package blacklist every hour.
251 NOTE: You can run aurblup as non-privileged user as well. Make sure that the
252 user has read-write access to "/var/lib/aurblup/" (or whatever you defined with
255 5. (optional): As of 1.8.0, all MySQL tables should be InnoDB compatible. To
256 convert a table, you can use this statement: `ALTER TABLE $foo ENGINE=InnoDB;`.
257 If you want to stick with MyISAM or another storage engine that doesn't support
258 transactions, you will need to disable the "MYSQL_USE_TRANSACTIONS" setting in
259 "config.h" when setting up aurblup.
263 ALTER TABLE Users ADD Salt CHAR(32) NOT NULL DEFAULT '';
264 ALTER TABLE Users ADD ResetKey CHAR(32) NOT NULL DEFAULT '';
265 ALTER TABLE Users MODIFY LangPreference CHAR(5) NOT NULL DEFAULT 'en';
270 1. Ensure this appears in config.inc:
271 define("DEFAULT_LANG", "en");
276 1. Ensure Pear and File/Find.php are in the path. See web/README.txt.
278 2. Update your running copy of support/scripts/newpackage-notify.
280 3. Run this in web/lib:
283 # Run the script from within lib
284 include('config.inc');
287 $query = "UPDATE Packages SET " .
288 "FSPath = CONCAT('" . INCOMING_DIR . "', Name, '/', Name,
290 "URLPath = CONCAT('" . URL_DIR . "', Name, '/', Name, '.tar.gz') " .
291 "WHERE DummyPKG = 0 AND LocationID = 2;";
294 db_query($query, $dbh);
296 $query = "ALTER TABLE Packages DROP COLUMN AURMaintainerUID;";
297 db_query($query, $dbh);
302 ALTER TABLE PackageDepends ADD COLUMN DepCondition VARCHAR(20) AFTER DepPkgID;
303 ALTER TABLE Packages ADD License CHAR(40) NOT NULL DEFAULT '';
308 ALTER TABLE Packages MODIFY Description CHAR(255) NOT NULL DEFAULT "An Arch Package";
313 ALTER TABLE Packages MODIFY Name CHAR(64) NOT NULL;