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.
# portsnap fetch update
Looking up portsnap.FreeBSD.org mirrors... none found.
Fetching snapshot tag from portsnap.FreeBSD.org... done.
Ports tree hasn't changed since last snapshot.
No updates needed.
Ports tree is already up to date.
This is normal?
 
From what has been posted here in the forums, the ports repository is being transitioned from SVN to git, and updates to the repository have been stopped until that is complete.
 
Well, the forum and the mailing lists are full of the same question and the almost same answers over and over again, but I'll attempt to add a short "reference answer" here:

1. Using devel/git (the "tiny" flavor would be enough)

Code:
# initial clone:
git clone https://git.freebsd.org/ports.git --branch main /usr/ports

# later updates:
cd /usr/ports
git pull

If you don't plan to do any development or similar, you could avoid cloning the FULL repository, although the savings aren't that huge:
Code:
# only clone a single branch
git clone https://git.freebsd.org/ports.git --branch main --single-branch /usr/ports

# or single branch without any history, just the very latest commit:
git clone https://git.freebsd.org/ports.git -depth 1 --branch main /usr/ports

2. Using net/gitup, not for development, roughly the same usecase as portsnap:

Make sure your /usr/local/etc/gitup.conf doesn't have the Githup mirror for ports any more, for reference, you will find the latest version here: https://github.com/johnmehr/gitup/blob/main/gitup.conf

Then, it's as simple as
Code:
gitup ports
 
I have no network problems.
Sure you do. Check whether git.freebsd.org resolves (host git.freebsd.org), check whether you can ping it, check whether you can connect to port 443 (e.g. telnet git.freebsd.org 443).
I used to update ports.
A wild guess: portsnap.freebsd.org seems IPv4-only here, while git.freebsd.org has an IPv6 address. Git should support the -4 or --ipv4 flag, maybe try that…
 
Sure you do. Check whether git.freebsd.org resolves (host git.freebsd.org), check whether you can ping it, check whether you can connect to port 443 (e.g. telnet git.freebsd.org 443).
host git.freebsd.org
git.freebsd.org is an alias for gitmir.geo.freebsd.org.
gitmir.geo.freebsd.org has address 139.178.72.204
gitmir.geo.freebsd.org has IPv6 address 2604:1380:2000:9501::e6a:1
gitmir.geo.freebsd.org mail is handled by 0 .

telnet git.freebsd.org 443
Trying 2604:1380:2000:9501::e6a:1...
Trying 139.178.72.204...
telnet: connect to address 139.178.72.204: Permission denied
telnet: Unable to connect to remote host
 
Index files are never part of the repository. If you really want to use pkg features relying on them, you can either fetch them separately (so they're not perfectly up to date, could lag behind a few hours) or create them locally (which takes a lot of time).

See ports(7) (targets index and fetchindex)
 
You need to fetch the index file as well, I'm not sure why it's not included in the repo.

As above, then
Code:
# from your ports dir, eg /usr/ports
make fetchindex

# show updated ports
pkg version -l '<'  

# update them
portmaster -a

Seemed to update a normal number of ports for me today.
 
I'm not sure why it's not included in the repo.
Because it depends on local DEFAULT_VERSIONS you may have set and needs to be generated for your local copy of the ports tree (you may have opted to only accept certain commits)
 
Didn't create an index file before.
How often do i need to create an index file (make index)?
Before every software update on the server?
 
You don't need to create one at all unless you want to use something relying on it like e.g. pkg version -I.

And again, you can also fetch it, it just won't be completely up to date (but should be recreated multiple times per day). Portsnap fetched it as well.
 
Understood, before updating the software on the server, I look at what will be updated (pkg version).
Before each upgrade (portupgrade), I will collect a fresh index (the index is created about 5 minutes).
 
Back
Top