Bug 194679 - [patch] irc/irc:builds forever if uname -a doesn't match CONFIGURE_TARGET
Summary: [patch] irc/irc:builds forever if uname -a doesn't match CONFIGURE_TARGET
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Johan van Selst
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-10-29 09:29 UTC by John Marino
Modified: 2014-10-29 09:47 UTC (History)
0 users

See Also:
marino: maintainer-feedback? (johans)


Attachments
IRC makefile patch (654 bytes, patch)
2014-10-29 09:29 UTC, John Marino
no flags Details | Diff
*very* small excerpt of build log that goes forever (10.05 KB, text/plain)
2014-10-29 09:45 UTC, John Marino
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description John Marino freebsd_committer 2014-10-29 09:29:04 UTC
Created attachment 148757 [details]
IRC makefile patch

The IRC configure script has curious logic.  All it really wants to do is create a build directory and run a different configure script there.  Rather than just use a fixed name for the build directory, it uses a name based on the triplet of the host machine.  This is reflected in the port makefile with the line "BUILD_WRKSRC=	${WRKSRC}/${MACHINE_ARCH}-unknown-${OPSYS:tl}${OSREL}"

Besides being overly complex, it actually breaks badly if the port is being built in a chroot where the host triplet won't match the jail triplet.  Attached in a log showing make running forever after hitting a "cd" error, which in itself is a bug.

The solution I've provided here is clean.  Using the pre-configure target, the build directory (with a fixed name) is created and the needed configure script and header are copied over, just like the top configure script does.  Then the port makefile just configures with that.  It's much better, more robust, and fixes the triplet mismatch.

Please review and hopefully approve the patch for commit.
Comment 1 Bugzilla Automation freebsd_committer 2014-10-29 09:29:04 UTC
Auto-assigned to maintainer johans@FreeBSD.org
Comment 2 commit-hook freebsd_committer 2014-10-29 09:42:08 UTC
A commit references this bug:

Author: johans
Date: Wed Oct 29 09:41:48 UTC 2014
New revision: 371671
URL: https://svnweb.freebsd.org/changeset/ports/371671

Log:
  The IRC configure script has curious logic, is being overly complex,
  and actually breaks badly if the port is being built in a chroot
  where the host triplet won't match the jail triplet.

  The solution I've provided here is clean.  Using the pre-configure
  target, the build directory (with a fixed name) is created and the
  needed configure script and header are copied over, just like the top
  configure script does.  Then the port makefile just configures with
  that.  It's much better, more robust, and fixes the triplet mismatch.

  PR:		194679
  Submitted by:	marino

Changes:
  head/irc/irc/Makefile
Comment 3 Johan van Selst freebsd_committer 2014-10-29 09:43:04 UTC
Yes, I really like it. Tested and committed. Thanks.
Comment 4 John Marino freebsd_committer 2014-10-29 09:45:04 UTC
Created attachment 148759 [details]
*very* small excerpt of build log that goes forever

note that make spawns forever with the build directory mismatch bug caused by trying to guess the triplet and not providing a configure switch override.
Comment 5 John Marino freebsd_committer 2014-10-29 09:45:58 UTC
sorry, bugzilla was blocked for me for several minutes.  I just realized you committed the fix in the meantime, thanks!