FreeBSD backup libraries such as base/FreeBSD-kerberos-lib-backup-libkrb5profile.so

I build my own FreeBSD packages using poudriere. I do this for various reasons, which include:

  • Getting security updates faster because I build nightly
  • Some packages I install use non-default build options

One of the monitoring checks I have in place will identify any installed package which is not in the package repository. That helps me identify any failed package builds or packages I have build once, installed, and did not added to my package building system. You can find that check in my git repo of nagios things.

Case in point:

[12:33 r730-01 dvl ~] % pkg version -vRL= | grep orphaned
FreeBSD-kerberos-lib-backup-libkrb5profile.so.122-20260717191016 ?   orphaned: base/FreeBSD-kerberos-lib-backup-libkrb5profile.so.122
FreeBSD-lldb-backup-libprivatelldb.so.19-20260717191013 ?   orphaned: base/FreeBSD-lldb-backup-libprivatelldb.so.19
FreeBSD-runtime-backup-libpam.so.6-20260717191009 ?   orphaned: base/FreeBSD-runtime-backup-libpam.so.6
FreeBSD-runtime-backup-libprivatezstd.so.5-20260717191009 ?   orphaned: base/FreeBSD-runtime-backup-libprivatezstd.so.5
lmdb-backup-liblmdb.so.0-20260803225943 ?   orphaned: databases/lmdb-backup-liblmdb.so.0
mesa-libs-backup-libgallium-26.1.3.so-20260803225944 ?   orphaned: graphics/mesa-libs-backup-libgallium-26.1.3.so

I don’t build my own FreeBSD-base packages. There is no reason for that. I might, one day. But not now.

Notice how all these orphaned packages contain backup in their name.

I asked on Mastodon some time ago. I got an answer. It pointed to a man page. I forgot. I posted again. I got an answer. Thanks L?ng Shu?ng (??).

I was pointed to man pkg.conf which contains:

     BACKUP_LIBRARIES: boolean
		  If set to true and if an upgrade will remove a library  (typi-
		  cally  due  to the library version number having been bumped),
		  then pkg(8) will back up the library to the  path  defined  by
		  BACKUP_LIBRARY_PATH.	 A  package containing the backed up li-
		  brary will be created.  This package is named after the origi-
		  nal  package	containing  the   library,   with   the   suffix
		  `-backup-libraries'  appended.   The	package  version will be
		  bumped whenever an additional library is backed up.	Default:
		  NO.

OK, let’s check those pkg.conf files.

Yes, most of my hosts had that configuration setting. Not all of the hosts had the orphaned packages problem. However, every one which did have orphaned FreeBSD-base packages, also had that setting.

Clean up on aisle 3

Here I go, cleaning up that host:

[12:36 r730-01 dvl ~] % sudo pkg delete FreeBSD-kerberos-lib-backup-libkrb5profile.so.122 FreeBSD-lldb-backup-libprivatelldb.so.19 FreeBSD-runtime-backup-libpam.so.6 FreeBSD-runtime-backup-libprivatezstd.so.5
Checking integrity... done (0 conflicting)
Deinstallation has been requested for the following 4 packages (of 0 packages in the universe):

Installed packages to be REMOVED:
	FreeBSD-kerberos-lib-backup-libkrb5profile.so.122: 20260717191016
	FreeBSD-lldb-backup-libprivatelldb.so.19: 20260717191013
	FreeBSD-runtime-backup-libpam.so.6: 20260717191009
	FreeBSD-runtime-backup-libprivatezstd.so.5: 20260717191009

Number of packages to be removed: 4

Proceed with deinstalling packages? [y/N]: y
[1/4] Deinstalling FreeBSD-kerberos-lib-backup-libkrb5profile.so.122-20260717191016...
[1/4] Deleting files for FreeBSD-kerberos-lib-backup-libkrb5profile.so.122-2026[1/4] Deleting files for FreeBSD-kerberos-lib-backup-libkrb5profile.so.122-20260717191016:   0%
FreeBSD-kerberos-lib-backup-libkrb5profile.so.122-20260717191016: missing file /root/usr/local/lib/compat/pkg/libkrb5profile.so.122
[1/4] Deleting files for FreeBSD-kerberos-lib-backup-libkrb5profile.so.122-20260717191016: 100%
[2/4] Deinstalling FreeBSD-lldb-backup-libprivatelldb.so.19-20260717191013...
[2/4] Deleting files for FreeBSD-lldb-backup-libprivatelldb.so.19-2026071719101[2/4] Deleting files for FreeBSD-lldb-backup-libprivatelldb.so.19-20260717191013:   0%
FreeBSD-lldb-backup-libprivatelldb.so.19-20260717191013: missing file /root/usr/local/lib/compat/pkg/libprivatelldb.so.19
[2/4] Deleting files for FreeBSD-lldb-backup-libprivatelldb.so.19-20260717191013: 100%
[3/4] Deinstalling FreeBSD-runtime-backup-libpam.so.6-20260717191009...
[3/4] Deleting files for FreeBSD-runtime-backup-libpam.so.6-20260717191009:   0[3/4] Deleting files for FreeBSD-runtime-backup-libpam.so.6-20260717191009:   0[3/4] Deleting files for FreeBSD-runtime-backup-libpam.so.6-20260717191009: 100%
[4/4] Deinstalling FreeBSD-runtime-backup-libprivatezstd.so.5-20260717191009...
[4/4] Deleting files for FreeBSD-runtime-backup-libprivatezstd.so.5-20260717191[4/4] Deleting files for FreeBSD-runtime-backup-libprivatezstd.so.5-20260717191[4/4] Deleting files for FreeBSD-runtime-backup-libprivatezstd.so.5-20260717191009: 100%

These packages are not FreeBSD-base related and are for me to investigate later.

[12:37 r730-01 dvl ~] % pkg version -vRL= | grep orphaned
lmdb-backup-liblmdb.so.0-20260803225943 ?   orphaned: databases/lmdb-backup-liblmdb.so.0
mesa-libs-backup-libgallium-26.1.3.so-20260803225944 ?   orphaned: graphics/mesa-libs-backup-libgallium-26.1.3.so
[12:37 r730-01 dvl ~] % 

I removed the setting

I am sure I added that configuration setting on my own. It was not a recommendation I had seen. I checked my ansible configuration. That setting is not specified there.

I also ran this query on each host (which runs jails):

[12:52 r730-01 dvl ~] % grep BACKUP /jails/*/usr/local/etc/pkg.conf
[12:53 r730-01 dvl ~] % 
Website Pin Facebook Twitter Myspace Friendfeed Technorati del.icio.us Digg Google StumbleUpon Premium Responsive

Leave a Comment

Scroll to Top