diff --git a/documentation/content/en/books/handbook/ports/_index.adoc b/documentation/content/en/books/handbook/ports/_index.adoc --- a/documentation/content/en/books/handbook/ports/_index.adoc +++ b/documentation/content/en/books/handbook/ports/_index.adoc @@ -957,7 +957,7 @@ Each has its strengths and weaknesses. Historically, most installations used either Portmaster or Portupgrade. -Synth is a newer alternative. +Poudriere is the tool used by the package builders, while Synth is an alternative. [NOTE] ==== @@ -965,172 +965,11 @@ It is recommended practice to back up your data before using any of these tools. ==== -[[portmaster]] -==== Upgrading Ports Using Portmaster - -package:ports-mgmt/portmaster[] is a very small utility for upgrading installed ports. -It is designed to use the tools installed with the FreeBSD base system without depending on other ports or databases. -To install this utility as a port: - -[source,shell] -.... -# cd /usr/ports/ports-mgmt/portmaster -# make install clean -.... - -Portmaster defines four categories of ports: - -* Root port: has no dependencies and is not a dependency of any other ports. -* Trunk port: has no dependencies, but other ports depend upon it. -* Branch port: has dependencies and other ports depend upon it. -* Leaf port: has dependencies but no other ports depend upon it. - -To list these categories and search for updates: - -[source,shell] -.... -# portmaster -L -===>>> Root ports (No dependencies, not depended on) -===>>> ispell-3.2.06_18 -===>>> screen-4.0.3 - ===>>> New version available: screen-4.0.3_1 -===>>> tcpflow-0.21_1 -===>>> 7 root ports -... -===>>> Branch ports (Have dependencies, are depended on) -===>>> apache22-2.2.3 - ===>>> New version available: apache22-2.2.8 -... -===>>> Leaf ports (Have dependencies, not depended on) -===>>> automake-1.9.6_2 -===>>> bash-3.1.17 - ===>>> New version available: bash-3.2.33 -... -===>>> 32 leaf ports - -===>>> 137 total installed ports - ===>>> 83 have new versions available -.... - -This command is used to upgrade all outdated ports: - -[source,shell] -.... -# portmaster -a -.... - -[NOTE] -==== -By default, Portmaster makes a backup package before deleting the existing port. -If the installation of the new version is successful, Portmaster deletes the backup. -Using `-b` instructs Portmaster not to automatically delete the backup. -Adding `-i` starts Portmaster in interactive mode, prompting for confirmation before upgrading each port. -Many other options are available. -Read through the manual page for man:portmaster[8] for details regarding their usage. -==== - -If errors are encountered during the upgrade process, add `-f` to upgrade and rebuild all ports: - -[source,shell] -.... -# portmaster -af -.... - -Portmaster can also be used to install new ports on the system, upgrading all dependencies before building and installing the new port. -To use this function, specify the location of the port in the Ports Collection: - -[source,shell] -.... -# portmaster shells/bash -.... - -More information about package:ports-mgmt/portmaster[] may be found in its `pkg-descr`. - -[[portupgrade]] -==== Upgrading Ports Using Portupgrade - -package:ports-mgmt/portupgrade[] is another utility that can be used to upgrade ports. -It installs a suite of applications which can be used to manage ports. -However, it is dependent upon Ruby. To install the port: - -[source,shell] -.... -# cd /usr/ports/ports-mgmt/portupgrade -# make install clean -.... - -Before performing an upgrade using this utility, it is recommended to scan the list of installed ports using `pkgdb -F` and to fix all the inconsistencies it reports. - -To upgrade all the outdated ports installed on the system, use `portupgrade -a`. -Alternately, include `-i` to be asked for confirmation of every individual upgrade: - -[source,shell] -.... -# portupgrade -ai -.... - -To upgrade only a specified application instead of all available ports, use `portupgrade _pkgname_`. -It is very important to include `-R` to first upgrade all the ports required by the given application: - -[source,shell] -.... -# portupgrade -R firefox -.... - -If `-P` is included, Portupgrade searches for available packages in the local directories listed in `PKG_PATH`. -If none are available locally, it then fetches packages from a remote site. -If packages can not be found locally or fetched remotely, Portupgrade will use ports. -To avoid using ports entirely, specify `-PP`. -This last set of options tells Portupgrade to abort if no packages are available: - -[source,shell] -.... -# portupgrade -PP gnome3 -.... - -To just fetch the port distfiles, or packages, if `-P` is specified, without building or installing anything, use `-F`. -For further information on all of the available switches, refer to the manual page for `portupgrade`. - -More information about package:ports-mgmt/portupgrade[] may be found in its `pkg-descr`. - [[ports-disk-space]] === Ports and Disk Space Using the Ports Collection will use up disk space over time. After building and installing a port, running `make clean` within the ports skeleton will clean up the temporary `work` directory. -If Portmaster is used to install a port, it will automatically remove this directory unless `-K` is specified. -If Portupgrade is installed, this command will remove all `work` directories found within the local copy of the Ports Collection: - -[source,shell] -.... -# portsclean -C -.... - -In addition, outdated source distribution files accumulate in `/usr/ports/distfiles` over time. -To use Portupgrade to delete all the distfiles that are no longer referenced by any ports: - -[source,shell] -.... -# portsclean -D -.... - -Portupgrade can remove all distfiles not referenced by any port currently installed on the system: - -[source,shell] -.... -# portsclean -DD -.... - -If Portmaster is installed, use: - -[source,shell] -.... -# portmaster --clean-distfiles -.... - -By default, this command is interactive and prompts the user to confirm if a distfile should be deleted. - -In addition to these commands, package:ports-mgmt/pkg_cutleaves[] automates the task of removing installed ports that are no longer needed. [[ports-poudriere]] == Building Packages with Poudriere