Skip to content

force fluentd/fluent-gem scripts to use installed ruby interpreter #1

Closed
kzk wants to merge 1 commit into
fluent:masterfrom
kzk:master
Closed

force fluentd/fluent-gem scripts to use installed ruby interpreter #1
kzk wants to merge 1 commit into
fluent:masterfrom
kzk:master

Conversation

@kzk

@kzk kzk commented Jul 31, 2011

Copy link
Copy Markdown
Member

No description provided.

@frsyuki

frsyuki commented Aug 1, 2011

Copy link
Copy Markdown
Member

The problem also affected depended gems (jeweler, rake, bundle, etc). It may cause problems.
So I fixed the install process at 16948fd.

@frsyuki frsyuki closed this Aug 1, 2011
ashie added a commit that referenced this pull request Apr 14, 2021
When a client with invalid TLS certificates is trying to connect,
following logs will be outputted repeatedly, but it doesn't include
peer information. It's hard to investigate which client has the
problem.

2021-03-31 08:08:58 +0000 [warn]: #1 unexpected error before accepting TLS connection by OpenSSL error_class=OpenSSL::SSL::SSLError error="SSL_accept SYSCALL returned=5 errno=0 state=SSLv3/TLS write server done"
2021-03-31 08:08:58 +0000 [warn]: #1 unexpected error before accepting TLS connection by OpenSSL error_class=OpenSSL::SSL::SSLError error="SSL_accept returned=1 errno=0 state=error: sslv3 alert bad certificate"
2021-03-31 08:08:58 +0000 [warn]: #0 unexpected error before accepting TLS connection by OpenSSL error_class=OpenSSL::SSL::SSLError error="SSL_accept returned=1 errno=0 state=error: sslv3 alert bad certificate"

Signed-off-by: Takuro Ashie <ashie@clear-code.com>
ashie added a commit that referenced this pull request Apr 14, 2021
When a client with invalid TLS certificates is trying to connect,
following logs will be outputted repeatedly, but it doesn't include
peer information. It's hard to investigate which client has the
problem.

2021-03-31 08:08:58 +0000 [warn]: #1 unexpected error before accepting TLS connection by OpenSSL error_class=OpenSSL::SSL::SSLError error="SSL_accept SYSCALL returned=5 errno=0 state=SSLv3/TLS write server done"
2021-03-31 08:08:58 +0000 [warn]: #1 unexpected error before accepting TLS connection by OpenSSL error_class=OpenSSL::SSL::SSLError error="SSL_accept returned=1 errno=0 state=error: sslv3 alert bad certificate"
2021-03-31 08:08:58 +0000 [warn]: #0 unexpected error before accepting TLS connection by OpenSSL error_class=OpenSSL::SSL::SSLError error="SSL_accept returned=1 errno=0 state=error: sslv3 alert bad certificate"

Signed-off-by: Takuro Ashie <ashie@clear-code.com>
ashie added a commit that referenced this pull request Apr 22, 2021
When a client with invalid TLS certificates is trying to connect,
following logs will be outputted repeatedly, but it doesn't include
peer information. It's hard to investigate which client has the
problem.

2021-03-31 08:08:58 +0000 [warn]: #1 unexpected error before accepting TLS connection by OpenSSL error_class=OpenSSL::SSL::SSLError error="SSL_accept SYSCALL returned=5 errno=0 state=SSLv3/TLS write server done"
2021-03-31 08:08:58 +0000 [warn]: #1 unexpected error before accepting TLS connection by OpenSSL error_class=OpenSSL::SSL::SSLError error="SSL_accept returned=1 errno=0 state=error: sslv3 alert bad certificate"
2021-03-31 08:08:58 +0000 [warn]: #0 unexpected error before accepting TLS connection by OpenSSL error_class=OpenSSL::SSL::SSLError error="SSL_accept returned=1 errno=0 state=error: sslv3 alert bad certificate"

Signed-off-by: Takuro Ashie <ashie@clear-code.com>
daipom pushed a commit that referenced this pull request Nov 20, 2025
**Which issue(s) this PR fixes**: 
Fixes #5148

**What this PR does / why we need it**: 

Since Ruby 4.0, When we give pipe command in `Kernel.open`, it causes an
error.

```
$ ruby -w -v -e "Kernel.open('| uname -a'){|out| p out.read }"
ruby 3.4.7 (2025-10-08 revision 7a5688e2a2) +PRISM [x86_64-linux]
-e:1: warning: Calling Kernel#open with a leading '|' is deprecated and will be removed in Ruby 4.0; use IO.popen instead
"Linux UM890 6.17.1-0-MANJARO #1 SMP PREEMPT_DYNAMIC Tue, 07 Oct 2025 07:57:35 +0000 x86_64 GNU/Linux\n"

$ ruby -w -v -e "Kernel.open('| uname -a'){|out| p out.read }"
ruby 4.0.0dev (2025-11-20T00:03:23Z master 167c3dbaa0) +PRISM [x86_64-linux]
-e:1:in 'File#initialize': No such file or directory @ rb_sysopen - | uname -a (Errno::ENOENT)
	from -e:1:in 'Kernel.open'
	from -e:1:in '<main>'
```

This path will save the command's result in temporary files and use them
instead due to avoid the error.


**Docs Changes**:
N/A

**Release Note**: 
N/A

Signed-off-by: Shizuo Fujita <fujita@clear-code.com>
Watson1978 added a commit that referenced this pull request Nov 21, 2025
**Which issue(s) this PR fixes**: 
Fixes #5148

**What this PR does / why we need it**: 
Related to #5159
I overlooked the fact that there were also tests using pipe commands in
another file.

Since Ruby 4.0, When we give pipe command in `Kernel.open`, it causes an
error.

```
$ ruby -w -v -e "Kernel.open('| uname -a'){|out| p out.read }"
ruby 3.4.7 (2025-10-08 revision 7a5688e2a2) +PRISM [x86_64-linux]
-e:1: warning: Calling Kernel#open with a leading '|' is deprecated and will be removed in Ruby 4.0; use IO.popen instead
"Linux UM890 6.17.1-0-MANJARO #1 SMP PREEMPT_DYNAMIC Tue, 07 Oct 2025 07:57:35 +0000 x86_64 GNU/Linux\n"

$ ruby -w -v -e "Kernel.open('| uname -a'){|out| p out.read }"
ruby 4.0.0dev (2025-11-20T00:03:23Z master 167c3dbaa0) +PRISM [x86_64-linux]
-e:1:in 'File#initialize': No such file or directory @ rb_sysopen - | uname -a (Errno::ENOENT)
	from -e:1:in 'Kernel.open'
	from -e:1:in '<main>'
```

**Docs Changes**:
N/A

**Release Note**: 
N/A

Signed-off-by: Shizuo Fujita <fujita@clear-code.com>
Watson1978 added a commit that referenced this pull request Dec 9, 2025
**Which issue(s) this PR fixes**:
Fixes #5148

**What this PR does / why we need it**:
Related to #5159
I overlooked the fact that there were also tests using pipe commands in
another file.

Since Ruby 4.0, When we give pipe command in `Kernel.open`, it causes an
error.

```
$ ruby -w -v -e "Kernel.open('| uname -a'){|out| p out.read }"
ruby 3.4.7 (2025-10-08 revision 7a5688e2a2) +PRISM [x86_64-linux]
-e:1: warning: Calling Kernel#open with a leading '|' is deprecated and will be removed in Ruby 4.0; use IO.popen instead
"Linux UM890 6.17.1-0-MANJARO #1 SMP PREEMPT_DYNAMIC Tue, 07 Oct 2025 07:57:35 +0000 x86_64 GNU/Linux\n"

$ ruby -w -v -e "Kernel.open('| uname -a'){|out| p out.read }"
ruby 4.0.0dev (2025-11-20T00:03:23Z master 167c3dbaa0) +PRISM [x86_64-linux]
-e:1:in 'File#initialize': No such file or directory @ rb_sysopen - | uname -a (Errno::ENOENT)
	from -e:1:in 'Kernel.open'
	from -e:1:in '<main>'
```

**Docs Changes**:
N/A

**Release Note**:
N/A

Signed-off-by: Shizuo Fujita <fujita@clear-code.com>
Watson1978 added a commit that referenced this pull request Dec 9, 2025
**Which issue(s) this PR fixes**:
Fixes #5148

**What this PR does / why we need it**:
Related to #5159
I overlooked the fact that there were also tests using pipe commands in
another file.

Since Ruby 4.0, When we give pipe command in `Kernel.open`, it causes an
error.

```
$ ruby -w -v -e "Kernel.open('| uname -a'){|out| p out.read }"
ruby 3.4.7 (2025-10-08 revision 7a5688e2a2) +PRISM [x86_64-linux]
-e:1: warning: Calling Kernel#open with a leading '|' is deprecated and will be removed in Ruby 4.0; use IO.popen instead
"Linux UM890 6.17.1-0-MANJARO #1 SMP PREEMPT_DYNAMIC Tue, 07 Oct 2025 07:57:35 +0000 x86_64 GNU/Linux\n"

$ ruby -w -v -e "Kernel.open('| uname -a'){|out| p out.read }"
ruby 4.0.0dev (2025-11-20T00:03:23Z master 167c3dbaa0) +PRISM [x86_64-linux]
-e:1:in 'File#initialize': No such file or directory @ rb_sysopen - | uname -a (Errno::ENOENT)
	from -e:1:in 'Kernel.open'
	from -e:1:in '<main>'
```

**Docs Changes**:
N/A

**Release Note**:
N/A

Signed-off-by: Shizuo Fujita <fujita@clear-code.com>
Watson1978 added a commit that referenced this pull request Dec 9, 2025
**Which issue(s) this PR fixes**:
Fixes #5148

**What this PR does / why we need it**:

Since Ruby 4.0, When we give pipe command in `Kernel.open`, it causes an
error.

```
$ ruby -w -v -e "Kernel.open('| uname -a'){|out| p out.read }"
ruby 3.4.7 (2025-10-08 revision 7a5688e2a2) +PRISM [x86_64-linux]
-e:1: warning: Calling Kernel#open with a leading '|' is deprecated and will be removed in Ruby 4.0; use IO.popen instead
"Linux UM890 6.17.1-0-MANJARO #1 SMP PREEMPT_DYNAMIC Tue, 07 Oct 2025 07:57:35 +0000 x86_64 GNU/Linux\n"

$ ruby -w -v -e "Kernel.open('| uname -a'){|out| p out.read }"
ruby 4.0.0dev (2025-11-20T00:03:23Z master 167c3dbaa0) +PRISM [x86_64-linux]
-e:1:in 'File#initialize': No such file or directory @ rb_sysopen - | uname -a (Errno::ENOENT)
	from -e:1:in 'Kernel.open'
	from -e:1:in '<main>'
```

This path will save the command's result in temporary files and use them
instead due to avoid the error.

**Docs Changes**:
N/A

**Release Note**:
N/A

Signed-off-by: Shizuo Fujita <fujita@clear-code.com>
Watson1978 added a commit that referenced this pull request Dec 9, 2025
**Which issue(s) this PR fixes**:
Fixes #5148

**What this PR does / why we need it**:

Since Ruby 4.0, When we give pipe command in `Kernel.open`, it causes an
error.

```
$ ruby -w -v -e "Kernel.open('| uname -a'){|out| p out.read }"
ruby 3.4.7 (2025-10-08 revision 7a5688e2a2) +PRISM [x86_64-linux]
-e:1: warning: Calling Kernel#open with a leading '|' is deprecated and will be removed in Ruby 4.0; use IO.popen instead
"Linux UM890 6.17.1-0-MANJARO #1 SMP PREEMPT_DYNAMIC Tue, 07 Oct 2025 07:57:35 +0000 x86_64 GNU/Linux\n"

$ ruby -w -v -e "Kernel.open('| uname -a'){|out| p out.read }"
ruby 4.0.0dev (2025-11-20T00:03:23Z master 167c3dbaa0) +PRISM [x86_64-linux]
-e:1:in 'File#initialize': No such file or directory @ rb_sysopen - | uname -a (Errno::ENOENT)
	from -e:1:in 'Kernel.open'
	from -e:1:in '<main>'
```

This path will save the command's result in temporary files and use them
instead due to avoid the error.

**Docs Changes**:
N/A

**Release Note**:
N/A

Signed-off-by: Shizuo Fujita <fujita@clear-code.com>
daipom pushed a commit that referenced this pull request Dec 9, 2025
Backport #5160

**Which issue(s) this PR fixes**:
Fixes #5148

**What this PR does / why we need it**:
Related to #5159
I overlooked the fact that there were also tests using pipe commands in
another file.

Since Ruby 4.0, When we give pipe command in `Kernel.open`, it causes an
error.

```
$ ruby -w -v -e "Kernel.open('| uname -a'){|out| p out.read }"
ruby 3.4.7 (2025-10-08 revision 7a5688e2a2) +PRISM [x86_64-linux]
-e:1: warning: Calling Kernel#open with a leading '|' is deprecated and will be removed in Ruby 4.0; use IO.popen instead
"Linux UM890 6.17.1-0-MANJARO #1 SMP PREEMPT_DYNAMIC Tue, 07 Oct 2025 07:57:35 +0000 x86_64 GNU/Linux\n"

$ ruby -w -v -e "Kernel.open('| uname -a'){|out| p out.read }"
ruby 4.0.0dev (2025-11-20T00:03:23Z master 167c3dbaa0) +PRISM [x86_64-linux]
-e:1:in 'File#initialize': No such file or directory @ rb_sysopen - | uname -a (Errno::ENOENT)
	from -e:1:in 'Kernel.open'
	from -e:1:in '<main>'
```

**Docs Changes**:
N/A

**Release Note**:
N/A

Signed-off-by: Shizuo Fujita <fujita@clear-code.com>
daipom pushed a commit that referenced this pull request Dec 9, 2025
Backport #5160

**Which issue(s) this PR fixes**:
Fixes #5148

**What this PR does / why we need it**:
Related to #5159
I overlooked the fact that there were also tests using pipe commands in
another file.

Since Ruby 4.0, When we give pipe command in `Kernel.open`, it causes an
error.

```
$ ruby -w -v -e "Kernel.open('| uname -a'){|out| p out.read }"
ruby 3.4.7 (2025-10-08 revision 7a5688e2a2) +PRISM [x86_64-linux]
-e:1: warning: Calling Kernel#open with a leading '|' is deprecated and will be removed in Ruby 4.0; use IO.popen instead
"Linux UM890 6.17.1-0-MANJARO #1 SMP PREEMPT_DYNAMIC Tue, 07 Oct 2025 07:57:35 +0000 x86_64 GNU/Linux\n"

$ ruby -w -v -e "Kernel.open('| uname -a'){|out| p out.read }"
ruby 4.0.0dev (2025-11-20T00:03:23Z master 167c3dbaa0) +PRISM [x86_64-linux]
-e:1:in 'File#initialize': No such file or directory @ rb_sysopen - | uname -a (Errno::ENOENT)
	from -e:1:in 'Kernel.open'
	from -e:1:in '<main>'
```

**Docs Changes**:
N/A

**Release Note**:
N/A

Signed-off-by: Shizuo Fujita <fujita@clear-code.com>
daipom pushed a commit that referenced this pull request Dec 9, 2025
…5186)

Backport #5159

**Which issue(s) this PR fixes**:
Fixes #5148

**What this PR does / why we need it**:

Since Ruby 4.0, When we give pipe command in `Kernel.open`, it causes an
error.

```
$ ruby -w -v -e "Kernel.open('| uname -a'){|out| p out.read }"
ruby 3.4.7 (2025-10-08 revision 7a5688e2a2) +PRISM [x86_64-linux]
-e:1: warning: Calling Kernel#open with a leading '|' is deprecated and will be removed in Ruby 4.0; use IO.popen instead
"Linux UM890 6.17.1-0-MANJARO #1 SMP PREEMPT_DYNAMIC Tue, 07 Oct 2025 07:57:35 +0000 x86_64 GNU/Linux\n"

$ ruby -w -v -e "Kernel.open('| uname -a'){|out| p out.read }"
ruby 4.0.0dev (2025-11-20T00:03:23Z master 167c3dbaa0) +PRISM [x86_64-linux]
-e:1:in 'File#initialize': No such file or directory @ rb_sysopen - | uname -a (Errno::ENOENT)
	from -e:1:in 'Kernel.open'
	from -e:1:in '<main>'
```

This path will save the command's result in temporary files and use them
instead due to avoid the error.

**Docs Changes**:
N/A

**Release Note**:
N/A

Signed-off-by: Shizuo Fujita <fujita@clear-code.com>
daipom pushed a commit that referenced this pull request Dec 9, 2025
…5185)

Backport #5159

**Which issue(s) this PR fixes**:
Fixes #5148

**What this PR does / why we need it**:

Since Ruby 4.0, When we give pipe command in `Kernel.open`, it causes an
error.

```
$ ruby -w -v -e "Kernel.open('| uname -a'){|out| p out.read }"
ruby 3.4.7 (2025-10-08 revision 7a5688e2a2) +PRISM [x86_64-linux]
-e:1: warning: Calling Kernel#open with a leading '|' is deprecated and will be removed in Ruby 4.0; use IO.popen instead
"Linux UM890 6.17.1-0-MANJARO #1 SMP PREEMPT_DYNAMIC Tue, 07 Oct 2025 07:57:35 +0000 x86_64 GNU/Linux\n"

$ ruby -w -v -e "Kernel.open('| uname -a'){|out| p out.read }"
ruby 4.0.0dev (2025-11-20T00:03:23Z master 167c3dbaa0) +PRISM [x86_64-linux]
-e:1:in 'File#initialize': No such file or directory @ rb_sysopen - | uname -a (Errno::ENOENT)
	from -e:1:in 'Kernel.open'
	from -e:1:in '<main>'
```

This path will save the command's result in temporary files and use them
instead due to avoid the error.

**Docs Changes**:
N/A

**Release Note**:
N/A

Signed-off-by: Shizuo Fujita <fujita@clear-code.com>
kenhys pushed a commit that referenced this pull request Mar 31, 2026
**Which issue(s) this PR fixes**: 
Fixes #

**What this PR does / why we need it**: 
`win32-registry` gem will be moved from default to bundled gem at Ruby
4.1.
Ref. ruby/ruby#16189

Therefore, if we do not add it as a runtime dependency, it will fail to
load.

See
https://github.com/fluent/fluentd/actions/runs/23711126803/job/69070953279
```
Error: -03-29 14:45:48 +0000 [error]: cannot load such file -- win32/registry path=\"win32/registry\" error_class=LoadError error=\"cannot load such file -- win32/registry\"\r\n">
  was expected to include:
  <["#0 fluentd worker is now running worker=0",
   "#1 fluentd worker is now running worker=1",
   "#1 adding match pattern=\"dummy\" type=\"null\""]>
D:/a/fluentd/fluentd/test/command/test_fluentd.rb:219:in 'TestFluentdCommand#assert_log_matches'
D:/a/fluentd/fluentd/test/command/test_fluentd.rb:1077:in 'block (2 levels) in <class:TestFluentdCommand>'
```

**Docs Changes**:
N/A

**Release Note**: 
* gem: add win32-registry as runtime dependency for Ruby 4.1

Signed-off-by: Shizuo Fujita <fujita@clear-code.com>
github-actions Bot pushed a commit that referenced this pull request Apr 5, 2026
**Which issue(s) this PR fixes**:
Fixes #

**What this PR does / why we need it**:
`win32-registry` gem will be moved from default to bundled gem at Ruby
4.1.
Ref. ruby/ruby#16189

Therefore, if we do not add it as a runtime dependency, it will fail to
load.

See
https://github.com/fluent/fluentd/actions/runs/23711126803/job/69070953279
```
Error: -03-29 14:45:48 +0000 [error]: cannot load such file -- win32/registry path=\"win32/registry\" error_class=LoadError error=\"cannot load such file -- win32/registry\"\r\n">
  was expected to include:
  <["#0 fluentd worker is now running worker=0",
   "#1 fluentd worker is now running worker=1",
   "#1 adding match pattern=\"dummy\" type=\"null\""]>
D:/a/fluentd/fluentd/test/command/test_fluentd.rb:219:in 'TestFluentdCommand#assert_log_matches'
D:/a/fluentd/fluentd/test/command/test_fluentd.rb:1077:in 'block (2 levels) in <class:TestFluentdCommand>'
```

**Docs Changes**:
N/A

**Release Note**:
* gem: add win32-registry as runtime dependency for Ruby 4.1

Signed-off-by: Shizuo Fujita <fujita@clear-code.com>
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Watson1978 added a commit that referenced this pull request Apr 5, 2026
…by 4.1 (#5308) (#5317)

**Which issue(s) this PR fixes**: 
Backport #5308
Fixes #

**What this PR does / why we need it**: 
`win32-registry` gem will be moved from default to bundled gem at Ruby
4.1.
Ref. ruby/ruby#16189

Therefore, if we do not add it as a runtime dependency, it will fail to
load.

See
https://github.com/fluent/fluentd/actions/runs/23711126803/job/69070953279
```
Error: -03-29 14:45:48 +0000 [error]: cannot load such file -- win32/registry path=\"win32/registry\" error_class=LoadError error=\"cannot load such file -- win32/registry\"\r\n">
  was expected to include:
  <["#0 fluentd worker is now running worker=0",
   "#1 fluentd worker is now running worker=1",
   "#1 adding match pattern=\"dummy\" type=\"null\""]>
D:/a/fluentd/fluentd/test/command/test_fluentd.rb:219:in 'TestFluentdCommand#assert_log_matches'
D:/a/fluentd/fluentd/test/command/test_fluentd.rb:1077:in 'block (2 levels) in <class:TestFluentdCommand>'
```

**Docs Changes**:
N/A

**Release Note**: 
* gem: add win32-registry as runtime dependency for Ruby 4.1

Signed-off-by: Shizuo Fujita <fujita@clear-code.com>
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Shizuo Fujita <fujita@clear-code.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants