Questions about pkgbase
- Reply: Lexi Winter : "Re: Questions about pkgbase"
- Reply: Yasuhiro Kimura : "Re: Questions about pkgbase"
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Thu, 02 Oct 2025 09:01:21 UTC
Hello,
As is explained in announsement from Colin, pkgbase has become the
default of install media. So I start playing with pkgbase and have some
questions. Would someone please answer me them?
1. Consistency with update using source tree
Let me assume I made clean install of 16.0-CURRENT system with pkgbase
and updated it using source tree (make {build,install}{kernel,world}).
After it has completed, base system itself shoule be updated
successfully. Then what about things about pkgbase (e.g. version of
package, list of included files, etc.)? Are they properly updated or
become inconsistent?
2. `make delete-old-libs`
If you chase -CURRENT you may face the situation that application
installed as (non-pkgbase) package doesn't work well (don't start up,
emit error message, incorrect behavior, etc.). Usually such sutuation
happens because of bug and needs to be fixed. But sometimes it happens
because of intentional change such as bellow.
* Version of shared library has changed.
* Name of shared library has changed.
* Shared library is removed.
The latest example of such situation happened when Kerberos of base
system changed from Heimdal to MIT. It caused curl(1) to fail to run
and made git(1) unusable.
If you update system using source tree, application error caused by
above reasons can be prevented by following steps as below.
a. Follow the step 1 to step 10 explained in /usr/src/Makefile
b. Rebuild and reinstall all (non-pkgbase) packages.
c. Do `make delete-old-libs`.
On the other hand, it doesn't seems pkgbase keeps obsolete files while
updating. IIUC `pkg upgrade` uninstall all files included in old
version of package in question before installing files of new
version. So obsolete files dissapear after update has finished. Then
is there any way to prevent situation as above?
3. etcupdate(8)
If you update system using source tree, `make installworld` don't
update files under /etc, and etcupdate(8) takes care of it including
confliction resolving.
On pkgbase system, however, files under /etc seems to belong to
packages. So they are updated by `pkg upgrade`. Then how confliction
is handled if it happnes?
4. Build pkgbase repository by myself
I'd like to build pkgbase repository and configure system to use
it. Is it documented somewhere?
5. Handle pkgbase packages and non-pkgbase ones separately
The last question is about pkg(8) rather than pkgbase.
On -CURRENT system I build (non-pkgbase) packages I want to use by
myself with poudriere and install them from created repository. And
each time __FreeBSD_version is bumped I rebuild and reinstall
them.
On non-pkgbase system, I usually reinstall packages by executing
`pkg-static upgrade -fy`. But sometimes I uninstall all installed
packages with `pkg-static delete -afy` and install them again.
In either case it doesn't affect base system.
On pkgbase system, however, the former causes side effect that base
system packages are also reinstalled. And the latter results in
disaster.
Then is there any way to (re|un)install all installed non-pkgbase
packages?
Best Regares,
---
Yasuhiro Kimura