Downgrading Ports
Created: 12/05/2006
General Information
Using the ports tree to install applications is one of the most common ways to install softare. However, what if you updated a port to the latest version and it turns out to break things? How do you downgrade to a previous version if your ports tree is up-to-date? This is where the portdowngrade utility comes in handy.Requirements
/stand/sysinstallInstallation
Installation is pretty straight forward with the configuration of a default cvs server.Note: For a list of available cvs servers to use see this section of the handbook.
|
# # |
cd /usr/ports/sysutils/portdowngrade make DEFAULT_CVS_SERVER="anoncvs@anoncvs1.FreeBSD.org:/home/ncvs" install clean |
Usage
The way portdowngrade works is it logs into the default cvs server (or one that is defined with the-s flag) and processes the commit notes. It then displays the results of the previous versions for you to choose from and then updates the ports tree with that information (only for the selected port).portdowngrade(1) to pull the results for php5.Note: If you only specify php5 as the port name, you will be presented with a list of all ports that contain php5 in the name.
|
# portdowngrade lang/php5 portdowngrade 0.6 by Heiner Eichmann Please note, that nothing is changed in the ports tree unless it is explicitly permitted in step 6! Seeking port lang/php5 ... Found several matches: 1: lang/php5 2: lang/php5-extensions Please choose one: 1 |
|
Downgrading port: lang/php5 Step 1: Checking out port from CVS repository CVS root directory: anoncvs@anoncvs1.FreeBSD.org:/home/ncvs The authenticity of host 'anoncvs1.freebsd.org (216.38.206.185)' can't be established. DSA key fingerprint is 4d:59:19:7b:ea:9b:76:0b:ca:ee:da:26:e2:3a:83:b8. Are you sure you want to continue connecting (yes/no)? yes Warning: Permanently added 'anoncvs1.freebsd.org' (DSA) to the list of known hosts. Step 2: Reading the port history from the CVS repository Step 3: Analyzing the port history from the CVS repository Step 4: Load port version numbers and present results Keys: <space> : next page d : details p : previous page <enter> : leave presentation and downdgrade if wanted =============================================================================== number date portversion comment 1 2006/11/12 19:43:12 5.2.0 Update suhosin patch to 0.9.6.2 release. 2 2006/11/06 17:43:10 5.2.0 Update to 5.2.0 release. 3 2006/10/27 19:11:17 5.1.6 Update suhosin patch to 0.9.6 release. 4 2006/10/16 09:30:58 5.1.6 - fix open_basedir vulnerability in php4 and php5 [1] 5 2006/10/06 17:24:21 5.1.6 Enable suhosin patch by default. 6 2006/10/05 20:59:17 5.1.6 Added safety checks against integer overflow. 7 2006/09/29 19:11:40 5.1.6 Update suhosin patch to 0.9.5 release. 8 2006/09/10 16:37:43 5.1.6 Add support for QDBM. 9 2006/09/09 12:35:33 5.1.6 Update suhosin patch to 0.9.3 release. 10 2006/09/04 07:59:15 5.1.6 - Add experimental suhosin protection system support 11 2006/08/31 14:37:05 5.1.6 Update to 5.1.6 release. 12 2006/08/18 16:41:29 5.1.5 Update to 5.1.5. 13 2006/08/18 16:40:18 5.1.4 Allow php5-ldap to be built with SASL support enabled. 14 2006/07/11 13:21:54 5.1.4 Add databases/php5-oci8: 15 2006/05/23 06:19:19 5.1.4 Try to fix build on 4.X. 16 2006/05/18 22:17:32 5.1.4 - Holy Batman! Chase rerolled distfile. Only chance is an addition of a file 17 2006/05/10 14:46:43 5.1.4 Chase gmp library and bump PORTREVISION. Total lines: 152. Command: |
enter to choose which commit to downgrade to or you can hit space to view the next list of choices. Since 5.1.6 is in this first list we'll hit enter.|
Enter version number to change port to (0: exit): 3 |
|
Step 5: Checking out choosen date of the port from the CVS repository Step 6: Modifying the port Port: lang/php5 at : 2006/10/27 19:11:17 Type 'yes' to bring the port to the state of the date above or 'no' to exit without changing anything. Note, that this only changes the port, not the installed software! yes or no:yes |
lang/php5 is now at version 5.1.6 and ready for you to actually downgrade your port. It is first recommended to run the following command to make sure we see the changes in the ports tree:| # | portsdb -Uu |
*.| # | portupgrade -f php5* |
| # | pkg_info | grep php5 |
Author: Jon LaBass
jon at bsdguides dot org