Bug 194116 - [Port update] devel/ding-libs 0.1.3_1 -> 0.4.0
Summary: [Port update] devel/ding-libs 0.1.3_1 -> 0.4.0
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Ryan Steinmetz
URL:
Keywords:
Depends on:
Blocks: 194659
  Show dependency treegraph
 
Reported: 2014-10-03 14:50 UTC by Sebastian YEPES F.
Modified: 2014-11-07 13:34 UTC (History)
4 users (show)

See Also:
aweits: maintainer-feedback+


Attachments
shar of the updated port (3.95 KB, text/plain)
2014-10-03 14:50 UTC, Sebastian YEPES F.
no flags Details
Update patch (2.77 KB, patch)
2014-10-05 16:14 UTC, Sebastian YEPES F.
zi: maintainer-approval+
Details | Diff
fix for ding-libs upgrade (543 bytes, patch)
2014-10-23 18:24 UTC, lukas.slebodnik
lukas.slebodnik: maintainer-approval? (aweits)
Details | Diff
tentative fmemopen() fix for < 9.2 (12.25 KB, patch)
2014-10-24 12:56 UTC, aweits
no flags Details | Diff
updated tentative fmemopen() fix for < 9.2 / incorporated libintl fix (13.60 KB, patch)
2014-10-28 16:14 UTC, aweits
aweits: maintainer-approval+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Sebastian YEPES F. 2014-10-03 14:50:03 UTC

    
Comment 1 Bugzilla Automation freebsd_committer freebsd_triage 2014-10-03 14:50:03 UTC
Maintainer CC'd
Comment 2 Sebastian YEPES F. 2014-10-03 14:50:41 UTC
Created attachment 147935 [details]
shar of the updated port
Comment 3 Sebastian YEPES F. 2014-10-05 16:14:56 UTC
Created attachment 147998 [details]
Update patch
Comment 4 aweits 2014-10-05 21:22:48 UTC
Looks good here, approved
Comment 5 Ryan Steinmetz freebsd_committer freebsd_triage 2014-10-06 14:19:13 UTC
Comment on attachment 147998 [details]
Update patch

Maintainer approved.
Comment 6 commit-hook freebsd_committer freebsd_triage 2014-10-20 20:18:45 UTC
A commit references this bug:

Author: pi
Date: Mon Oct 20 20:18:23 UTC 2014
New revision: 371298
URL: https://svnweb.freebsd.org/changeset/ports/371298

Log:
  devel/ding-libs: 0.1.3 -> 0.4.0

  Changes:
  https://fedorahosted.org/sssd/wiki/Releases/DingNotes-0.2.91
  https://fedorahosted.org/sssd/wiki/Releases/DingNotes-0.3.0
  https://fedorahosted.org/sssd/wiki/Releases/DingNotes-0.3.0.1
  https://fedorahosted.org/sssd/wiki/Releases/DingNotes-0.4.0

  PR:		194116
  Submitted by:	Sebastian YEPES F. <syepes@gmail.com>
  Approved by:	aweits@rit.edu (maintainer)

Changes:
  head/devel/ding-libs/Makefile
  head/devel/ding-libs/distinfo
  head/devel/ding-libs/pkg-plist
Comment 7 Kurt Jaeger freebsd_committer freebsd_triage 2014-10-20 20:19:29 UTC
Committed, thanks.
Comment 8 lukas.slebodnik 2014-10-23 18:18:42 UTC
This update of ding-libs port caused linking problems in sssd port.

http://pkg.supranet.net/data/latest-per-pkg/sssd/1.9.6_9/84amd64-default.log
http://pkg.supranet.net/data/latest-per-pkg/sssd/1.9.6_9/91amd64-default.log

{{{
root@fbsd10:/usr/ports/security/sssd # make V=0

//snip

  CCLD     sss_ssh_authorizedkeys
/usr/local/lib/libini_config.so: undefined reference to `libiconv'
/usr/local/lib/libini_config.so: undefined reference to `libiconv_close'
/usr/local/lib/libini_config.so: undefined reference to `libiconv_open'
cc: error: linker command failed with exit code 1 (use -v to see invocation)
Makefile:5357: recipe for target 'sss_ssh_authorizedkeys' failed
gmake[4]: *** [sss_ssh_authorizedkeys] Error 1
gmake[4]: Leaving directory '/usr/ports/security/sssd/work/sssd-1.9.6'
Makefile:9283: recipe for target 'all-recursive' failed
gmake[3]: *** [all-recursive] Error 1
gmake[3]: Leaving directory '/usr/ports/security/sssd/work/sssd-1.9.6'
Makefile:3592: recipe for target 'all' failed
gmake[2]: *** [all] Error 2
gmake[2]: Leaving directory '/usr/ports/security/sssd/work/sssd-1.9.6'
===> Compilation failed unexpectedly.
Try to set MAKE_JOBS_UNSAFE=yes and rebuild before reporting the failure to
the maintainer.
*** Error code 1

Stop.
make[1]: stopped in /usr/ports/security/sssd
}}}

The problem is that new version of ding-libs use iconv but was not linked with libiconv.

{{{
# ldd /usr/local/lib/libini_config.so
/usr/local/lib/libini_config.so:
        libcollection.so.4 => /usr/local/lib/libcollection.so.4 (0x281f6000)
        libpath_utils.so.1 => /usr/local/lib/libpath_utils.so.1 (0x28202000)
        libref_array.so.1 => /usr/local/lib/libref_array.so.1 (0x28205000)
        libbasicobjects.so.0 => /usr/local/lib/libbasicobjects.so.0 (0x28208000)
        libc.so.7 => /lib/libc.so.7 (0x2806c000)
# nm --dynamic --undefined-only /usr/local/lib/libini_config.so | grep iconv
         U libiconv
         U libiconv_close
         U libiconv_open
}}}
Comment 9 lukas.slebodnik 2014-10-23 18:24:23 UTC
Created attachment 148587 [details]
fix for ding-libs upgrade

I tried to link just libini_config with libconv, but I did not managed to solve problem with autotools in port. There is not way how to call "autoreconf -if" and "autopoint" is not recognized in USE_AUTOTOOLS, which caused error

{{{
configure.ac:14: error: required file 'build/config.rpath' not found
}}}
Comment 10 Kurt Jaeger freebsd_committer freebsd_triage 2014-10-23 18:29:14 UTC
(In reply to lukas.slebodnik from comment #8)
> This update of ding-libs port caused linking problems in sssd port.

Does it work if one adds iconv to USES of ding-libs ?
Comment 11 Kurt Jaeger freebsd_committer freebsd_triage 2014-10-23 18:47:21 UTC
(In reply to Kurt Jaeger from comment #10)
> (In reply to lukas.slebodnik from comment #8)
> > This update of ding-libs port caused linking problems in sssd port.
> 
> Does it work if one adds iconv to USES of ding-libs ?

I tested it, a problem occurred on 91a and 84i, not on 10x, but it
seems to be related to fmemopen missing from libini_config.so, so
it's no longer the iconv issue ?

http://people.freebsd.org/~pi/logs/security__sssd-10x-1414089036.txt
http://people.freebsd.org/~pi/logs/security__sssd-84i-1414089036.txt
http://people.freebsd.org/~pi/logs/security__sssd-91a-1414089036.txt
Comment 12 Sebastian YEPES F. 2014-10-23 18:54:24 UTC
@lukas why dons you push the update to the sssd 1.11.7 we have worked on?
It work with this version.
Comment 13 lukas.slebodnik 2014-10-23 18:59:19 UTC
(In reply to Sebastian YEPES F. from comment #12)
> @lukas why dons you push the update to the sssd 1.11.7 we have worked on?
> It work with this version.

I am just port maintainer, I don't have rihts to push patch.
I tried to find someone on IRC and I found this problem.
Comment 14 lukas.slebodnik 2014-10-23 19:05:08 UTC
(In reply to Kurt Jaeger from comment #11)
> (In reply to Kurt Jaeger from comment #10)
> > (In reply to lukas.slebodnik from comment #8)
> > > This update of ding-libs port caused linking problems in sssd port.
> > 
> > Does it work if one adds iconv to USES of ding-libs ?
> 
> I tested it, a problem occurred on 91a and 84i, not on 10x, but it
> seems to be related to fmemopen missing from libini_config.so, so
> it's no longer the iconv issue ?
> 
> http://people.freebsd.org/~pi/logs/security__sssd-10x-1414089036.txt
> http://people.freebsd.org/~pi/logs/security__sssd-84i-1414089036.txt
> http://people.freebsd.org/~pi/logs/security__sssd-91a-1414089036.txt

libc seems to have function fmemopen ofn freebsd 9.3

root@freebsd:/usr/ports/security/sssd # nm --dynamic --defined-only /lib/libc.so.7 | grep fmem
0000000000044590 T fmemopen

root@freebsd:/usr/ports/security/sssd # nm --dynamic --defined-only /lib/libc.so.7 | grep fopen
00000000000efb80 T fopen

root@freebsd:/usr/ports/security/sssd # uname -a
FreeBSD freebsd 9.3-RELEASE-p2 FreeBSD 9.3-RELEASE-p2 #0: Mon Sep 15 16:44:27 UTC 2014     root@amd64-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC  amd64
Comment 15 Kurt Jaeger freebsd_committer freebsd_triage 2014-10-23 19:13:04 UTC
> > I tested it, a problem occurred on 91a and 84i, not on 10x, but it
> > seems to be related to fmemopen missing from libini_config.so, so

> libc seems to have function fmemopen in freebsd 9.3

It was added in 9.2. It's not available in 8.x. So, why is ding-libs
building it into libini_config.so ?
Comment 16 lukas.slebodnik 2014-10-23 19:18:34 UTC
(In reply to Kurt Jaeger from comment #15)
> > > I tested it, a problem occurred on 91a and 84i, not on 10x, but it
> > > seems to be related to fmemopen missing from libini_config.so, so
> 
> > libc seems to have function fmemopen in freebsd 9.3
> 
> It was added in 9.2. It's not available in 8.x. So, why is ding-libs
> building it into libini_config.so ?

ding-libs is collection of libraries:
libini_config.so, libdhash.sh, libbasicobjects.so, libcollection.so, libpath_utils.so, libref_array.

IIRC, ding-libs-0.4 added feature to read ini config from memory (fmemopen)
This is a reason why there is a problem.

On my local machine, I had just problem with iconv.

How will be problem solved on FreeBSD 8?
Comment 17 Kurt Jaeger freebsd_committer freebsd_triage 2014-10-23 19:18:55 UTC
(In reply to Kurt Jaeger from comment #15)
> > > I tested it, a problem occurred on 91a and 84i, not on 10x, but it
> > > seems to be related to fmemopen missing from libini_config.so, so
> 
> > libc seems to have function fmemopen in freebsd 9.3
> 
> It was added in 9.2. It's not available in 8.x. So, why is ding-libs
> building it into libini_config.so ?

1) It's an upstream bug that ding-libs does not detect if fmemopen
is missing. That "feature" is even in the 0.4 relnotes:

https://fedorahosted.org/sssd/wiki/Releases/DingNotes-0.4.0

as: Ability to read configuration data from a memory buffer

Can someone (the maintainer?) please report this upstream ?

2) The port should be BROKEN for < 9.2 because of this ?

Can someone provide a patch ?
Comment 18 Kurt Jaeger freebsd_committer freebsd_triage 2014-10-23 19:20:48 UTC
(In reply to lukas.slebodnik from comment #16)
> How will be problem solved on FreeBSD 8?

If upstream provides a fmemopen() implementation if the base system does
not have one ? Or someone provides a patch to fix it in the ports system ?
Otherwise it's broken.
Comment 19 lukas.slebodnik 2014-10-23 19:24:19 UTC
(In reply to Kurt Jaeger from comment #17)
> (In reply to Kurt Jaeger from comment #15)
> > > > I tested it, a problem occurred on 91a and 84i, not on 10x, but it
> > > > seems to be related to fmemopen missing from libini_config.so, so
> > 
> > > libc seems to have function fmemopen in freebsd 9.3
> > 
> > It was added in 9.2. It's not available in 8.x. So, why is ding-libs
> > building it into libini_config.so ?
> 
> 1) It's an upstream bug that ding-libs does not detect if fmemopen
> is missing. That "feature" is even in the 0.4 relnotes:
> 
> https://fedorahosted.org/sssd/wiki/Releases/DingNotes-0.4.0
> 
> as: Ability to read configuration data from a memory buffer
> 
> Can someone (the maintainer?) please report this upstream ?
> 
> 2) The port should be BROKEN for < 9.2 because of this ?
> 
> Can someone provide a patch ?
This feature is not optional in upstream, so someone will need to do it.
Is it possible to have old verions of ding-libs for FreeBSD 8?
For example 0.3 or previous one.
Comment 20 aweits 2014-10-24 12:56:39 UTC
Created attachment 148611 [details]
tentative fmemopen() fix for < 9.2

warning: highly untested! lukas can you test/exercise fmemopen()?
Comment 21 aweits 2014-10-27 17:43:16 UTC
lukas, test plz?
Comment 22 lukas.slebodnik 2014-10-27 19:33:41 UTC
(In reply to aweits from comment #21)
> lukas, test plz?

I'm sorry. I have limited access to the internet this week. (I am traveling)
I can only recommend you to run "make check" on old (and new) version of freebsd.
I will be able to test it with sssd on next Monday.
Comment 23 aweits 2014-10-28 16:14:39 UTC
Created attachment 148739 [details]
updated tentative fmemopen() fix for < 9.2 / incorporated libintl fix
Comment 24 lukas.slebodnik 2014-11-05 14:35:18 UTC
(In reply to aweits from comment #23)
> Created attachment 148739 [details]
> updated tentative fmemopen() fix for < 9.2 / incorporated libintl fix

This patch fixed problem. I tested ding-libs with a patch on freebsd 9.1 and freebsd 10. port sssd can be compiled without any problem.

This workaround patch can be removed in future after EoL of Freebsd 8 (June 30, 2015). FreeBSd <= 9.2 has EoL on  December 31, 2014
https://www.freebsd.org/security/
Comment 25 Ryan Steinmetz freebsd_committer freebsd_triage 2014-11-07 13:34:06 UTC
Maintainer patch committed.
Comment 26 commit-hook freebsd_committer freebsd_triage 2014-11-07 13:34:40 UTC
A commit references this bug:

Author: zi
Date: Fri Nov  7 13:33:40 UTC 2014
New revision: 372261
URL: https://svnweb.freebsd.org/changeset/ports/372261

Log:
  - Resolve build problems on systems without fmemopen()

  PR:		194116
  Submitted by:	aweits@rit.edu (maintainer)

Changes:
  head/devel/ding-libs/Makefile
  head/devel/ding-libs/files/
  head/devel/ding-libs/files/extra-patch-Makefile.am
  head/devel/ding-libs/files/extra-patch-ini__ini_fileobj.c
  head/devel/ding-libs/files/extra-patch-ini__libini_config.sym
  head/devel/ding-libs/files/flags.c
  head/devel/ding-libs/files/fmemopen.c
  head/devel/ding-libs/files/patch-ini__ini_parse_ut.c