Page MenuHomeFreeBSD

Ping: Make build reproducible
ClosedPublic

Authored by cperciva on Oct 13 2025, 4:01 PM.
Tags
None
Referenced Files
F149503655: D53075.id.diff
Tue, Mar 24, 9:49 PM
Unknown Object (File)
Sun, Mar 22, 11:10 AM
Unknown Object (File)
Sun, Mar 22, 2:19 AM
Unknown Object (File)
Thu, Mar 19, 8:04 AM
Unknown Object (File)
Wed, Mar 18, 12:06 AM
Unknown Object (File)
Sun, Mar 15, 1:29 AM
Unknown Object (File)
Fri, Mar 13, 6:37 AM
Unknown Object (File)
Sat, Mar 7, 6:18 PM
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.