Update ports tree
Not all kde packages have "kde" in their names. And if I just rebuilt packages except KDE ones, there would be problems. Click to expand SirDice Administrator Staff member. This could cause problems with KDE if it depends on anyone of those. Like I said - make sure you catch'em all.
In the case of KDE, I'd say it probably takes a few dryruns of portmaster to get it right. Partial answer, test before using Use Code:. How do I use portmaster to get it right? You can't, becouse FreeBSD lack decent package management. There are recent threads in this section of the forum explaining about this subject.
Check them out and good luck. Is it possible? I can still upgrade using packages even after I upgraded KDE using ports, right? Also, don't use sysinstall anymore because it is depreciated. Note to submitter: If the point of the PR is just to alert the maintainer, he'll get notices every time it fails to build on the FreeBSD cluster. For this purpose, the PR is unnecessary Did you update the operating system since the last successful build?
I have FreeBSD Cluster assembly for ports build ports with the default options - problems arise when installing with more options Did you select any special options? If it does, this is not related to the OS. The information that you used the option FFMPEG was very useful, and you should have said so clearly in the original report.
It is very unlikely I would have spotted this from the code segment you sent me, and also it is very unlikely that I could have found this proposed fix. For some reason bugzilla didn't include this in the previous patch. A FreeBSD package contains pre-compiled copies of all the commands for an application, as well as any configuration files and documentation.
A package can be manipulated with the pkg 8 commands, such as pkg install. While the two technologies are similar, packages and ports each have their own strengths. Select the technology that meets your requirements for installing a particular application. A compressed package tarball is typically smaller than the compressed tarball containing the source code for the application. Packages do not require compilation time. Packages do not require any understanding of the process involved in compiling software on FreeBSD.
Packages are normally compiled with conservative options because they have to run on the maximum number of systems. By compiling from the port, one can change the compilation options. Some applications have compile-time options relating to which features are installed. For example, Apache can be configured with a wide variety of different built-in options.
In some cases, multiple packages will exist for the same application to specify certain settings. For example, Ghostscript is available as a ghostscript package and a ghostscript-nox11 package, depending on whether or not Xorg is installed.
Creating multiple packages rapidly becomes impossible if an application has more than one or two different compile-time options. The licensing conditions of some software forbid binary distribution. Such software must be distributed as source code which must be compiled by the end-user. Some people do not trust binary distributions or prefer to read through source code in order to look for potential problems.
The remainder of this chapter explains how to use packages and ports to install and manage third-party software on FreeBSD.
There are a number of ways to find software to install:. The ports can be searched by application name or by software category.
Dan Langille maintains FreshPorts. Registered users can create a customized watch list in order to receive an automated email when their watched ports are updated. If finding a particular application becomes challenging, try searching a site like SourceForge. Package names include the version number and, in the case of ports based on python, the version number of the version of python the package was built with.
Some ports also have multiple versions available. In the case of Subversion, there are different versions available, as well as different compile options. In this case, the statically linked version of Subversion. When indicating which package to install, it is best to specify the application by the port origin, which is the path in the ports tree.
Repeat the pkg search with -o to list the origin of each package:. Searching by shell globs, regular expressions, exact match, by description, or any other field in the repository database is also supported by pkg search.
If the Ports Collection is already installed, there are several methods to query the local version of the ports tree. To find out which category a port is in, type whereis file , where file is the program to be installed:.
Alternately, an echo 1 statement can be used:. For example, to search for lsof :. The built-in search mechanism uses a file of index information. If a message indicates that the INDEX is required, run make fetchindex to download the current index file. The text can be in comments, descriptions, or dependencies in order to find ports which relate to a particular subject when the name of the program is unknown. When using search or quicksearch , the search string is case-insensitive.
Searching for "LSOF" will yield the same results as searching for "lsof". For sites wishing to only use prebuilt binary packages from the FreeBSD mirrors, managing packages with pkg can be sufficient. However, for those sites building from source or using their own repositories, a separate port management tool will be needed.
Since pkg only works with binary packages, it is not a replacement for such tools. Those tools can be used to install software from both binary packages and the Ports Collection, while pkg installs only binary packages. FreeBSD includes a bootstrap utility which can be used to download and install pkg and its manual pages.
This utility is designed to work with versions of FreeBSD starting with Not all FreeBSD versions and architectures support this bootstrap process. For other cases, pkg must instead be installed from the Ports Collection or as a binary package. Once pkg has been installed, the package database must be converted from the traditional format to the new format by running this command:.
This step is not required for new installations that do not yet have any third-party software installed. This step is not reversible. The package database conversion may emit errors as the contents are converted to the new version.
Generally, these errors can be safely ignored. However, a list of software that was not successfully converted is shown after pkg2ng finishes. These applications must be manually reinstalled. To ensure that the Ports Collection registers new software with pkg instead of the traditional packages database, FreeBSD versions earlier than By default, pkg uses the binary packages from the FreeBSD package mirrors the repository. For information about building a custom package repository, see Building Packages with Poudriere.
Additional pkg configuration options are described in pkg. Usage information for pkg is available in the pkg 8 manual page or by running pkg without additional arguments. Each pkg command argument is documented in a command-specific manual page. To read the manual page for pkg install , for example, run either of these commands:. The rest of this section demonstrates common binary package management tasks which can be performed using pkg. Each demonstrated command provides many switches to customize its use.
The Quarterly branch provides users with a more predictable and stable experience for port and package installation and upgrades. This is done essentially by only allowing non-feature updates. Quarterly branches aim to receive security fixes that may be version updates, or backports of commits , bug fixes and ports compliance or framework changes.
For example, the quarterly branch created in January , is named Q1. And the Latest branch provides the latest versions of the packages to the users. Information about the packages installed on a system can be viewed by running pkg info which, when run without any switches, will list the package version for either all installed packages or the specified package. To install a binary package use the following command, where packagename is the name of the package to install:.
This command uses repository data to determine which version of the software to install and if it has any uninstalled dependencies. For example, to install curl:. The new package and any additional packages that were installed as dependencies can be seen in the installed packages list:.
This command will compare the installed versions with those available in the repository catalogue and upgrade them from the repository. Software vulnerabilities are regularly discovered in third-party applications.
To address this, pkg includes a built-in auditing mechanism. To determine if there are any known vulnerabilities for the software installed on the system, run:. Removing a package may leave behind dependencies which are no longer required.
Unneeded packages that were installed as dependencies leaf packages can be automatically detected and removed using:. Packages installed as dependencies are called automatic packages. Non-automatic packages, i. There are many others that can be used to query the package database of the system. For instance, command pkg prime-origins can be used to get the origin port directory of the list mentioned above:.
Once a package is a leaf package and is marked as automatic, it gets selected by pkg autoremove. Unlike the traditional package management system, pkg includes its own package database backup mechanism. This functionality is enabled by default.
If restoring a backup taken by the periodic script, it must be decompressed prior to being restored. Only copies of the latest installed packages are kept. Older versions of pkg kept all previous packages. To remove these outdated binary packages, run:. To address this, pkg has a built-in command to update package origins.
When changing package origins, it is important to reinstall packages that are dependent on the package with the modified origin. To force a reinstallation of dependent packages, run:. The Ports Collection is a set of Makefile s, patches, and description files.
Each set of these files is used to compile and install an individual application on FreeBSD, and is called a port. Before installing and using the Ports Collection, please be aware that it is generally ill-advised to use the Ports Collection in conjunction with the binary packages provided via pkg to install software.
Dependencies could be different for a port in HEAD compared to its counterpart in a quarterly branch release and this could result in conflicts between dependencies installed by pkg and those from the Ports Collection. If the Ports Collection and pkg must be used in conjunction, then be sure that your Ports Collection and pkg are on the same branch release of the ports tree.
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:. Makefile : contains statements that specify how the application should be compiled and where its components should be installed.
This directory may also contain other files used to build the port. It also tells the ports system which files to remove upon deinstallation. Some ports include pkg-message or other files to handle special situations. The port does not include the actual source code, also known as a distfile.