# FreeBSD kernel and base as a pkg?



## Ikinoki (Apr 16, 2014)

Is it possible to compile the FreeBSD kernel and base to distribute as a pkg for faster updates?


----------



## kpa (Apr 16, 2014)

Nope, not yet. The build system for building the world and kernel is not compatible with the requirements of PKG that is at the moment completely geared for building packages out of ports(7) and nothing else. It would be a nice feature but first there would have to some serious thinking how the "base" package/packages would interact with the packages that are built from ports.


----------



## Ikinoki (Apr 16, 2014)

Maybe not mixing them and putting the base into /base (well it's sort of this way now while base system resides in / and /usr and ports go to /usr/local/)?
Also base package might be just one big base package dependent on kernel package and vice versa? I mean package allows different paths for packages because the ports they are build from allow this.


----------



## kpa (Apr 16, 2014)

Maybe that's possible but first there is the big problem of solving how to get the base package built in the first place. It's not as simple as it looks because the build/install cycles of world and kernel have been designed only for direct installs to DESTDIR (that defaults to /) with no tracking of what gets installed. PKG on the other hand requires a pkg-plist file as the list of files and directories that are installed by `make install` and it's paranoidically strict about missing files and extra files.


----------



## SirDice (Apr 16, 2014)

Ikinoki said:
			
		

> Is it possible to compile the FreeBSD kernel and base to distribute as a pkg for faster updates?


Just use freebsd-update(8). It's built in such a way it is easily proxied. If you have a good caching proxy the data will only be downloaded once from the internet, the other machines will fetch the updates from the proxy cache.


----------



## ondra_knezour (Apr 16, 2014)

However there was some attempt. I didn't try it personally.


----------



## Ikinoki (Apr 16, 2014)

SirDice said:
			
		

> Ikinoki said:
> 
> 
> 
> ...




It's RELEASE only and no custom options or patches, so it's basically useless for my requirements. We use it on clients systems but for our in-house systems it's a pain in the ass.


----------



## Ikinoki (Apr 16, 2014)

ondra_knezour said:
			
		

> However there was some attempt. I didn't try it personally.


Thanks, I'll try that.


----------

