Page MenuHomeFreeBSD

src: fix deps in package build
Needs ReviewPublic

Authored by vladlen on Sun, Jul 19, 10:34 AM.
Referenced Files
Unknown Object (File)
Wed, Jul 22, 4:17 AM
Unknown Object (File)
Wed, Jul 22, 12:20 AM
Unknown Object (File)
Mon, Jul 20, 11:01 PM
Subscribers

Details

Reviewers
ivy
Group Reviewers
releng
Summary

I am testing pkgbase upgrade scenarios, using a CURRENT snapshot
as target version to simplify testing. The same issues appear on releng/15.X and
current/15 branches. Source version is 14.4R after pkgbasify.

This patch fixes a problem: post-install triggers fail
because not all packages are updated yet due to missing explicit
dependencies. Specifically, caroot depends on certctl, which
depends on openssl-lib(but certctl's dependency in Makefile
is on openssl, that is obsolete after changing certctl from script
to binary implementation) and openssl-lib is not declared. Thus, during upgrade,
certctl's post-install script tries to load libcrypto.so.35 before
openssl-lib is installed, causing "Shared object not found".

[234/435] Upgrading FreeBSD-openssl from 14.4p6 to 16.snap20260629171155...
[234/435] Extracting FreeBSD-openssl-16.snap20260629171155: 100%
[235/435] Upgrading FreeBSD-certctl from 14.4p6 to 16.snap20260629171155...
[235/435] Extracting FreeBSD-certctl-16.snap20260629171155: 100%
[236/435] Upgrading FreeBSD-caroot from 14.4p6 to 16.snap20260427094521...
[236/435] Extracting FreeBSD-caroot-16.snap20260427094521: 100%
ld-elf.so.1: Shared object "libcrypto.so.35" not found, required by "certctl"
pkg: POST-INSTALL script failed

The fix adds an explicit dependency on openssl-lib to the certctl
package.

This demonstrates that we need to explicitly declare dependencies
for all packages with post-install triggers and their descendants,
contrary to the README's claim that pkg should handle this
automatically.

Further investigation reveals that we should explicitly declare
dependencies for all packages and their descendants.
pkg could not resolve automatically many cases,
especially cases with new packages.

Test Plan

tested on local build, amd64 arch.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped