Page MenuHomeFreeBSD

pkgbase: set the prefix of debug files and macros to /usr/src
ClosedPublic

Authored by bapt on Nov 13 2023, 5:19 PM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, Oct 15, 11:21 PM
Unknown Object (File)
Wed, Oct 15, 11:21 PM
Unknown Object (File)
Wed, Oct 15, 11:21 PM
Unknown Object (File)
Wed, Oct 15, 12:57 PM
Unknown Object (File)
Thu, Oct 9, 1:58 AM
Unknown Object (File)
Tue, Oct 7, 4:20 PM
Unknown Object (File)
Fri, Sep 26, 5:45 PM
Unknown Object (File)
Sep 17 2025, 7:21 AM

Details

Summary

When the macro PACKAGE_BUILDING is set, then consider we are building package for pkgbase, this has already been used in Makefile.inc1 and reuse the PACKAGE_BUILDING macros already used for that purpose in the ports tree

Diff Detail

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

Event Timeline

bapt requested review of this revision.Nov 13 2023, 5:19 PM

This should be set in general for reproducible builds, to be honest, of which pkgbase is but one user.

I am fine with binding on the reproducible build variable

I agree with @jrtc27 that tying it to reproducible builds is sensible -- I'm fine with either change.
I'd like to understand the full workflow with gdb and lldb better.

This revision is now accepted and ready to land.Nov 13 2023, 7:17 PM

It turns out that when poudriere jail is run with -b, the PACKAGE_BUILDING isn't defined: https://github.com/freebsd/poudriere/issues/1196

On the other hand, why wrap these CFLAGS into .if (PACKAGE_BUILDING) at all? It feels to me that these flags are correct for any case.

this is not for all case because people may have multiple checkouts of the source tree (other than /usr/src) this is good only for releases.