Solved What's the new alternative to portsnap

I do the following,
Code:
rm -r /usr/ports/* /usr/ports/.??*
cd /usr/ports/
git clone --branch 2021Q2 https://git.FreeBSD.org/ports.git /usr/ports
And to update,
Code:
cd /usr/ports
git pull --rebase
 
Not sure how much of the default gitup file has been fixed. Your /usr/local/etc/gitup.conf should have a ports section that reads
Code:
         "repository_path"  : "/ports.git",
                "branch"           : "main",
                "target_directory" : "/usr/ports",
There is more in there, but the repository path line was wrong fro awhile, also the branch line might say master--if it does, change it to main.
 
Just for completeness:

portsnap is planned to be removed at some point in time. But it's still part of 13.0-RELEASE, so it won't go away until (earliest) EOL of the 13-STABLE branch. As far as I know, there is no "replacement" planned so far.

Apart from that, it was always an alternative to get the ports tree directly from its source repository, which worked using svn until recently, but is now switched to git. Using the repository directly always had some advantages, one of them being that you can select the branch you want (while portsnap was always based on the "main" branch, "latest" in pkg repos).

For people wanting to just fetch from repos and not interested in doing development themselves, there was svnup in the past, and there's gitup now to replace it. Those are tools that just fetch (and don't support anything else) and aim for ease of use (one simple command…)

As for the config issue with the branch name: the "master" branch was renamed to "main" quite some time ago, and the default config of gitup followed that. If you still have a config referring to "master", it seems you didn't upgrade ports/packages for some time ;)
 
I think the quaterly pkg install of gitup has the wrong configuration.

There was a blip when portsnap wasn't working (during the migration to git) but now both tools do the job - just need to watch out for the config issue in gitup.

I think gitup might use a lot of memory so if you are on a 512M VM or similar you might want to stick to portsnap (think there's been a fix for the memory usage).
 
Back
Top