# Looking forward to FreeBSD Package Base!



## zoujiaqing (Jan 29, 2020)

About FreeBSD Package Base!

I would very much hope FreeBSD use "Package Base" to managerment all packages.

First, this makes the entire kernel code easier to maintain.

Second, the kernel-dependent software can be maintained independently.

Get more people to contribute to projects they excel at.


----------



## eldaemon (Jan 29, 2020)

I am a little bit skeptical about this. It might be a good idea, but in general I like the very simplistic BSD design of the core install separate from ports/packages and the like.

It might work out well, but I am not sure the delineation of core system to ports is a bad thing.


----------



## SirDice (Jan 29, 2020)

If you want to try/test: https://wiki.freebsd.org/PkgBase


----------



## Beastie (Jan 29, 2020)

eldaemon said:


> I am a little bit skeptical about this. It might be a good idea, but in general I like the very simplistic BSD design of the core install separate from ports/packages and the like.
> 
> It might work out well, but I am not sure the delineation of core system to ports is a bad thing.


The "system vs third-party" paradigm that is so dear to FreeBSD users is enforced through the rigorous use of a well-defined directory hierarchy. How ports/packages vs kernel+base system get installed and updated changes nothing. pkgbase basically changes nothing.


----------



## zoujiaqing (Feb 1, 2020)

eldaemon said:


> I am a little bit skeptical about this. It might be a good idea, but in general I like the very simplistic BSD design of the core install separate from ports/packages and the like. It might work out well, but I am not sure the delineation of core system to ports is a bad thing.


I need using pkg command to upgrade my FreeBSD system.


----------



## memreflect (Feb 2, 2020)

zoujiaqing said:


> I need using pkg command to upgrade my FreeBSD system.


freebsd-update(8) doesn't work?


```
ROOT# freebsd-update fetch
<list of files that will be updated>
ROOT# freebsd-update install
<install messages>
```

That will apply the latest patches to your system.  If you needed to upgrade from 12.0 to 12.1, you would use this instead:


```
ROOT# freebsd-update -r 12.1-RELEASE upgrade
```

I haven't experienced any trouble since I'm still relatively new to FreeBSD, but I've seen more than one person recommend doing a backup and installing a new major release of FreeBSD instead of upgrading the way they do for minor releases (e.g. upgrading from 12.0 to 12.1 is OK, but 11.3 to 12.0 requires a full backup and reinstall).  The forums can be searched for upgrade troubles.  Even if the upgrade problems are uncommon, people still experience them.


----------



## zoujiaqing (Feb 2, 2020)

memreflect said:


> freebsd-update(8) doesn't work?



No, it's good work.

I think FreeBSD's kernel dependency some software, and there software import to the FreeBSD kernel source code repo? Who are these software patches for maintenance?

The way the package depends on the package can completely solve the situation.


----------



## acheron (Feb 2, 2020)

memreflect said:


> (e.g. upgrading from 12.0 to 12.1 is OK, but 11.3 to 12.0 requires a full backup and reinstall).


I never had to reinstall FreeBSD to perform an upgrade from 11 to 12.


----------



## zoujiaqing (Feb 2, 2020)

acheron said:


> I never had to reinstall FreeBSD to perform an upgrade from 11 to 12.



Debian using `apt dist-upgrade` upgrade to latest stable version.

Fedora using `dnf system-upgrade download --releasever=31` upgrade to fedora 31.

TrueOS and PacBSD also want to use package to manage the entire OS.


----------



## Hakaba (Feb 2, 2020)

Are you talking about an alias ?

If not, each time I try to upgrade a major version on ubuntu, it break my system.
The major reason to have two tools, for me is if ypu have only one tool, you didn't have the needs of stable ABI and strong documentation.
Because a patch in the system side can fix a bad implementation in user side.
After 10 years, you will inherit a mess that will break userland when you make kernel update without warning or documentation.
It is one of major reason that each time I can, I choose Freebsd.


----------



## memreflect (Feb 2, 2020)

acheron said:


> I never had to reinstall FreeBSD to perform an upgrade from 11 to 12.


That's fair.  I haven't experienced issues myself as I just started with the 12.1-RELEASE, so I'm just parroting what I've heard from some who experienced upgrades to different major releases gone wrong.


----------



## ralphbsz (Feb 2, 2020)

zoujiaqing said:


> I think FreeBSD's kernel dependency some software, and there software introduced into the FreeBSD kernel source code repo? Who are these software patches for maintenance?
> 
> The way the package depends on the package can completely solve the situation.


Sorry, but I could not understand this message. What depends on what? What was introduced? Please explain this again with more detail.


----------



## zoujiaqing (Feb 2, 2020)

ralphbsz said:


> Sorry, but I could not understand this message. What depends on what? What was introduced? Please explain this again with more detail.


I'm sorry. I mean is import 3rd source code to FreeBSD source code repo.


----------



## ralphbsz (Feb 2, 2020)

So you want to introduce some software into which source code repo? Into the main one for base (which for example contains the kernel)? In that case I don't see a versioning or dependency problem, and that whole repo changes in lockstep as one unit.


----------



## kpedersen (Feb 2, 2020)

zoujiaqing said:


> I'm sorry. I mean is import 3rd source code to FreeBSD source code repo.



Gentoo Linux and Arch Linux copy the idea from FreeBSD to have a clean and deterministic "base".

In many ways, this organisation performs better than having an amateur clusterfluck of packages spammed everywhere.
This should hopefully help to satiate your desire to use a different operating system than FreeBSD.


----------



## zoujiaqing (Feb 27, 2020)

New question!

I don't using freebsd-update to upgrade 13-CURRENT kernel. But, using `package base` be can upgrade kernel from pkg!


----------



## zoujiaqing (Feb 27, 2020)

New question!

I can't using `pkg install clang10` to install clang latest version.(FreeBSD kernel source code include clang 8.x source code?)
But, `package base` can be to install it.


----------



## kpedersen (Feb 27, 2020)

zoujiaqing said:


> New question!
> 
> I can't using `pkg install clang10` to install clang latest version.(FreeBSD kernel source code include clang 8.x source code?)
> But, `package base` can be to install it.



Clang is part of the llvm project. The command would be


```
# pkg install llvm10
# pkg install llvm9
# pkg install llvm8
# pkg install llvmX
```






						[ports] Index of /head/devel/llvm10
					






					svnweb.freebsd.org
				




You might want to refer to your previous thread about this: https://forums.freebsd.org/threads/add-clang-9-and-10-compilers-to-pkg.74221/


----------



## zoujiaqing (Feb 27, 2020)

kpedersen said:


> Clang is part of the llvm project. The command would be
> 
> 
> ```
> ...


Thank you!

I don't using freebsd-update to upgrade 13-CURRENT kernel. But, using `package base` be can upgrade kernel from pkg! 

I think package base can be to resolve this question.


----------



## kpedersen (Feb 27, 2020)

zoujiaqing said:


> I don't using freebsd-update to upgrade 13-CURRENT kernel. But, using `package base` be can upgrade kernel from pkg!



You appear to have input an incompatible response to my post.


----------



## 20-100-2fe (Feb 27, 2020)

zoujiaqing, in your first posts on this forum, you already seemed to expect FreeBSD to be a Linux clone. If what you want is Linux, why are you losing your time with FreeBSD? Stick with Linux, it is _already_ exactly as you want.


----------



## zoujiaqing (Feb 28, 2020)

20-100-2fe said:


> zoujiaqing, in your first posts on this forum, you already seemed to expect FreeBSD to be a Linux clone. If what you want is Linux, why are you losing your time with FreeBSD? Stick with Linux, it is _already_ exactly as you want.


I believe that the FreeBSD community should not be all backward people like you.

The right development roud way:

```
ports -> pkd_add -> pkg-ng -> package base!
```

I think the core idea of UNIX is simplicity. I think FreeBSD should have these qualities.

Only use `pkg` to replace `ports + freebsd-update + pkg` is simplicity.


----------



## kpedersen (Feb 28, 2020)

zoujiaqing said:


> I believe that the FreeBSD community should not be all backward people like you.



Unfortunately we all are and probably will never change XD.

Again, if you want new prototype ideas and gimmicks with no stability, then this really isn't the place for that. Unless you can implement them yourself and do an extremely good job of convincing others that your system is in fact much better. In which case the development mailing list would be a better medium than these forums.

Besides, a concept of "base" is a key component for simplicity. Did you know, some people use FreeBSD without using anything from ports / packages? Their entire solution keeps to just what is inside base.

Eliminating packages increases the ability for deterministic installs.


----------



## 20-100-2fe (Feb 28, 2020)

Base packages updates have broken my Debian machines on several occasions in the past.
Over time, Debian has greatly improved on this point, but with any Linux distribution, base system updates/upgrades are still a cause of annoyances, differing in nature depending on the distribution.
I'm happy FreeBSD separates ports from base!


----------



## drhowarddrfine (Feb 28, 2020)

zoujiaqing said:


> I think the core idea of UNIX is simplicity. I think FreeBSD should have these qualities.


Are you aware FreeBSD's roots are in UNIX and once contained UNIX code? Are you aware FreeBSD's core values are the UNIX philosophy? Obviously you aren't.


----------



## zoujiaqing (May 28, 2020)

drhowarddrfine said:


> Are you aware FreeBSD's roots are in UNIX and once contained UNIX code? Are you aware FreeBSD's core values are the UNIX philosophy? Obviously you aren't.


It's nonsense that easier management is the direction of the operating system. It's a waste of life to upgrade the kernel to a long compilation.


----------



## Menelkir (May 28, 2020)

zoujiaqing said:


> It's nonsense that easier management is the direction of the operating system. It's a waste of life to upgrade the kernel to a long compilation.



You don't need a "long compilation" if you're using a RELEASE kernel. And I think most linux distributions will do the same unless (I'm not aware of) some obscure linux distribution that gives you a binary kernel from HEAD daily.


----------



## Hakaba (May 28, 2020)

Ok, you only miss what SIMPLE mean.
Do one thing and do it well.

Merging two tools is not simple. It is neither elegant.
`Freebsd-update` is a good tool, simple, elegant, with a clear scope and so on.
`Pkg` is in that philosophy too.
Merging this two simple, easy to use tool into one with more options,  more steps (need I a reboot and relaunch the tools to finish my upgrade ?) and a not well defined scope is not SIMPLE, not the Unix way.
I know in the Linux world, SystemD need to do all things. Ubuntu want to package all update in the same way and so on.
But the result is not simple. The emerging tool seems to be simple, (one click), but who really undestood what a major update in Ubuntu will do ? It always break my system for information. And I never know why.
(The list of things installed in a Xubuntu linux is huge...)


----------



## Menelkir (May 28, 2020)

Waiting for the question about why /bin and /sbin in freebsd isn't linked to /usr/bin or /usr/sbin......


----------



## 20-100-2fe (May 28, 2020)

And also this one: why isn't FreeBSD using systemd?



Menelkir said:


> Waiting for the question about why /bin and /sbin in freebsd isn't linked to /usr/bin or /usr/sbin......


----------



## SirDice (May 28, 2020)

I'm just going to leave this here: Why is FreeBSD not (more) like ....

As I've also seen various references to 13-CURRENT, this one's relevant too: Topics about unsupported FreeBSD versions


----------



## wolffnx (May 28, 2020)

I'have no problem with Linux,but its another case of "I'want to convert FreeBSD into a Linux and syste#@ because FreeBSD make no sense and is old,ugly..etc..etc..to me"


----------



## zoujiaqing (Mar 29, 2021)

Hakaba said:


> Ok, you only miss what SIMPLE mean.
> Do one thing and do it well.
> 
> Merging two tools is not simple. It is neither elegant.
> ...


How to use freebsd-update to upgrade kernel on  FreeBSD 14.0-CURRENT ?


----------



## Deleted member 66267 (Mar 29, 2021)

wolffnx said:


> I'have no problem with Linux,but its another case of "I'want to convert FreeBSD into a Linux and syste#@ because FreeBSD make no sense and is old,ugly..etc..etc..to me"


Indeed there is Debian/kFreeBSD, Gentoo/kFreeBSD and ArchBSD (now PacBSD). All of them are defunct.


----------



## SirDice (Mar 29, 2021)

zoujiaqing said:


> How to use freebsd-update to upgrade kernel on FreeBSD 14.0-CURRENT ?


You don't. First of all -CURRENT is an unsupported development version. Further more, freebsd-update(8) only works on -RELEASE version. See post #31.


----------



## Deleted member 66267 (Mar 29, 2021)

zoujiaqing said:


> How to use freebsd-update to upgrade kernel on  FreeBSD 14.0-CURRENT ?


Maybe impossible? I have never use current and I think freebsd-update can only upgrade between released versions.


----------

