git: 48f35b4d24ff - main - net/benthos: fix default Redis port number

From: Jimmy Olgeni <olgeni_at_FreeBSD.org>
Date: Sat, 25 May 2024 18:03:59 UTC
The branch main has been updated by olgeni:

URL: https://cgit.FreeBSD.org/ports/commit/?id=48f35b4d24ffbdf67919d6e6760ee5f2ce85301d

commit 48f35b4d24ffbdf67919d6e6760ee5f2ce85301d
Author:     Jimmy Olgeni <olgeni@FreeBSD.org>
AuthorDate: 2024-05-23 10:18:32 +0000
Commit:     Jimmy Olgeni <olgeni@FreeBSD.org>
CommitDate: 2024-05-25 18:03:52 +0000

    net/benthos: fix default Redis port number
    
    It should be 6379, but it shows up as 6397 in both the
    documentation and in the generated config files.
    
    Matches upstream issue #2572, pending merge.
    
    (also make a small portclippy fix)
---
 net/benthos/Makefile               |   4 +-
 net/benthos/files/patch-redis-port | 387 +++++++++++++++++++++++++++++++++++++
 2 files changed, 389 insertions(+), 2 deletions(-)

diff --git a/net/benthos/Makefile b/net/benthos/Makefile
index 4b61d9e0cdd1..03a4b022b053 100644
--- a/net/benthos/Makefile
+++ b/net/benthos/Makefile
@@ -1,7 +1,7 @@
 PORTNAME=	benthos
-DISTVERSION=	4.27.0
 DISTVERSIONPREFIX=	v
-PORTREVISION=	1
+DISTVERSION=	4.27.0
+PORTREVISION=	2
 CATEGORIES=	net
 
 MAINTAINER=	olgeni@FreeBSD.org
diff --git a/net/benthos/files/patch-redis-port b/net/benthos/files/patch-redis-port
new file mode 100644
index 000000000000..f5459772e9ba
--- /dev/null
+++ b/net/benthos/files/patch-redis-port
@@ -0,0 +1,387 @@
+diff --git internal/impl/redis/client.go internal/impl/redis/client.go
+index eeadf575b..a078c3a81 100644
+--- internal/impl/redis/client.go
++++ internal/impl/redis/client.go
+@@ -21,7 +21,7 @@ Some cloud hosted instances of Redis (such as Azure Cache) might need some hand
+ 	return []*service.ConfigField{
+ 		service.NewURLField("url").
+ 			Description("The URL of the target Redis server. Database is optional and is supplied as the URL path.").
+-			Example("redis://:6397").
++			Example("redis://:6379").
+ 			Example("redis://localhost:6379").
+ 			Example("redis://foousername:foopassword@redisplace:6379").
+ 			Example("redis://:foopassword@redisplace:6379").
+diff --git website/docs/components/caches/redis.md website/docs/components/caches/redis.md
+index 4ee3d8b74..eefed0bde 100644
+--- website/docs/components/caches/redis.md
++++ website/docs/components/caches/redis.md
+@@ -28,7 +28,7 @@ Use a Redis instance as a cache. The expiration can be set to zero or an empty s
+ # Common config fields, showing default values
+ label: ""
+ redis:
+-  url: redis://:6397 # No default (required)
++  url: redis://:6379 # No default (required)
+   prefix: "" # No default (optional)
+ ```
+
+@@ -39,7 +39,7 @@ redis:
+ # All config fields, showing default values
+ label: ""
+ redis:
+-  url: redis://:6397 # No default (required)
++  url: redis://:6379 # No default (required)
+   kind: simple
+   master: ""
+   tls:
+@@ -72,7 +72,7 @@ Type: `string`
+ ```yml
+ # Examples
+
+-url: redis://:6397
++url: redis://:6379
+
+ url: redis://localhost:6379
+
+diff --git website/docs/components/inputs/redis_list.md website/docs/components/inputs/redis_list.md
+index 8dd9aacff..456ecdf57 100644
+--- website/docs/components/inputs/redis_list.md
++++ website/docs/components/inputs/redis_list.md
+@@ -30,7 +30,7 @@ Pops messages from the beginning of a Redis list using the BLPop command.
+ input:
+   label: ""
+   redis_list:
+-    url: redis://:6397 # No default (required)
++    url: redis://:6379 # No default (required)
+     key: "" # No default (required)
+     auto_replay_nacks: true
+ ```
+@@ -43,7 +43,7 @@ input:
+ input:
+   label: ""
+   redis_list:
+-    url: redis://:6397 # No default (required)
++    url: redis://:6379 # No default (required)
+     kind: simple
+     master: ""
+     tls:
+@@ -75,7 +75,7 @@ Type: `string`
+ ```yml
+ # Examples
+
+-url: redis://:6397
++url: redis://:6379
+
+ url: redis://localhost:6379
+
+diff --git website/docs/components/inputs/redis_pubsub.md website/docs/components/inputs/redis_pubsub.md
+index 2efe5dda5..87e490aa3 100644
+--- website/docs/components/inputs/redis_pubsub.md
++++ website/docs/components/inputs/redis_pubsub.md
+@@ -30,7 +30,7 @@ Consume from a Redis publish/subscribe channel using either the SUBSCRIBE or PSU
+ input:
+   label: ""
+   redis_pubsub:
+-    url: redis://:6397 # No default (required)
++    url: redis://:6379 # No default (required)
+     channels: [] # No default (required)
+     use_patterns: false
+     auto_replay_nacks: true
+@@ -44,7 +44,7 @@ input:
+ input:
+   label: ""
+   redis_pubsub:
+-    url: redis://:6397 # No default (required)
++    url: redis://:6379 # No default (required)
+     kind: simple
+     master: ""
+     tls:
+@@ -82,7 +82,7 @@ Type: `string`
+ ```yml
+ # Examples
+
+-url: redis://:6397
++url: redis://:6379
+
+ url: redis://localhost:6379
+
+diff --git website/docs/components/inputs/redis_scan.md website/docs/components/inputs/redis_scan.md
+index 5384f7893..43ecc08ee 100644
+--- website/docs/components/inputs/redis_scan.md
++++ website/docs/components/inputs/redis_scan.md
+@@ -35,7 +35,7 @@ Introduced in version 4.27.0.
+ input:
+   label: ""
+   redis_scan:
+-    url: redis://:6397 # No default (required)
++    url: redis://:6379 # No default (required)
+     auto_replay_nacks: true
+     match: ""
+ ```
+@@ -48,7 +48,7 @@ input:
+ input:
+   label: ""
+   redis_scan:
+-    url: redis://:6397 # No default (required)
++    url: redis://:6379 # No default (required)
+     kind: simple
+     master: ""
+     tls:
+@@ -88,7 +88,7 @@ Type: `string`
+ ```yml
+ # Examples
+
+-url: redis://:6397
++url: redis://:6379
+
+ url: redis://localhost:6379
+
+diff --git website/docs/components/inputs/redis_streams.md website/docs/components/inputs/redis_streams.md
+index 9d72ea90d..d25b6223b 100644
+--- website/docs/components/inputs/redis_streams.md
++++ website/docs/components/inputs/redis_streams.md
+@@ -30,7 +30,7 @@ Pulls messages from Redis (v5.0+) streams with the XREADGROUP command. The `clie
+ input:
+   label: ""
+   redis_streams:
+-    url: redis://:6397 # No default (required)
++    url: redis://:6379 # No default (required)
+     body_key: body
+     streams: [] # No default (required)
+     auto_replay_nacks: true
+@@ -47,7 +47,7 @@ input:
+ input:
+   label: ""
+   redis_streams:
+-    url: redis://:6397 # No default (required)
++    url: redis://:6379 # No default (required)
+     kind: simple
+     master: ""
+     tls:
+@@ -86,7 +86,7 @@ Type: `string`
+ ```yml
+ # Examples
+
+-url: redis://:6397
++url: redis://:6379
+
+ url: redis://localhost:6379
+
+diff --git website/docs/components/outputs/redis_hash.md website/docs/components/outputs/redis_hash.md
+index 808dd5c60..3bf96bbea 100644
+--- website/docs/components/outputs/redis_hash.md
++++ website/docs/components/outputs/redis_hash.md
+@@ -30,7 +30,7 @@ Sets Redis hash objects using the HMSET command.
+ output:
+   label: ""
+   redis_hash:
+-    url: redis://:6397 # No default (required)
++    url: redis://:6379 # No default (required)
+     key: ${! @.kafka_key )} # No default (required)
+     walk_metadata: false
+     walk_json_object: false
+@@ -46,7 +46,7 @@ output:
+ output:
+   label: ""
+   redis_hash:
+-    url: redis://:6397 # No default (required)
++    url: redis://:6379 # No default (required)
+     kind: simple
+     master: ""
+     tls:
+@@ -111,7 +111,7 @@ Type: `string`
+ ```yml
+ # Examples
+
+-url: redis://:6397
++url: redis://:6379
+
+ url: redis://localhost:6379
+
+diff --git website/docs/components/outputs/redis_list.md website/docs/components/outputs/redis_list.md
+index c22103ca1..8663d4009 100644
+--- website/docs/components/outputs/redis_list.md
++++ website/docs/components/outputs/redis_list.md
+@@ -30,7 +30,7 @@ Pushes messages onto the end of a Redis list (which is created if it doesn't alr
+ output:
+   label: ""
+   redis_list:
+-    url: redis://:6397 # No default (required)
++    url: redis://:6379 # No default (required)
+     key: some_list # No default (required)
+     max_in_flight: 64
+     batching:
+@@ -48,7 +48,7 @@ output:
+ output:
+   label: ""
+   redis_list:
+-    url: redis://:6397 # No default (required)
++    url: redis://:6379 # No default (required)
+     kind: simple
+     master: ""
+     tls:
+@@ -96,7 +96,7 @@ Type: `string`
+ ```yml
+ # Examples
+
+-url: redis://:6397
++url: redis://:6379
+
+ url: redis://localhost:6379
+
+diff --git website/docs/components/outputs/redis_pubsub.md website/docs/components/outputs/redis_pubsub.md
+index a3c671522..c8cbbc6ae 100644
+--- website/docs/components/outputs/redis_pubsub.md
++++ website/docs/components/outputs/redis_pubsub.md
+@@ -30,7 +30,7 @@ Publishes messages through the Redis PubSub model. It is not possible to guarant
+ output:
+   label: ""
+   redis_pubsub:
+-    url: redis://:6397 # No default (required)
++    url: redis://:6379 # No default (required)
+     channel: "" # No default (required)
+     max_in_flight: 64
+     batching:
+@@ -48,7 +48,7 @@ output:
+ output:
+   label: ""
+   redis_pubsub:
+-    url: redis://:6397 # No default (required)
++    url: redis://:6379 # No default (required)
+     kind: simple
+     master: ""
+     tls:
+@@ -95,7 +95,7 @@ Type: `string`
+ ```yml
+ # Examples
+
+-url: redis://:6397
++url: redis://:6379
+
+ url: redis://localhost:6379
+
+diff --git website/docs/components/outputs/redis_streams.md website/docs/components/outputs/redis_streams.md
+index 282336be1..aa9b9688c 100644
+--- website/docs/components/outputs/redis_streams.md
++++ website/docs/components/outputs/redis_streams.md
+@@ -30,7 +30,7 @@ Pushes messages to a Redis (v5.0+) Stream (which is created if it doesn't alread
+ output:
+   label: ""
+   redis_streams:
+-    url: redis://:6397 # No default (required)
++    url: redis://:6379 # No default (required)
+     stream: "" # No default (required)
+     body_key: body
+     max_length: 0
+@@ -52,7 +52,7 @@ output:
+ output:
+   label: ""
+   redis_streams:
+-    url: redis://:6397 # No default (required)
++    url: redis://:6379 # No default (required)
+     kind: simple
+     master: ""
+     tls:
+@@ -105,7 +105,7 @@ Type: `string`
+ ```yml
+ # Examples
+
+-url: redis://:6397
++url: redis://:6379
+
+ url: redis://localhost:6379
+
+diff --git website/docs/components/processors/redis.md website/docs/components/processors/redis.md
+index 814426078..e30b95b8e 100644
+--- website/docs/components/processors/redis.md
++++ website/docs/components/processors/redis.md
+@@ -30,7 +30,7 @@ performed for each message and the message contents are replaced with the result
+ # Common config fields, showing default values
+ label: ""
+ redis:
+-  url: redis://:6397 # No default (required)
++  url: redis://:6379 # No default (required)
+   command: scard # No default (optional)
+   args_mapping: root = [ this.key ] # No default (optional)
+ ```
+@@ -42,7 +42,7 @@ redis:
+ # All config fields, showing default values
+ label: ""
+ redis:
+-  url: redis://:6397 # No default (required)
++  url: redis://:6379 # No default (required)
+   kind: simple
+   master: ""
+   tls:
+@@ -134,7 +134,7 @@ Type: `string`
+ ```yml
+ # Examples
+
+-url: redis://:6397
++url: redis://:6379
+
+ url: redis://localhost:6379
+
+diff --git website/docs/components/processors/redis_script.md website/docs/components/processors/redis_script.md
+index 3bb5665f5..10b1a05c7 100644
+--- website/docs/components/processors/redis_script.md
++++ website/docs/components/processors/redis_script.md
+@@ -34,7 +34,7 @@ Introduced in version 4.11.0.
+ # Common config fields, showing default values
+ label: ""
+ redis_script:
+-  url: redis://:6397 # No default (required)
++  url: redis://:6379 # No default (required)
+   script: return redis.call('set', KEYS[1], ARGV[1]) # No default (required)
+   args_mapping: root = [ this.key ] # No default (required)
+   keys_mapping: root = [ this.key ] # No default (required)
+@@ -47,7 +47,7 @@ redis_script:
+ # All config fields, showing default values
+ label: ""
+ redis_script:
+-  url: redis://:6397 # No default (required)
++  url: redis://:6379 # No default (required)
+   kind: simple
+   master: ""
+   tls:
+@@ -115,7 +115,7 @@ Type: `string`
+ ```yml
+ # Examples
+
+-url: redis://:6397
++url: redis://:6379
+
+ url: redis://localhost:6379
+
+diff --git website/docs/components/rate_limits/redis.md website/docs/components/rate_limits/redis.md
+index 36c611b5e..4ef3fa968 100644
+--- website/docs/components/rate_limits/redis.md
++++ website/docs/components/rate_limits/redis.md
+@@ -33,7 +33,7 @@ Introduced in version 4.12.0.
+ # Common config fields, showing default values
+ label: ""
+ redis:
+-  url: redis://:6397 # No default (required)
++  url: redis://:6379 # No default (required)
+   count: 1000
+   interval: 1s
+   key: "" # No default (required)
+@@ -46,7 +46,7 @@ redis:
+ # All config fields, showing default values
+ label: ""
+ redis:
+-  url: redis://:6397 # No default (required)
++  url: redis://:6379 # No default (required)
+   kind: simple
+   master: ""
+   tls:
+@@ -76,7 +76,7 @@ Type: `string`
+ ```yml
+ # Examples
+
+-url: redis://:6397
++url: redis://:6379
+
+ url: redis://localhost:6379
+
+--
+2.45.1