Bug 190649 - [MAINTAINER] net-mgmt/isic: Fix build in 9.1
Summary: [MAINTAINER] net-mgmt/isic: Fix build in 9.1
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: Thomas Zander
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-06-05 09:39 UTC by Muhammad Moinur Rahman
Modified: 2014-08-12 20:57 UTC (History)
1 user (show)

See Also:


Attachments
Patch for isic (553 bytes, patch)
2014-06-05 09:39 UTC, Muhammad Moinur Rahman
no flags Details | Diff
Proposal for changes to Makefile and files/patch-isic.h (1.43 KB, patch)
2014-08-11 18:34 UTC, Thomas Zander
riggs: maintainer-approval?
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Muhammad Moinur Rahman freebsd_committer 2014-06-05 09:39:03 UTC
Created attachment 143395 [details]
Patch for isic

- Fix build in 9.1 more specifically for OSVERSION 901000
Comment 1 Thomas Zander freebsd_committer 2014-07-14 19:07:47 UTC
(In reply to Muhammad Moinur Rahman from comment #0)
> Created attachment 143395 [details]
> Patch for isic
> 
> - Fix build in 9.1 more specifically for OSVERSION 901000

This patch should not be necessary. At the moment, this REINPLACE is performed for ${OSVERSION} > 900000. That includes ${OSVERSION} > 901000. Since 9.0 is no longer supported, this would not change anything for the supported releases. Or am I wrong?
Comment 2 Muhammad Moinur Rahman freebsd_committer 2014-07-14 20:32:15 UTC
Hmm .. Noops .. That's not right. It includes 901000 but we need to exclude it. 9.0 is no longer supported but 9.1 is. And port builders do not run with the highest version that is for 9/STABLE port builders use the lowest supported not the highest supported hence I get error reports from pkg-fallout. :'(

(In reply to Thomas Zander from comment #1)
> (In reply to Muhammad Moinur Rahman from comment #0)
> > Created attachment 143395 [details]
> > Patch for isic
> > 
> > - Fix build in 9.1 more specifically for OSVERSION 901000
> 
> This patch should not be necessary. At the moment, this REINPLACE is
> performed for ${OSVERSION} > 900000. That includes ${OSVERSION} > 901000.
> Since 9.0 is no longer supported, this would not change anything for the
> supported releases. Or am I wrong?
Comment 3 John Marino freebsd_committer 2014-08-11 10:37:45 UTC
Thomas, this PR is stalled because of your comment.  Care to respond to Mohammad so it can get going again?
Comment 4 Thomas Zander freebsd_committer 2014-08-11 12:59:28 UTC
Sure, sorry for the delay. I do not understand the logic of this patch.
Originally the port changed this constant in isic.h for OSVERSION higher than (but not including) 900000. This suggests it stopped building on "9.0-CURRENT after importing x86emu, a software emulator for real mode x86 CPU from OpenBSD."???[1]
Now the patch says, we do not need it on 9.0 and 9.1-R, but we do need it since "9.1-STABLE after LIST_PREV() added to queue.h (rev 242893) and KBI change in USB serial devices (rev 240659)."[2] which does not seem related to the patch at all.
So I don't quite understand for which OSVERSIONS we really need this patch.
Do we need it on 9.1-R? On 9.2? 9.3? 10.0? 11-CURRENT?




[1] https://www.freebsd.org/doc/en/books/porters-handbook/book.html#freebsd-versions
[2] page as [1], but first functional change in the base system after branching of 9.1
Comment 5 Muhammad Moinur Rahman freebsd_committer 2014-08-11 13:11:46 UTC
Actually in my poudriere I use 8.4, 9.2, 10.0 and HEAD. While I was working on upgrading the port I came into the problem. So I had to patch isic.h. The port works great on 9.2 and later. However after the port was committed I started getting mails from pkg-fallout with build failure on 901000. Now what's your suggestion?
Comment 6 Thomas Zander freebsd_committer 2014-08-11 14:12:55 UTC
Thanks for the extra info, appreciate it.
I read through the code of isic a bit to learn what the fuzz with the RAND_MAX check in that include file is all about. Long story short:
My suggestion would be to simply remove the utterly useless[1] test from the header file. I'd just remove this part of isic.h entirely:

/* We want a random function that returns 0 to 0x7fff */
#if ( RAND_MAX != 2147483647 )  /* expect signed long */
#error Random IP generation broken: unexpected RAND_MAX.
#endif

or change the test to RAND_MAX != RAND_MAX if the patch should be minimal :-)

Then you can remove the test for OSVERSION in the port Makefile as well, hence simplify it.
Since there is already files/patch-isic.h , we can just append the removal of these lines to it.

Let me know if you want me to commit this.
Thanks again for your quick response.


[1] rand() function is specifically not designed to produce high quality random numbers anyway.
Comment 7 Thomas Zander freebsd_committer 2014-08-11 18:34:29 UTC
Created attachment 145680 [details]
Proposal for changes to Makefile and files/patch-isic.h
Comment 8 Muhammad Moinur Rahman freebsd_committer 2014-08-12 08:51:31 UTC
Approved. Poudriere logs:
http://pdr.s.ubze.ro/bulk/latest-per-pkg/isic/0.07_5/

(In reply to Thomas Zander from comment #7)
> Created attachment 145680 [details]
> Proposal for changes to Makefile and files/patch-isic.h
Comment 9 commit-hook freebsd_committer 2014-08-12 19:30:56 UTC
A commit references this bug:

Author: riggs
Date: Tue Aug 12 19:30:40 UTC 2014
New revision: 364738
URL: http://svnweb.freebsd.org/changeset/ports/364738

Log:
  - Fix build failure on 9.1
  - Simplify Makefile in the process

  PR:		190649
  Submitted by:	Muhammad Moinur Rahman <5u623l20@gmail.com> (maintainer)
  Reviewed by:	Muhammad Moinur Rahman <5u623l20@gmail.com> (maintainer)
  Approved by:	mentors (implicit), maintainer
  MFH:		2014Q3

Changes:
  head/net-mgmt/isic/Makefile
  head/net-mgmt/isic/files/patch-isic.h
Comment 10 Thomas Zander freebsd_committer 2014-08-12 20:00:35 UTC
Patch committed, thanks!
Comment 11 commit-hook freebsd_committer 2014-08-12 20:57:03 UTC
A commit references this bug:

Author: riggs
Date: Tue Aug 12 20:56:24 UTC 2014
New revision: 364745
URL: http://svnweb.freebsd.org/changeset/ports/364745

Log:
  MFH: r364738

  - Fix build failure on 9.1
  - Simplify Makefile in the process

  PR:		190649
  Submitted by:	Muhammad Moinur Rahman <5u623l20@gmail.com> (maintainer)
  Reviewed by:	Muhammad Moinur Rahman <5u623l20@gmail.com> (maintainer)
  Approved by:	portmgr (erwin), mentors (implicit), maintainer

Changes:
_U  branches/2014Q3/
  branches/2014Q3/net-mgmt/isic/Makefile
  branches/2014Q3/net-mgmt/isic/files/patch-isic.h