How to get Ports in FreeBSD 14.1

Hi All,

What is the command when installing fresh base install of 14.1 do you use to get the Ports tree?

Or do you have to install a package first before getting the Ports tree on to a new install?

Kind of missed the boat a bit on recent discussions, and there seems to be a few third party packages that have been mentioned, but am looking for something in base userland...

Kr,
James
 
Its not in the handbook, but for a while gitup was suggested, but I'm not sure if it is in favour any more? It's working well for me instead of portsnap.

It is a lot lighter than full-blown git, so if you want to try it, pkg install gitup and then gitup ports (You may need to use the -C create flag the first time you use it.)
 
What way to go/tool to use may vary with what you want to do.

If you want to simply update ports tree and just patiently wait someone to fix once some problem happens, gitup or the way astyle noted on comment #8 should be your best friend.
This is so-called "shallow clone" without revision logs and so on.

If the above is insufficient, for example, when some problem happens, you want to bisect the problematic commit and try to fix/workaround, so-called "deep clone" is needed. This case, any flavor of git or got would be needed.
Regarding the amounts of documents on Internet, maybe git would be preferrable (some pages would assume full git to be used).
 
Many thanks to Astyle for the fetch from the FreeBSD cgit repository approach, was my thoughts too.

I just seems odd to me that a BSD licensed OS needs to have a third party app to install its own ports tree or source tree; Maybe I have been using FreeBSD for too many decades comming from SVN/portsnap historically.
 
Many thanks to Astyle for the fetch from the FreeBSD cgit repository approach, was my thoughts too.

I just seems odd to me that a BSD licensed OS needs to have a third party app to install its own ports tree or source tree; Maybe I have been using FreeBSD for too many decades comming from SVN/portsnap historically.
What still works:
Code:
ftp anonymous@ftp.freebsd.org
password <enter>
cd pub/freebsd/ports/ports
get ports.tar.gz
bye
The file appears to be from '22 but the UPDATING file inside is last modified at 12/11/2024 or later.
 
Assume one does an offline install of the ports tree from the DVD iso.

Is git smart enough to update the existing /usr/ports/ or will it blow it out start over?
As far as I experienced, no. I needed to clear out /usr/ports before starting.
This would be usually true for any kind of version control systems. The version control systems FreeBSD used prior to git (Subversion [svn] and CVS) had the same limitation, if I recall correctly.

If you already have something in /usr/ports/distdiles and/or /usr/ports/packages, you should better moving /usr/ports/distdiles and /usr/ports/packages to somewhere outside /usr/ports as a whole before clearling out, and move back after you git clone'ed ports repo These 2 directories are not managed by git (and other VCS'es prior to git).

And just for your info, I have the 2 directories mentioned above as separate datasets in ZFS pool. So I can simply unmount and remount when I cleared my local ports tree for switching from svn to git.
 
Back
Top