tiny_tds 2.1.4-x86-mingw32 → 2.1.6-x86-mingw32
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.circleci/config.yml +407 -0
- data/.gitignore +2 -0
- data/CHANGELOG.md +12 -2
- data/Gemfile +0 -7
- data/README.md +2 -4
- data/Rakefile +19 -10
- data/VERSION +1 -1
- data/docker-compose.yml +19 -7
- data/ext/tiny_tds/client.c +6 -3
- data/ext/tiny_tds/extconf.rb +21 -2
- data/ext/tiny_tds/extconsts.rb +1 -1
- data/ext/tiny_tds/result.c +5 -2
- data/lib/tiny_tds/2.4/tiny_tds.so +0 -0
- data/lib/tiny_tds/2.5/tiny_tds.so +0 -0
- data/lib/tiny_tds/2.6/tiny_tds.so +0 -0
- data/lib/tiny_tds/2.7/tiny_tds.so +0 -0
- data/lib/tiny_tds/3.0/tiny_tds.so +0 -0
- data/lib/tiny_tds/gem.rb +1 -6
- data/ports/x86-mingw32/freetds/1.1.24/bin/bsqldb.exe +0 -0
- data/ports/x86-mingw32/freetds/1.1.24/bin/datacopy.exe +0 -0
- data/ports/x86-mingw32/freetds/1.1.24/bin/defncopy.exe +0 -0
- data/ports/x86-mingw32/freetds/1.1.24/bin/freebcp.exe +0 -0
- data/ports/x86-mingw32/freetds/1.1.24/bin/libct-4.dll +0 -0
- data/ports/x86-mingw32/freetds/1.1.24/bin/libsybdb-5.dll +0 -0
- data/ports/x86-mingw32/freetds/1.1.24/bin/tdspool.exe +0 -0
- data/ports/x86-mingw32/freetds/1.1.24/bin/tsql.exe +0 -0
- data/ports/{i686-w64-mingw32 → x86-mingw32}/freetds/1.1.24/lib/libct.dll.a +0 -0
- data/ports/{i686-w64-mingw32 → x86-mingw32}/freetds/1.1.24/lib/libct.la +2 -2
- data/ports/{i686-w64-mingw32 → x86-mingw32}/freetds/1.1.24/lib/libsybdb.dll.a +0 -0
- data/ports/{i686-w64-mingw32 → x86-mingw32}/freetds/1.1.24/lib/libsybdb.la +2 -2
- data/ports/x86-mingw32/libiconv/1.15/bin/iconv.exe +0 -0
- data/ports/x86-mingw32/libiconv/1.15/bin/libcharset-1.dll +0 -0
- data/ports/{i686-w64-mingw32 → x86-mingw32}/libiconv/1.15/bin/libiconv-2.dll +0 -0
- data/ports/{i686-w64-mingw32 → x86-mingw32}/libiconv/1.15/lib/libcharset.dll.a +0 -0
- data/ports/{i686-w64-mingw32 → x86-mingw32}/libiconv/1.15/lib/libcharset.la +2 -2
- data/ports/{i686-w64-mingw32 → x86-mingw32}/libiconv/1.15/lib/libiconv.dll.a +0 -0
- data/ports/{i686-w64-mingw32 → x86-mingw32}/libiconv/1.15/lib/libiconv.la +2 -2
- data/ports/x86-mingw32/openssl/1.1.1s/bin/c_rehash +251 -0
- data/ports/x86-mingw32/openssl/1.1.1s/bin/libcrypto-1_1.dll +0 -0
- data/ports/x86-mingw32/openssl/1.1.1s/bin/libssl-1_1.dll +0 -0
- data/ports/x86-mingw32/openssl/1.1.1s/bin/openssl.exe +0 -0
- data/ports/x86-mingw32/openssl/1.1.1s/lib/libcrypto.a +0 -0
- data/ports/{i686-w64-mingw32/openssl/1.1.1d → x86-mingw32/openssl/1.1.1s}/lib/libcrypto.dll.a +0 -0
- data/ports/x86-mingw32/openssl/1.1.1s/lib/libssl.a +0 -0
- data/ports/{i686-w64-mingw32/openssl/1.1.1d → x86-mingw32/openssl/1.1.1s}/lib/libssl.dll.a +0 -0
- data/setup_cimgruby_dev.sh +25 -0
- data/start_dev.sh +21 -0
- data/tasks/native_gem.rake +15 -6
- data/tasks/ports/libiconv.rb +0 -17
- data/tasks/ports/recipe.rb +16 -4
- data/tasks/ports.rake +58 -35
- data/test/bin/install-mssql.ps1 +31 -0
- data/test/bin/install-mssqltools.sh +9 -0
- data/test/bin/setup_tinytds_db.sh +7 -0
- data/test/bin/setup_volume_permissions.sh +10 -0
- data/test/client_test.rb +22 -4
- data/test/gem_test.rb +11 -13
- data/test/sql/db-create.sql +18 -0
- data/test/sql/db-login.sql +38 -0
- data/test/test_helper.rb +16 -7
- data/tiny_tds.gemspec +7 -6
- metadata +69 -50
- data/.travis.yml +0 -25
- data/appveyor.yml +0 -72
- data/ports/i686-w64-mingw32/freetds/1.1.24/bin/bsqldb.exe +0 -0
- data/ports/i686-w64-mingw32/freetds/1.1.24/bin/datacopy.exe +0 -0
- data/ports/i686-w64-mingw32/freetds/1.1.24/bin/defncopy.exe +0 -0
- data/ports/i686-w64-mingw32/freetds/1.1.24/bin/freebcp.exe +0 -0
- data/ports/i686-w64-mingw32/freetds/1.1.24/bin/libct-4.dll +0 -0
- data/ports/i686-w64-mingw32/freetds/1.1.24/bin/libsybdb-5.dll +0 -0
- data/ports/i686-w64-mingw32/freetds/1.1.24/bin/tdspool.exe +0 -0
- data/ports/i686-w64-mingw32/freetds/1.1.24/bin/tsql.exe +0 -0
- data/ports/i686-w64-mingw32/libiconv/1.15/bin/iconv.exe +0 -0
- data/ports/i686-w64-mingw32/libiconv/1.15/bin/libcharset-1.dll +0 -0
- data/ports/i686-w64-mingw32/openssl/1.1.1d/bin/c_rehash +0 -232
- data/ports/i686-w64-mingw32/openssl/1.1.1d/bin/libcrypto-1_1.dll +0 -0
- data/ports/i686-w64-mingw32/openssl/1.1.1d/bin/libssl-1_1.dll +0 -0
- data/ports/i686-w64-mingw32/openssl/1.1.1d/bin/openssl.exe +0 -0
- data/ports/i686-w64-mingw32/openssl/1.1.1d/lib/libcrypto.a +0 -0
- data/ports/i686-w64-mingw32/openssl/1.1.1d/lib/libssl.a +0 -0
- data/test/appveyor/dbsetup.ps1 +0 -27
- data/test/appveyor/dbsetup.sql +0 -9
- data/test/bin/setup.sh +0 -19
- /data/ports/{i686-w64-mingw32 → x86-mingw32}/freetds/1.1.24/bin/osql +0 -0
- /data/ports/{i686-w64-mingw32 → x86-mingw32}/libiconv/1.15/lib/charset.alias +0 -0
data/ext/tiny_tds/result.c
CHANGED
@@ -99,12 +99,14 @@ static void nogvl_cleanup(DBPROCESS *client) {
|
|
99
99
|
Now that the blocking operation is done, we can finally throw any
|
100
100
|
exceptions based on errors from SQL Server.
|
101
101
|
*/
|
102
|
-
|
102
|
+
short int i;
|
103
|
+
for (i = 0; i < userdata->nonblocking_errors_length; i++) {
|
103
104
|
tinytds_errordata error = userdata->nonblocking_errors[i];
|
104
105
|
|
105
106
|
// lookahead to drain any info messages ahead of raising error
|
106
107
|
if (!error.is_message) {
|
107
|
-
|
108
|
+
short int j;
|
109
|
+
for (j = i; j < userdata->nonblocking_errors_length; j++) {
|
108
110
|
tinytds_errordata msg_error = userdata->nonblocking_errors[j];
|
109
111
|
if (msg_error.is_message) {
|
110
112
|
rb_tinytds_raise_error(client, msg_error);
|
@@ -582,6 +584,7 @@ void init_tinytds_result() {
|
|
582
584
|
cDate = rb_const_get(rb_cObject, rb_intern("Date"));
|
583
585
|
/* Define TinyTds::Result */
|
584
586
|
cTinyTdsResult = rb_define_class_under(mTinyTds, "Result", rb_cObject);
|
587
|
+
rb_undef_alloc_func(cTinyTdsResult);
|
585
588
|
/* Define TinyTds::Result Public Methods */
|
586
589
|
rb_define_method(cTinyTdsResult, "fields", rb_tinytds_result_fields, 0);
|
587
590
|
rb_define_method(cTinyTdsResult, "each", rb_tinytds_result_each, -1);
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
data/lib/tiny_tds/gem.rb
CHANGED
@@ -20,12 +20,7 @@ module TinyTds
|
|
20
20
|
end
|
21
21
|
|
22
22
|
def ports_host
|
23
|
-
|
24
|
-
|
25
|
-
# Our fat binary builds with a i686-w64-mingw32 toolchain
|
26
|
-
# but ruby for windows x32-mingw32 reports i686-pc-mingw32
|
27
|
-
# so correct the host here
|
28
|
-
h.gsub('i686-pc-mingw32', 'i686-w64-mingw32')
|
23
|
+
RbConfig::CONFIG["arch"]
|
29
24
|
end
|
30
25
|
end
|
31
26
|
end
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
@@ -17,7 +17,7 @@ old_library=''
|
|
17
17
|
inherited_linker_flags=''
|
18
18
|
|
19
19
|
# Libraries that this one depends upon.
|
20
|
-
dependency_libs=' -R/
|
20
|
+
dependency_libs=' -R/root/project/ports/x86-mingw32/libiconv/1.15/lib -L/root/project/ports/x86-mingw32/libiconv/1.15/lib -L/root/project/ports/x86-mingw32/openssl/1.1.1s/lib -lws2_32 -lssl -lcrypto /root/project/ports/x86-mingw32/libiconv/1.15/lib/libiconv.la'
|
21
21
|
|
22
22
|
# Names of additional weak libraries provided by this library
|
23
23
|
weak_library_names=''
|
@@ -38,4 +38,4 @@ dlopen=''
|
|
38
38
|
dlpreopen=''
|
39
39
|
|
40
40
|
# Directory that this library needs to be installed in:
|
41
|
-
libdir='/
|
41
|
+
libdir='/root/project/ports/x86-mingw32/freetds/1.1.24/lib'
|
Binary file
|
@@ -17,7 +17,7 @@ old_library=''
|
|
17
17
|
inherited_linker_flags=''
|
18
18
|
|
19
19
|
# Libraries that this one depends upon.
|
20
|
-
dependency_libs=' -R/
|
20
|
+
dependency_libs=' -R/root/project/ports/x86-mingw32/libiconv/1.15/lib -L/root/project/ports/x86-mingw32/libiconv/1.15/lib -L/root/project/ports/x86-mingw32/openssl/1.1.1s/lib -lws2_32 -lssl -lcrypto /root/project/ports/x86-mingw32/libiconv/1.15/lib/libiconv.la'
|
21
21
|
|
22
22
|
# Names of additional weak libraries provided by this library
|
23
23
|
weak_library_names=''
|
@@ -38,4 +38,4 @@ dlopen=''
|
|
38
38
|
dlpreopen=''
|
39
39
|
|
40
40
|
# Directory that this library needs to be installed in:
|
41
|
-
libdir='/
|
41
|
+
libdir='/root/project/ports/x86-mingw32/freetds/1.1.24/lib'
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
@@ -17,7 +17,7 @@ old_library=''
|
|
17
17
|
inherited_linker_flags=''
|
18
18
|
|
19
19
|
# Libraries that this one depends upon.
|
20
|
-
dependency_libs=' -L/
|
20
|
+
dependency_libs=' -L/root/project/ports/x86-mingw32/openssl/1.1.1s/lib'
|
21
21
|
|
22
22
|
# Names of additional weak libraries provided by this library
|
23
23
|
weak_library_names=''
|
@@ -38,4 +38,4 @@ dlopen=''
|
|
38
38
|
dlpreopen=''
|
39
39
|
|
40
40
|
# Directory that this library needs to be installed in:
|
41
|
-
libdir='/
|
41
|
+
libdir='/root/project/ports/x86-mingw32/libiconv/1.15/lib'
|
Binary file
|
@@ -17,7 +17,7 @@ old_library=''
|
|
17
17
|
inherited_linker_flags=''
|
18
18
|
|
19
19
|
# Libraries that this one depends upon.
|
20
|
-
dependency_libs=' -L/
|
20
|
+
dependency_libs=' -L/root/project/ports/x86-mingw32/openssl/1.1.1s/lib'
|
21
21
|
|
22
22
|
# Names of additional weak libraries provided by this library
|
23
23
|
weak_library_names=''
|
@@ -38,4 +38,4 @@ dlopen=''
|
|
38
38
|
dlpreopen=''
|
39
39
|
|
40
40
|
# Directory that this library needs to be installed in:
|
41
|
-
libdir='/
|
41
|
+
libdir='/root/project/ports/x86-mingw32/libiconv/1.15/lib'
|
@@ -0,0 +1,251 @@
|
|
1
|
+
#!/usr/bin/env perl
|
2
|
+
|
3
|
+
# WARNING: do not edit!
|
4
|
+
# Generated by Makefile from tools/c_rehash.in
|
5
|
+
# Copyright 1999-2022 The OpenSSL Project Authors. All Rights Reserved.
|
6
|
+
#
|
7
|
+
# Licensed under the OpenSSL license (the "License"). You may not use
|
8
|
+
# this file except in compliance with the License. You can obtain a copy
|
9
|
+
# in the file LICENSE in the source distribution or at
|
10
|
+
# https://www.openssl.org/source/license.html
|
11
|
+
|
12
|
+
# Perl c_rehash script, scan all files in a directory
|
13
|
+
# and add symbolic links to their hash values.
|
14
|
+
|
15
|
+
my $dir = "/root/project/ports/x86-mingw32/openssl/1.1.1s";
|
16
|
+
my $prefix = "/root/project/ports/x86-mingw32/openssl/1.1.1s";
|
17
|
+
|
18
|
+
my $errorcount = 0;
|
19
|
+
my $openssl = $ENV{OPENSSL} || "openssl";
|
20
|
+
my $pwd;
|
21
|
+
my $x509hash = "-subject_hash";
|
22
|
+
my $crlhash = "-hash";
|
23
|
+
my $verbose = 0;
|
24
|
+
my $symlink_exists=eval {symlink("",""); 1};
|
25
|
+
my $removelinks = 1;
|
26
|
+
|
27
|
+
## Parse flags.
|
28
|
+
while ( $ARGV[0] =~ /^-/ ) {
|
29
|
+
my $flag = shift @ARGV;
|
30
|
+
last if ( $flag eq '--');
|
31
|
+
if ( $flag eq '-old') {
|
32
|
+
$x509hash = "-subject_hash_old";
|
33
|
+
$crlhash = "-hash_old";
|
34
|
+
} elsif ( $flag eq '-h' || $flag eq '-help' ) {
|
35
|
+
help();
|
36
|
+
} elsif ( $flag eq '-n' ) {
|
37
|
+
$removelinks = 0;
|
38
|
+
} elsif ( $flag eq '-v' ) {
|
39
|
+
$verbose++;
|
40
|
+
}
|
41
|
+
else {
|
42
|
+
print STDERR "Usage error; try -h.\n";
|
43
|
+
exit 1;
|
44
|
+
}
|
45
|
+
}
|
46
|
+
|
47
|
+
sub help {
|
48
|
+
print "Usage: c_rehash [-old] [-h] [-help] [-v] [dirs...]\n";
|
49
|
+
print " -old use old-style digest\n";
|
50
|
+
print " -h or -help print this help text\n";
|
51
|
+
print " -v print files removed and linked\n";
|
52
|
+
exit 0;
|
53
|
+
}
|
54
|
+
|
55
|
+
eval "require Cwd";
|
56
|
+
if (defined(&Cwd::getcwd)) {
|
57
|
+
$pwd=Cwd::getcwd();
|
58
|
+
} else {
|
59
|
+
$pwd=`pwd`;
|
60
|
+
chomp($pwd);
|
61
|
+
}
|
62
|
+
|
63
|
+
# DOS/Win32 or Unix delimiter? Prefix our installdir, then search.
|
64
|
+
my $path_delim = ($pwd =~ /^[a-z]\:/i) ? ';' : ':';
|
65
|
+
$ENV{PATH} = "$prefix/bin" . ($ENV{PATH} ? $path_delim . $ENV{PATH} : "");
|
66
|
+
|
67
|
+
if (! -x $openssl) {
|
68
|
+
my $found = 0;
|
69
|
+
foreach (split /$path_delim/, $ENV{PATH}) {
|
70
|
+
if (-x "$_/$openssl") {
|
71
|
+
$found = 1;
|
72
|
+
$openssl = "$_/$openssl";
|
73
|
+
last;
|
74
|
+
}
|
75
|
+
}
|
76
|
+
if ($found == 0) {
|
77
|
+
print STDERR "c_rehash: rehashing skipped ('openssl' program not available)\n";
|
78
|
+
exit 0;
|
79
|
+
}
|
80
|
+
}
|
81
|
+
|
82
|
+
if (@ARGV) {
|
83
|
+
@dirlist = @ARGV;
|
84
|
+
} elsif ($ENV{SSL_CERT_DIR}) {
|
85
|
+
@dirlist = split /$path_delim/, $ENV{SSL_CERT_DIR};
|
86
|
+
} else {
|
87
|
+
$dirlist[0] = "$dir/certs";
|
88
|
+
}
|
89
|
+
|
90
|
+
if (-d $dirlist[0]) {
|
91
|
+
chdir $dirlist[0];
|
92
|
+
$openssl="$pwd/$openssl" if (!-x $openssl);
|
93
|
+
chdir $pwd;
|
94
|
+
}
|
95
|
+
|
96
|
+
foreach (@dirlist) {
|
97
|
+
if (-d $_ ) {
|
98
|
+
if ( -w $_) {
|
99
|
+
hash_dir($_);
|
100
|
+
} else {
|
101
|
+
print "Skipping $_, can't write\n";
|
102
|
+
$errorcount++;
|
103
|
+
}
|
104
|
+
}
|
105
|
+
}
|
106
|
+
exit($errorcount);
|
107
|
+
|
108
|
+
sub copy_file {
|
109
|
+
my ($src_fname, $dst_fname) = @_;
|
110
|
+
|
111
|
+
if (open(my $in, "<", $src_fname)) {
|
112
|
+
if (open(my $out, ">", $dst_fname)) {
|
113
|
+
print $out $_ while (<$in>);
|
114
|
+
close $out;
|
115
|
+
} else {
|
116
|
+
warn "Cannot open $dst_fname for write, $!";
|
117
|
+
}
|
118
|
+
close $in;
|
119
|
+
} else {
|
120
|
+
warn "Cannot open $src_fname for read, $!";
|
121
|
+
}
|
122
|
+
}
|
123
|
+
|
124
|
+
sub hash_dir {
|
125
|
+
my $dir = shift;
|
126
|
+
my %hashlist;
|
127
|
+
|
128
|
+
print "Doing $dir\n";
|
129
|
+
|
130
|
+
if (!chdir $dir) {
|
131
|
+
print STDERR "WARNING: Cannot chdir to '$dir', $!\n";
|
132
|
+
return;
|
133
|
+
}
|
134
|
+
|
135
|
+
opendir(DIR, ".") || print STDERR "WARNING: Cannot opendir '.', $!\n";
|
136
|
+
my @flist = sort readdir(DIR);
|
137
|
+
closedir DIR;
|
138
|
+
if ( $removelinks ) {
|
139
|
+
# Delete any existing symbolic links
|
140
|
+
foreach (grep {/^[\da-f]+\.r{0,1}\d+$/} @flist) {
|
141
|
+
if (-l $_) {
|
142
|
+
print "unlink $_\n" if $verbose;
|
143
|
+
unlink $_ || warn "Can't unlink $_, $!\n";
|
144
|
+
}
|
145
|
+
}
|
146
|
+
}
|
147
|
+
FILE: foreach $fname (grep {/\.(pem)|(crt)|(cer)|(crl)$/} @flist) {
|
148
|
+
# Check to see if certificates and/or CRLs present.
|
149
|
+
my ($cert, $crl) = check_file($fname);
|
150
|
+
if (!$cert && !$crl) {
|
151
|
+
print STDERR "WARNING: $fname does not contain a certificate or CRL: skipping\n";
|
152
|
+
next;
|
153
|
+
}
|
154
|
+
link_hash_cert($fname) if ($cert);
|
155
|
+
link_hash_crl($fname) if ($crl);
|
156
|
+
}
|
157
|
+
|
158
|
+
chdir $pwd;
|
159
|
+
}
|
160
|
+
|
161
|
+
sub check_file {
|
162
|
+
my ($is_cert, $is_crl) = (0,0);
|
163
|
+
my $fname = $_[0];
|
164
|
+
|
165
|
+
open(my $in, "<", $fname);
|
166
|
+
while(<$in>) {
|
167
|
+
if (/^-----BEGIN (.*)-----/) {
|
168
|
+
my $hdr = $1;
|
169
|
+
if ($hdr =~ /^(X509 |TRUSTED |)CERTIFICATE$/) {
|
170
|
+
$is_cert = 1;
|
171
|
+
last if ($is_crl);
|
172
|
+
} elsif ($hdr eq "X509 CRL") {
|
173
|
+
$is_crl = 1;
|
174
|
+
last if ($is_cert);
|
175
|
+
}
|
176
|
+
}
|
177
|
+
}
|
178
|
+
close $in;
|
179
|
+
return ($is_cert, $is_crl);
|
180
|
+
}
|
181
|
+
|
182
|
+
sub compute_hash {
|
183
|
+
my $fh;
|
184
|
+
if ( $^O eq "VMS" ) {
|
185
|
+
# VMS uses the open through shell
|
186
|
+
# The file names are safe there and list form is unsupported
|
187
|
+
if (!open($fh, "-|", join(' ', @_))) {
|
188
|
+
print STDERR "Cannot compute hash on '$fname'\n";
|
189
|
+
return;
|
190
|
+
}
|
191
|
+
} else {
|
192
|
+
if (!open($fh, "-|", @_)) {
|
193
|
+
print STDERR "Cannot compute hash on '$fname'\n";
|
194
|
+
return;
|
195
|
+
}
|
196
|
+
}
|
197
|
+
return (<$fh>, <$fh>);
|
198
|
+
}
|
199
|
+
|
200
|
+
# Link a certificate to its subject name hash value, each hash is of
|
201
|
+
# the form <hash>.<n> where n is an integer. If the hash value already exists
|
202
|
+
# then we need to up the value of n, unless its a duplicate in which
|
203
|
+
# case we skip the link. We check for duplicates by comparing the
|
204
|
+
# certificate fingerprints
|
205
|
+
|
206
|
+
sub link_hash_cert {
|
207
|
+
link_hash($_[0], 'cert');
|
208
|
+
}
|
209
|
+
|
210
|
+
# Same as above except for a CRL. CRL links are of the form <hash>.r<n>
|
211
|
+
|
212
|
+
sub link_hash_crl {
|
213
|
+
link_hash($_[0], 'crl');
|
214
|
+
}
|
215
|
+
|
216
|
+
sub link_hash {
|
217
|
+
my ($fname, $type) = @_;
|
218
|
+
my $is_cert = $type eq 'cert';
|
219
|
+
|
220
|
+
my ($hash, $fprint) = compute_hash($openssl,
|
221
|
+
$is_cert ? "x509" : "crl",
|
222
|
+
$is_cert ? $x509hash : $crlhash,
|
223
|
+
"-fingerprint", "-noout",
|
224
|
+
"-in", $fname);
|
225
|
+
chomp $hash;
|
226
|
+
chomp $fprint;
|
227
|
+
return if !$hash;
|
228
|
+
$fprint =~ s/^.*=//;
|
229
|
+
$fprint =~ tr/://d;
|
230
|
+
my $suffix = 0;
|
231
|
+
# Search for an unused hash filename
|
232
|
+
my $crlmark = $is_cert ? "" : "r";
|
233
|
+
while(exists $hashlist{"$hash.$crlmark$suffix"}) {
|
234
|
+
# Hash matches: if fingerprint matches its a duplicate cert
|
235
|
+
if ($hashlist{"$hash.$crlmark$suffix"} eq $fprint) {
|
236
|
+
my $what = $is_cert ? 'certificate' : 'CRL';
|
237
|
+
print STDERR "WARNING: Skipping duplicate $what $fname\n";
|
238
|
+
return;
|
239
|
+
}
|
240
|
+
$suffix++;
|
241
|
+
}
|
242
|
+
$hash .= ".$crlmark$suffix";
|
243
|
+
if ($symlink_exists) {
|
244
|
+
print "link $fname -> $hash\n" if $verbose;
|
245
|
+
symlink $fname, $hash || warn "Can't symlink, $!";
|
246
|
+
} else {
|
247
|
+
print "copy $fname -> $hash\n" if $verbose;
|
248
|
+
copy_file($fname, $hash);
|
249
|
+
}
|
250
|
+
$hashlist{$hash} = $fprint;
|
251
|
+
}
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
data/ports/{i686-w64-mingw32/openssl/1.1.1d → x86-mingw32/openssl/1.1.1s}/lib/libcrypto.dll.a
RENAMED
Binary file
|
Binary file
|
Binary file
|
@@ -0,0 +1,25 @@
|
|
1
|
+
#!/usr/bin/env bash
|
2
|
+
|
3
|
+
set -x
|
4
|
+
set -e
|
5
|
+
|
6
|
+
# this should mirror the steps outlined in the circleci yml
|
7
|
+
echo "Installing mssql-tools..."
|
8
|
+
sleep 5
|
9
|
+
sudo -E ./test/bin/install-mssqltools.sh
|
10
|
+
|
11
|
+
echo "Configurating tinytds test database..."
|
12
|
+
sleep 5
|
13
|
+
./test/bin/setup_tinytds_db.sh
|
14
|
+
|
15
|
+
echo "Building openssl library..."
|
16
|
+
sleep 5
|
17
|
+
sudo -E ./test/bin/install-openssl.sh
|
18
|
+
|
19
|
+
echo "Building freetds library..."
|
20
|
+
sleep 5
|
21
|
+
sudo -E ./test/bin/install-freetds.sh
|
22
|
+
|
23
|
+
echo "Installing gems..."
|
24
|
+
sleep 5
|
25
|
+
bundle install
|
data/start_dev.sh
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
#!/usr/bin/env bash
|
2
|
+
|
3
|
+
set -x
|
4
|
+
set -e
|
5
|
+
|
6
|
+
# set volume read/write permissions to work both outside and inside container
|
7
|
+
sudo ./test/bin/setup_volume_permissions.sh
|
8
|
+
|
9
|
+
docker-compose up -d
|
10
|
+
echo "Waiting for containers to start..."
|
11
|
+
sleep 10
|
12
|
+
|
13
|
+
# setup circleci ruby container for development
|
14
|
+
docker exec cimg_ruby bash -c './setup_cimgruby_dev.sh'
|
15
|
+
|
16
|
+
# enter container
|
17
|
+
set +x
|
18
|
+
echo "cimg/ruby container is ready for tiny_tds development.........."
|
19
|
+
echo "To enter container run: docker exec -it cimg_ruby /bin/bash"
|
20
|
+
echo "To build solution run: docker exec cimg_ruby bash -c 'bundle exec rake build'"
|
21
|
+
echo "To test solution run: docker exec cimg_ruby bash -c 'bundle exec rake test'"
|
data/tasks/native_gem.rake
CHANGED
@@ -1,14 +1,23 @@
|
|
1
1
|
# encoding: UTF-8
|
2
2
|
|
3
|
-
desc 'Build the
|
4
|
-
task 'gem:
|
3
|
+
desc 'Build the native binary gems using rake-compiler-dock'
|
4
|
+
task 'gem:native' => ['ports:cross'] do
|
5
5
|
require 'rake_compiler_dock'
|
6
6
|
|
7
7
|
# make sure to install our bundle
|
8
|
-
|
8
|
+
sh "bundle package --all" # Avoid repeated downloads of gems by using gem files from the host.
|
9
9
|
|
10
|
-
|
11
|
-
|
10
|
+
GEM_PLATFORM_HOSTS.each do |plat, meta|
|
11
|
+
RakeCompilerDock.sh "bundle --local && RUBY_CC_VERSION=#{meta[:ruby_versions]} rake native:#{plat} gem", platform: plat
|
12
|
+
end
|
13
|
+
end
|
14
|
+
|
15
|
+
# assumes you are in a container provided by Rake compiler
|
16
|
+
# if not, use the task above
|
17
|
+
task 'gem:for_platform', [:gem_platform] do |_task, args|
|
18
|
+
args.with_defaults(gem_platform: RbConfig::CONFIG["arch"])
|
12
19
|
|
13
|
-
|
20
|
+
sh "bundle install"
|
21
|
+
Rake::Task["ports:compile"].invoke(GEM_PLATFORM_HOSTS[args.gem_platform][:host], args.gem_platform)
|
22
|
+
sh "RUBY_CC_VERSION=#{GEM_PLATFORM_HOSTS[args.gem_platform][:ruby_versions]} rake native:#{args.gem_platform} gem"
|
14
23
|
end
|
data/tasks/ports/libiconv.rb
CHANGED
@@ -8,25 +8,8 @@ module Ports
|
|
8
8
|
set_patches
|
9
9
|
end
|
10
10
|
|
11
|
-
def cook
|
12
|
-
chdir_for_build do
|
13
|
-
super
|
14
|
-
end
|
15
|
-
self
|
16
|
-
end
|
17
|
-
|
18
11
|
private
|
19
12
|
|
20
|
-
# When using rake-compiler-dock on Windows, the underlying Virtualbox shared
|
21
|
-
# folders don't support symlinks, but libiconv expects it for a build on
|
22
|
-
# Linux. We work around this limitation by using the temp dir for cooking.
|
23
|
-
def chdir_for_build
|
24
|
-
build_dir = ENV['RCD_HOST_RUBY_PLATFORM'].to_s =~ /mingw|mswin|cygwin/ ? '/tmp' : '.'
|
25
|
-
Dir.chdir(build_dir) do
|
26
|
-
yield
|
27
|
-
end
|
28
|
-
end
|
29
|
-
|
30
13
|
def configure_defaults
|
31
14
|
[
|
32
15
|
"--host=#{@host}",
|
data/tasks/ports/recipe.rb
CHANGED
@@ -5,17 +5,30 @@ require 'rbconfig'
|
|
5
5
|
|
6
6
|
module Ports
|
7
7
|
class Recipe < MiniPortile
|
8
|
+
attr_writer :gem_platform
|
9
|
+
|
8
10
|
def cook
|
9
|
-
checkpoint = "ports/#{name}-#{version}-#{
|
11
|
+
checkpoint = "ports/checkpoints/#{name}-#{version}-#{gem_platform}.installed"
|
10
12
|
|
11
13
|
unless File.exist? checkpoint
|
12
14
|
super
|
15
|
+
FileUtils.mkdir_p("ports/checkpoints")
|
13
16
|
FileUtils.touch checkpoint
|
14
17
|
end
|
15
18
|
end
|
16
19
|
|
17
20
|
private
|
18
21
|
|
22
|
+
attr_reader :gem_platform
|
23
|
+
|
24
|
+
def port_path
|
25
|
+
"#{@target}/#{gem_platform}/#{@name}/#{@version}"
|
26
|
+
end
|
27
|
+
|
28
|
+
def tmp_path
|
29
|
+
"tmp/#{gem_platform}/ports/#{@name}/#{@version}"
|
30
|
+
end
|
31
|
+
|
19
32
|
def configure_defaults
|
20
33
|
[
|
21
34
|
"--host=#{@host}",
|
@@ -38,9 +51,9 @@ module Ports
|
|
38
51
|
|
39
52
|
def get_patches(libname, version)
|
40
53
|
patches = []
|
41
|
-
|
54
|
+
|
42
55
|
patch_path = File.expand_path(
|
43
|
-
File.join('..','..','..','patches',libname,version),
|
56
|
+
File.join('..','..','..','patches',libname,version),
|
44
57
|
__FILE__
|
45
58
|
)
|
46
59
|
|
@@ -49,4 +62,3 @@ module Ports
|
|
49
62
|
end
|
50
63
|
end
|
51
64
|
end
|
52
|
-
|