Bug 202002 - sysutils/openipmi: SSL option is broken after update to 2.0.21
Summary: sysutils/openipmi: SSL option is broken after update to 2.0.21
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: Jason Unovitch
URL:
Keywords: regression
Depends on:
Blocks:
 
Reported: 2015-07-31 06:40 UTC by Anton Saietskii
Modified: 2015-09-04 16:41 UTC (History)
2 users (show)

See Also:


Attachments
poudriere build log (59.00 KB, text/x-log)
2015-07-31 06:40 UTC, Anton Saietskii
no flags Details
Replace Linuxism EKEYREJECTED errno with original EINVAL (420 bytes, patch)
2015-08-19 13:06 UTC, dennis.noordsij
no flags Details | Diff
Poudriere build log with patch and SSL option enabled (184.93 KB, text/x-log)
2015-09-04 12:31 UTC, Jason Unovitch
no flags Details
Poudriere testport log from 10.1-RELEASE jail with EAGAIN and SSL option enabled (184.94 KB, text/x-log)
2015-09-04 12:55 UTC, Jason Unovitch
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Anton Saietskii 2015-07-31 06:40:10 UTC
Created attachment 159407 [details]
poudriere build log

You can see the following error when building in poudriere:

/bin/sh ../libtool  --tag=CC   --mode=compile cc -DHAVE_CONFIG_H -I. -I..   -I/usr/local/include -Wall -Wsign-compare -I../include -I../include -DIPMI_CHECK_LOCKS -I/usr/include -O2 -pipe -march=core-avx-i  -fstack-protector -fno-strict-aliasing -MT rakp.lo -MD -MP -MF .deps/rakp.Tpo -c -o rakp.lo rakp.c
libtool: compile:  cc -DHAVE_CONFIG_H -I. -I.. -I/usr/local/include -Wall -Wsign-compare -I../include -I../include -DIPMI_CHECK_LOCKS -I/usr/include -O2 -pipe -march=core-avx-i -fstack-protector -fno-strict-aliasing -MT rakp.lo -MD -MP -MF .deps/rakp.Tpo -c rakp.c  -fPIC -DPIC -o .libs/rakp.o
rakp.c:485:9: error: use of undeclared identifier 'EKEYREJECTED'
        return EKEYREJECTED;
               ^
1 error generated.
Makefile:547: recipe for target 'rakp.lo' failed
gmake[3]: *** [rakp.lo] Error 1
gmake[3]: Leaving directory '/wrkdirs/usr/ports/sysutils/openipmi/work/OpenIPMI-2.0.21/lib'
Makefile:503: recipe for target 'all-recursive' failed
gmake[2]: *** [all-recursive] Error 1
gmake[2]: Leaving directory '/wrkdirs/usr/ports/sysutils/openipmi/work/OpenIPMI-2.0.21'
Makefile:414: recipe for target 'all' failed
gmake[1]: *** [all] Error 2
gmake[1]: Leaving directory '/wrkdirs/usr/ports/sysutils/openipmi/work/OpenIPMI-2.0.21'
*** Error code 1

Stop.
make: stopped in /usr/ports/sysutils/openipmi
====>> Cleaning up wrkdir
===>  Cleaning for openipmi-2.0.21
build of sysutils/openipmi ended at Fri Jul 31 05:53:16 UTC 2015
build time: 00:00:17
!!! build failure encountered !!
Comment 1 dennis.noordsij 2015-08-19 13:06:01 UTC
Created attachment 160101 [details]
Replace Linuxism EKEYREJECTED errno with original EINVAL

This error occurs when enabling the SSL (IPMI 2.0 RMCP+ encryption and authentication) option, which is not the port default.

The EKEYREJECTED errno is as far as I can find a Linuxism. It was changed from EINVAL in earlier OpenIPMI versions to allow more fine grained error handling (I suppose), but works for its original purpose also with EINVAL.

This simple patch to revert this change, while waiting for openipmi to hopefully add a linux ifdef guard.

The patch can be added to sysutils/openipmi/files

(I don't know how to go about to have this added to the official ports tree)
Comment 2 Anton Saietskii 2015-08-19 13:27:14 UTC
(In reply to dennis.noordsij from comment #1)
Tried your patch - it fixes problem.
Comment 3 Jason Unovitch freebsd_committer freebsd_triage 2015-09-04 12:31:37 UTC
Created attachment 160710 [details]
Poudriere build log with patch and SSL option enabled

With the patch, I've tested builds on the following.

9.3-RELEASE-p24     amd64
9.3-RELEASE-p24     i386
10.1-RELEASE-p19    amd64
10.1-RELEASE-p19    i386
10.2-RELEASE-p2     amd64
10.2-RELEASE-p2     i386
11.0-CURRENTr286886 amd64
11.0-CURRENTr286888 i386
Comment 4 dennis.noordsij 2015-09-04 12:38:22 UTC
I contacted the openipmi-developer list and the response was that it will be changed back to EAGAIN.

I don't know when the next release will be, but just a heads up to verify the patch is still needed when the port is updated with a newer version of openipmi.
Comment 5 Jason Unovitch freebsd_committer freebsd_triage 2015-09-04 12:55:36 UTC
Created attachment 160712 [details]
Poudriere testport log from 10.1-RELEASE jail with EAGAIN and SSL option enabled

Retest with EAGAIN based on comment 4.

9.3-RELEASE-p24     amd64
9.3-RELEASE-p24     i386
10.1-RELEASE-p19    amd64
10.1-RELEASE-p19    i386
10.2-RELEASE-p2     amd64
10.2-RELEASE-p2     i386
11.0-CURRENTr286886 amd64
11.0-CURRENTr286888 i386
Comment 6 Jason Unovitch freebsd_committer freebsd_triage 2015-09-04 12:59:13 UTC
(In reply to dennis.noordsij from comment #4)

Thank you Dennis! I submitted https://reviews.FreeBSD.org/D3568 with this along with another OpenIPMI PR with the EAGAIN fix. This should hold us over until whenever the next upstream release is available.
Comment 7 Jason Unovitch freebsd_committer freebsd_triage 2015-09-04 13:05:17 UTC
For the archives, source of upstream discussion about the change back to EAGAIN for the next release: http://sourceforge.net/p/openipmi/mailman/message/34398853/
Comment 8 commit-hook freebsd_committer freebsd_triage 2015-09-04 16:26:09 UTC
A commit references this bug:

Author: junovitch
Date: Fri Sep  4 16:25:12 UTC 2015
New revision: 396109
URL: https://svnweb.freebsd.org/changeset/ports/396109

Log:
  sysutils/openipmi: resolve build issues with 2.0.21
  - Return EAGAIN errno instead of EKEYREJECTED to fix build with SSL option [1]
  - Prepend -I../include to CPPFLAGS to stop build breakage from old .h files [2]
  - While here, add LICENSE and regen one of the original patches (portlint)

  PR:		202002 [1]
  PR:		202528 [2]
  Submitted by:	dennis.noordsij@helsinki.fi [1]
  Submitted by:	Anton Sayetsky <vsasjason@gmail.com> [1]
  Submitted by:	Larry Rosenman <ler@lerctr.org> [2]
  Approved by:	feld (mentor)
  Differential Revision:	https://reviews.freebsd.org/D3568

Changes:
  head/sysutils/openipmi/Makefile
  head/sysutils/openipmi/files/patch-OpenIPMIpthread.pc.in
  head/sysutils/openipmi/files/patch-lib_rakp.c
Comment 9 Jason Unovitch freebsd_committer freebsd_triage 2015-09-04 16:40:21 UTC
Thank you both for your work tracking this down and notifying upstream. The update has been committed and I am closing the PR.