7 1. Add new "Users" table login date and PGP key columns:
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.
18 4. Enable the PDO MySQL extension (pdo_mysql.so) in "php.ini".
20 5. Upgrade to PHP>=5.4.0 or enable "short_open_tag" in "php.ini".
22 6. Install translations by running `make install` in "po/".
27 1. Merge "web/lib/config.inc.php.proto" with "web/lib/config.inc.php".
29 2. Install translations by running `make install` in "po/".
34 1. Translation files are now gettext compatible and need to be compiled after
35 each AUR upgrade by running `make install` in the "po/" directory.
37 2. Remove the "NewPkgNotify" column from the "Users" table:
39 ALTER TABLE Users DROP COLUMN NewPkgNotify;
41 3. Fix up issues with depends performance on large dataset.
43 ALTER TABLE PackageDepends ADD INDEX (DepName);
45 4. Rename "web/lib/config.inc" to "web/lib/config.inc.php".
47 5. Merge "web/lib/config.inc.php.proto" with "web/lib/config.inc.php".
49 6. Run the upload directory transform script ("scripts/uploadbuckets.sh") and
50 rotate the converted directory structure into place.
52 7. In order to to provide backward compatible package URLs, enable mod_rewrite
53 and add the following to your Apache configuration (inside the "VirtualHost"
54 container or optionally create a ".htaccess" file in the upload directory):
58 RewriteRule ^/packages/([^/]{1,2})([^/]*/(PKGBUILD|[^/]*\.tar\.gz|))$ /packages/$1/$1$2
61 The following equivalent rule can be used for lighttpd setups:
64 url.rewrite-once = ( "^/packages/([^/]{1,2})([^/]*/(PKGBUILD|[^/]*\.tar\.gz|))$" => "/packages/$1/$1$2" )
67 If you use a non-standard URL_DIR, slight modifications might be necessary.
69 8. Merge "scripts/aurblup/config.h.proto" with "scripts/aurblup/config.h".
74 1. Update the modified package timestamp for new packages.
76 UPDATE Packages SET ModifiedTS = SubmittedTS WHERE ModifiedTS = 0;
78 2. Move to new method of storing package depends.
81 ALTER TABLE PackageDepends ADD COLUMN DepName VARCHAR(64) NOT NULL DEFAULT '' AFTER PackageID;
82 UPDATE PackageDepends SET DepName = (SELECT Name FROM Packages WHERE ID = DepPkgID);
83 ALTER TABLE PackageDepends MODIFY DepName VARCHAR(64) NOT NULL;
84 ALTER TABLE PackageDepends DROP FOREIGN KEY `PackageDepends_ibfk_2`;
85 ALTER TABLE PackageDepends DROP COLUMN DepPkgID;
86 DELETE FROM Packages WHERE DummyPkg = 1;
87 ALTER TABLE Packages DROP COLUMN DummyPkg;
90 3. The File_Find PEAR module is no longer required. You can safely uninstall it
91 if nothing else depends on it.
96 1. Drop foreign keys from the "Sessions" table:
98 `ALTER TABLE Sessions DROP FOREIGN KEY Sessions_ibfk_1;` should work in most
99 cases. Otherwise, check the output of `SHOW CREATE TABLE Sessions;` and use the
100 foreign key name shown there.
102 2. Run the following MySQL statements:
106 ADD FOREIGN KEY (UsersID) REFERENCES Users(ID) ON DELETE CASCADE;
107 ALTER TABLE PackageDepends
108 ADD FOREIGN KEY (PackageID) REFERENCES Packages(ID) ON DELETE CASCADE,
109 ADD FOREIGN KEY (DepPkgID) REFERENCES Packages(ID) ON DELETE CASCADE;
110 ALTER TABLE PackageSources
111 ADD FOREIGN KEY (PackageID) REFERENCES Packages(ID) ON DELETE CASCADE;
112 ALTER TABLE TU_VoteInfo
113 ADD FOREIGN KEY (SubmitterID) REFERENCES Users(ID) ON DELETE CASCADE;
115 ADD FOREIGN KEY (VoteID) REFERENCES TU_VoteInfo(ID) ON DELETE CASCADE,
116 ADD FOREIGN KEY (UserID) REFERENCES Users(ID) ON DELETE CASCADE;
117 ALTER TABLE PackageComments
118 MODIFY DelUsersID INTEGER UNSIGNED NULL DEFAULT NULL;
119 UPDATE PackageComments SET DelUsersID = NULL WHERE DelUsersID = 0;
121 MODIFY SubmitterUID INTEGER UNSIGNED NULL DEFAULT NULL,
122 MODIFY MaintainerUID INTEGER UNSIGNED NULL DEFAULT NULL;
123 UPDATE Packages SET SubmitterUID = NULL WHERE SubmitterUID = 0;
124 UPDATE Packages SET MaintainerUID = NULL WHERE MaintainerUID = 0;
127 3. (optional) If you converted your database from MyISAM to InnoDB during the
128 upgrade process from 1.7.0 to 1.8.0 or from 1.8.0 to 1.8.1 without completely
129 rebuilding the database from the MySQL schema, you should additionally run the
130 following MySQL statements to add missing foreign keys:
134 ADD FOREIGN KEY (AccountTypeID) REFERENCES AccountTypes(ID) ON DELETE NO ACTION;
136 ADD FOREIGN KEY (CategoryID) REFERENCES PackageCategories(ID) ON DELETE NO ACTION,
137 ADD FOREIGN KEY (SubmitterUID) REFERENCES Users(ID) ON DELETE NO ACTION,
138 ADD FOREIGN KEY (MaintainerUID) REFERENCES Users(ID) ON DELETE NO ACTION;
139 ALTER TABLE PackageVotes
140 ADD FOREIGN KEY (UsersID) REFERENCES Users(ID) ON DELETE CASCADE,
141 ADD FOREIGN KEY (PackageID) REFERENCES Packages(ID) ON DELETE CASCADE;
142 ALTER TABLE PackageComments
143 ADD FOREIGN KEY (UsersID) REFERENCES Users(ID) ON DELETE CASCADE,
144 ADD FOREIGN KEY (DelUsersID) REFERENCES Users(ID) ON DELETE CASCADE,
145 ADD FOREIGN KEY (PackageID) REFERENCES Packages(ID) ON DELETE CASCADE;
146 ALTER TABLE CommentNotify
147 ADD FOREIGN KEY (PkgID) REFERENCES Packages(ID) ON DELETE CASCADE,
148 ADD FOREIGN KEY (UserID) REFERENCES Users(ID) ON DELETE CASCADE;
151 4. Merge "web/lib/config.inc.proto" with "web/lib/config.inc".
156 1. Run the following MySQL statements:
159 ALTER TABLE Packages ADD OutOfDateTS BIGINT UNSIGNED NULL DEFAULT NULL;
160 UPDATE Packages SET OutOfDateTS = UNIX_TIMESTAMP() WHERE OutOfDate = 1;
161 ALTER TABLE Packages DROP OutOfDate, DROP FSPath, DROP URLPath, DROP LocationID;
162 DROP TABLE PackageLocations, PackageContents;
163 ALTER TABLE AccountTypes MODIFY AccountType VARCHAR(32) NOT NULL DEFAULT '';
164 ALTER TABLE Users MODIFY Username VARCHAR(32) NOT NULL,
165 MODIFY Email VARCHAR(64) NOT NULL,
166 MODIFY RealName VARCHAR(64) NOT NULL DEFAULT '',
167 MODIFY LangPreference VARCHAR(5) NOT NULL DEFAULT 'en',
168 MODIFY IRCNick VARCHAR(32) NOT NULL DEFAULT '';
169 ALTER TABLE PackageCategories MODIFY Category VARCHAR(32) NOT NULL;
170 ALTER TABLE Packages MODIFY Name VARCHAR(64) NOT NULL,
171 MODIFY Version VARCHAR(32) NOT NULL DEFAULT '',
172 MODIFY Description VARCHAR(255) NOT NULL DEFAULT "An Arch Package",
173 MODIFY URL VARCHAR(255) NOT NULL DEFAULT "http://www.archlinux.org",
174 MODIFY License VARCHAR(40) NOT NULL DEFAULT '';
175 ALTER TABLE PackageSources
176 MODIFY Source VARCHAR(255) NOT NULL DEFAULT "/dev/null";
177 ALTER TABLE TU_VoteInfo
178 MODIFY User VARCHAR(32) collate latin1_general_ci NOT NULL;
179 CREATE TABLE PackageBlacklist (
180 ID INTEGER UNSIGNED NOT NULL AUTO_INCREMENT,
181 Name VARCHAR(64) NOT NULL,
187 2. Drop all fulltext indexes from the "Packages" table:
189 Please do this with care. `ALTER TABLE Packages DROP INDEX Name;` will work in
190 most cases but might remove the wrong index if your indexes have been created
191 in a non-standard order (e.g. during some update process). You'd better run
192 `SHOW INDEX FROM Packages;` before to ensure that your setup doesn't use a
195 3. You will need to update all packages which are stored in the incoming dir as
196 in 1.8.0, source tarballs are no longer extracted automatically and PKGBUILDs
197 are from now on located in the same subdirectories as the tarballs themselves.
198 The following script will do the conversion automatically when being run inside
205 if [ -d "${pkg}" -a ! -f "${pkg}/PKGBUILD" ]; then
206 pkgbuild_file=$(find -P "${pkg}" -name PKGBUILD)
207 [ -n "${pkgbuild_file}" ] && \
208 cp "${pkgbuild_file}" "${pkg}/PKGBUILD"
213 4. (optional): 1.8.0 includes a helper utility called "aurblup" that can be
214 used to prevent users from uploading source packages with names identical to
215 packages in predefined binary repos, e.g. the official repositories of your
216 distribution. In order to build and install aurblup, enter the following
222 make install # as root
224 Add something like "0 * * * * /usr/local/bin/aurblup" to root's crontab to make
225 aurblup update the package blacklist every hour.
227 NOTE: You can run aurblup as non-privileged user as well. Make sure that the
228 user has read-write access to "/var/lib/aurblup/" (or whatever you defined with
231 5. (optional): As of 1.8.0, all MySQL tables should be InnoDB compatible. To
232 convert a table, you can use this statement: `ALTER TABLE $foo ENGINE=InnoDB;`.
233 If you want to stick with MyISAM or another storage engine that doesn't support
234 transactions, you will need to disable the "MYSQL_USE_TRANSACTIONS" setting in
235 "config.h" when setting up aurblup.
239 ALTER TABLE Users ADD Salt CHAR(32) NOT NULL DEFAULT '';
240 ALTER TABLE Users ADD ResetKey CHAR(32) NOT NULL DEFAULT '';
241 ALTER TABLE Users MODIFY LangPreference CHAR(5) NOT NULL DEFAULT 'en';
246 1. Ensure this appears in config.inc:
247 define("DEFAULT_LANG", "en");
252 1. Ensure Pear and File/Find.php are in the path. See web/README.txt.
254 2. Update your running copy of support/scripts/newpackage-notify.
256 3. Run this in web/lib:
259 # Run the script from within lib
260 include('config.inc');
263 $query = "UPDATE Packages SET " .
264 "FSPath = CONCAT('" . INCOMING_DIR . "', Name, '/', Name,
266 "URLPath = CONCAT('" . URL_DIR . "', Name, '/', Name, '.tar.gz') " .
267 "WHERE DummyPKG = 0 AND LocationID = 2;";
270 db_query($query, $dbh);
272 $query = "ALTER TABLE Packages DROP COLUMN AURMaintainerUID;";
273 db_query($query, $dbh);
278 ALTER TABLE PackageDepends ADD COLUMN DepCondition VARCHAR(20) AFTER DepPkgID;
279 ALTER TABLE Packages ADD License CHAR(40) NOT NULL DEFAULT '';
284 ALTER TABLE Packages MODIFY Description CHAR(255) NOT NULL DEFAULT "An Arch Package";
289 ALTER TABLE Packages MODIFY Name CHAR(64) NOT NULL;