pkgsrc-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: pkgsrc/databases/ruby-ldap



Module Name:    pkgsrc
Committed By:   taca
Date:           Mon Jan 30 13:53:50 UTC 2023

Modified Files:
        pkgsrc/databases/ruby-ldap: Makefile distinfo
Added Files:
        pkgsrc/databases/ruby-ldap/patches: patch-conn.c

Log Message:
databases/ruby-ldap: allow build with Ruby 3.2

* Stop using tainted Ruby strings.
* Stop using rb_cData for Ruby 3.2.

Bump PKGREVISION.


To generate a diff of this commit:
cvs rdiff -u -r1.25 -r1.26 pkgsrc/databases/ruby-ldap/Makefile
cvs rdiff -u -r1.11 -r1.12 pkgsrc/databases/ruby-ldap/distinfo
cvs rdiff -u -r0 -r1.1 pkgsrc/databases/ruby-ldap/patches/patch-conn.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/databases/ruby-ldap/Makefile
diff -u pkgsrc/databases/ruby-ldap/Makefile:1.25 pkgsrc/databases/ruby-ldap/Makefile:1.26
--- pkgsrc/databases/ruby-ldap/Makefile:1.25    Wed Jan 25 11:07:40 2023
+++ pkgsrc/databases/ruby-ldap/Makefile Mon Jan 30 13:53:50 2023
@@ -1,7 +1,8 @@
-# $NetBSD: Makefile,v 1.25 2023/01/25 11:07:40 taca Exp $
+# $NetBSD: Makefile,v 1.26 2023/01/30 13:53:50 taca Exp $
 
 DISTNAME=      ruby-ldap-0.9.20
 PKGNAME=       ${DISTNAME:S/^ruby-/${RUBY_PKGPREFIX}-/}
+PKGREVISION=   1
 CATEGORIES=    databases
 
 MAINTAINER=    pkgsrc-users%NetBSD.org@localhost
@@ -9,9 +10,6 @@ HOMEPAGE=      https://github.com/alexey-cheb
 COMMENT=       LDAP extension module for Ruby
 LICENSE=       modified-bsd
 
-# dose not support ruby32
-RUBY_VERSIONS_ACCEPTED=        27 30 31
-
 CONFIGURE_ARGS+=       --with-openldap2
 CONFIGURE_ARGS+=       --with-ldap-dir=${BUILDLINK_PREFIX.openldap-client}
 

Index: pkgsrc/databases/ruby-ldap/distinfo
diff -u pkgsrc/databases/ruby-ldap/distinfo:1.11 pkgsrc/databases/ruby-ldap/distinfo:1.12
--- pkgsrc/databases/ruby-ldap/distinfo:1.11    Tue Oct 26 10:10:02 2021
+++ pkgsrc/databases/ruby-ldap/distinfo Mon Jan 30 13:53:50 2023
@@ -1,5 +1,6 @@
-$NetBSD: distinfo,v 1.11 2021/10/26 10:10:02 nia Exp $
+$NetBSD: distinfo,v 1.12 2023/01/30 13:53:50 taca Exp $
 
 BLAKE2s (ruby-ldap-0.9.20.gem) = c87fd4a4be50189df2defbcfe8ca837b4e14414aaa6cc7e531fe0d9f2af6d91b
 SHA512 (ruby-ldap-0.9.20.gem) = 4f4902e7eaf4fe0cd421d58c73ce4e625d61ee20ef02363d3cf5754c66237e0f378ac433b234c2b86d5f5284ae03b7ae6c46d3575c512487bc1a931d021c9517
 Size (ruby-ldap-0.9.20.gem) = 67072 bytes
+SHA1 (patch-conn.c) = 352cd212a546b8bc4b56727bd7256c2029f0123b

Added files:

Index: pkgsrc/databases/ruby-ldap/patches/patch-conn.c
diff -u /dev/null pkgsrc/databases/ruby-ldap/patches/patch-conn.c:1.1
--- /dev/null   Mon Jan 30 13:53:50 2023
+++ pkgsrc/databases/ruby-ldap/patches/patch-conn.c     Mon Jan 30 13:53:50 2023
@@ -0,0 +1,53 @@
+$NetBSD: patch-conn.c,v 1.1 2023/01/30 13:53:50 taca Exp $
+
+* Stop using tainted Ruby strings.
+* Stop using rb_cData for Ruby 3.2.
+
+--- conn.c.orig        2023-01-30 13:49:20.297087468 +0000
++++ conn.c
+@@ -688,7 +688,7 @@ rb_ldap_conn_get_option (VALUE self, VAL
+ #endif
+ #endif
+         val = (data
+-               && *data) ? rb_tainted_str_new2 ((char *) (*data)) : Qnil;
++               && *data) ? rb_str_new2 ((char *) (*data)) : Qnil;
+         break;
+ #ifdef LDAP_OPT_API_INFO
+       case LDAP_OPT_API_INFO:
+@@ -781,7 +781,7 @@ rb_ldap_conn_err2string (VALUE self, VAL
+ 
+   GET_LDAP_DATA (self, ldapdata);
+   str = ldap_err2string (c_err);
+-  return (str ? rb_tainted_str_new2 (str) : Qnil);
++  return (str ? rb_str_new2 (str) : Qnil);
+ };
+ 
+ VALUE
+@@ -826,14 +826,14 @@ rb_ldap_internal_strcmp (const char *lef
+ 
+   if (rb_ldap_sort_obj == Qtrue)
+     {
+-      res = rb_funcall (rb_tainted_str_new2 (left), rb_intern ("<=>"), 1,
+-                      rb_tainted_str_new2 (right));
++      res = rb_funcall (rb_str_new2 (left), rb_intern ("<=>"), 1,
++                      rb_str_new2 (right));
+     }
+   else if (rb_ldap_sort_obj != Qnil)
+     {
+       res = rb_funcall (rb_ldap_sort_obj, rb_intern ("call"), 2,
+-                      rb_tainted_str_new2 (left),
+-                      rb_tainted_str_new2 (right));
++                      rb_str_new2 (left),
++                      rb_str_new2 (right));
+     }
+   else
+     {
+@@ -1855,7 +1855,7 @@ 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_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);



Home | Main Index | Thread Index | Old Index