View | Details | Raw Unified | Return to bug 266326
Collapse All | Expand All

(-)b/net-mgmt/rubygem-riemann-client/Makefile (-4 / +2 lines)
Lines 1-6 Link Here
1
PORTNAME=	riemann-client
1
PORTNAME=	riemann-client
2
DISTVERSION=	0.2.6
2
DISTVERSION=	1.0.1
3
PORTREVISION=	1
4
CATEGORIES=	net-mgmt rubygems
3
CATEGORIES=	net-mgmt rubygems
5
MASTER_SITES=	RG
4
MASTER_SITES=	RG
6
5
Lines 12-19 LICENSE= MIT Link Here
12
LICENSE_FILE=	${WRKSRC}/LICENSE
11
LICENSE_FILE=	${WRKSRC}/LICENSE
13
12
14
RUN_DEPENDS=	rubygem-beefcake>=1.2:net/rubygem-beefcake \
13
RUN_DEPENDS=	rubygem-beefcake>=1.2:net/rubygem-beefcake \
15
		rubygem-mtrc>=0.0.4:math/rubygem-mtrc \
14
		rubygem-mtrc>=0.0.4:math/rubygem-mtrc
16
		rubygem-trollop>=2.9:devel/rubygem-trollop
17
15
18
USES=		gem
16
USES=		gem
19
USE_RUBY=	yes
17
USE_RUBY=	yes
(-)b/net-mgmt/rubygem-riemann-client/distinfo (-3 / +3 lines)
Lines 1-3 Link Here
1
TIMESTAMP = 1540513080
1
TIMESTAMP = 1662755179
2
SHA256 (rubygem/riemann-client-0.2.6.gem) = 28ba11bd2bf7cecaeb1fa94ef486796f7b2feae313b1d42beac140e44547370b
2
SHA256 (rubygem/riemann-client-1.0.1.gem) = 34ed4b4a3b71cec374d91f47c5b26eb42ef649a8a276f16c1edfb00a1c826569
3
SIZE (rubygem/riemann-client-0.2.6.gem) = 15360
3
SIZE (rubygem/riemann-client-1.0.1.gem) = 19456
(-)a/net-mgmt/rubygem-riemann-client/files/patch-lib_riemann_client_tcp__socket.rb (-48 lines)
Removed Link Here
1
--- lib/riemann/client/tcp_socket.rb.orig	2019-11-25 11:01:31 UTC
2
+++ lib/riemann/client/tcp_socket.rb
3
@@ -107,13 +107,14 @@ module Riemann
4
       # Using the options from the initializer, a new ::Socket is created that
5
       # is:
6
       #
7
-      #   TCP, IPv4 only, autoclosing on exit, nagle's algorithm is disabled and has
8
+      #   TCP, autoclosing on exit, nagle's algorithm is disabled and has
9
       #   TCP Keepalive options set if keepalive is supported.
10
       #
11
-      # Returns a new ::Socket instance
12
-      def blank_socket
13
-        sock = ::Socket.new(::Socket::AF_INET, ::Socket::SOCK_STREAM, 0)
14
+      # Returns a new ::Socket instance for
15
 
16
+      def socket_factory(type)
17
+         sock = ::Socket.new(type, ::Socket::SOCK_STREAM, 0)
18
+
19
         # close file descriptors if we exec
20
         if Fcntl.constants.include?(:F_SETFD) && Fcntl.constants.include?(:FD_CLOEXEC)
21
           sock.fcntl(Fcntl::F_SETFD, Fcntl::FD_CLOEXEC)
22
@@ -167,13 +168,14 @@ module Riemann
23
         # Calculate our timeout deadline
24
         deadline = Time.now.to_f + connect_timeout
25
 
26
-        # Lookup destination address, we only want    IPv4             , TCP
27
-        addrs      = ::Socket.getaddrinfo(host, port, ::Socket::AF_INET, ::Socket::SOCK_STREAM )
28
+        # Lookup destination address, we only want TCP.
29
+        addrs      = ::Socket.getaddrinfo(host, port, nil, ::Socket::SOCK_STREAM )
30
         errors     = []
31
         conn_error = lambda { raise errors.first }
32
         sock       = nil
33
 
34
-        addrs.find( conn_error ) do |addr|
35
+        # Sort it so we get AF_INET, IPv4
36
+        addrs.sort.find( conn_error ) do |addr|
37
           sock = connect_or_error( addr, deadline, errors )
38
         end
39
         return sock
40
@@ -210,7 +212,7 @@ module Riemann
41
       # connection was possible.
42
       def connect_nonblock( addr, timeout )
43
         sockaddr = ::Socket.pack_sockaddr_in(addr[1], addr[3])
44
-        sock     = blank_socket()
45
+        sock     = self.socket_factory( addr[4] )
46
         sock.connect_nonblock( sockaddr )
47
         return sock
48
       rescue Errno::EINPROGRESS
(-)a/net-mgmt/rubygem-riemann-client/files/patch-riemann-client.gemspec (-11 lines)
Removed Link Here
1
--- riemann-client.gemspec.orig	2021-10-25 13:35:50 UTC
2
+++ riemann-client.gemspec
3
@@ -26,7 +26,7 @@ Gem::Specification.new do |s|
4
   if s.respond_to? :add_runtime_dependency then
5
     s.add_development_dependency(%q<bundler>.freeze, [">= 1.3"])
6
     s.add_development_dependency(%q<bacon>.freeze, [">= 0"])
7
-    s.add_runtime_dependency(%q<beefcake>.freeze, [">= 0.3.5", "<= 1.0.0"])
8
+    s.add_runtime_dependency(%q<beefcake>.freeze, [">= 1.2.0"])
9
     s.add_runtime_dependency(%q<trollop>.freeze, [">= 1.16.2"])
10
     s.add_runtime_dependency(%q<mtrc>.freeze, [">= 0.0.4"])
11
   else

Return to bug 266326