# Switching to STABLE



## robotchaos (Jul 2, 2019)

I see in the Handbook: Tracking a Development Branch that you checkout the source for STABLE to switch. Does it work the same way if you use pkg instead of ports? If not, what's the upgrade procedure? I want to track STABLE so I can hopefully have a working Bluetooth stack, as well as eventually contribute.

As an aside, I haven't used ports yet. I have done everything through pkg. I may use ports, but I'm concerned about update times.


----------



## Deleted member 30996 (Jul 2, 2019)

robotchaos said:


> As an aside, I haven't used ports yet. I have done everything through pkg. I may use ports, but I'm concerned about update times.



I've never used Stable but I believe ports are updated more frequently than pkg. I like using ports and have only used pkg on a few occasions with FreeBSD. On OpenBSD I use pkg.

It's usually not recommended to mix pkg and ports though I did when I used them.


----------



## robotchaos (Jul 3, 2019)

By update times, I mean that I'm concerned about how long it actually takes to update. Like does it take a while to update/recompile a port? I suppose what I could do is install VirtualBox and run a ports managed VM... Try it out.


----------



## Deleted member 30996 (Jul 3, 2019)

It takes much longer to compile ports. It depends on the port and your machine how long it takes. Some take several hours.


----------



## ljboiler (Jul 3, 2019)

-STABLE has nothing to do with ports / pkgs.  It's only a different branch of the base FreeBSD operating system and the userland components.   Ports / pkgs branches are only for the quarterly snapshots that are made from time to time.


----------



## robotchaos (Jul 3, 2019)

No, I get that. But the instructions for switching to say to checkout the desired branch to /usr/ports. But I haven't done anything with ports, so I'm wondering if it's the same procedure to upgrade to STABLE when you solely have used pkg. If not, what is the procedure for upgrading the system to use STABLE?


----------



## ljboiler (Jul 3, 2019)

Paragraph 23.4.3, step 3, in the Handbook reference you gave, refers you to 23.5. Updating FreeBSD from Source, where the QuickStart section shows /usr/src, not /usr/ports, as the destination for the source code check-out.  That's the proper place to be working in.


----------



## robotchaos (Jul 3, 2019)

But isn't that if you are Updating FreeBSD from Source? Which afaik, I am not. I am using the binary pkg manager. So would I just use freebsd-update(8)?


----------



## ljboiler (Jul 3, 2019)

If you’re using the pkg() command to update something, you only get two flavors: ‘quarterly’ and ‘latest’.  The default is ‘quarterly ‘, which means you wait 3 months for any new stuff ( apart from security updates that are deemed necessary).  To get new stuff as it becomes available, change quarterly to latest in /etc/pkg/FreeBSD.conf, then `pkg update -f` followed by `pkg upgrade`


----------



## F1R3-R4H (Jul 3, 2019)

Why should I not mix pkg and ports?


----------



## robotchaos (Jul 3, 2019)

Aha. That’s just what I think I’m looking for. Is ‘latest’ not the same thing as STABLE?


----------



## Shadow53 (Jul 3, 2019)

You are mixing two different things here.

The base FreeBSD system comes in three basic flavors: RELEASE, STABLE, and CURRENT. freebsd-update(8) allows you to update between RELEASE versions.

Quarterly and latest are terms for the precompiled binary packages built from the ports tree, where latest is rebuilt more often.

Generally speaking, packages from pkg can be installed on RELEASE or STABLE, with the possible exception of anything providing kernel modules. For instance, I started getting kernel panics on my STABLE system after the DRM subsystem got updated in STABLE and not RELEASE.

Answering the question of not mixing pkg and ports, it's because of the potential for mismatched compilation options. A pkg package A might depend on package B with certain compilation options. But maybe you compiled B with some options disabled. This can lead to hard-to-diagnose issues between the two. It's better to get all of your packages from the same source, just to be safe.


----------



## Nicola Mingotti (Jul 3, 2019)

F1R3-R4H said:


> Why should I not mix pkg and ports?



read this. it is a very good post. https://forums.freebsd.org/threads/10-dos-and-dont-for-freebsd.65618/post-385482


----------



## F1R3-R4H (Jul 3, 2019)

Shadow53 Thanks for the response. If I install with the rightful options, may I avoid that? Or the trouble persists?
Nicola Mingotti Thanks in advance. Now I'm looking what you posted. You'll see: a time ago, I was very resistant to read the whole docs, but this post is catching my curiosity. I've read a few pages of the handbook, then what you've posted. Now I think I want to go further in the docs, videos, etc. Thanks!


----------



## F1R3-R4H (Jul 3, 2019)

Nicola Mingotti I'd give the thanks x2: this post contains another things, like the trouble of starting the system while I had edited previously the /etc/defaults/rc.conf
And thanks again, 'cause I think I must read more of the handbook, and I'm gonna do it.


----------

