Add pkg-config to USE_TOOLS.

Set PKG_CONFIG to empty as it removes reference to the build directory.

Add checks for the presence of SSLv3 in OpenSSL/LibreSSL - obtained from
http://www.libressl.org/patches.html

Fix typo in comment s/refrect/reference.

Reviewed by taca@ wiz@
This commit is contained in:
sevan 2015-10-14 18:33:08 +00:00
parent 7e2ec92cd3
commit e7ce450e6e
5 changed files with 56 additions and 38 deletions

View file

@ -1,4 +1,4 @@
# $NetBSD: Makefile,v 1.83 2015/02/16 14:03:32 taca Exp $
# $NetBSD: Makefile,v 1.84 2015/10/14 18:33:08 sevan Exp $
#
DISTNAME= ${RUBY_DISTNAME}
@ -31,7 +31,7 @@ CONFIGURE_ARGS+= --enable-shared \
WRKSRC= ${RUBY_WRKSRC}
#
# Don't refrect pkgsrc's INSTALL macro since Ruby expect it could
# Don't reference pkgsrc's INSTALL macro since Ruby expect it could
# execute by unprivileged user.
#
CONFIGURE_ENV+= INSTALL="${INSTALL} ${COPY}" \

View file

@ -1,4 +1,4 @@
$NetBSD: distinfo,v 1.61 2015/02/16 14:03:32 taca Exp $
$NetBSD: distinfo,v 1.62 2015/10/14 18:33:08 sevan Exp $
SHA1 (ruby-1.8.7-p374.tar.bz2) = cf82b6cbeed8e389705aa6b66c2a8141626705c3
RMD160 (ruby-1.8.7-p374.tar.bz2) = 314efaa961c80c9294202c6e40dec0e38865ed94
@ -17,7 +17,7 @@ SHA1 (patch-dl) = 0a5010f57e0f21170530fd4f940e66608c6d9630
SHA1 (patch-dn) = 3cd429fcd4f48ad0ab784058a4ac8672f6ae17db
SHA1 (patch-do) = d2b190074647a591106797922e2ec907f6b3efde
SHA1 (patch-dp) = ebdc27a84c24d3373769250bf4b7052058f89d9b
SHA1 (patch-dq) = 4cd59c9a965c70ed5ee50dc2e8cebe3bce094fbd
SHA1 (patch-dq) = 24f4f2785d939559e85e5a42638092eea935e324
SHA1 (patch-dr) = ed734e802f2d1cb59c2b49952d646849c9226d1e
SHA1 (patch-ds) = e60434cb299d070289a3c80765187e4058a65f99
SHA1 (patch-dt) = 59c09f6ea19cc02a1d8ca92a99eed7f8c30a5f10
@ -45,6 +45,7 @@ SHA1 (patch-et) = eba90415e5279c9eb8bea67635f5f8cab5d1e7ac
SHA1 (patch-eu) = dbf65258dcdc619d220ab39864389c4ec4c5c625
SHA1 (patch-ev) = 6178be681ca1cf2647cab9a61c8ef989ff5b23cb
SHA1 (patch-ew) = 3f23697dddbb11a10d1f0c3e47fb602822ecd11f
SHA1 (patch-ext_openssl_extconf.rb) = f6a5b4e989d7a8864cc49f68331613294cd6f95e
SHA1 (patch-ext_tk_lib_tkextlib_tktable_tktable.rb) = a903dfbc1a7361bc11b643fb78f1365b4236a195
SHA1 (patch-ga) = 73f50504baf74ee77d00dcfb5a9446bbaf122726
SHA1 (patch-gb) = 345ad3e5df6fd9febe7b398f091662fd7c300dc4

View file

@ -1,16 +1,17 @@
$NetBSD: patch-dq,v 1.2 2010/09/10 03:29:00 taca Exp $
$NetBSD: patch-dq,v 1.3 2015/10/14 18:33:08 sevan Exp $
* r18172: suppress warnings.
* r20494: (ossl_ssl_read_nonblock): OpenSSL::SSL::SSLSocket should implement
read_nonblock. a patch from Aaron Patterson in [ruby-core:20277].
fix: #814 [ruby-core:20241]
read_nonblock. a patch from Aaron Patterson in [ruby-core:20277].
fix: #814 [ruby-core:20241]
* r21772: Test for Server Name Indication support.
* r23008: revert incomplete read_nonblock implemenatation.
* r26835: backport fixes in 1.9.
* r26838: backport the commit from trunk.
* Constify (some cases are depends on OpenSSL's version).
* Only enable SSLv3 methods if library provides support.
--- ext/openssl/ossl_ssl.c.orig 2010-06-21 09:18:59.000000000 +0000
--- ext/openssl/ossl_ssl.c.orig Wed Feb 8 06:09:40 2012
+++ ext/openssl/ossl_ssl.c
@@ -26,6 +26,12 @@
# define TO_SOCKET(s) s
@ -25,7 +26,7 @@ $NetBSD: patch-dq,v 1.2 2010/09/10 03:29:00 taca Exp $
VALUE mSSL;
VALUE eSSLError;
VALUE cSSLContext;
@@ -69,6 +75,9 @@ static const char *ossl_sslctx_attrs[] =
@@ -69,6 +75,9 @@ static const char *ossl_sslctx_attrs[] = {
"verify_callback", "options", "cert_store", "extra_chain_cert",
"client_cert_cb", "tmp_dh_callback", "session_id_context",
"session_get_cb", "session_new_cb", "session_remove_cb",
@ -35,7 +36,7 @@ $NetBSD: patch-dq,v 1.2 2010/09/10 03:29:00 taca Exp $
};
#define ossl_ssl_get_io(o) rb_iv_get((o),"@io")
@@ -86,7 +95,12 @@ static const char *ossl_sslctx_attrs[] =
@@ -86,7 +95,12 @@ static const char *ossl_sslctx_attrs[] = {
#define ossl_ssl_set_tmp_dh(o,v) rb_iv_set((o),"@tmp_dh",(v))
static const char *ossl_ssl_attr_readers[] = { "io", "context", };
@ -58,7 +59,20 @@ $NetBSD: patch-dq,v 1.2 2010/09/10 03:29:00 taca Exp $
} ossl_ssl_method_tab[] = {
#define OSSL_SSL_METHOD_ENTRY(name) { #name, name##_method }
OSSL_SSL_METHOD_ENTRY(TLSv1),
@@ -144,7 +158,7 @@ ossl_sslctx_s_alloc(VALUE klass)
@@ -107,9 +121,12 @@ struct {
OSSL_SSL_METHOD_ENTRY(SSLv2_server),
OSSL_SSL_METHOD_ENTRY(SSLv2_client),
#endif
+#if defined(HAVE_SSLV3_METHOD) && defined(HAVE_SSLV3_SERVER_METHOD) && \
+ defined(HAVE_SSLV3_CLIENT_METHOD)
OSSL_SSL_METHOD_ENTRY(SSLv3),
OSSL_SSL_METHOD_ENTRY(SSLv3_server),
OSSL_SSL_METHOD_ENTRY(SSLv3_client),
+#endif
OSSL_SSL_METHOD_ENTRY(SSLv23),
OSSL_SSL_METHOD_ENTRY(SSLv23_server),
OSSL_SSL_METHOD_ENTRY(SSLv23_client),
@@ -146,7 +163,7 @@ ossl_sslctx_s_alloc(VALUE klass)
static VALUE
ossl_sslctx_set_ssl_version(VALUE self, VALUE ssl_method)
{
@ -67,7 +81,7 @@ $NetBSD: patch-dq,v 1.2 2010/09/10 03:29:00 taca Exp $
const char *s;
int i;
@@ -297,7 +311,7 @@ ossl_ssl_verify_callback(int preverify_o
@@ -299,7 +316,7 @@ ossl_ssl_verify_callback(int preverify_ok, X509_STORE_
static VALUE
ossl_call_session_get_cb(VALUE ary)
{
@ -76,7 +90,7 @@ $NetBSD: patch-dq,v 1.2 2010/09/10 03:29:00 taca Exp $
Check_Type(ary, T_ARRAY);
ssl_obj = rb_ary_entry(ary, 0);
@@ -325,7 +339,7 @@ ossl_sslctx_session_get_cb(SSL *ssl, uns
@@ -327,7 +344,7 @@ ossl_sslctx_session_get_cb(SSL *ssl, unsigned char *bu
ssl_obj = (VALUE)ptr;
ary = rb_ary_new2(2);
rb_ary_push(ary, ssl_obj);
@ -85,7 +99,7 @@ $NetBSD: patch-dq,v 1.2 2010/09/10 03:29:00 taca Exp $
ret_obj = rb_protect((VALUE(*)_((VALUE)))ossl_call_session_get_cb, ary, &state);
if (state) {
@@ -344,7 +358,7 @@ ossl_sslctx_session_get_cb(SSL *ssl, uns
@@ -346,7 +363,7 @@ ossl_sslctx_session_get_cb(SSL *ssl, unsigned char *bu
static VALUE
ossl_call_session_new_cb(VALUE ary)
{
@ -94,7 +108,7 @@ $NetBSD: patch-dq,v 1.2 2010/09/10 03:29:00 taca Exp $
Check_Type(ary, T_ARRAY);
ssl_obj = rb_ary_entry(ary, 0);
@@ -387,10 +401,11 @@ ossl_sslctx_session_new_cb(SSL *ssl, SSL
@@ -389,10 +406,11 @@ ossl_sslctx_session_new_cb(SSL *ssl, SSL_SESSION *sess
return RTEST(ret_obj) ? 1 : 0;
}
@ -107,7 +121,7 @@ $NetBSD: patch-dq,v 1.2 2010/09/10 03:29:00 taca Exp $
Check_Type(ary, T_ARRAY);
sslctx_obj = rb_ary_entry(ary, 0);
@@ -400,6 +415,7 @@ ossl_call_session_remove_cb(VALUE ary)
@@ -402,6 +420,7 @@ ossl_call_session_remove_cb(VALUE ary)
return rb_funcall(cb, rb_intern("call"), 1, ary);
}
@ -115,7 +129,7 @@ $NetBSD: patch-dq,v 1.2 2010/09/10 03:29:00 taca Exp $
static void
ossl_sslctx_session_remove_cb(SSL_CTX *ctx, SSL_SESSION *sess)
@@ -446,6 +462,66 @@ ossl_sslctx_add_extra_chain_cert_i(VALUE
@@ -448,6 +467,66 @@ ossl_sslctx_add_extra_chain_cert_i(VALUE i, VALUE arg)
return i;
}
@ -182,7 +196,7 @@ $NetBSD: patch-dq,v 1.2 2010/09/10 03:29:00 taca Exp $
/*
* call-seq:
* ctx.setup => Qtrue # first time
@@ -563,7 +639,7 @@ ossl_sslctx_setup(VALUE self)
@@ -569,7 +648,7 @@ ossl_sslctx_setup(VALUE self)
val = ossl_sslctx_get_sess_id_ctx(self);
if (!NIL_P(val)){
StringValue(val);
@ -191,7 +205,7 @@ $NetBSD: patch-dq,v 1.2 2010/09/10 03:29:00 taca Exp $
RSTRING_LEN(val))){
ossl_raise(eSSLError, "SSL_CTX_set_session_id_context:");
}
@@ -581,11 +657,20 @@ ossl_sslctx_setup(VALUE self)
@@ -587,11 +666,20 @@ ossl_sslctx_setup(VALUE self)
SSL_CTX_sess_set_remove_cb(ctx, ossl_sslctx_session_remove_cb);
OSSL_Debug("SSL SESSION remove callback added");
}
@ -213,7 +227,7 @@ $NetBSD: patch-dq,v 1.2 2010/09/10 03:29:00 taca Exp $
{
VALUE ary;
int bits, alg_bits;
@@ -609,7 +694,7 @@ ossl_sslctx_get_ciphers(VALUE self)
@@ -615,7 +703,7 @@ ossl_sslctx_get_ciphers(VALUE self)
{
SSL_CTX *ctx;
STACK_OF(SSL_CIPHER) *ciphers;
@ -222,7 +236,7 @@ $NetBSD: patch-dq,v 1.2 2010/09/10 03:29:00 taca Exp $
VALUE ary;
int i, num;
@@ -623,10 +708,10 @@ ossl_sslctx_get_ciphers(VALUE self)
@@ -629,10 +717,10 @@ ossl_sslctx_get_ciphers(VALUE self)
if (!ciphers)
return rb_ary_new();
@ -235,7 +249,7 @@ $NetBSD: patch-dq,v 1.2 2010/09/10 03:29:00 taca Exp $
rb_ary_push(ary, ossl_ssl_cipher_to_ary(cipher));
}
return ary;
@@ -815,7 +900,6 @@ ossl_sslctx_flush_sessions(int argc, VAL
@@ -821,7 +909,6 @@ ossl_sslctx_flush_sessions(int argc, VALUE *argv, VALU
VALUE arg1;
SSL_CTX *ctx;
time_t tm = 0;
@ -243,7 +257,7 @@ $NetBSD: patch-dq,v 1.2 2010/09/10 03:29:00 taca Exp $
rb_scan_args(argc, argv, "01", &arg1);
@@ -889,6 +973,8 @@ ossl_ssl_initialize(int argc, VALUE *arg
@@ -895,6 +982,8 @@ ossl_ssl_initialize(int argc, VALUE *argv, VALUE self)
ossl_sslctx_setup(ctx);
rb_call_super(0, 0);
@ -252,7 +266,7 @@ $NetBSD: patch-dq,v 1.2 2010/09/10 03:29:00 taca Exp $
return self;
}
@@ -902,6 +988,10 @@ ossl_ssl_setup(VALUE self)
@@ -908,6 +997,10 @@ ossl_ssl_setup(VALUE self)
Data_Get_Struct(self, SSL, ssl);
if(!ssl){
@ -263,7 +277,7 @@ $NetBSD: patch-dq,v 1.2 2010/09/10 03:29:00 taca Exp $
v_ctx = ossl_ssl_get_ctx(self);
Data_Get_Struct(v_ctx, SSL_CTX, ctx);
@@ -911,6 +1001,12 @@ ossl_ssl_setup(VALUE self)
@@ -917,6 +1010,12 @@ ossl_ssl_setup(VALUE self)
}
DATA_PTR(self) = ssl;
@ -276,7 +290,7 @@ $NetBSD: patch-dq,v 1.2 2010/09/10 03:29:00 taca Exp $
io = ossl_ssl_get_io(self);
GetOpenFile(io, fptr);
rb_io_check_readable(fptr);
@@ -947,7 +1043,15 @@ ossl_start_ssl(VALUE self, int (*func)()
@@ -953,7 +1052,15 @@ ossl_start_ssl(VALUE self, int (*func)(), const char *
Data_Get_Struct(self, SSL, ssl);
GetOpenFile(ossl_ssl_get_io(self), fptr);
for(;;){
@ -293,7 +307,7 @@ $NetBSD: patch-dq,v 1.2 2010/09/10 03:29:00 taca Exp $
switch((ret2 = ssl_get_error(ssl, ret))){
case SSL_ERROR_WANT_WRITE:
rb_io_wait_writable(FPTR_TO_FD(fptr));
@@ -963,10 +1067,6 @@ ossl_start_ssl(VALUE self, int (*func)()
@@ -969,10 +1076,6 @@ ossl_start_ssl(VALUE self, int (*func)(), const char *
}
}
@ -304,7 +318,7 @@ $NetBSD: patch-dq,v 1.2 2010/09/10 03:29:00 taca Exp $
return self;
}
@@ -1004,6 +1104,72 @@ ossl_ssl_accept(VALUE self)
@@ -1010,6 +1113,72 @@ ossl_ssl_accept(VALUE self)
static VALUE
ossl_ssl_read(int argc, VALUE *argv, VALUE self)
{
@ -377,7 +391,7 @@ $NetBSD: patch-dq,v 1.2 2010/09/10 03:29:00 taca Exp $
SSL *ssl;
int ilen, nread = 0;
VALUE len, str;
@@ -1021,12 +1187,11 @@ ossl_ssl_read(int argc, VALUE *argv, VAL
@@ -1027,12 +1196,11 @@ ossl_ssl_read(int argc, VALUE *argv, VALUE self)
Data_Get_Struct(self, SSL, ssl);
GetOpenFile(ossl_ssl_get_io(self), fptr);
@ -392,7 +406,7 @@ $NetBSD: patch-dq,v 1.2 2010/09/10 03:29:00 taca Exp $
case SSL_ERROR_NONE:
goto end;
case SSL_ERROR_ZERO_RETURN:
@@ -1035,7 +1200,7 @@ ossl_ssl_read(int argc, VALUE *argv, VAL
@@ -1041,7 +1209,7 @@ ossl_ssl_read(int argc, VALUE *argv, VALUE self)
rb_io_wait_writable(FPTR_TO_FD(fptr));
continue;
case SSL_ERROR_WANT_READ:
@ -401,7 +415,7 @@ $NetBSD: patch-dq,v 1.2 2010/09/10 03:29:00 taca Exp $
continue;
case SSL_ERROR_SYSCALL:
if(ERR_peek_error() == 0 && nread == 0) rb_eof_error();
@@ -1046,9 +1211,8 @@ ossl_ssl_read(int argc, VALUE *argv, VAL
@@ -1052,9 +1220,8 @@ ossl_ssl_read(int argc, VALUE *argv, VALUE self)
}
}
else {
@ -412,7 +426,7 @@ $NetBSD: patch-dq,v 1.2 2010/09/10 03:29:00 taca Exp $
}
end:
@@ -1221,7 +1385,7 @@ ossl_ssl_get_cipher(VALUE self)
@@ -1227,7 +1394,7 @@ ossl_ssl_get_cipher(VALUE self)
rb_warning("SSL session is not started yet.");
return Qnil;
}
@ -421,7 +435,7 @@ $NetBSD: patch-dq,v 1.2 2010/09/10 03:29:00 taca Exp $
return ossl_ssl_cipher_to_ary(cipher);
}
@@ -1344,13 +1508,13 @@ Init_ossl_ssl()
@@ -1350,13 +1517,13 @@ Init_ossl_ssl()
ID_callback_state = rb_intern("@callback_state");

View file

@ -1,4 +1,4 @@
# $NetBSD: Makefile,v 1.50 2015/04/30 03:25:56 taca Exp $
# $NetBSD: Makefile,v 1.51 2015/10/14 18:33:53 sevan Exp $
#
DISTNAME= ${RUBY_DISTNAME}
@ -16,7 +16,7 @@ RUBY_VERSION_SUPPORTED= 193
USE_GCC_RUNTIME= yes
USE_LANGUAGES= c
USE_TOOLS+= pax yacc
USE_TOOLS+= pax yacc pkg-config
GNU_CONFIGURE= yes
TEST_TARGET= test
CONFIGURE_ARGS+= --enable-shared
@ -29,12 +29,14 @@ MAKE_JOBS_SAFE= no
MAKE_DIRS= ${RUBY_SITEARCHLIB} ${RUBY_VENDORARCHLIB}
#
# Don't refrect pkgsrc's INSTALL macro since Ruby expect it could
# Don't reference pkgsrc's INSTALL macro since Ruby expect it could
# execute by unprivileged user.
#
CONFIGURE_ENV+= INSTALL="${INSTALL} ${COPY}" \
INSTALL_DATA= INSTALL_PROGRAM= INSTALL_SCRIPT=
CONFIGURE_ENV+= ac_cv_prog_PKG_CONFIG=""
.include "../../mk/compiler.mk"
.if !empty(PKGSRC_COMPILER:Msunpro)
@ -47,7 +49,6 @@ LIBS.SunOS+= -lm
.if ${OPSYS} == "SunOS"
CONFIGURE_ENV+= OBJCOPY=:
CONFIGURE_ENV+= ac_cv_prog_PKG_CONFIG=""
.endif
.if ${OPSYS} == "MirBSD"

View file

@ -1,4 +1,4 @@
$NetBSD: distinfo,v 1.44 2015/04/30 03:25:56 taca Exp $
$NetBSD: distinfo,v 1.45 2015/10/14 18:33:53 sevan Exp $
SHA1 (ruby-1.9.3-p551.tar.bz2) = 35600f4e2ac98653fa8a634104cb6ab3d47a1535
RMD160 (ruby-1.9.3-p551.tar.bz2) = 59cfcaf4e02957f53bf83557962b0d428156bc01
@ -8,6 +8,8 @@ SHA1 (patch-configure.in) = 09dfe819b6a9bd7c9af704eeaef659857d33d0c3
SHA1 (patch-defs_default__gems) = fb24111736f1a76a05e853aa068024dbdd24e5a5
SHA1 (patch-ext_dbm_extconf.rb) = cc16af8f4999ef6c54c9652e2748504c31e5ef4e
SHA1 (patch-ext_dl_extconf.rb) = aed210606893d2b9c463d794df039f06003848e4
SHA1 (patch-ext_openssl_extconf.rb) = 5f64e97f1a563db4daa371d52bb6dbfb54c1f01c
SHA1 (patch-ext_openssl_ossl_ssl.c) = a2fd301c45b2677c8c7293222f6f797eff7ac7db
SHA1 (patch-ext_tk_extconf.rb) = 7cda490107ce8d23644152feeade8a8cf21d9898
SHA1 (patch-ext_tk_lib_tk.rb) = 78034ed6fa0f24099ce06a717da2423731b276cb
SHA1 (patch-ext_tk_lib_tk_autoload.rb) = e8bcb93feae90fd46531a412f6c963a6d5d2c132