Page MenuHomeFreeBSD

pkgbase: fix inclusion of tests in ssh, bsnmp, clibs-dev
ClosedPublic

Authored by ifreund_freebsdfoundation.org on Oct 9 2024, 1:17 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sep 16 2025, 10:04 AM
Unknown Object (File)
Sep 12 2025, 12:16 PM
Unknown Object (File)
Sep 5 2025, 2:13 PM
Unknown Object (File)
Sep 4 2025, 9:29 PM
Unknown Object (File)
Aug 29 2025, 2:24 PM
Unknown Object (File)
Aug 26 2025, 4:11 PM
Unknown Object (File)
Aug 19 2025, 6:50 PM
Unknown Object (File)
Aug 14 2025, 2:48 PM
Subscribers

Details

Summary

Currently, files that belong in the tests package are included in the
ssh, bsnmp, and clibs-dev packages:

ssh.plist
24:@dir(root,wheel,0755,) /usr/tests/secure/libexec
25:@(root,wheel,0444,) /usr/tests/secure/libexec/Kyuafile

bsnmp.plist
82:@dir(root,wheel,0755,) /usr/tests/lib/libbsnmp
83:@(root,wheel,0444,) /usr/tests/lib/libbsnmp/Kyuafile
84:@(root,wheel,0555,) /usr/tests/lib/libbsnmp/bsnmpd_test

clibs-dev.plist
2518:@dir(root,wheel,0755,) /usr/tests/lib/csu
2519:@(root,wheel,0444,) /usr/tests/lib/csu/Kyuafile

This is caused by the PACKAGE=foo assignment in foo/Makefile.inc which
overrides the default PACKAGE?=tests in bsd.test.mk.

To fix this, instead use PACKAGE?=foo in foo/Makefile.inc and set
PACKAGE=tests in foo/tests/Makefile.

PR: 249144
Sponsored by: The FreeBSD Foundation

Diff Detail

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

Event Timeline

I wonder if we can have bsd.test.mk set PACKAGE?= tests before .include <bsd.init.mk>, which would let us drop the Makefile changes. I'm fine with either version so will see if @bapt has a comment.

This revision is now accepted and ready to land.Oct 9 2024, 7:13 PM

I wonder if we can have bsd.test.mk set PACKAGE?= tests before .include <bsd.init.mk>, which would let us drop the Makefile changes. I'm fine with either version so will see if @bapt has a comment.

Yes, that would work and allow us to avoid the PACKAGE=tests in foo/tests/Makefile though we would still need to replace PACKAGE=foo with PACKAGE?=foo in foo/Makefile.inc.

I don't have a strong opinion on which approach is better, they both seem reasonable to me.