Bug 192297 - net/openldap24-server: post-patch CFLAGS injection fails because of bad sed separator
Summary: net/openldap24-server: post-patch CFLAGS injection fails because of bad sed s...
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Xin LI
URL:
Keywords: easy, needs-patch, needs-qa
Depends on:
Blocks:
 
Reported: 2014-07-31 20:19 UTC by Olivier - interfaSys sàrl
Modified: 2015-10-14 23:22 UTC (History)
4 users (show)

See Also:
delphij: maintainer-feedback+
delphij: merge-quarterly+


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Olivier - interfaSys sàrl 2014-07-31 20:19:40 UTC
I guess it depends on what you're using in your CFLAGS, but we do have commas in ours which make this Makefile command fail
@${REINPLACE_CMD} -e 's,^OPT =.*,OPT = ${CFLAGS},g' 
with
sed: 1: "s,^OPT =.*,OPT = -O2 -p ...": bad flag in substitute command: '-'

using slashes worked for me
@${REINPLACE_CMD} -e 's/^OPT =.*/OPT = ${CFLAGS}/g' 

YMMV
Comment 1 John Marino freebsd_committer freebsd_triage 2014-07-31 21:13:31 UTC
I'm not sure this is a ports issues, nor that using slashes is inherently better than using commas (I'd pick pipes "|" myself).

Let the maintainer decide...
Comment 2 Justin Hibbits freebsd_committer freebsd_triage 2014-08-26 21:25:11 UTC
This also happens when just adding "USE_GCC=yes" to build with gcc47 (seen when trying to build openldap24-client).
Comment 3 Justin Hibbits freebsd_committer freebsd_triage 2015-10-13 12:07:59 UTC
Ping?  No activity in over a year, and the bug still occurs with USE_GCC=yes.
Comment 4 Kubilay Kocak freebsd_committer freebsd_triage 2015-10-13 12:19:03 UTC
This needs a patch to progress. 

Justin (jhibbits) is willing to commit a fix for this now over 1 year old issue. I've offered to review and approve it given successful QA results.

Xin, it would be great if you could respond/reply to this issue with alternate instructions before the above occurs, otherwise Justin is happy to take care of it.

Last call prior to maintainer-timeout
Comment 5 Xin LI freebsd_committer freebsd_triage 2015-10-14 01:07:37 UTC
Sorry for the delay, I've committed John's proposed change.
Comment 6 commit-hook freebsd_committer freebsd_triage 2015-10-14 01:07:59 UTC
A commit references this bug:

Author: delphij
Date: Wed Oct 14 01:07:03 UTC 2015
New revision: 399232
URL: https://svnweb.freebsd.org/changeset/ports/399232

Log:
  Use pipe sign (|) instead of comma (,) when doing sed.  This fixes a
  problem when the variable portion of sed command contains comma, for
  instance, when USE_GCC=4.9.

  PR:		192297
  Submitted by:	marino

Changes:
  head/net/openldap24-server/Makefile
Comment 7 Kubilay Kocak freebsd_committer freebsd_triage 2015-10-14 01:37:42 UTC
Thanks Xin, does this also need to be MFC'd to quarterlies?
Comment 8 Justin Hibbits freebsd_committer freebsd_triage 2015-10-14 03:29:18 UTC
Thanks, Xin!  I had a patch all set, then saw your commit.
Comment 9 Xin LI freebsd_committer freebsd_triage 2015-10-14 23:21:40 UTC
(In reply to Kubilay Kocak from comment #7)
Done.
Comment 10 commit-hook freebsd_committer freebsd_triage 2015-10-14 23:22:06 UTC
A commit references this bug:

Author: delphij
Date: Wed Oct 14 23:21:24 UTC 2015
New revision: 399301
URL: https://svnweb.freebsd.org/changeset/ports/399301

Log:
  MFH: r399232

  Use pipe sign (|) instead of comma (,) when doing sed.  This fixes a
  problem when the variable portion of sed command contains comma, for
  instance, when USE_GCC=4.9.

  PR:		192297
  Submitted by:	marino
  Requested by:	koobs
  Approved by:	ports-secteam

Changes:
_U  branches/2015Q4/
  branches/2015Q4/net/openldap24-server/Makefile