Bug 177883 - patch for net/rubygem-net-ldap to correctly work with ruby19
Summary: patch for net/rubygem-net-ldap to correctly work with ruby19
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: Steve Wills
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-04-16 08:50 UTC by rainer
Modified: 2013-05-27 20:00 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description rainer 2013-04-16 08:50:00 UTC
We have a script that scrapes an LDAP-directory to build a list of users and domains for a postfix-configuration.
This script uses rubygem-net-ldap.
After upgrading to ruby19, the script did no longer work.

We found that this patch solved the problem:

https://github.com/ruby-ldap/ruby-net-ldap/pull/41/files

Fix: 

see
https://github.com/ruby-ldap/ruby-net-ldap/pull/41/files
Comment 1 Edwin Groothuis freebsd_committer freebsd_triage 2013-04-16 15:47:16 UTC
Responsible Changed
From-To: freebsd-ports-bugs->ruby

Over to maintainer (via the GNATS Auto Assign Tool)
Comment 2 Steve Wills freebsd_committer freebsd_triage 2013-05-27 19:53:25 UTC
Responsible Changed
From-To: ruby->swills

I'll take it.
Comment 3 dfilter service freebsd_committer freebsd_triage 2013-05-27 19:53:25 UTC
Author: swills
Date: Mon May 27 18:53:17 2013
New Revision: 319278
URL: http://svnweb.freebsd.org/changeset/ports/319278

Log:
  - Add patch to work correctly with ruby19
  
  PR:		ports/177883
  Submitted by:	Rainer Duffner <rainer@ultra-secure.de>
  Obtained from:	https://github.com/ruby-ldap/ruby-net-ldap/pull/41/files (upstream)

Added:
  head/net/rubygem-net-ldap/files/
  head/net/rubygem-net-ldap/files/patch-ruby19   (contents, props changed)
Modified:
  head/net/rubygem-net-ldap/Makefile   (contents, props changed)

Modified: head/net/rubygem-net-ldap/Makefile
==============================================================================
--- head/net/rubygem-net-ldap/Makefile	Mon May 27 17:49:44 2013	(r319277)
+++ head/net/rubygem-net-ldap/Makefile	Mon May 27 18:53:17 2013	(r319278)
@@ -1,12 +1,9 @@
-# New ports collection makefile for:	rubygem-net-ldap
-# Date created:		2010-05-13
-# Whom:			Jyun-Yan You <jyyou@cs.nctu.edu.tw>
-#
+# Whom: Jyun-Yan You <jyyou@cs.nctu.edu.tw>
 # $FreeBSD$
-#
 
 PORTNAME=	net-ldap
 PORTVERSION=	0.3.1
+PORTREVISION=	1
 CATEGORIES=	net rubygems
 MASTER_SITES=	RG
 

Added: head/net/rubygem-net-ldap/files/patch-ruby19
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/net/rubygem-net-ldap/files/patch-ruby19	Mon May 27 18:53:17 2013	(r319278)
@@ -0,0 +1,15 @@
+--- lib/net/ber/core_ext/string.rb
++++ lib/net/ber/core_ext/string.rb
+@@ -20,7 +20,11 @@ def raw_utf8_encoded
+     if self.respond_to?(:encode)
+       # Strings should be UTF-8 encoded according to LDAP.
+       # However, the BER code is not necessarily valid UTF-8
+-      self.encode('UTF-8').force_encoding('ASCII-8BIT')
++      begin
++        self.encode('UTF-8').force_encoding('ASCII-8BIT')
++      rescue Encoding::UndefinedConversionError
++        self
++      end
+     else
+       self
+     end
_______________________________________________
svn-ports-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-ports-all
To unsubscribe, send any mail to "svn-ports-all-unsubscribe@freebsd.org"
Comment 4 Steve Wills freebsd_committer freebsd_triage 2013-05-27 19:53:35 UTC
State Changed
From-To: open->closed

Committed. Thanks!