Shortest source update requirements.

I lost track of how gitup works or it has changed and no longer works in my build chroot. I don't like spending time on this. It tries 15.0 on a 15.1 kernel... What's the most simple way to get the latest FreeBSD 15.1 source tree?
 
If you are running pkg base, install the relevant pkgs (src or sys only).
The upside is that it will always match the running kernel, the downside is that if you are on stable/current there's a lot of churn.
 
If you want to use gitup for this, edit /usr/local/etc/gitup.conf and replace "branch" : "releng/15.0", with "branch" : "releng/15.1", (this is under the top level "release" entry) and then do "gitup release".
 
Install one of the following devel/git flavors, listed by number of dependencies. Top listed: most, bottom listed: least.

Code:
git        Distributed source code management tool
git-lite   Distributed source code management tool (lite flavor)
git-tiny   Distributed source code management tool (tiny flavor)
List dependencies: pkg rquery %dn <git_flavor>

Proceed with FreeBSD handbook, 27.7. Updating FreeBSD from Source, chapter 27.7.3. Updating the Source:
Code:
# mv /usr/src /usr/src.bak
# git clone --branch releng/13.2 https://git.FreeBSD.org/src.git /usr/src
Obviously replace unsupported version from the handbook example with a supported version.
 
Code:
# mv /usr/src /usr/src.bak
This might not work if you have a ZFS system, /usr/src/ is a separate dataset and you cannot rename it this way. I'd just nuke it, no reason to keep a 'backup' of it, rm -rf /usr/src/* /usr/src/.[^.]*
 
This might not work if you have a ZFS system, /usr/src/ is a separate dataset and you cannot rename it this way. I'd just nuke it, no reason to keep a 'backup' of it,
Absolutely (I just copy&paste'ed the whole procedure, including the "mv" line, from the handbook).

I myself use "src" ZFS datasets, ZFS clones of the (Git cloned) "main" branch source dataset to be exactly, to create different branch source directories. Currently stable/15, which I use from time to time to test a wifi driver in a boot environment, is missing.
Code:
% zfs list | grep src
zroot/usr/src-15.1                     256M  5.74G  3.09G  /usr/src-15.1
zroot/usr/src-main                    3.32G  5.74G  3.14G  /usr/src-main
Separate branch src directories create separate build /usr/obj directories (/usr/obj/usr/src-15.1/), which is easier to maintain instead of using /usr/src only, which would required every time the branch changes to buildworld|kernel again and again. Separating src directories is also particularly useful when using WITH_META_MODE.

When I'm done with a branch, that dataset is destroyed.
 
If you want to use gitup for this, edit /usr/local/etc/gitup.conf and replace "branch" : "releng/15.0", with "branch" : "releng/15.1", (this is under the top level "release" entry) and then do "gitup release".

If forgot that. It's pretty important. Can't it just assume the currently running release string by default?

It still works with git too . But why is there no freebsd.org page that contains the last accepted kernel and base source? It's like 2GB... I'm usually working on offline projects so I don't really need to cover the latest vulnerabilities per week but it doesn't look significant either. Providing a most up-to-date source tree should not come with technical barriers. It's a directory with text files.
 
Back
Top