Freebsd update ports tree portsnap




















This file describes various issues and additional steps users may encounter and need to perform when updating a port, including such things as file format changes, changes in locations of configuration files, or any incompatibilities with previous versions.

Make note of any instructions which match any of the ports that need upgrading and follow these instructions when performing the upgrade.

The Ports Collection contains several utilities to perform the actual upgrade. Each has its strengths and weaknesses. Historically, most installations used either Portmaster or Portupgrade. Synth is a newer alternative. The choice of which tool is best for a particular system is up to the system administrator. It is recommended practice to back up your data before using any of these tools. 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:. 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 portmaster 8 for details regarding their usage. If errors are encountered during the upgrade process, add -f to upgrade and rebuild all ports:. 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:.

It installs a suite of applications which can be used to manage ports. However, it is dependent upon Ruby. To install the port:. 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:.

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:.

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:.

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. 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:. To use Portupgrade to delete all the distfiles that are no longer referenced by any ports:. Portupgrade can remove all distfiles not referenced by any port currently installed on the system:.

By default, this command is interactive and prompts the user to confirm if a distfile should be deleted. It uses FreeBSD jails to set up isolated compilation environments.

These jails can be used to build packages for versions of FreeBSD that are different from the system on which it is installed, and also to build packages for i if the host is an amd64 system. Once the packages are built, they are in a layout identical to the official mirrors. These packages are usable by pkg 8 and other package management tools.

Edit the copied file to suit the local configuration. While ZFS is not required on the system running poudriere, it is beneficial. Defaults for the other configuration values are adequate. The number of processor cores detected is used to define how many builds will run in parallel. Supply enough virtual memory, either with RAM or swap space. If virtual memory runs out, the compilation jails will stop and be torn down, resulting in weird error messages.

After configuration, initialize poudriere so that it installs a jail with the required FreeBSD tree and a ports tree. Specify a name for the jail using -j and the FreeBSD version with -v. The default is the architecture shown by uname.

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. The basic configuration shown here puts a single jail-, port-, and set-specific make.

The filename in this example is created by combining the jail name, port name, and set name: 11amdlocal-workstation-make. The system make. Packages to be built are entered in 11amdlocal-workstation-pkglist :. After completion, the new packages are now available for installation from the poudriere repository. While it is possible to use both a custom repository along side of the official repository, sometimes it is useful to disable the official repository.

This is done by creating a configuration file that overrides and disables the official configuration file. Usually it is easiest to serve a poudriere repository to the client machines via HTTP.

Regardless of whether the software was installed from a binary package or port, most third-party applications require some level of configuration after installation. The following commands and locations can be used to help determine what was installed with the application. In cases where an application has a large number of configuration files, a subdirectory will be created to hold them. Often, sample configuration files are installed which end with a suffix such as.

To edit a sample file, first copy it without the. This documentation should be consulted before continuing. See Starting Services for more information. By design, applications do not run their startup script upon installation, nor do they run their stop script upon deinstallation or upgrade. This decision is left to the individual system administrator. Users of csh 1 should run rehash to rebuild the known binary list in the shells PATH.

Use pkg info to determine which files, man pages, and binaries were installed with the application. Search to see if there is a fix pending for the port in the Problem Report database. If so, implementing the proposed fix may fix the issue. Ask the maintainer of the port for help. Remember to include the output leading up to the error in the email to the maintainer. Some ports are not maintained by an individual but instead by a group maintainer represented by a mailing list.

Many, but not all, of these addresses look like freebsd-listname FreeBSD. Please take this into account when sending an email. In particular, ports maintained by ports FreeBSD. Instead, any fixes and support come from the general community who subscribe to that mailing list. More volunteers are always needed! Fix it! Install the package instead of the port using the instructions in Using pkg for Binary Package Management.

Book menu. Table of Contents 4. Synopsis 4. Overview of Software Installation 4. Finding Software 4. Using pkg for Binary Package Management 4. Using the Ports Collection 4.

Building Packages with Poudriere 4. Post-Installation Considerations 4. Dealing with Broken Ports. Synopsis FreeBSD is bundled with a rich collection of system tools as part of the base system. The difference between binary packages and ports. How to find third-party software that has been ported to FreeBSD.

How to manage binary packages using pkg. How to build third-party software from source using the Ports Collection. How to find the files installed with the application for post-installation configuration. What to do if a software installation fails. Find and download the software, which might be distributed in source code format or as a binary. Test and install the software.

Packages can be manipulated with the FreeBSD package management commands. To search the binary package repository for an application: pkg search subversion git-subversion It may not display this or other websites correctly. You should upgrade or use an alternative browser.

Thread starter firetree Start date Apr 7, Zirias Son of Beastie Reaction score: 1, Messages: 2, You have an old gitup config. Solved - starting port updates Hello. The last time the ports were updated a week ago.

Now I start updating ports and receive messages that the ports have not changed, there are no updates. Fetching snapshot tag from portsnap. A thousand thanks. Minbari Aspiring Daemon Reaction score: Messages: I have a similar error but with quarterly and I've updated that config file.

I also tried using gitup quarterly with the same config, and it did not work either. Obviously there is no branch named "quarterly" on git. It would probably work with setting "branch" : "Q2" but then I don't see any advantage in using it instead of plain git if you have to manually switch from a quarterly branch to the next one anyway. SirDice Administrator Staff member.

Click to expand When it works I may adopt it then. This is a good method of quickly acquiring software, but it forfeits the level of customization provided by the ports system. You can learn more about how to manage software packages in this guide. This hierarchy contains directories that correspond to port categories, within which are other directories that correspond to individual ports. Before we begin manipulating any ports, we should ensure that this hierarchy is up-to-date.

Forgetting to refresh the ports hierarchy can result in build failures as the ports try to fetch and build files that may not be valid anymore.

We can update the ports tree using a utility called portsnap. This tool queries the FreeBSD ports servers for changes. We can use the stat tool to see the various timestamps associated with the file:. If you see this, it means that you do not have a ports tree initialized on your system. If this is the case, continue onto the next section to learn how to extract an initial ports tree onto your system using portsnap.

We need to remember the timestamp so that we know which updating notes we need to pay attention to after we refresh our ports tree. We can save these to a file in our home directory by typing:. To do this, we will use a tool called portsnap. This is the format that should be used in day-to-day updates of the ports tree. Once your ports tree is built or updated, you can begin to manage and work with ports on your system.

Now that you have an updated ports tree hierarchy on your system, you can begin looking at the software available to you. There are several ways of doing this, each of which has its advantages.

The easiest way of searching for an application is by name using the whereis command. This will search for the command on your system and within the ports tree.

If it finds a match, it will return the relevant path info for the application on your system. Typically, if the application is not installed but the search was for a valid port, it will return the path to the port within the ports tree. If the application is installed, it will usually return the path to the executable, the port, and often the man page:.

We can use the path returned if we wish to install this port. This includes the path to the actual installed executable, the man page file for the application, and the location of the port within the ports tree. In the FreeBSD Handbook , the authors also suggest a rather novel way of searching using only the echo command and the built-in structure of the ports tree.

In the filesystem, each port is represented by a distinct directory that contains all of the information necessary to build and install the software on the FreeBSD system. So in the wget example above, we see that the wget command has been categorized within the ftp group. We can exploit this consistent structure through the use of the echo command and wildcards. Since we probably do not know the category the port will exist in, we will replace that directory level with an asterisk.

We can also put these before and after our search term if we want to be more flexible in our matching. So we can search for wget related programs by typing:. This can be a bit more flexible than the whereis command because it does not require an exact match.

This is also the command that is used to build and install ports onto the system, but is more generally a flexible tool that can be used to easily execute complex tasks that have been defined in a config file. To use this functionality, you must first move to the base of the ports tree. This is where the make targets are defined:. The two make targets designed to search the ports tree are search and quicksearch. These have exactly the same functionality, differing only in their default display.

The search target will return information about the name of the port, path in the port tree, a general description and then details about the build including the maintainer email, build dependencies, run dependencies, and the upstream URL.

The quicksearch target only returns the port name, path, and description. Below, you can see the difference in the output of the search and quicksearch targets. The search target includes full information about the matches:. On the other hand, the quicksearch target only displays the essential information about the matches it finds:. It is possible to combine different search types to narrow down the results.

For example, if we were to search for the ntop network monitor, we might see results that look like this:. Here, we can see that most of the results are related to ntop , but we also have a book about learning Python. We can further filter by adding a path specification:. We can also modify the behavior of the search in a few different ways.

Some valid modifiers are:. One further situation that you may come across in your searches is a port that has been moved or deleted. These results look like this:. If this field is present, but empty, the port has been deleted.

Even though these are deleted, they will still show up in your search results. As you can see, all of the entries that had been moved or deleted are now filtered out of our results. Once you have found a port that you wish to install, you can easily download the required files, build the binary, and install it using the make command. To install a port, change to the directory of the port within the port tree.

You can find this location through any of the search methods given above. To demonstrate this, we will be installing a port called portmaster , which we will need later in this guide. First, change to the port location. The portmaster port is kept in the ports-mgmt category:. Now, we can easily download, configure, compile, and install the port using make targets.

Since these operations affect our system, we will need to use sudo. The long way to do this is through individual calls to make , like this. Do not type these commands yet, we will show you a much shorter version momentarily:. We could shorten this a bit by listing each target after a single make command like this:.



0コメント

  • 1000 / 1000