Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package rubygem-fluentd for openSUSE:Factory
checked in at 2022-09-03 23:18:45
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/rubygem-fluentd (Old)
and /work/SRC/openSUSE:Factory/.rubygem-fluentd.new.2083 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "rubygem-fluentd"
Sat Sep 3 23:18:45 2022 rev:21 rq:1000908 version:1.15.2
Changes:
--------
--- /work/SRC/openSUSE:Factory/rubygem-fluentd/rubygem-fluentd.changes
2022-08-09 15:26:41.733341147 +0200
+++
/work/SRC/openSUSE:Factory/.rubygem-fluentd.new.2083/rubygem-fluentd.changes
2022-09-03 23:18:54.587789026 +0200
@@ -1,0 +2,27 @@
+Mon Aug 29 06:50:35 UTC 2022 - Stephan Kulow <[email protected]>
+
+updated to version 1.15.2
+ see installed CHANGELOG.md
+
+ ## Release v1.15.2 - 2022/08/22
+
+ ### Enhancement
+
+ * Add a new system configuration `enable_jit`
+ https://github.com/fluent/fluentd/pull/3857
+
+ ### Bug Fix
+
+ * out_file: Fix append mode with `--daemon` flag
+ https://github.com/fluent/fluentd/pull/3864
+ * child_process: Plug file descriptor leak
+ https://github.com/fluent/fluentd/pull/3844
+
+ ### Misc
+
+ * Drop win32-api gem to support Ruby 3.2
+ https://github.com/fluent/fluentd/pull/3849
+ https://github.com/fluent/fluentd/pull/3866
+
+
+-------------------------------------------------------------------
Old:
----
fluentd-1.15.1.gem
New:
----
fluentd-1.15.2.gem
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ rubygem-fluentd.spec ++++++
--- /var/tmp/diff_new_pack.jM7v1G/_old 2022-09-03 23:18:55.131790448 +0200
+++ /var/tmp/diff_new_pack.jM7v1G/_new 2022-09-03 23:18:55.139790469 +0200
@@ -24,7 +24,7 @@
#
Name: rubygem-fluentd
-Version: 1.15.1
+Version: 1.15.2
Release: 0
%define mod_name fluentd
%define mod_full_name %{mod_name}-%{version}
++++++ fluentd-1.15.1.gem -> fluentd-1.15.2.gem ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/CHANGELOG.md new/CHANGELOG.md
--- old/CHANGELOG.md 2022-07-27 03:23:12.000000000 +0200
+++ new/CHANGELOG.md 2022-08-22 10:08:16.000000000 +0200
@@ -1,5 +1,25 @@
# v1.15
+## Release v1.15.2 - 2022/08/22
+
+### Enhancement
+
+* Add a new system configuration `enable_jit`
+ https://github.com/fluent/fluentd/pull/3857
+
+### Bug Fix
+
+* out_file: Fix append mode with `--daemon` flag
+ https://github.com/fluent/fluentd/pull/3864
+* child_process: Plug file descriptor leak
+ https://github.com/fluent/fluentd/pull/3844
+
+### Misc
+
+* Drop win32-api gem to support Ruby 3.2
+ https://github.com/fluent/fluentd/pull/3849
+ https://github.com/fluent/fluentd/pull/3866
+
## Release v1.15.1 - 2022/07/27
### Bug Fix
Binary files old/checksums.yaml.gz and new/checksums.yaml.gz differ
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/fluentd.gemspec new/fluentd.gemspec
--- old/fluentd.gemspec 2022-07-27 03:23:12.000000000 +0200
+++ new/fluentd.gemspec 2022-08-22 10:08:16.000000000 +0200
@@ -34,12 +34,9 @@
fake_platform = ENV['GEM_BUILD_FAKE_PLATFORM'].to_s
gem.platform = fake_platform unless fake_platform.empty?
if /mswin|mingw/ =~ fake_platform || (/mswin|mingw/ =~ RUBY_PLATFORM &&
fake_platform.empty?)
- gem.add_runtime_dependency("win32-api", [">= 1.10", "< 2.0.0"])
gem.add_runtime_dependency("win32-service", ["~> 2.3.0"])
gem.add_runtime_dependency("win32-ipc", ["~> 0.7.0"])
gem.add_runtime_dependency("win32-event", ["~> 0.6.3"])
- gem.add_runtime_dependency("windows-api", ["~> 0.4.5"])
- gem.add_runtime_dependency("windows-pr", ["~> 1.2.6"])
gem.add_runtime_dependency("certstore_c", ["~> 0.1.7"])
end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/lib/fluent/command/fluentd.rb
new/lib/fluent/command/fluentd.rb
--- old/lib/fluent/command/fluentd.rb 2022-07-27 03:23:12.000000000 +0200
+++ new/lib/fluent/command/fluentd.rb 2022-08-22 10:08:16.000000000 +0200
@@ -189,9 +189,6 @@
}
if Fluent.windows?
- require 'windows/library'
- include Windows::Library
-
opts.merge!(
:winsvc_name => 'fluentdwinsvc',
:winsvc_display_name => 'Fluentd Windows Service',
@@ -292,9 +289,7 @@
case winsvcinstmode
when 'i'
binary_path = File.join(File.dirname(__FILE__), "..")
- ruby_path = "\0" * 256
- GetModuleFileName.call(0,ruby_path,256)
- ruby_path = ruby_path.rstrip.gsub(/\\/, '/')
+ ruby_path = ServerEngine.ruby_bin_path
start_type = Service::DEMAND_START
if opts[:regwinsvcautostart]
start_type = Service::AUTO_START
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/lib/fluent/plugin/file_wrapper.rb
new/lib/fluent/plugin/file_wrapper.rb
--- old/lib/fluent/plugin/file_wrapper.rb 2022-07-27 03:23:12.000000000
+0200
+++ new/lib/fluent/plugin/file_wrapper.rb 2022-08-22 10:08:16.000000000
+0200
@@ -14,6 +14,8 @@
# limitations under the License.
#
+require 'fluent/win32api'
+
module Fluent
module FileWrapper
def self.open(path, mode='r')
@@ -36,19 +38,16 @@
end
class WindowsFile
- require 'windows/file'
- require 'windows/handle'
-
include File::Constants
- include Windows::File
- include Windows::Handle
attr_reader :io
+ INVALID_HANDLE_VALUE = -1
+
def initialize(path, mode='r')
@path = path
@io = File.open(path, mode2flags(mode))
- @file_handle = _get_osfhandle(@io.to_i)
+ @file_handle = Win32API._get_osfhandle(@io.to_i)
@io.instance_variable_set(:@file_index, self.ino)
def @io.ino
@file_index
@@ -68,7 +67,7 @@
def ino
by_handle_file_information = '\0'*(4+8+8+8+4+4+4+4+4+4) #72bytes
- unless GetFileInformationByHandle.call(@file_handle,
by_handle_file_information)
+ unless Win32API.GetFileInformationByHandle(@file_handle,
by_handle_file_information)
return 0
end
@@ -122,7 +121,7 @@
bufsize = 1024
buf = '\0' * bufsize
- unless GetFileInformationByHandleEx.call(@file_handle,
file_standard_info, buf, bufsize)
+ unless Win32API.GetFileInformationByHandleEx(@file_handle,
file_standard_info, buf, bufsize)
return false
end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/lib/fluent/plugin_helper/child_process.rb
new/lib/fluent/plugin_helper/child_process.rb
--- old/lib/fluent/plugin_helper/child_process.rb 2022-07-27
03:23:12.000000000 +0200
+++ new/lib/fluent/plugin_helper/child_process.rb 2022-08-22
10:08:16.000000000 +0200
@@ -346,6 +346,9 @@
if cb
cb.call(process_info.exit_status) rescue nil
end
+ process_info.readio&.close rescue nil
+ process_info.writeio&.close rescue nil
+ process_info.stderrio&.close rescue nil
end
thread[:_fluentd_plugin_helper_child_process_running] = true
thread[:_fluentd_plugin_helper_child_process_pid] = pid
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/lib/fluent/supervisor.rb new/lib/fluent/supervisor.rb
--- old/lib/fluent/supervisor.rb 2022-07-27 03:23:12.000000000 +0200
+++ new/lib/fluent/supervisor.rb 2022-08-22 10:08:16.000000000 +0200
@@ -32,12 +32,6 @@
require 'serverengine'
if Fluent.windows?
- require 'windows/library'
- require 'windows/synchronize'
- require 'windows/system_info'
- include Windows::Library
- include Windows::Synchronize
- include Windows::SystemInfo
require 'win32/ipc'
require 'win32/event'
end
@@ -50,6 +44,9 @@
@rpc_server = nil
@counter = nil
+ @fluentd_lock_dir = Dir.mktmpdir("fluentd-lock-")
+ ENV['FLUENTD_LOCK_DIR'] = @fluentd_lock_dir
+
if config[:rpc_endpoint]
@rpc_endpoint = config[:rpc_endpoint]
@enable_get_dump = config[:enable_get_dump]
@@ -79,9 +76,15 @@
stop_windows_event_thread if Fluent.windows?
stop_rpc_server if @rpc_endpoint
stop_counter_server if @counter
+ cleanup_lock_dir
Fluent::Supervisor.cleanup_resources
end
+ def cleanup_lock_dir
+ FileUtils.rm(Dir.glob(File.join(@fluentd_lock_dir, "fluentd-*.lock")))
+ FileUtils.rmdir(@fluentd_lock_dir)
+ end
+
def run_rpc_server
@rpc_server = RPC::Server.new(@rpc_endpoint, $log)
@@ -235,7 +238,8 @@
end
begin
loop do
- ipc_idx = ipc.wait_any(events.map {|e| e[:win32_event]},
Windows::Synchronize::INFINITE)
+ infinite = 0xFFFFFFFF
+ ipc_idx = ipc.wait_any(events.map {|e| e[:win32_event]}, infinite)
event_idx = ipc_idx - 1
if event_idx >= 0 && event_idx < events.length
@@ -876,10 +880,7 @@
Fluent::Supervisor.load_config(@config_path, params)
}
- Dir.mktmpdir("fluentd-lock-") do |lock_dir|
- ENV['FLUENTD_LOCK_DIR'] = lock_dir
- se.run
- end
+ se.run
end
def install_main_process_signal_handlers
@@ -1104,6 +1105,11 @@
fluentd_spawn_cmd << '-Eascii-8bit:ascii-8bit'
end
+ if @system_config.enable_jit
+ $log.info "enable Ruby JIT for workers (--jit)"
+ fluentd_spawn_cmd << '--jit'
+ end
+
# Adding `-h` so that it can avoid ruby's command blocking
# e.g. `ruby -Eascii-8bit:ascii-8bit` will block. but `ruby
-Eascii-8bit:ascii-8bit -h` won't.
_, e, s = Open3.capture3(*fluentd_spawn_cmd, "-h")
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/lib/fluent/system_config.rb
new/lib/fluent/system_config.rb
--- old/lib/fluent/system_config.rb 2022-07-27 03:23:12.000000000 +0200
+++ new/lib/fluent/system_config.rb 2022-08-22 10:08:16.000000000 +0200
@@ -28,7 +28,7 @@
:without_source, :rpc_endpoint, :enable_get_dump, :process_name,
:file_permission, :dir_permission, :counter_server, :counter_client,
:strict_config_value, :enable_msgpack_time_support,
:disable_shared_socket,
- :metrics, :enable_input_metrics, :enable_size_metrics
+ :metrics, :enable_input_metrics, :enable_size_metrics, :enable_jit
]
config_param :workers, :integer, default: 1
@@ -50,6 +50,7 @@
config_param :disable_shared_socket, :bool, default: nil
config_param :enable_input_metrics, :bool, default: nil
config_param :enable_size_metrics, :bool, default: nil
+ config_param :enable_jit, :bool, default: false
config_param :file_permission, default: nil do |v|
v.to_i(8)
end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/lib/fluent/version.rb new/lib/fluent/version.rb
--- old/lib/fluent/version.rb 2022-07-27 03:23:12.000000000 +0200
+++ new/lib/fluent/version.rb 2022-08-22 10:08:16.000000000 +0200
@@ -16,6 +16,6 @@
module Fluent
- VERSION = '1.15.1'
+ VERSION = '1.15.2'
end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/lib/fluent/win32api.rb new/lib/fluent/win32api.rb
--- old/lib/fluent/win32api.rb 1970-01-01 01:00:00.000000000 +0100
+++ new/lib/fluent/win32api.rb 2022-08-22 10:08:16.000000000 +0200
@@ -0,0 +1,38 @@
+#
+# Fluentd
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+require 'fluent/env'
+
+module Fluent
+ module Win32API
+ require 'fiddle/import'
+ require 'fiddle/types'
+ extend Fiddle::Importer
+
+ if RUBY_PLATFORM.split('-')[-1] == "ucrt"
+ MSVCRT_DLL = 'ucrtbase.dll'
+ else
+ MSVCRT_DLL = 'msvcrt.dll'
+ end
+
+ dlload MSVCRT_DLL, "kernel32.dll"
+ include Fiddle::Win32Types
+
+ extern "intptr_t _get_osfhandle(int)"
+ extern "BOOL GetFileInformationByHandle(HANDLE, void *)"
+ extern "BOOL GetFileInformationByHandleEx(HANDLE, int, void *, DWORD)"
+ end if Fluent.windows?
+end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/lib/fluent/winsvc.rb new/lib/fluent/winsvc.rb
--- old/lib/fluent/winsvc.rb 2022-07-27 03:23:12.000000000 +0200
+++ new/lib/fluent/winsvc.rb 2022-08-22 10:08:16.000000000 +0200
@@ -17,14 +17,12 @@
begin
require 'optparse'
- require 'windows/debug'
- require 'Windows/Library'
require 'win32/daemon'
require 'win32/event'
+ require 'win32/registry'
+ require 'serverengine'
include Win32
- include Windows::Library
- include Windows::Debug
op = OptionParser.new
opts = {service_name: nil}
@@ -37,16 +35,13 @@
end
def read_fluentdopt(service_name)
- require 'win32/Registry'
Win32::Registry::HKEY_LOCAL_MACHINE.open("SYSTEM\\CurrentControlSet\\Services\\#{service_name}")
do |reg|
reg.read("fluentdopt")[1] rescue ""
end
end
def service_main_start(service_name)
- ruby_path = 0.chr * 260
- GetModuleFileName.call(0, ruby_path,260)
- ruby_path = ruby_path.rstrip.gsub(/\\/, '/')
+ ruby_path = ServerEngine.ruby_bin_path
rubybin_dir = ruby_path[0, ruby_path.rindex("/")]
opt = read_fluentdopt(service_name)
Process.spawn("\"#{rubybin_dir}/ruby.exe\" \"#{rubybin_dir}/fluentd\"
#{opt} -x #{service_name}")
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/metadata new/metadata
--- old/metadata 2022-07-27 03:23:12.000000000 +0200
+++ new/metadata 2022-08-22 10:08:16.000000000 +0200
@@ -1,14 +1,14 @@
--- !ruby/object:Gem::Specification
name: fluentd
version: !ruby/object:Gem::Version
- version: 1.15.1
+ version: 1.15.2
platform: ruby
authors:
- Sadayuki Furuhashi
autorequire:
bindir: bin
cert_chain: []
-date: 2022-07-27 00:00:00.000000000 Z
+date: 2022-08-22 00:00:00.000000000 Z
dependencies:
- !ruby/object:Gem::Dependency
name: bundler
@@ -705,6 +705,7 @@
- lib/fluent/unique_id.rb
- lib/fluent/variable_store.rb
- lib/fluent/version.rb
+- lib/fluent/win32api.rb
- lib/fluent/winsvc.rb
- templates/new_gem/Gemfile
- templates/new_gem/README.md.erb
@@ -965,7 +966,7 @@
- !ruby/object:Gem::Version
version: '0'
requirements: []
-rubygems_version: 3.3.5
+rubygems_version: 3.3.17
signing_key:
specification_version: 4
summary: Fluentd event collector
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/test/config/test_system_config.rb
new/test/config/test_system_config.rb
--- old/test/config/test_system_config.rb 2022-07-27 03:23:12.000000000
+0200
+++ new/test/config/test_system_config.rb 2022-08-22 10:08:16.000000000
+0200
@@ -84,6 +84,7 @@
assert_nil(sc.enable_input_metrics)
assert_nil(sc.enable_size_metrics)
assert_nil(sc.enable_msgpack_time_support)
+ assert(!sc.enable_jit)
assert_equal(:text, sc.log.format)
assert_equal('%Y-%m-%d %H:%M:%S %z', sc.log.time_format)
end
@@ -102,6 +103,7 @@
'enable_msgpack_time_support' => ['enable_msgpack_time_support', true],
'enable_input_metrics' => ['enable_input_metrics', true],
'enable_size_metrics' => ['enable_size_metrics', true],
+ 'enable_jit' => ['enable_jit', true],
)
test "accepts parameters" do |(k, v)|
conf = parse_text(<<-EOS)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/test/plugin/test_file_wrapper.rb
new/test/plugin/test_file_wrapper.rb
--- old/test/plugin/test_file_wrapper.rb 2022-07-27 03:23:12.000000000
+0200
+++ new/test/plugin/test_file_wrapper.rb 2022-08-22 10:08:16.000000000
+0200
@@ -2,11 +2,6 @@
require 'fluent/plugin/file_wrapper'
class FileWrapperTest < Test::Unit::TestCase
- require 'windows/file'
- require 'windows/error'
- include Windows::File
- include Windows::Error
-
TMP_DIR = File.dirname(__FILE__) +
"/../tmp/file_wrapper#{ENV['TEST_ENV_NUMBER']}"
def setup