About using git to install ports.

How many use git to update? My surprise was when my installation by internet did not include the ports section. I then read the man and it shows a line to update the port using git but does not say that the user has to cd to the /usr.
 
This does not really answer your question, but what I do is:
1. delete ports (don't miss the dotfiles. And you may keep /usr/ports/distfiles/)
2. then get a new ports tree with gitup(1)
Since I don't use git (too complex/complicated/strange to use for me/my needs) it was overkill for my sit just for having it only to get (new) ports trees. So I use gitup. It just does the job.
 
Ok. The git was in the man pages so it was the only help I got. No question, just that it did not say to move to the directory. So I had to re-install FreeBSD15.
 
Are you using ZFS? If so I think/usr/ports is a dataset, not a simple directory.
git/gitup are used to create a ports source tree and build from the source.
Is that your intention?"
 
How many use git to update? My surprise was when my installation by internet did not include the ports section.
Sorry to be blunt here, but: update what? The ports collection? I do that all the time, because it helps me to remind myself to keep my base OS up to date.

I then read the man and it shows a line to update the port using git but does not say that the user has to cd to the /usr.
Care to share the exact manualpage?

After you use the command you should see the name (and number!), maybe try to share that.
 
So, double post, because...

You don't use Git to install ports.

Thing is, I can see the confusion here. I think.. I also no care.

@OP... GIT is a source control mechanism which allows you to maintain your ports collection. The collection of.. well, stuff. But install ing this isn't part of that process. Installing a port, the very essence, is: # make install clean, where clean is optional and of course: this needs to be done in the right directory.

As such this has nothing to do with installing ports, just the colleciotn of them.

Ports, in FreeBSD.. as blueprints (not anything official, this is my, myself, and I) => blueprints which tell the BSD system how to install "stuff".. but.. who is gonna maintain the "maintainers", right ? (lousy example btw...).

Git can manage the collection, but the actual installing... is done by trial and error: the make command.
 
Are you using ZFS? If so I think/usr/ports is a dataset, not a simple directory.
git/gitup are used to create a ports source tree and build from the source.
Is that your intention?"
I recommend making /usr/ports/distfiles and /usr/ports/packages to be dedicated datasets (on ZFS) or partitions (on UFS).
Doing so allows you to unmount both when your ports tree is somehow broken, delete the existing whole /usr/ports and clone from upstream again, then, (re)mount /usr/ports/distfilesand /usr/ports/packages.
 
I recommend making /usr/ports/distfiles and /usr/ports/packages to be dedicated datasets (on ZFS) or partitions (on UFS).
Doing so allows you to unmount both when your ports tree is somehow broken, delete the existing whole /usr/ports and clone from upstream again, then, (re)mount /usr/ports/distfilesand /usr/ports/packages.
Agree 100% on this.
I think by by default /usr/ports may be it's own dataset, so distfiles would wind up there by default, but have /usr/ports/distfiles it's own dataset helps save time if you blow away the tree.
 
Agree 100% on this.
I think by by default /usr/ports may be it's own dataset, so distfiles would wind up there by default, but have /usr/ports/distfiles it's own dataset helps save time if you blow away the tree.
And for anyone preferring bare-metal upgrading tools like ports-mgmt/portupgrade{-devel} that uses /usr/ports/packages/All for the place to store packages (newly built one if option -p is set and temporary/kept backups), /usr/ports/packages would be better being dedicated dataset (ZFS) or partition (UFS) not to lose already-built packages when ports tree is blown away.
 
I had never used git so the link to the program or application is good except if is to be complicated, then I will see if I read it. I used the memory stick install, not the DVD one. Maybe that is different in some way, but it does not install the ports. I should have explained this, but I installed git just to install the port. thanks, and to report a PR problem to the manpage of ports, maybe.
 
If you just want to build ports locally, maybe net/gitup would better fit for you rather than devel/git.

Unlike devel/git, It doesn't keep actual repo (/usr/ports/.git/by default) but working ports tree.
Just to keep it up-to-date. No complexed operations like back and forth supported (if I understand correctly).

Note that you need to install it via pkg requires Internet connectivity if you've installed FreeBSD using memstick image. If you need to install it without Internet connectivity (i.e., no network interfaces in hand work on FreeBSD unless you've installed drivers using ports / pkgs) on FreeBSD computer, you'll need to use dvd1 image, as it's the only installation image having pkgs in it.

It should work when dd'ed into USB memstick, unless your BIOS/UEFI firmware is too old or broken (in its spec).
 
I recommend making /usr/ports/distfiles and /usr/ports/packages to be dedicated datasets (on ZFS) or partitions (on UFS).
Doing so allows you to unmount both when your ports tree is somehow broken, delete the existing whole /usr/ports and clone from upstream again, then, (re)mount /usr/ports/distfilesand /usr/ports/packages.
Very good advice. In addition it can also help you to save up some precious diskspace. Because the ports collection mostly consists of text files it's very useful to turn compression on for the ports dataset. But because distfiles and packages mostly contain binary (and already compressed) data you're better of to leave compression off.

In other words...
root@zefiris:~postgres/data18 # zfs get compression -r zroot/ports
NAME PROPERTY VALUE SOURCE
zroot/ports compression on local
zroot/ports/distfiles compression off local
zroot/ports/packages compression off local
 
Are you using ZFS? If so I think/usr/ports is a dataset, not a simple directory.
git/gitup are used to create a ports source tree and build from the source.
Is that your intention?"
Not using ZFS. I loooked in ports manpage because I did not use packages to install FreeBSD but cliked the internet option.
 
  • Like
Reactions: mer
Back
Top