Solved scr component not installed

Hi,

Today I wanted to grab patch security, I see that as an upgrade but I have a problem.
I need some help to understand what should I do.

Code:
~ : doas freebsd-update fetch && doas freebsd-update install
src component not installed, skipped
Looking up update.FreeBSD.org mirrors... 2 mirrors found.
Fetching metadata signature for 13.0-RELEASE from update2.freebsd.org... done.
Fetching metadata index... done.
Inspecting system... done.
Preparing to download files... done.

No updates needed to update system to 13.0-RELEASE-p2.
src component not installed, skipped
No updates are available to install.
Run '/usr/sbin/freebsd-update fetch' first.

It appears that I do not have the src part. I think I already saw that message once but didn't really catch my attention as today.
On my way to try to fix the problem I did some research and found this:
https://forums.freebsd.org/threads/freebsd-13-0-release-source-not-available.80664/#post-515012

So I did what is described by SirDice which is to delete the src directory:
# rm -rf /usr/src/* /usr/src/.[^.]*

As expected it was empty, and then I downloaded the src via the git command :
# git clone -b releng/13.0 https://git.freebsd.org/src.git /usr/src

After git grab the src the folder is now about 2G.

But I've got some doubts about what should I do now, do I also need to recompile everything on the system (if so how do I do, a link to the documentation would be nice or a thread in the forum) or it's unnecessary ? I am a bit confused.

Thanks.

Some info:
I use only pkg binaries, no ports are installed ... yet(need some work to understand it better).
uname -r: 13.0-RELEASE-p1
Filesystem: ZFS
 
But I've got some doubts about what should I do now, do I need to recompile everything as I read somewhere (if so how do I do, a link to the documentation would be nice or a thread in the forum) or it's not needed ?
If you update with freebsd-update(8) then you don't need the source at all. You might need access to the source if you're building certain ports (mostly kernel modules). As long as you keep your system updated with freebsd-update(8) you don't have to do anything with the source.

I use only pkg binaries, no ports are installed
Then you can just remove the source, you don't need it. Remove the src Component from /etc/freebsd-update.conf, then freebsd-update(8) won't try to update it any more and you won't get that message.
 

Thank you SirDice the situation is a bit more understandable now .
I think I will keep the src just in case I want to play with ports it doesn't hurt I guess, I will see.

This is the message that I really struggled with :
No updates needed to update system to 13.0-RELEASE-p2.
Found the answer here:
which lead to the man page of freebsd-version:
The freebsd-version utility should provide the correct answer in the vast majority of cases, including on systems kept up-to-date using freebsd-update(8), which does not update the kernel version unless the kernel itself was affected by the latest patch.
I was using 'uname' to know if the update was fine while I should have used 'freebsd-version' which show the right answer in this case:
Code:
~ : freebsd-version
13.0-RELEASE-p2
~ : uname -r
13.0-RELEASE-p1

Thank you for your help always well detailed, I appreciate.
 
Back
Top