Page MenuHomeFreeBSD

Ping: Make build reproducible
ClosedPublic

Authored by cperciva on Oct 13 2025, 4:01 PM.
Tags
None
Referenced Files
F137165115: D53075.id164123.diff
Fri, Nov 21, 8:17 AM
Unknown Object (File)
Sun, Nov 16, 8:45 AM
Unknown Object (File)
Wed, Nov 12, 5:08 PM
Unknown Object (File)
Wed, Nov 12, 7:58 AM
Unknown Object (File)
Tue, Nov 11, 5:07 AM
Unknown Object (File)
Sat, Nov 8, 11:14 PM
Unknown Object (File)
Wed, Oct 29, 6:49 AM
Unknown Object (File)
Wed, Oct 29, 4:46 AM
Subscribers

Details

Summary

As recently fixed in sockstat (9934558460e4), having tests/Makefile
include files from the parent directory with SRCS= ../foo.c results
in a race condition as the parent build and the tests build try to
produce the same object file but contain different paths.

Use .PATH to tell make to find sockstat.c in the parent directory
but place the object file in the current object directory.

MFC after: 3 days
Sponsored by: https://www.patreon.com/cperciva

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 67758
Build 64641: arc lint + arc unit

Event Timeline

This revision is now accepted and ready to land.Oct 13 2025, 7:03 PM
jrtc27 added inline comments.
sbin/ping/tests/Makefile
3

I think convention is to put .PATH before the first need for it, not after? Doesn't functionally matter though.

emaste added inline comments.
sbin/ping/tests/Makefile
3

It's logical to put the .PATH before the source IMO, yeah.

This revision was automatically updated to reflect the committed changes.