Changeset View
Changeset View
Standalone View
Standalone View
documentation/content/en/books/handbook/ports/_index.adoc
Show First 20 Lines • Show All 604 Lines • ▼ Show 20 Lines | |||||
When using `fetch`, the `extract` or the `update` operation may be run consecutively, like so: | When using `fetch`, the `extract` or the `update` operation may be run consecutively, like so: | ||||
+ | + | ||||
[source,shell] | [source,shell] | ||||
.... | .... | ||||
# portsnap fetch update | # portsnap fetch update | ||||
.... | .... | ||||
**** | **** | ||||
[[ports-using-subversion-method]] | [[ports-using-git-method]] | ||||
[.procedure] | [.procedure] | ||||
**** | **** | ||||
*Procedure: Subversion Method* | *Procedure: Git Method* | ||||
If more control over the ports tree is needed or if local changes need to be maintained, Subversion can be used to obtain the Ports Collection. Refer to link:{committers-guide}#subversion-primer[the Subversion Primer] for a detailed description of Subversion. | If more control over the ports tree is needed or if local changes need to be maintained, Git can be used to obtain the Ports Collection. Refer to link:{committers-guide}#git-primer[the Git Primer] for a detailed description of Git. | ||||
. Subversion must be installed before it can be used to check out the ports tree. If a copy of the ports tree is already present, install Subversion like this: | . Git must be installed before it can be used to check out the ports tree. If a copy of the ports tree is already present, install Git like this: | ||||
+ | + | ||||
[source,shell] | [source,shell] | ||||
.... | .... | ||||
# cd /usr/ports/devel/subversion | # cd /usr/ports/devel/git | ||||
# make install clean | # make install clean | ||||
.... | .... | ||||
+ | + | ||||
If the ports tree is not available, or pkg is being used to manage packages, Subversion can be installed as a package: | If the ports tree is not available, or pkg is being used to manage packages, Git can be installed as a package: | ||||
+ | + | ||||
[source,shell] | [source,shell] | ||||
.... | .... | ||||
# pkg install subversion | # pkg install git | ||||
mat: This should probably be put before the whole "build your own" bit, so that people know they can… | |||||
.... | .... | ||||
+ | + | ||||
. Check out a copy of the ports tree: | . Check out a copy of the ports tree: | ||||
+ | + | ||||
[source,shell] | [source,shell] | ||||
.... | .... | ||||
# svn checkout https://svn.FreeBSD.org/ports/head /usr/ports | # git clone https://git.FreeBSD.org/ports.git /usr/ports | ||||
.... | .... | ||||
+ | + | ||||
. As needed, update [.filename]#/usr/ports# after the initial Subversion checkout: | . As needed, update [.filename]#/usr/ports# after the initial Git checkout: | ||||
+ | + | ||||
[source,shell] | [source,shell] | ||||
.... | .... | ||||
# svn update /usr/ports | # git -C /usr/ports pull | ||||
.... | .... | ||||
**** | **** | ||||
The Ports Collection contains directories for software categories. Inside each category are subdirectories for individual applications. Each application subdirectory contains a set of files that tells FreeBSD how to compile and install that program, called a _ports skeleton_. Each port skeleton includes these files and directories: | The Ports Collection contains directories for software categories. Inside each category are subdirectories for individual applications. Each application subdirectory contains a set of files that tells FreeBSD how to compile and install that program, called a _ports skeleton_. Each port skeleton includes these files and directories: | ||||
* [.filename]#Makefile#: contains statements that specify how the application should be compiled and where its components should be installed. | * [.filename]#Makefile#: contains statements that specify how the application should be compiled and where its components should be installed. | ||||
* [.filename]#distinfo#: contains the names and checksums of the files that must be downloaded to build the port. | * [.filename]#distinfo#: contains the names and checksums of the files that must be downloaded to build the port. | ||||
* [.filename]#files/#: this directory contains any patches needed for the program to compile and install on FreeBSD. This directory may also contain other files used to build the port. | * [.filename]#files/#: this directory contains any patches needed for the program to compile and install on FreeBSD. This directory may also contain other files used to build the port. | ||||
▲ Show 20 Lines • Show All 146 Lines • ▼ Show 20 Lines | |||||
It is recommended to read the messages as the port is uninstalled. If the port has any applications that depend upon it, this information will be displayed but the uninstallation will proceed. In such cases, it may be better to reinstall the application in order to prevent broken dependencies. | It is recommended to read the messages as the port is uninstalled. If the port has any applications that depend upon it, this information will be displayed but the uninstallation will proceed. In such cases, it may be better to reinstall the application in order to prevent broken dependencies. | ||||
[[ports-upgrading]] | [[ports-upgrading]] | ||||
=== Upgrading Ports | === Upgrading Ports | ||||
Over time, newer versions of software become available in the Ports Collection. This section describes how to determine which software can be upgraded and how to perform the upgrade. | Over time, newer versions of software become available in the Ports Collection. This section describes how to determine which software can be upgraded and how to perform the upgrade. | ||||
To determine if newer versions of installed ports are available, ensure that the latest version of the ports tree is installed, using the updating command described in either <<ports-using-portsnap-method, “Portsnap Method”>> or <<ports-using-subversion-method, “Subversion Method”>>. On FreeBSD 10 and later, or if the system has been converted to pkg, the following command will list the installed ports which are out of date: | To determine if newer versions of installed ports are available, ensure that the latest version of the ports tree is installed, using the updating command described in either <<ports-using-portsnap-method, “Portsnap Method”>> or <<ports-using-git-method, “Git Method”>>. On FreeBSD 10 and later, or if the system has been converted to pkg, the following command will list the installed ports which are out of date: | ||||
[source,shell] | [source,shell] | ||||
.... | .... | ||||
# pkg version -l "<" | # pkg version -l "<" | ||||
.... | .... | ||||
For FreeBSD 9._X_ and lower, the following command will list the installed ports that are out of date: | For FreeBSD 9._X_ and lower, the following command will list the installed ports that are out of date: | ||||
▲ Show 20 Lines • Show All 226 Lines • ▼ Show 20 Lines | |||||
done. | done. | ||||
11.4-RELEASE-p1 | 11.4-RELEASE-p1 | ||||
[00:04:06] Recording filesystem state for clean... done | [00:04:06] Recording filesystem state for clean... done | ||||
[00:04:07] Jail 11amd64 11.4-RELEASE-p1 amd64 is ready to be used | [00:04:07] Jail 11amd64 11.4-RELEASE-p1 amd64 is ready to be used | ||||
.... | .... | ||||
[source,shell] | [source,shell] | ||||
.... | .... | ||||
# poudriere ports -c -p local -m svn+https | # poudriere ports -c -p local -m git+https | ||||
[00:00:00] Creating local fs at /poudriere/ports/local... done | [00:00:00] Creating local fs at /poudriere/ports/local... done | ||||
[00:00:00] Checking out the ports tree... done | [00:00:00] Checking out the ports tree... done | ||||
.... | .... | ||||
On a single computer, poudriere can build ports with multiple configurations, in multiple jails, and from different port trees. Custom configurations for these combinations are called _sets_. See the CUSTOMIZATION section of man:poudriere[8] for details after package:ports-mgmt/poudriere[] or package:ports-mgmt/poudriere-devel[] is installed. | On a single computer, poudriere can build ports with multiple configurations, in multiple jails, and from different port trees. Custom configurations for these combinations are called _sets_. See the CUSTOMIZATION section of man:poudriere[8] for details after package:ports-mgmt/poudriere[] or package:ports-mgmt/poudriere-devel[] is installed. | ||||
The basic configuration shown here puts a single jail-, port-, and set-specific [.filename]#make.conf# in [.filename]#/usr/local/etc/poudriere.d#. The filename in this example is created by combining the jail name, port name, and set name: [.filename]#10amd64-local-workstation-make.conf#. The system [.filename]#make.conf# and this new file are combined at build time to create the [.filename]#make.conf# used by the build jail. | The basic configuration shown here puts a single jail-, port-, and set-specific [.filename]#make.conf# in [.filename]#/usr/local/etc/poudriere.d#. The filename in this example is created by combining the jail name, port name, and set name: [.filename]#10amd64-local-workstation-make.conf#. The system [.filename]#make.conf# and this new file are combined at build time to create the [.filename]#make.conf# used by the build jail. | ||||
▲ Show 20 Lines • Show All 88 Lines • Show Last 20 Lines |
This should probably be put before the whole "build your own" bit, so that people know they can install a binary package first.