HomeFreeBSD

etc, ypserv: Fix symlink creation for pkgbase

Description

etc, ypserv: Fix symlink creation for pkgbase

The Makefile logic for /etc/aliases, /var/yp/Makefile and /etc/unbound
tries to avoid creating the symlink if it already exists in the target,
but this breaks with pkgbase since the symlink won't be installed (and
therefore won't be added to METALOG) if building with an existing
worldstage, meaning it's missing from the generated package.

Change the logic to forcibly install the symlink if NO_ROOT is defined,
but keep the existing logic for non-package builds to avoid trashing
the user's custom symlinks on non-pkgbase installworld.

MFC after: 3 seconds
Reported by: cperciva
Reviewed by: cperciva, emaste
Sponsored by: https://www.patreon.com/bsdivy
Differential Revision: https://reviews.freebsd.org/D52834

Details

Provenance
ivyAuthored on Oct 2 2025, 1:10 AM
Reviewer
cperciva
Differential Revision
D52834: etc, ypserv: Fix symlink creation for pkgbase
Parents
rG213170eb956f: iflib: Implement tx desc reclaim threshold
Branches
Unknown
Tags
Unknown