Page MenuHomeFreeBSD

etc, ypserv: Fix symlink creation for pkgbase
ClosedPublic

Authored by ivy on Oct 1 2025, 4:55 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Dec 7, 11:16 AM
Unknown Object (File)
Fri, Dec 5, 11:56 AM
Unknown Object (File)
Thu, Dec 4, 2:36 AM
Unknown Object (File)
Wed, Dec 3, 11:39 PM
Unknown Object (File)
Wed, Dec 3, 5:30 PM
Unknown Object (File)
Tue, Dec 2, 11:59 AM
Unknown Object (File)
Sun, Nov 30, 1:04 PM
Unknown Object (File)
Sun, Nov 30, 6:07 AM
Subscribers

Details

Summary

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 3 seconds 3 seconds

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

ivy requested review of this revision.Oct 1 2025, 4:55 PM

Fine with me. I think it would be nicer to avoid duplicating the ${INSTALL_SYMLINK} although the fact that it's a combination of a shell if and a make .if makes that a bit awkward as well.

This revision is now accepted and ready to land.Oct 1 2025, 5:02 PM

fix a typographical error in a comment

This revision now requires review to proceed.Oct 1 2025, 5:04 PM

avoid duplicating the INSTALL_SYMLINK logic

This revision is now accepted and ready to land.Oct 1 2025, 5:22 PM
This revision was automatically updated to reflect the committed changes.