Thursday, July 07, 2022

Patch databases/ruby-ldap to avoid deprecation warnings

This patches ruby-ldap to apply an upstream pull request to avoid
deprecation warnings. It also applies a local patch to allow
building on Ruby 3.2+. Other than removing the deprecation
warnings, this should have no effect.

Tested on amd64. Will be commiting in a couple days unless I hear
objections.

Thanks,
Jeremy

Index: Makefile
===================================================================
RCS file: /cvs/ports/databases/ruby-ldap/Makefile,v
retrieving revision 1.40
diff -u -p -r1.40 Makefile
--- Makefile 14 May 2022 15:35:07 -0000 1.40
+++ Makefile 7 Jul 2022 22:13:22 -0000
@@ -1,11 +1,15 @@
COMMENT= Ruby interface to some common LDAP libraries

PKGNAME= ldap-0.9.20
-REVISION= 0
+REVISION= 1
DISTNAME= ruby-${PKGNAME}
CATEGORIES= databases

-HOMEPAGE= https://github.com/alexey-chebotar/ruby-ldap
+MASTER_SITES0= https://github.com/bearded/ruby-ldap/commit/
+PATCHFILES= ruby-ldap-taint-fix{72a4a89b28a99560b018b78069b29632f362a7d0}.patch:0
+PATCH_DIST_STRIP= -p1
+
+HOMEPAGE= https://github.com/bearded/ruby-ldap

MAINTAINER= Jeremy Evans <jeremy@openbsd.org>

Index: distinfo
===================================================================
RCS file: /cvs/ports/databases/ruby-ldap/distinfo,v
retrieving revision 1.8
diff -u -p -r1.8 distinfo
--- distinfo 12 Nov 2019 06:40:03 -0000 1.8
+++ distinfo 7 Jul 2022 22:13:24 -0000
@@ -1,2 +1,4 @@
SHA256 (ruby-ldap-0.9.20.gem) = LUj2d36gzWSYSnOtAjiyeGn4Ni4BmPIVSHByVOzTMqM=
+SHA256 (ruby-ldap-taint-fix.patch) = os0NA2gy8ey9rmNu9+gAIic5XTa8MUbUXiE1XcVo1mA=
SIZE (ruby-ldap-0.9.20.gem) = 67072
+SIZE (ruby-ldap-taint-fix.patch) = 757
Index: patches/patch-conn_c
===================================================================
RCS file: patches/patch-conn_c
diff -N patches/patch-conn_c
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ patches/patch-conn_c 7 Jul 2022 22:18:35 -0000
@@ -0,0 +1,15 @@
+Avoid deprecation message in Ruby 3.1, allow building with Ruby 3.2.
+
+Index: conn.c
+--- conn.c.orig
++++ conn.c
+@@ -1855,7 +1855,8 @@ Init_ldap_conn ()
+ {
+ rb_ldap_sort_obj = Qnil;
+
+- rb_cLDAP_Conn = rb_define_class_under (rb_mLDAP, "Conn", rb_cData);
++ rb_cLDAP_Conn = rb_define_class_under (rb_mLDAP, "Conn", rb_cObject);
++ rb_undef_alloc_func(rb_cLDAP_Conn);
+ rb_define_attr (rb_cLDAP_Conn, "referrals", 1, 0);
+ rb_define_attr (rb_cLDAP_Conn, "controls", 1, 0);
+ rb_define_attr (rb_cLDAP_Conn, "sasl_quiet", 1, 1);

No comments:

Post a Comment