How i install the source code in FreeBSD?

I installed on my pc, FreeBSD 12.2 with xfce, when I type in the command
Code:
cd / usr / src / release
the message appears saying that the release directory does not exist, when I entered the file manager the src folder was empty, as do I download the source code?
 
I installed on my pc, FreeBSD 12.2 with xfce, when I type in the command
Code:
cd / usr / src / release
the message appears saying that the release directory does not exist, when I entered the file manager the src folder was empty, as do I download the source code?
you are using that cd sintax? or just for the example?
 
ls /usr/src
? If you have it, then you have it. If you don't:

mkdir /usr/src
pkg install security/ca_root_nss
svnlite checkout https://svn.freebsd.org/base/releng/12.2 /usr/src

Update:
svnlite update /usr/src

Clean-up (after failure: disconnected/interrupt):
svnlite cleanup /usr/src

Status:
svnlite status /usr/src

Info
svnlite info /usr/src

[EDIT] Correcting a mistake: unlock => cleanup
 
ls /usr/src
? If you have it, then you have it. If you don't:

mkdir /usr/src
pkg install security/ca_root_nss
svnlite checkout https://svn.freebsd.org/base/releng/12.2 /usr/src

Update:
svnlite update /usr/src

Unlock (after disconnected/interrupt):
svnlite unlock /usr/src

Status:
svnlite status /usr/src

Info
svnlite info /usr/src
It work!?
 
  • Like
Reactions: a6h
Thank-you for the last few comments on this thread.

They were exactly what I was looking for.

I was able to download the source code for the 14.2 version, as I wanted.

I now have written a script for future use.

thx.
 
I somewhat doubt that, keep in mind that this thread is very dated and so are some of its comments.

When in doubt... why not pull up the handbook? Not only does it explain how to configure things, it also tells you how to grab the source.

I saw the age of the early comments. That aside, the last few about git did, as I said, what I needed.

Thanks, though, for that reference to the Handbook to grab the source. I had looked through the Handbook before I started looking here for the info I needed.

Unfortunately, I was looking in the index for ~source code~, and not ~Git~. So I did not see the Git reference in Appendix A.

Thanks again for that reference. Bookmarked.
 
Back
Top