Bug 253000 - [PATCH] net/bsdrcmds - fix build under -CURRENT
Summary: [PATCH] net/bsdrcmds - fix build under -CURRENT
Status: In Progress
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Jeremie Le Hen
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-01-25 16:23 UTC by Cy Schubert
Modified: 2021-02-28 18:03 UTC (History)
2 users (show)

See Also:
bugzilla: maintainer-feedback? (jlh)


Attachments
Patch to fix 14-CURRENT build. (484 bytes, patch)
2021-01-25 16:23 UTC, Cy Schubert
no flags Details | Diff
The original fix (510 bytes, patch)
2021-02-08 15:48 UTC, Cy Schubert
no flags Details | Diff
Fix r564865 WERROR OPTIONS breakage (811 bytes, patch)
2021-02-20 12:53 UTC, Harald Schmalzbauer
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Cy Schubert freebsd_committer 2021-01-25 16:23:49 UTC
Created attachment 221909 [details]
Patch to fix 14-CURRENT build.

As of __FreeBSD_version 1300134 NO_WERROR=1 was replaced with MK_WERROR=no. This causes bsdrcmds some  gas.
Comment 1 Cy Schubert freebsd_committer 2021-01-26 19:16:13 UTC
See https://reviews.freebsd.org/D28361.
Comment 2 Jeremie Le Hen freebsd_committer 2021-01-30 21:20:19 UTC
I approved the patch in the review. Do you take care of committing it?
Comment 3 Cy Schubert freebsd_committer 2021-01-31 01:15:23 UTC
Sure. I'll do it tonight (PDT).
Comment 4 commit-hook freebsd_committer 2021-02-08 14:26:08 UTC
A commit references this bug:

Author: cy
Date: Mon Feb  8 14:25:59 UTC 2021
New revision: 564711
URL: https://svnweb.freebsd.org/changeset/ports/564711

Log:
  Fix build under 13-ALPHA and 14-CURRENT.

  As of src/7fa2f2a62f04f095e1e27ad55aa22a8f59b1df8f NO_WERROR was
  renamed MK_WERROR. Rather than add logic, use a redundant definition that
  will be a NOP on the "other" version of FreeBSD. This should be maintained
  until 12-STABLE is retired.

  PR:		253000
  Submitted by:	cy
  Reported by:	cy
  Reviewed by:	jlh (maintainer)
  Approved by:	jlh (maintainer)
  MFH:		2021Q1
  Differential Revision:	https://reviews.freebsd.org/D28361

Changes:
  head/net/bsdrcmds/Makefile
Comment 5 Cy Schubert freebsd_committer 2021-02-08 15:48:21 UTC
Created attachment 222270 [details]
The original fix

===>  Building for bsdrcmds-20171003.01
make[1]: "/usr/share/mk/bsd.opts.mk" line 110: "NO_WERROR is defined, but deprecated. Please use MK_WERROR=no instead."

make[1]: stopped in /wrkdirs/usr/ports/net/bsdrcmds/work/bsdrcmds-20171003.01

The original patch is the only way to fix this because CURRENT has foot shooting protection.
Comment 6 commit-hook freebsd_committer 2021-02-10 15:40:54 UTC
A commit references this bug:

Author: cy
Date: Wed Feb 10 15:39:57 UTC 2021
New revision: 564865
URL: https://svnweb.freebsd.org/changeset/ports/564865

Log:
  Fix 13-STABLE and 14-CURRENT for real.

  r564711 attempted to provide both the definitions to use the old
  NO_WERROR and the new MK_WERROR. However foot-shooting protection
  prevents such innovative approaches. Therefore additional logic
  is required.

  PR:		253000
  Submitted by:	cy
  Reported by:	cy
  Approved by:	jlh (maintainer, by private email)
  MFH:		2021Q1

Changes:
  head/net/bsdrcmds/Makefile
Comment 7 Harald Schmalzbauer 2021-02-20 12:53:30 UTC
Created attachment 222670 [details]
Fix r564865 WERROR OPTIONS breakage

The fix breaks OPTIONS because the line
.include <bsd.port.options.mk>
is pre OPTIONS definition.

cd net/bsdrcmds && make config doesn't reflect LIBBLACKLIST default nor IPV6 (which seems a infrastructure pre-default?!)

Alter config with 'make config' and do make showconfig <- PORSTDB/net_bsdrcmds/options were correctly written, but not respected.

This attachment fixes the fix, at least for 3 out of 7 portlint(8)'s FATAL:
Makefile: [26]: OPTIONS_DEFINE is set after including bsd.port.options.mk.
Makefile: [28]: OPTIONS_DEFAULT is set after including bsd.port.options.mk.
Makefile: [30]: OPTIONS_EXCLUDE is set after including bsd.port.options.mk.