From nobody Thu Apr 21 17:56:36 2022 X-Original-To: dev-commits-ports-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id A95B511CB7B2; Thu, 21 Apr 2022 17:56:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4KklbS4KxMz4mFj; Thu, 21 Apr 2022 17:56:36 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1650563796; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=CLYqFIo50VqK1ecGqihg5QF79BelLO5x4YZ1d8w2j9Q=; b=h2O/M5EexejRaNaiG3RJGYk0Ffx9uQR4Zil+tamct5EjA9TuIBeedDYZMzZZ8NkYrN9AfG DXe7RFBDoL9Cjx97a5Tu6ksVi65/Em+5G/gdhuu6cdI+OECKMFCBOzy17pEYT5c73062vG XIFYb4oHQH6vmGKAHLfgKr//puUGESsBpXwpY+msPElkmy9CVhJl2jxepg7ylmMIrPMQne aW5yLQRe34F8pMsLJeTd0Un3pBdHbPpvkTWplVoQnlMuzgOfSIq1guc0G40svNKFKYO7fW pIUyAXRS8//m84dCOSnzLbi+bLyfPLKTpIKXEzUGmgHxMT4S+8nFYn0UfkBgZw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 745A556B5; Thu, 21 Apr 2022 17:56:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 23LHualC040996; Thu, 21 Apr 2022 17:56:36 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 23LHua2j040995; Thu, 21 Apr 2022 17:56:36 GMT (envelope-from git) Date: Thu, 21 Apr 2022 17:56:36 GMT Message-Id: <202204211756.23LHua2j040995@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Hajimu UMEMOTO Subject: git: 5f28f9cbd40f - main - net/dtcp: make dtcp work with Ruby 3.X. List-Id: Commits to the main branch of the FreeBSD ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-main@freebsd.org X-BeenThere: dev-commits-ports-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ume X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 5f28f9cbd40f6f7fa68a1e73e47a7e0c1e015d79 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1650563796; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=CLYqFIo50VqK1ecGqihg5QF79BelLO5x4YZ1d8w2j9Q=; b=gUe7MQiP8PUhhL+8LXP94OvPPYvkIHjwt/13R+4WBCpfs/lUPPQOJ2YNQWgJsL8Wej6/wD WxRI32DV9xnla/EESvjssGBqGa598TJPLliyox/3lXxaBg/mWnpFQIrIdIaVJsqOiy2lln pBG5THBDqGb6vz29816AK6ficho7Agd5Ou7JuLXMngmY4oN4Wh/Erto4Oxz2ijtJTeg5d+ XMU/TuQD6TzMZbDOxwiKRSPRaX/ezfbs5LMCu/UNRRfbu+9HIgNWubc0Ri3N8bSuj3pJXU jjxoW1j8FcvPS9AFqI5SJqLNXvj+Ir/WyViSFchX3f2wWheoTlLJji55hYo1uw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1650563796; a=rsa-sha256; cv=none; b=WXcRsJ+SGG7EkTWWbadiM/Lt3/bFP91OcqO38Sj/FMT03l5spKOUjh4ZE39ZbblgMhwHO/ M0j71CMoamh3U1mpm3NQcOXyFHHWSbbTWM41aN7cWu5gb+xrkw1YylPncUewF2HOykh/s7 uKliMNUfIO2FCkeBxrz5rLcJzJ7nFarlTDCUCLR+dn0spbSVWGeBO8uJjpwONu1VMIXPUx TIoSdcylUUdebzjrD1fJ3lpNyzlHXihF1e3lnlpcwMmLH5QFZTVNrHYE9WSmwJ0AqO65z1 u4YR4zxd7ZvnGHMlvdB5sVhN0xGl6pKbnWhCH930NXE0leAUMRZvZI+BSkwIwg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by ume: URL: https://cgit.FreeBSD.org/ports/commit/?id=5f28f9cbd40f6f7fa68a1e73e47a7e0c1e015d79 commit 5f28f9cbd40f6f7fa68a1e73e47a7e0c1e015d79 Author: Hajimu UMEMOTO AuthorDate: 2022-04-21 17:55:07 +0000 Commit: Hajimu UMEMOTO CommitDate: 2022-04-21 17:56:25 +0000 net/dtcp: make dtcp work with Ruby 3.X. --- net/dtcp/Makefile | 2 +- net/dtcp/files/patch-dtcpc.rb | 43 +++++++++++++++++++++++++--------- net/dtcp/files/patch-dtcps.rb | 54 +++++++++++++++++++++++++++++++++---------- 3 files changed, 75 insertions(+), 24 deletions(-) diff --git a/net/dtcp/Makefile b/net/dtcp/Makefile index c97b6ff91027..860bb086068d 100644 --- a/net/dtcp/Makefile +++ b/net/dtcp/Makefile @@ -1,6 +1,6 @@ PORTNAME= dtcp PORTVERSION= 20130602 -PORTREVISION= 3 +PORTREVISION= 4 CATEGORIES= net MASTER_SITES= http://www.mahoroba.org/~ume/ipv6/ diff --git a/net/dtcp/files/patch-dtcpc.rb b/net/dtcp/files/patch-dtcpc.rb index a63ead05b960..e6395dd936e6 100644 --- a/net/dtcp/files/patch-dtcpc.rb +++ b/net/dtcp/files/patch-dtcpc.rb @@ -1,8 +1,6 @@ -Index: dtcpc.rb -diff -u dtcpc.rb.orig dtcpc.rb ---- dtcpc.rb.orig 2013-06-02 23:05:51.000000000 +0900 -+++ dtcpc.rb 2014-05-22 17:24:50.852383194 +0900 -@@ -422,6 +422,10 @@ +--- dtcpc.rb.orig 2013-06-02 14:05:51 UTC ++++ dtcpc.rb +@@ -422,6 +422,10 @@ class Interface execute("ifconfig #{@name} mtu #{mtu}") end @@ -13,7 +11,7 @@ diff -u dtcpc.rb.orig dtcpc.rb def linklocal `ifconfig #{@name} inet6`.each_line { |s| if s =~ /inet6 (fe80::[^ ]*)/ -@@ -461,6 +465,9 @@ +@@ -461,6 +465,9 @@ class ClonedInterface < Interface end } end @@ -23,7 +21,7 @@ diff -u dtcpc.rb.orig dtcpc.rb @created = true end -@@ -520,6 +527,9 @@ +@@ -520,6 +527,9 @@ class NetgraphInterface < Interface if !@tunif || @tunif == "ng" @name = mkpeer @created = true @@ -33,7 +31,12 @@ diff -u dtcpc.rb.orig dtcpc.rb return end -@@ -535,6 +545,9 @@ +@@ -531,10 +541,13 @@ class NetgraphInterface < Interface + shutdown(@tunif) + + bogus = Array.new +- while TRUE ++ while true @name = mkpeer if @name == @tunif @created = true @@ -43,7 +46,16 @@ diff -u dtcpc.rb.orig dtcpc.rb break end -@@ -927,6 +940,7 @@ +@@ -899,7 +912,7 @@ class DTCPClient + + def keep_alive(sock) + begin +- while TRUE ++ while true + debugmsg("sleep(60)\n") + sleep 60 + sendmsg(sock, "ping") +@@ -927,6 +940,7 @@ ousername = username password = '' tunif = TUNIF cloning = TUNIF_CLONING @@ -51,7 +63,7 @@ diff -u dtcpc.rb.orig dtcpc.rb tuntype = 'tunnelonly' route_type = 'static' static_routes = 'default' -@@ -949,7 +963,7 @@ +@@ -949,7 +963,7 @@ pidfile = PIDFILE # exit 0 begin @@ -60,7 +72,7 @@ diff -u dtcpc.rb.orig dtcpc.rb rescue usage() exit 0 -@@ -965,6 +979,7 @@ +@@ -965,6 +979,7 @@ cloning = false if params["c"] $debug = params["d"] daemonize = params["D"] pidfile = params["f"] if params["f"] @@ -68,3 +80,12 @@ diff -u dtcpc.rb.orig dtcpc.rb tunif = params["i"] if params["i"] loop = params["l"] mtu = params["m"].to_i if params["m"] +@@ -1013,7 +1028,7 @@ begin + rtadvd_disable) + dtcpc = DTCPClient.new(dst, port, username, password, tuntype, behind_nat, + mtu, udp_tunnel, udp_tunnel_port) +- while TRUE ++ while true + interrupt = nil + begin + trap("SIGHUP") { diff --git a/net/dtcp/files/patch-dtcps.rb b/net/dtcp/files/patch-dtcps.rb index bea1832ee408..a12c07ecf5c5 100644 --- a/net/dtcp/files/patch-dtcps.rb +++ b/net/dtcp/files/patch-dtcps.rb @@ -1,8 +1,6 @@ -Index: dtcps.rb -diff -u dtcps.rb.orig dtcps.rb ---- dtcps.rb.orig 2013-06-02 23:05:51.000000000 +0900 -+++ dtcps.rb 2014-05-22 17:24:50.868385076 +0900 -@@ -185,6 +185,18 @@ +--- dtcps.rb.orig 2013-06-02 14:05:51 UTC ++++ dtcps.rb +@@ -185,6 +185,18 @@ class Interface execute("ifconfig #{@name} mtu #{mtu}") end @@ -21,7 +19,7 @@ diff -u dtcps.rb.orig dtcps.rb def linklocal `ifconfig #{@name} inet6`.each_line { |s| if s =~ /inet6 (fe80::[^ ]*)/ -@@ -226,6 +238,9 @@ +@@ -226,6 +238,9 @@ class ClonedInterface < Interface end } end @@ -31,7 +29,7 @@ diff -u dtcps.rb.orig dtcps.rb @created = true end -@@ -291,6 +306,9 @@ +@@ -291,6 +306,9 @@ class NetgraphInterface < Interface if !@tunif || @tunif == "ng" @name = mkpeer @created = true @@ -41,7 +39,12 @@ diff -u dtcps.rb.orig dtcps.rb return end -@@ -306,6 +324,9 @@ +@@ -302,10 +320,13 @@ class NetgraphInterface < Interface + shutdown(@tunif) + + bogus = Array.new +- while TRUE ++ while true @name = mkpeer if @name == @tunif @created = true @@ -51,7 +54,7 @@ diff -u dtcps.rb.orig dtcps.rb break end -@@ -724,6 +745,7 @@ +@@ -724,6 +745,7 @@ class Tunnel } delpeer(@tunif, @info[3], @info[2]) end @@ -59,7 +62,7 @@ diff -u dtcps.rb.orig dtcps.rb _delete(@tunif) @tunif = nil end -@@ -769,6 +791,7 @@ +@@ -769,6 +791,7 @@ class Tunnel raise 'tunnel interface sold out' end debugmsg("#{s}: tunnel interface #{tunif.name}\n") @@ -67,7 +70,34 @@ diff -u dtcps.rb.orig dtcps.rb myaddr = nil if type == 'host' || (type == 'network' && $network_with_peeraddr) -@@ -1173,13 +1196,14 @@ +@@ -883,7 +906,7 @@ end + def checktraffic(tun) + return if TRAFFICTIMEOUT == 0 + ipkts = getipkts(tun.name) +- while TRUE ++ while true + sleep TRAFFICTIMEOUT + i = getipkts(tun.name) + next if i == -1 +@@ -899,7 +922,7 @@ end + + def service_dtcp(sock, name) + debugmsg("service_dtcp(#{sock}, #{name})\n") +- while TRUE ++ while true + debugmsg("service_dtcp(#{sock}, #{name}) accepting\n") + Thread.start(sock.accept) { |s| + debugmsg("service_dtcp(#{sock}, #{name}) accepted #{s}\n") +@@ -912,7 +935,7 @@ def service_dtcp(sock, name) + + # check response + # tunnel itojun RESPONSE type +- while TRUE ++ while true + t = IO.select([s], [], [s], tun == nil ? AUTHTIMEOUT : TUNTIMEOUT) + if t == nil + s.print "-ERR connection timed out, disconnecting\r\n" +@@ -1173,13 +1196,14 @@ port = 20200 $tunif = TUNIF $ng_tunif = "ng" $cloning = TUNIF_CLONING @@ -83,7 +113,7 @@ diff -u dtcps.rb.orig dtcps.rb rescue usage() exit 0 -@@ -1190,6 +1214,7 @@ +@@ -1190,6 +1214,7 @@ $udp_tunnel_port = params["b"].to_i if params["b"] $cloning = false if params["c"] $debug = params["d"] $daemonize = !params["D"]