Shouldn't be the ports more updated than the packages?

Hello folks,

I got this potential update:
Code:
Installed packages to be UPGRADED:
    nvidia-driver: 510.60.02 -> 525.116.03

But I use the ports otherwise without ACPI enabled I can't suspend the laptop.

Thus I updated the ports with portmaster -a and the Nvidia port did not get any update, when I look for which version was there I got:
Code:
cat Makefile | grep -i distversion\?
DISTVERSION?=    510.60.02

Which headed immediately to a good doas pkg lock nvidia-driver.

However now I am little bit confuse, shouldn't be the ports more updated than the packages?

?‍♂️

Cheers!
 
It begs the question, how are you updating your ports tree? It sounds like your ports tree is on an old quarterly branch.
 
510.60.02 was in the ports tree around April. Around the same time 13.2 was released. I'm guessing you installed 13.2 with the ports tree that came with the installer and have never actually updated the ports tree.
 
It begs the question, how are you updating your ports tree? It sounds like your ports tree is on an old quarterly branch.
Now I came to doubt freezr mis-understands that pkg updates ports tree in conjunction with installed pkgs, too, whch is never true.
 
Hi guys, I do not exclude that I misunderstood the half of what I believe I got, which is per se very little.

I understood that if you run portsmaster -a, it updates your port which consequently means that new source is available.

Mmm... I think that I didn't understand how ports work... ?
 
I understood that if you run portsmaster -a, it updates your port which consequently means that new source is available.
It updates the ports themselves, not the ports tree. It will just use whatever you have in /usr/ports. And that's where your problem lies, your /usr/ports/ ports tree is very much out of date.

A couple of ways to get a ports tree (and keep it up to date). First is portsnap(8), easy to use but will get removed in a future version, so I don't recommend using it. Second is net/gitup. Also quite easy to use. The third, and best way, is to use git(1); git clone https://git.freebsd.org/ports.git /usr/ports. Keep in mind that a git clone requires the /usr/ports directory to be empty or non-existent. Once you've done the initial clone you can keep it updated using cd /usr/ports && git pull.
 
It updates the ports themselves, not the ports tree. It will just use whatever you have in /usr/ports. And that's where your problem lies, your /usr/ports/ ports tree is very much out of date.

A couple of ways to get a ports tree (and keep it up to date). First is portsnap(8), easy to use but will get removed in a future version, so I don't recommend using it. Second is net/gitup. Also quite easy to use. The third, and best way, is to use git(1); git clone https://git.freebsd.org/ports.git /usr/ports. Keep in mind that a git clone requires the /usr/ports directory to be empty or non-existent. Once you've done the initial clone you can keep it updated using cd /usr/ports && git pull.

Can I use git even though I am using ZFS on root? To download the Kernel source I had to do several jumps on the hoops because I couldn't delete the /usr/src folder.

Thanks ?
 
You have a laptop with working suspend/resume? What model is it?

I don't remember the model of the laptop, I'll tell you later.

However, in the forum once I read the nvidia-driver package comes without the power management enabled, but if you compile it from the ports you can enable the module and having suspend/resume working.
 
Can I use git even though I am using ZFS on root?
Yes. One has nothing to do with the other.
To download the Kernel source I had to do several jumps on the hoops because I couldn't delete the /src folder.
Yes. That's because /usr/src/ is a separate dataset, same for /usr/ports. While you can't just delete /usr/ports[*], you can empty its contents; rm -rf /usr/ports/* /usr/ports/.[^.]*

[*] you can but you will need to destroy the dataset; zfs destroy .... A simple rm(1) won't be able to remove the dataset and complain, loudly, about this.
 
Can I use git even though I am using ZFS on root? To download the Kernel source I had to do several jumps on the hoops because I couldn't delete the /src folder.

Thanks ?
I'm running on ZFS on root installation and git works OK.
But usually FreeBSD doesn't have /src by default, but /usr/src.
/sys is a histrical symlink to /usr/src. ports directory is assumed at /usr/ports by default.
All of them would be created as user root and group wheel by the installer by default. So basically you must be root (by su or run commands via sudo or alike).
Some files/directories could have immutable (schg) attribute and refuse to be deleted. This case, you need to drop it as root, like chflags -R noschg /usr/src. Not sure but possibly contents of .git under somewhere (like /usr/ports/.git or /usr/src/.git) could have another immutable (uchg) attribute. If so, you can drop it just like schg case. Just use nouchg instead.
 
nvidia-driver package comes without the power management enabled, but if you compile it from the ports you can enable the module
ACPI is already enabled (The package will have it too), no need to build from ports.

Makefile
Code:
OPTIONS_DEFAULT=    ACPI_PM LINUX

Rich (BB code):
make config
===> The following configuration options are available for nvidia-driver-535.104.05_1:
     ACPI_PM=on: ACPI Power Management support
     DOCS=on: Build and/or install documentation
     LINUX=on: Linux compatibility support
     WBINVD=off: Flush CPU caches directly with WBINVD
===> Use 'make config' to modify these settings
 
because /usr/src/ is a separate dataset, same for /usr/ports. While you can't just delete /usr/ports[*], you can empty its contents; rm -rf /usr/ports/* /usr/ports/.[^.]*
Executing rm -r /usr/src or /usr/ports, despite the command returning "Device busy" and not able to remove the dataset mount point, it will empty the directory. No need for regexp.
 
Executing rm -r /usr/src or /usr/ports, despite the command returning "Device busy" and not able to remove the dataset mointpoint, it will empty the directory. No need for regexp.

/usr/src and /usr/obj might also be symlinks into a secondary filesystem. It makes more sense to say
Code:
cd /usr/src && rm -r *

/usr/src should have no files protected by extra flags, unless you build releases in there.
 
Not sure but possibly contents of .git under somewhere (like /usr/ports/.git or /usr/src/.git) could have another immutable (uchg) attribute.
There are none. Building system from source will create those under /usr/obj. For example make cleanworld executes chflags -R 0 /usr/obj before removing content.
 
First is portsnap(8), easy to use but will get removed in a future version, so I don't recommend using it. Second is net/gitup. Also quite easy to use. The third, and best way, is to use git(1)
I’ll be sad to see portsnap go but have started using gitup ports and that seems to work well, so curious as to why using git is the “best” way - what are the advantages compared to gitup?

I‘m not being snarky (if my question comes across that way) - genuinely want to know. I might be better off not moving to gitup if git is better.
 
I’ll be sad to see portsnap go but have started using gitup ports and that seems to work well, so curious as to why using git is the “best” way - what are the advantages compared to gitup?
I'm going by my best guesses here but "gitup" is "git update" and is a limited git client.
Since it's limited "git" lets you do everything you may need. So checkout different branches then git update.
 
Back
Top