FreeBSD 14.0 已经删除了 portsnap,转而使用 git,如本文所述可以使用 gitup 替代之。
# cd /usr/ports/net/gitup/
# make install clean
# gitup ports #获取 latest 的 ports
# gitup release #获取 release 版本的源代码
# cp /usr/local/etc/gitup.conf.sample /usr/local/etc/gitup.conf
# ee /usr/local/etc/gitup.conf
# $FreeBSD$
#
# Default configuration options for gitup.conf.
{
"defaults" : {
"host" : "mirrors.ustc.edu.cn", #①改动成这样
"port" : 443,
# "proxy_host" : "",
# "proxy_port" : 0,
# "proxy_username" : "",
# "proxy_password" : "",
# "source_address" : "",
"low_memory" : false,
"display_depth" : 0,
"verbosity" : 1,
"work_directory" : "/var/db/gitup",
},
"ports" : {
"repository_path" : "/freebsd-ports/ports.git", #②改动成这样
"branch" : "main",
"target_directory" : "/usr/ports",
"ignores" : [],
},
"quarterly" : {
"repository_path" : "/freebsd-ports/ports.git", #③改动成这样
"branch" : "quarterly",
"target_directory" : "/usr/ports",
"ignores" : [],
},
"release" : {
"repository_path" : "/src.git",
"branch" : "releng/13.2",
"target_directory" : "/usr/src",
"ignores" : [
"sys/[^\/]+/conf",
],
},
"stable" : {
"repository_path" : "/src.git",
"branch" : "stable/13",
"target_directory" : "/usr/src",
"ignores" : [
"sys/[^\/]+/conf",
],
},
"current" : {
"repository_path" : "/src.git",
"branch" : "main",
"target_directory" : "/usr/src",
"ignores" : [
"sys/[^\/]+/conf",
],
}
}
"proxy_host" : "192.168.27.1",
"proxy_port" : 7890,
# rm -rf /usr/ports
# gitup ports