FreeBSD Update Port Tree


In order to make the software we installed the latest version, we need to update Port Tree regularly.The so-called update port is to update patches

Note: csup is a rewrite of C VSup software in C language. It is provided as part of the system in FreeBSD 6.2 and later.
Before running CVSup for the first time, make sure / usr / ports is empty! If you have previously installed a Ports suite elsewhere, CVSup may not automatically delete patch files that have been deleted on upstream servers. First install the package cvsup-without-gui-16.1h. You can install it with ports or package. is modified to a CVSup server closer to you.
#cp /usr/share/examples/cvsup/ports-supfile ~/
#ee ~/ports-supfile
* default host = tells cvsup where to get updates ( to the server you think is the fastest)
* Location of default base=/var/db# cvsup support file
* Where do default prefix=/usr# files go
* default releases = CVS tag =. FreeBSD-CURRENT (branch =., or HEAD)
* default delete use-rel-suffix # delete files created by cvsup that have been deleted in CVS
Src-all # All FreeBSD source code
Ports-all tag=. All ports. Here, tag=. is used to replace the default branch. If you use RELENG_4, be sure to keep tag=.!!
To update:
# cvsup -L 2 /root/ports-supfile
The additional parameter means:
If you don’t run X11 or don’t like GUI, you need to add two options on the command line when you run cvsup:
# cvsup -g -L 2 supfile
– G tells CVSup not to use GUI. If you are not running X11, this is automatic, otherwise you must specify it.
– L 2 tells CVSup to output details of all upgrading files. There are three levels to choose from, from – L 0 to – L 2. The default is 0, which means that nothing is output except error messages.
– s requires incremental synchronization of cvsup to reduce network pressure, so you can’t add it to the first time!

Features: Old brand new methods, with a long history, can also be used to update the source, the first time takes a relatively long time, about 10 minutes. If updated in time (for example, in Cron set hourly synchronization once), it will only take about 2 minutes.

2. Unzip after downloading ports. tar. GZ
#tar -zxvf ports.tar.gz -C /usr/
Features: It’s also an old-fashioned method, faster than the first one, but often not the latest (relatively speaking)
Now ports. tar. GZ is about 37MB in size. I need to download it with the fastest mirror.
Downloaded 36.6 megabytes in 3:02 seconds. (205.96 KB/s)
Decompression takes 3 minutes and 20 seconds, totaling about 7 minutes.

Portsnap is another way to publish ports suites. It was first introduced in FreeBSD 6.0. In earlier systems, you could install it through ports-mgmt/portsnap package.
First run Portsnap
# portsnap fetch
# portsnap extract
Update Ports Tree
# portsnap fetch update

Modify the mirror site:
#ee /etc/portsnap.conf

Features: It is a new method introduced in recent years. The first download size is about 47 MB. The speed is not ideal, only about 20 Kb/s, if you download it every day.
It takes the shortest time to update in time, but if the update is not timely, there will be no advantage in speed accumulated.

CVS List:

Chinese Mainland

Taiwan, China