Page MenuHomeFreeBSD

Rename DISTDIR to RELDISTDIR to avoid clash with ports DISTDIR defined in make.conf
Needs ReviewPublic

Authored by otis on Sep 30 2020, 9:25 PM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Apr 23, 10:52 PM
Unknown Object (File)
Sun, Mar 31, 5:35 AM
Unknown Object (File)
Sun, Mar 31, 5:35 AM
Unknown Object (File)
Jan 14 2024, 5:38 AM
Unknown Object (File)
Jan 1 2024, 1:30 AM
Unknown Object (File)
Jan 1 2024, 1:30 AM
Unknown Object (File)
Dec 20 2023, 7:13 AM
Unknown Object (File)
Dec 9 2023, 9:16 PM

Details

Reviewers
manu
Group Reviewers
releng
Summary

To avoid variable name clash with ports' DISTDIR, rename DISTDIR used for pkgbase to PBDISTDIR

Diff Detail

Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

otis requested review of this revision.Sep 30 2020, 9:25 PM

I suspect this patch breaks the release/ scripts, which use DISTDIR

@kevans pointed out that:

02:45 < kevans91> otis: your DISTDIR problem is a tricky one
02:46 < kevans91> otis: PBDISTDIR isn't technically correct name as it's used for much more than pkgbase... but the conflict isn't a good one
02:47 < kevans91> I suspect we should expand it to DISTRIBDIR or something instead, but we need to comb the rest of the tree and figure out the impact
02:47 < kevans91> At least release/ will need to change
02:48 < kevans91> Or RELDISTDIR
02:49 < kevans91> share/man/man7/build.7 also needs to reflect the change

I'll do further investigation how this could be done in an ellegant way.

  • Rename DISTDIR to RELDISTDIR
  • Reflect this change also in build(7)
  • Make an entry in UPDATING

At first glance this looks ok.
I'll do some test build + release.sh build this weekend to confirm that everything is still working.
Thanks

otis retitled this revision from Rename DISTDIR to PBDISTDIR to avoid clash with ports DISTDIR defined in make.conf to Rename DISTDIR to RELDISTDIR to avoid clash with ports DISTDIR defined in make.conf.Oct 2 2020, 2:53 PM

I think this is almost complete; there's just two occurrences in share/mk that are also relevant and should be replaced, one in a comment in bsd.own.mk and one in distribute target of bsd.subdir.mk.

  • Catch some more occurences of DISTDIR

Also adding re@, because we should get them to confirm if DISTDIR is used in a base-context in thermite for release-building. I would suspect not, though.

Yes, can we please get this committed ASAP? I just spent some time debugging this problem. (Other solution would be for base not to read /etc/make.conf, but I have a feeling this commit is more likely.)

Relnotes: yes, please :)

brooks added inline comments.
Makefile.inc1
926

Given we're renaming the variable and touching every line, I wonder if we can't move the / into the value and drop this METALOG:= line.