net-mgmt/rubygem-riemann-client: Update to 1.0.1
ChangeLog: https://github.com/riemann/riemann-ruby-client/blob/main/CHANGELOG.md#101-2022-06-25 PR: 266326 Tested by: romain Sponsored by: SkunkWerks, GmbH
This commit is contained in:
parent
94e255a7ff
commit
dbfcc3a1b0
@ -1,6 +1,5 @@
|
||||
PORTNAME= riemann-client
|
||||
DISTVERSION= 0.2.6
|
||||
PORTREVISION= 1
|
||||
DISTVERSION= 1.0.1
|
||||
CATEGORIES= net-mgmt rubygems
|
||||
MASTER_SITES= RG
|
||||
|
||||
@ -12,8 +11,7 @@ LICENSE= MIT
|
||||
LICENSE_FILE= ${WRKSRC}/LICENSE
|
||||
|
||||
RUN_DEPENDS= rubygem-beefcake>=1.2:net/rubygem-beefcake \
|
||||
rubygem-mtrc>=0.0.4:math/rubygem-mtrc \
|
||||
rubygem-trollop>=2.9:devel/rubygem-trollop
|
||||
rubygem-mtrc>=0.0.4:math/rubygem-mtrc
|
||||
|
||||
USES= gem
|
||||
USE_RUBY= yes
|
||||
|
@ -1,3 +1,3 @@
|
||||
TIMESTAMP = 1540513080
|
||||
SHA256 (rubygem/riemann-client-0.2.6.gem) = 28ba11bd2bf7cecaeb1fa94ef486796f7b2feae313b1d42beac140e44547370b
|
||||
SIZE (rubygem/riemann-client-0.2.6.gem) = 15360
|
||||
TIMESTAMP = 1662755179
|
||||
SHA256 (rubygem/riemann-client-1.0.1.gem) = 34ed4b4a3b71cec374d91f47c5b26eb42ef649a8a276f16c1edfb00a1c826569
|
||||
SIZE (rubygem/riemann-client-1.0.1.gem) = 19456
|
||||
|
@ -1,48 +0,0 @@
|
||||
--- lib/riemann/client/tcp_socket.rb.orig 2019-11-25 11:01:31 UTC
|
||||
+++ lib/riemann/client/tcp_socket.rb
|
||||
@@ -107,13 +107,14 @@ module Riemann
|
||||
# Using the options from the initializer, a new ::Socket is created that
|
||||
# is:
|
||||
#
|
||||
- # TCP, IPv4 only, autoclosing on exit, nagle's algorithm is disabled and has
|
||||
+ # TCP, autoclosing on exit, nagle's algorithm is disabled and has
|
||||
# TCP Keepalive options set if keepalive is supported.
|
||||
#
|
||||
- # Returns a new ::Socket instance
|
||||
- def blank_socket
|
||||
- sock = ::Socket.new(::Socket::AF_INET, ::Socket::SOCK_STREAM, 0)
|
||||
+ # Returns a new ::Socket instance for
|
||||
|
||||
+ def socket_factory(type)
|
||||
+ sock = ::Socket.new(type, ::Socket::SOCK_STREAM, 0)
|
||||
+
|
||||
# close file descriptors if we exec
|
||||
if Fcntl.constants.include?(:F_SETFD) && Fcntl.constants.include?(:FD_CLOEXEC)
|
||||
sock.fcntl(Fcntl::F_SETFD, Fcntl::FD_CLOEXEC)
|
||||
@@ -167,13 +168,14 @@ module Riemann
|
||||
# Calculate our timeout deadline
|
||||
deadline = Time.now.to_f + connect_timeout
|
||||
|
||||
- # Lookup destination address, we only want IPv4 , TCP
|
||||
- addrs = ::Socket.getaddrinfo(host, port, ::Socket::AF_INET, ::Socket::SOCK_STREAM )
|
||||
+ # Lookup destination address, we only want TCP.
|
||||
+ addrs = ::Socket.getaddrinfo(host, port, nil, ::Socket::SOCK_STREAM )
|
||||
errors = []
|
||||
conn_error = lambda { raise errors.first }
|
||||
sock = nil
|
||||
|
||||
- addrs.find( conn_error ) do |addr|
|
||||
+ # Sort it so we get AF_INET, IPv4
|
||||
+ addrs.sort.find( conn_error ) do |addr|
|
||||
sock = connect_or_error( addr, deadline, errors )
|
||||
end
|
||||
return sock
|
||||
@@ -210,7 +212,7 @@ module Riemann
|
||||
# connection was possible.
|
||||
def connect_nonblock( addr, timeout )
|
||||
sockaddr = ::Socket.pack_sockaddr_in(addr[1], addr[3])
|
||||
- sock = blank_socket()
|
||||
+ sock = self.socket_factory( addr[4] )
|
||||
sock.connect_nonblock( sockaddr )
|
||||
return sock
|
||||
rescue Errno::EINPROGRESS
|
@ -1,11 +0,0 @@
|
||||
--- riemann-client.gemspec.orig 2021-10-25 13:35:50 UTC
|
||||
+++ riemann-client.gemspec
|
||||
@@ -26,7 +26,7 @@ Gem::Specification.new do |s|
|
||||
if s.respond_to? :add_runtime_dependency then
|
||||
s.add_development_dependency(%q<bundler>.freeze, [">= 1.3"])
|
||||
s.add_development_dependency(%q<bacon>.freeze, [">= 0"])
|
||||
- s.add_runtime_dependency(%q<beefcake>.freeze, [">= 0.3.5", "<= 1.0.0"])
|
||||
+ s.add_runtime_dependency(%q<beefcake>.freeze, [">= 1.2.0"])
|
||||
s.add_runtime_dependency(%q<trollop>.freeze, [">= 1.16.2"])
|
||||
s.add_runtime_dependency(%q<mtrc>.freeze, [">= 0.0.4"])
|
||||
else
|
Loading…
Reference in New Issue
Block a user