diff --git a/.github/workflows/apt.yml b/.github/workflows/apt.yml index f5c46ef6f..2019f8608 100644 --- a/.github/workflows/apt.yml +++ b/.github/workflows/apt.yml @@ -327,7 +327,7 @@ jobs: run: ./fluent-package/test-tools/setup-incus.sh - name: Setup Elasticsearch on host run: | - docker run -d -p 9200:9200 -e "discovery.type=single-node" -e "xpack.security.enabled=false" docker.elastic.co/elasticsearch/elasticsearch:8.19.11 + docker run -d -p 9200:9200 -e "discovery.type=single-node" -e "xpack.security.enabled=false" docker.elastic.co/elasticsearch/elasticsearch:9.5.2 - name: Copy elasticsearch.conf run: cp fluent-package/test-tools/elasticsearch.conf fluent-package/apt/systemd-test - name: Ensure elasticsearch availability from host @@ -356,7 +356,7 @@ jobs: - name: Setup Opensearch on host run: | docker run -d -p 9200:9200 -p 9600:9600 \ - -e "discovery.type=single-node" -e OPENSEARCH_INITIAL_ADMIN_PASSWORD=Passvv0rd@ opensearchproject/opensearch:2 + -e "discovery.type=single-node" -e OPENSEARCH_INITIAL_ADMIN_PASSWORD=Passvv0rd@ opensearchproject/opensearch:3 - name: Copy opensearch.conf run: cp fluent-package/test-tools/opensearch.conf fluent-package/apt/systemd-test - name: Ensure Opensearch availability from host diff --git a/.github/workflows/maintenance-bundle-update.yml b/.github/workflows/maintenance-bundle-update.yml index 96a943d46..33a1bf1d3 100644 --- a/.github/workflows/maintenance-bundle-update.yml +++ b/.github/workflows/maintenance-bundle-update.yml @@ -23,8 +23,8 @@ jobs: CMAKE_POLICY_VERSION_MINIMUM: "3.5" run: | cd fluent-package - gem install bundler:2.7.2 - bundle _2.7.2_ update -j 4 + gem install bundler:4.0.20 + bundle _4.0.20_ update -j 4 - name: Create Pull Request run: | $today=Get-Date -Format "yyyy-MM-dd-HHmmss" diff --git a/.github/workflows/retry-workflows.yml b/.github/workflows/retry-workflows.yml index 61d1bf1a5..0e01cd280 100644 --- a/.github/workflows/retry-workflows.yml +++ b/.github/workflows/retry-workflows.yml @@ -10,6 +10,7 @@ on: - Yum based Linux - Yum based Linux (AArch64) - Windows + - Windows (ARM64) types: - completed diff --git a/.github/workflows/windows-arm.yml b/.github/workflows/windows-arm.yml new file mode 100644 index 000000000..bd1041387 --- /dev/null +++ b/.github/workflows/windows-arm.yml @@ -0,0 +1,101 @@ +name: Windows (ARM64) +on: + push: + branches: + - master + pull_request: + workflow_dispatch: +concurrency: + group: ${{ github.head_ref || github.sha }}-${{ github.workflow }} + cancel-in-progress: true +jobs: + build: + name: Build + timeout-minutes: 90 + runs-on: windows-11-arm + steps: + - name: Set up Ruby + uses: ruby/setup-ruby@14594264cd68ce8a2345dd349bc3d138a4ef85c8 # v1.327.0 + with: + ruby-version: 3.4 + - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + - name: cache msi + uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0 + id: cache-msi + with: + path: fluent-package/msi/repositories + key: ${{ runner.os }}-${{ runner.arch }}-cache-windows-${{ hashFiles('**/config.rb', '**/Rakefile', '**/Gemfile*', 'fluent-package/msi/assets/*', 'fluent-package/msi/source.wxs', 'fluent-package/msi/parameters.wxi.erb', 'fluent-package/msi/localization-en-us.wxl', 'fluent-package/msi/exclude-files.xslt', '.github/workflows/windows-arm.yml') }} + - name: Install WiX Toolset + if: ${{ ! steps.cache-msi.outputs.cache-hit }} + shell: pwsh + run: | + $zip = "$env:RUNNER_TEMP\wix314-binaries.zip" + Invoke-WebRequest -Uri https://github.com/wixtoolset/wix3/releases/download/wix3141rtm/wix314-binaries.zip -OutFile $zip + $hash = (Get-FileHash -Algorithm SHA256 $zip).Hash + if ($hash -ne "6AC824E1642D6F7277D0ED7EA09411A508F6116BA6FAE0AA5F2C7DAA2FF43D31") { + throw "Unexpected SHA256 of wix314-binaries.zip: $hash" + } + Expand-Archive -Path $zip -DestinationPath "$env:RUNNER_TEMP\wix\bin" + "WIX=$env:RUNNER_TEMP\wix" | Out-File -FilePath $env:GITHUB_ENV -Append + - name: Build + if: ${{ ! steps.cache-msi.outputs.cache-hit }} + shell: pwsh + working-directory: fluent-package + run: | + $env:MSYS2_PATH = ruby -e "require 'ruby_installer/runtime'; puts RubyInstaller::Runtime.msys2_installation.msys_path" + $env:FLUENT_PACKAGE_STAGING_PATH = "C:/opt/fluent" + $env:FLUENT_PACKAGE_MSI_OUTPUT_PATH = "$PWD/msi/repositories" + gem install bundler:4.0.20 --no-document + rake msi:selfbuild + - name: Upload msi + uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 + with: + name: packages-windows-arm64 + path: fluent-package/msi/repositories + check_package_size: + name: Check Package Size + needs: build + runs-on: windows-11-arm + steps: + - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + - uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 + with: + name: packages-windows-arm64 + path: fluent-package/msi/repositories + - name: Check Package Size + shell: pwsh + run: | + powershell -ExecutionPolicy Bypass -Command ".\fluent-package\msi\pkgsize-test.ps1" + test: + name: Test ${{ matrix.test }} + needs: build + runs-on: windows-11-arm + strategy: + fail-fast: false + matrix: + test: + - "install-test.ps1" + - "install-test-with-install-path-including-space.ps1" + - "update-from-v4-test.ps1" + - "update-from-v4-test.ps1 -ViaV5" + - "update-from-v5-test.ps1" + - "serverspec-test.ps1" + - "load-extensions-test.ps1" + steps: + - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + - uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 + with: + name: packages-windows-arm64 + path: fluent-package/msi/repositories + - name: Hide MSYS2 + shell: pwsh + run: | + if (Test-Path C:\msys64) { + Rename-Item C:\msys64 C:\msys64-hidden + } + # The test scripts expect the repository in C:\fluentd as in the Docker container for x86_64. + - name: Installation Test + shell: pwsh + run: | + New-Item -ItemType Junction -Path C:\fluentd -Target $PWD | Out-Null + powershell -ExecutionPolicy Bypass -Command "C:\fluentd\fluent-package\msi\${{ matrix.test }}" diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index eccda5042..88937370e 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -47,7 +47,7 @@ jobs: if: ${{ ! steps.cache-msi.outputs.cache-hit }} run: | gem install serverspec - gem install bundler:2.7.2 --no-document + gem install bundler:4.0.20 --no-document rake msi:build - name: Upload td-agent msi uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 @@ -82,6 +82,7 @@ jobs: - "update-from-v4-test.ps1 -ViaV5" - "update-from-v5-test.ps1" - "serverspec-test.ps1" + - "load-extensions-test.ps1" steps: - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 diff --git a/.github/workflows/yum.yml b/.github/workflows/yum.yml index 3a0d7dad1..1077bbfda 100644 --- a/.github/workflows/yum.yml +++ b/.github/workflows/yum.yml @@ -403,7 +403,7 @@ jobs: run: ./fluent-package/test-tools/setup-incus.sh - name: Setup Elasticsearch on host run: | - docker run -d -p 9200:9200 -e "discovery.type=single-node" -e "xpack.security.enabled=false" docker.elastic.co/elasticsearch/elasticsearch:8.19.11 + docker run -d -p 9200:9200 -e "discovery.type=single-node" -e "xpack.security.enabled=false" docker.elastic.co/elasticsearch/elasticsearch:9.5.2 - name: Copy elasticsearch.conf run: cp fluent-package/test-tools/elasticsearch.conf fluent-package/yum/systemd-test - name: Ensure elasticsearch availability from host @@ -432,7 +432,7 @@ jobs: - name: Setup Opensearch on host run: | docker run -d -p 9200:9200 -p 9600:9600 \ - -e "discovery.type=single-node" -e OPENSEARCH_INITIAL_ADMIN_PASSWORD=Passvv0rd@ opensearchproject/opensearch:2 + -e "discovery.type=single-node" -e OPENSEARCH_INITIAL_ADMIN_PASSWORD=Passvv0rd@ opensearchproject/opensearch:3 - name: Copy opensearch.conf run: cp fluent-package/test-tools/opensearch.conf fluent-package/yum/systemd-test - name: Ensure Opensearch availability from host diff --git a/CHANGELOG.md b/CHANGELOG.md index f7d7f0e25..f35e84d12 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,75 @@ About the past changelog entries, see [CHANGELOG v4](CHANGELOG-v4.md) [CHANGELOG v5](CHANGELOG-v5.md) instead. +## Release v6.1.0 - 2026/10/29 + +### News + +* Update bundled Fluentd to v1.20.0 +* Update bundled gems +* Changed to keep compatibility with older RHEL 9.x/10.x (#1087, #1088) +* msi: fix broken link to enterprise services (#1078) +* Drop LTO flags on RHEL 10.x and Ubuntu. Note that hardening flags are kept. (#1101) +* msi: add a package for ARM64 Windows (PR #1132) +* msi: stop bundling nokogiri. The winevt_xml parser uses REXML instead, and in_windows_eventlog2 checks bookmarks less strictly. Install nokogiri with `fluent-gem install nokogiri` to keep the previous behavior or to use `parser nokogiri`. (PR #1132) + +### Core component + +* ruby v3.4.11 (update) +* jemalloc v5.3.1 (update) +* OpenSSL 3.6.3 Windows (update) +* OpenSSL 3.0.8 macOS +* gems + * fluentd v1.20.0 (update) + * msgpack 1.8.5 (update) + * oj 3.17.7 (update) + * webrick 1.9.2 + * openssl 4.0.2 (update) + +### Bundled plugins and gems + +* aws-partitions v1.1298.0 (update) +* aws-sdk-core v3.260.0 (update) +* aws-sdk-kms v1.135.0 (update) +* aws-sdk-s3 v1.235.0 (update) +* aws-sdk-sqs v1.122.0 (update) +* aws-sigv4 v1.12.1 +* elasticsearch v9.5.0 (update) +* fluent-diagtool v1.0.5 +* fluent-plugin-elasticsearch v6.0.0 +* fluent-plugin-flowcounter-simple 0.1.0 +* fluent-plugin-kafka v0.19.8 (update) +* fluent-plugin-metrics-cmetrics v0.1.2 +* fluent-plugin-fluent-package-update-notifier 0.2.4 (update) +* fluent-plugin-obsolete-plugins v0.2.2 +* fluent-plugin-opensearch v1.1.8 (update) +* fluent-plugin-opentelemetry 0.5.4 (update) +* fluent-plugin-prometheus v2.3.0 (update) +* fluent-plugin-prometheus_pushgateway v0.2.1 +* fluent-plugin-record-modifier v2.2.1 +* fluent-plugin-rewrite-tag-filter v2.4.1 (update) +* fluent-plugin-s3 v1.8.6 (update) +* fluent-plugin-sigdump v1.0.1 (new) +* fluent-plugin-sd-dns 0.1.0 +* fluent-plugin-systemd v1.1.2 (update) +* fluent-plugin-td v1.2.0 +* fluent-plugin-utmpx v0.5.0 +* fluent-plugin-webhdfs v1.6.0 +* mini_portile2 v2.8.9 +* prometheus-client v5.0.0 (update) +* rdkafka v0.21.0 +* ruby-kafka v1.5.0 +* systemd-journal v2.1.1 +* td-client v3.0.1 (update) +* webhdfs v0.11.0 + +On Windows + +* fluent-plugin-parser-winevt_xml v0.3.1 (update) +* fluent-plugin-windows-eventlog v0.9.3 (update) +* fluent-plugin-windows-exporter v1.0.0 +* winevt_c v0.11.6 (update) + ## Release v6.0.5 - 2026/09/29 ### News diff --git a/fluent-package/Gemfile b/fluent-package/Gemfile index dd5255847..df92caa29 100644 --- a/fluent-package/Gemfile +++ b/fluent-package/Gemfile @@ -15,21 +15,21 @@ source "https://rubygems.org" no_fat_gem = [:ruby] gem "rake" gem "bundler", BUNDLER_VERSION -gem "cool.io", "1.9.0", platforms: no_fat_gem +gem "cool.io", "1.10.1", platforms: no_fat_gem gem "sigdump", "0.2.5" -gem "http_parser.rb", "0.8.0" +gem "http_parser.rb", "0.8.1" gem "yajl-ruby", "1.4.3" gem "serverengine", "2.4.0" -gem "msgpack", "1.8.0" -gem "oj", "3.16.11" +gem "msgpack", "1.8.5" +gem "oj", "3.17.7" gem "tzinfo", "2.0.6" -gem "tzinfo-data", "1.2025.2" +gem "tzinfo-data", "1.2026.5" # Fluentd v1.19.0 requires io-event 1.10.x or before. # The dependency condition cannot be met with async >= 2.25 -gem "async", "2.24.0" -gem "async-http", "0.89.0" -gem "webrick", "1.9.1" +gem "async", "2.46.0" +gem "async-http", "0.105.0" +gem "webrick", "1.9.2" if ENV["INSTALL_GEM_FROM_LOCAL_REPO"] # During build process, pre-built fluentd gem will be installed @@ -44,77 +44,84 @@ if ENV["INSTALL_GEM_FROM_LOCAL_REPO"] # https://github.com/fluent/fluent-package-builder/issues/618 # NOTE: platforms: does not work in source ... do block gem "win32-service" if RUBY_PLATFORM =~ /mswin|mingw/ + # Bundle forked version of ffi-win32-extensions until + # ffi 1.17.1 or later is supported. + # This workaround should be applied to fluent-package not to block using + # newer rdkafka to fix SEGV issue. + # https://github.com/fluent/fluent-package-builder/issues/1051 + gem "ffi-win32-extensions" if RUBY_PLATFORM =~ /mswin|mingw/ end else # Lock to specific revision git_source(:github) {|repo_name| "https://github.com/#{repo_name}" } gem "fluentd", github: "fluent/fluentd", ref: FLUENTD_REVISION gem "win32-service", github: "fluent-plugins-nursery/win32-service", branch: "fluent-package", platforms: [:mingw, :x64_mingw] + gem "ffi-win32-extensions", github: "fluent-plugins-nursery/ffi-win32-extensions", branch: "fluent-package", platforms: [:mingw, :x64_mingw] end # plugin gems -gem "elasticsearch", "8.19.0" +gem "elasticsearch", "9.5.0" gem "fluent-plugin-elasticsearch", "6.0.0" gem "ruby-kafka", "1.5.0" gem "digest-murmurhash", "1.1.1" -gem "fluent-plugin-kafka", "0.19.5" -gem "prometheus-client", "4.2.5" -gem "fluent-plugin-prometheus", "2.2.1" +gem "fluent-plugin-kafka", "0.19.8" +gem "prometheus-client", "5.0.0" +gem "fluent-plugin-prometheus", "2.3.0" gem "fluent-plugin-prometheus_pushgateway", "0.2.1" gem "jmespath", "1.6.2" -gem "aws-partitions", "1.1150.0" -gem "aws-sdk-core", "3.230.0" -gem "aws-sdk-kms", "1.110.0" -gem "aws-sdk-sqs", "1.101.0" +gem "aws-partitions", "1.1298.0" +gem "aws-sdk-core", "3.260.0" +gem "aws-sdk-kms", "1.135.0" +gem "aws-sdk-sqs", "1.122.0" gem "aws-sigv4", "1.12.1" -gem "aws-sdk-s3", "1.197.0" -gem "fluent-plugin-s3", "1.8.3" +gem "aws-sdk-s3", "1.235.0" +gem "fluent-plugin-s3", "1.8.6" gem "httpclient", "2.9.0" gem "fluent-diagtool", "1.0.5" -gem "td", "0.19.0" -gem "td-client", "3.0.0" +gem "td", "0.19.1" +gem "td-client", "3.0.1" gem "fluent-plugin-td", "1.2.0" gem "webhdfs", "0.11.0" gem "fluent-plugin-webhdfs", "1.6.0" gem "fluent-plugin-record-modifier", "2.2.1" -gem "fluent-plugin-rewrite-tag-filter", "2.4.0" +gem "fluent-plugin-rewrite-tag-filter", "2.4.1" gem "fluent-plugin-sd-dns", "0.1.0" gem "fluent-plugin-flowcounter-simple", "0.1.0" gem "mini_portile2", "2.8.9" gem "cmetrics", "0.3.3" gem "fluent-plugin-metrics-cmetrics", "0.1.2" gem "opensearch-ruby", "3.4.0" -gem "fluent-plugin-opensearch", "1.1.5" -gem "fluent-plugin-fluent-package-update-notifier", "0.2.3" +gem "fluent-plugin-opensearch", "1.1.8" +gem "fluent-plugin-fluent-package-update-notifier", "0.2.4" gem "fluent-plugin-obsolete-plugins", "0.2.2" -gem "fluent-plugin-opentelemetry", "0.3.0" +gem "fluent-plugin-opentelemetry", "0.5.4" gem "fluent-plugin-sigdump", "1.0.1" windows_platforms = [:mingw, :x64_mingw] # :mswin # ffi-win32-extensions doesn't support ffi 1.17.1 or later -gem "ffi", "1.17.0", platforms: windows_platforms -gem "ffi-win32-extensions", "1.1.0", platforms: windows_platforms +gem "ffi", "1.17.4", platforms: windows_platforms +# Use officially released version when PR was merged and released. +#gem "ffi-win32-extensions", "1.1.0", platforms: windows_platforms # fiddle gem that isn't default gems as of Ruby 3.5 gem "fiddle", "1.1.8", platforms: windows_platforms -gem "nokogiri", "1.18.9", platforms: windows_platforms gem "win32-event", "0.6.3", platforms: windows_platforms gem "win32-ipc", "0.7.0", platforms: windows_platforms # Use officially released version when PR was merged and released. #gem "win32-service", "2.3.2", platforms: windows_platforms -gem "winevt_c", "0.11.2", platforms: windows_platforms +gem "winevt_c", "0.11.6", platforms: windows_platforms gem "win32-eventlog", "0.6.7", platforms: windows_platforms -gem "fluent-plugin-parser-winevt_xml", "0.2.8", platforms: windows_platforms -gem "fluent-plugin-windows-eventlog", "0.9.1", platforms: windows_platforms +gem "fluent-plugin-parser-winevt_xml", "0.3.1", platforms: windows_platforms +gem "fluent-plugin-windows-eventlog", "0.9.3", platforms: windows_platforms gem "fluent-plugin-windows-exporter", "1.0.0", platforms: windows_platforms not_windows_platforms = [:ruby] -gem "capng_c", "0.2.3", platforms: not_windows_platforms +gem "capng_c", "0.2.5", platforms: not_windows_platforms # Use newer bundled rdkafka with librdkafka 2.8.0 to support AlmaLinux 10 # (librdkafka 2.8.0 supports "OpenSSL without the ENGINE component") # librdkafka 2.8.0 can't be built on CentOS 7. unless platform_centos7? gem "rdkafka", "0.21.0", platforms: not_windows_platforms end -gem "fluent-plugin-systemd", "1.1.1", platforms: not_windows_platforms +gem "fluent-plugin-systemd", "1.1.2", platforms: not_windows_platforms gem "fluent-plugin-utmpx", "0.5.0", platforms: not_windows_platforms diff --git a/fluent-package/Gemfile.lock b/fluent-package/Gemfile.lock index 55865498f..0a00755c6 100644 --- a/fluent-package/Gemfile.lock +++ b/fluent-package/Gemfile.lock @@ -1,3 +1,11 @@ +GIT + remote: https://github.com/fluent-plugins-nursery/ffi-win32-extensions + revision: a549365f60c06635bd9b14dd961db118721a2aec + branch: fluent-package + specs: + ffi-win32-extensions (1.1.1) + ffi (~> 1.15) + GIT remote: https://github.com/fluent-plugins-nursery/win32-service revision: cfcc2007b3843127329d6a7307a62a927a714327 @@ -9,8 +17,8 @@ GIT GIT remote: https://github.com/fluent/fluentd - revision: ed15edc4b7c86c1fcea3fbf326b7c42325e6fc71 - ref: ed15edc4b7c86c1fcea3fbf326b7c42325e6fc71 + revision: f727da51501ff8d29adcc62a12995294e023724d + ref: f727da51501ff8d29adcc62a12995294e023724d specs: fluentd (1.19.0) async-http (~> 0.86) @@ -22,10 +30,11 @@ GIT drb (~> 2.2) fiddle (~> 1.1) http_parser.rb (>= 0.5.1, < 0.9.0) - io-event (< 1.11.0) - io-stream (< 0.8.0) + json (>= 2.21) logger (~> 1.6) msgpack (>= 1.3.1, < 2.0.0) + net-http (~> 0.8) + ostruct (~> 0.6) serverengine (>= 2.3.2, < 3.0.0) sigdump (~> 0.2.5) strptime (>= 0.2.4, < 1.0.0) @@ -35,6 +44,7 @@ GIT webrick (~> 1.4) win32-event (~> 0.6.3) win32-ipc (~> 0.7.0) + win32-registry (~> 0.1) win32-service (~> 2.3.0) yajl-ruby (~> 1.0) zstd-ruby (~> 1.5) @@ -42,103 +52,103 @@ GIT GEM remote: https://rubygems.org/ specs: - addressable (2.8.7) - public_suffix (>= 2.0.2, < 7.0) - async (2.24.0) + addressable (2.9.0) + public_suffix (>= 2.0.2, < 8.0) + async (2.46.0) console (~> 1.29) fiber-annotation - io-event (~> 1.9) - metrics (~> 0.12) - traces (~> 0.15) - async-http (0.89.0) - async (>= 2.10.2) - async-pool (~> 0.9) - io-endpoint (~> 0.14) - io-stream (~> 0.6) - metrics (~> 0.12) - protocol-http (~> 0.49) - protocol-http1 (~> 0.30) - protocol-http2 (~> 0.22) - traces (~> 0.10) - async-pool (0.11.0) + io-event (~> 1.21) + async-http (0.105.0) + async (>= 2.35.1) + async-pool (~> 0.12) + io-endpoint (~> 0.18) + io-stream (~> 0.14) + protocol-http (~> 0.72) + protocol-http1 (~> 0.41) + protocol-http2 (~> 0.28) + protocol-url (~> 0.2) + async-pool (0.12.0) async (>= 2.0) - aws-eventstream (1.4.0) - aws-partitions (1.1150.0) - aws-sdk-core (3.230.0) - aws-eventstream (~> 1, >= 1.3.0) + aws-eventstream (1.4.1) + aws-partitions (1.1298.0) + aws-sdk-core (3.260.0) + aws-eventstream (~> 1, >= 1.4.1) aws-partitions (~> 1, >= 1.992.0) aws-sigv4 (~> 1.9) base64 bigdecimal jmespath (~> 1, >= 1.6.1) logger - aws-sdk-kms (1.110.0) - aws-sdk-core (~> 3, >= 3.228.0) + rexml (~> 3.4, >= 3.4.2) + aws-sdk-kms (1.135.0) + aws-sdk-core (~> 3, >= 3.260.0) aws-sigv4 (~> 1.5) - aws-sdk-s3 (1.197.0) - aws-sdk-core (~> 3, >= 3.228.0) + aws-sdk-s3 (1.235.0) + aws-sdk-core (~> 3, >= 3.258.0) aws-sdk-kms (~> 1) aws-sigv4 (~> 1.5) - aws-sdk-sqs (1.101.0) - aws-sdk-core (~> 3, >= 3.228.0) + aws-sdk-sqs (1.122.0) + aws-sdk-core (~> 3, >= 3.260.0) aws-sigv4 (~> 1.5) aws-sigv4 (1.12.1) aws-eventstream (~> 1, >= 1.0.2) base64 (0.3.0) - bigdecimal (3.2.2) + bigdecimal (3.3.1) bindata (2.4.15) - capng_c (0.2.3) + capng_c (0.2.5) certstore_c (0.1.7) cmetrics (0.3.3) mini_portile2 (~> 2.7) - concurrent-ruby (1.3.5) - console (1.33.0) + concurrent-ruby (1.3.8) + console (1.38.0) fiber-annotation fiber-local (~> 1.1) json - cool.io (1.9.0) - csv (3.3.5) + cool.io (1.10.1) + csv (3.3.6) digest-crc (0.7.0) rake (>= 12.0.0, < 14.0.0) digest-murmurhash (1.1.1) drb (2.2.3) - elastic-transport (8.4.0) + elastic-transport (8.5.3) faraday (< 3) multi_json - elasticsearch (8.19.0) + elasticsearch (9.5.0) elastic-transport (~> 8.3) - elasticsearch-api (= 8.19.0) - elasticsearch-api (8.19.0) + elasticsearch-api (= 9.5.0) + elasticsearch-api (9.5.0) + base64 multi_json - excon (1.3.0) + excon (1.8.0) logger - faraday (2.13.4) - faraday-net_http (>= 2.0, < 3.5) + faraday (2.15.0) + faraday-net_http (>= 2.0, < 3.6) json logger - faraday-excon (2.3.0) + faraday-excon (2.4.0) excon (>= 1.0.0) faraday (>= 2.11.0, < 3) - faraday-net_http (3.4.1) - net-http (>= 0.5.0) + faraday-net_http (3.5.0) + net-http (~> 0.5) faraday_middleware-aws-sigv4 (1.0.1) aws-sigv4 (~> 1.0) faraday (>= 2.0, < 3) - ffi (1.17.0) - ffi-win32-extensions (1.1.0) - ffi (>= 1.15.5, <= 1.17.0) + ffi (1.17.4) + ffi (1.17.4-aarch64-mingw-ucrt) + ffi (1.17.4-x64-mingw-ucrt) fiber-annotation (0.2.0) fiber-local (1.1.0) fiber-storage fiber-storage (1.0.1) fiddle (1.1.8) - fileutils (1.7.3) + fileutils (1.8.1) fluent-config-regexp-type (1.0.0) fluentd (> 1.0.0, < 2) fluent-diagtool (1.0.5) fileutils json - fluent-logger (0.9.1) + fluent-logger (0.11.0) + logger (~> 1.6) msgpack (>= 1.0.0, < 2) fluent-plugin-elasticsearch (6.0.0) elasticsearch @@ -148,10 +158,10 @@ GEM fluentd (>= 0.14.22) fluent-plugin-flowcounter-simple (0.1.0) fluentd (>= 1.0) - fluent-plugin-fluent-package-update-notifier (0.2.3) + fluent-plugin-fluent-package-update-notifier (0.2.4) fluentd (>= 0.14.10, < 2) specinfra (~> 2.94.1) - fluent-plugin-kafka (0.19.5) + fluent-plugin-kafka (0.19.8) bigdecimal (~> 3.1) fluentd (>= 0.10.58, < 2) ltsv @@ -161,7 +171,7 @@ GEM fluentd (>= 0.14.0, < 2) fluent-plugin-obsolete-plugins (0.2.2) fluentd (>= 0.14.10, < 2) - fluent-plugin-opensearch (1.1.5) + fluent-plugin-opensearch (1.1.8) aws-sdk-core (~> 3) excon faraday (>= 2.0.0) @@ -169,27 +179,29 @@ GEM faraday_middleware-aws-sigv4 (~> 1.0.1) fluentd (>= 0.14.22) opensearch-ruby (>= 3.0.1) - fluent-plugin-opentelemetry (0.3.0) + fluent-plugin-opentelemetry (0.5.4) async-http (~> 0.88) excon (~> 1.2) fluentd (~> 1.18) + get_process_mem (~> 1.0) google-protobuf (~> 4.30) - fluent-plugin-parser-winevt_xml (0.2.8) + sys-proctable (~> 1.3) + fluent-plugin-parser-winevt_xml (0.3.1) base64 (~> 0.2) csv (~> 3.2) fluentd (>= 0.14.12, < 2) - nokogiri (>= 1.12.5) - fluent-plugin-prometheus (2.2.1) + rexml (~> 3.2) + fluent-plugin-prometheus (2.3.0) fluentd (>= 1.9.1, < 2) prometheus-client (>= 2.1.0) fluent-plugin-prometheus_pushgateway (0.2.1) fluent-plugin-prometheus (>= 2.0.0, < 3) fluent-plugin-record-modifier (2.2.1) fluentd (>= 1.1, < 2) - fluent-plugin-rewrite-tag-filter (2.4.0) + fluent-plugin-rewrite-tag-filter (2.4.1) fluent-config-regexp-type fluentd (>= 0.14.2, < 2) - fluent-plugin-s3 (1.8.3) + fluent-plugin-s3 (1.8.6) aws-sdk-s3 (~> 1.60) aws-sdk-sqs (~> 1.23) fluentd (>= 0.14.22, < 2) @@ -198,7 +210,7 @@ GEM fluent-plugin-sigdump (1.0.1) fluentd (>= 1.9.3, < 2) sigdump (~> 0.2.5) - fluent-plugin-systemd (1.1.1) + fluent-plugin-systemd (1.1.2) fluentd (>= 0.14.11, < 2) systemd-journal (~> 2.1.0) fluent-plugin-td (1.2.0) @@ -210,76 +222,84 @@ GEM fluent-plugin-webhdfs (1.6.0) fluentd (>= 0.14.22) webhdfs (>= 0.11.0) - fluent-plugin-windows-eventlog (0.9.1) + fluent-plugin-windows-eventlog (0.9.3) fluentd (>= 0.14.12, < 2) win32-eventlog winevt_c (>= 0.11.0) fluent-plugin-windows-exporter (1.0.0) bindata (~> 2.4) fluentd (>= 0.14.10, < 2) - google-protobuf (4.32.0-aarch64-linux-gnu) + get_process_mem (1.0.0) + bigdecimal (>= 2.0) + ffi (~> 1.0) + google-protobuf (4.36.2) bigdecimal - rake (>= 13) - google-protobuf (4.32.0-x64-mingw-ucrt) + rake (~> 13.3) + google-protobuf (4.36.2-aarch64-linux-gnu) bigdecimal - rake (>= 13) - google-protobuf (4.32.0-x86_64-linux-gnu) + rake (~> 13.3) + google-protobuf (4.36.2-x64-mingw-ucrt) bigdecimal - rake (>= 13) + rake (~> 13.3) + google-protobuf (4.36.2-x86_64-linux-gnu) + bigdecimal + rake (~> 13.3) hirb (0.7.3) - http_parser.rb (0.8.0) + http_parser.rb (0.8.1) httpclient (2.9.0) mutex_m - io-endpoint (0.15.2) - io-event (1.10.2) - io-stream (0.7.0) + io-endpoint (0.19.0) + openssl (>= 3.3.0) + io-event (1.22.3) + io-stream (0.14.0) + openssl (>= 3.3) jmespath (1.6.2) - json (2.13.2) + json (3.1.0) linux-utmpx (0.3.0) bindata (~> 2.4.8) logger (1.7.0) ltsv (0.1.2) - metrics (0.14.0) mini_portile2 (2.8.9) - msgpack (1.8.0) - multi_json (1.17.0) + msgpack (1.8.5) + multi_json (1.21.2) mutex_m (0.3.0) - net-http (0.6.0) - uri - net-scp (4.1.0) - net-ssh (>= 2.6.5, < 8.0.0) - net-ssh (7.3.0) + net-http (0.10.0) + net-protocol (>= 0.3.0) + uri (>= 0.11.1) + net-protocol (0.4.0) + timeout + net-scp (4.1.2) + net-ssh (>= 2.6.5, < 9.0.0) + net-ssh (8.0.4) + logger + openssl (>= 3.2.0) net-telnet (0.2.0) - nokogiri (1.18.9) - mini_portile2 (~> 2.8.2) - racc (~> 1.4) - nokogiri (1.18.9-x64-mingw-ucrt) - racc (~> 1.4) - oj (3.16.11) + oj (3.17.7) bigdecimal (>= 3.0) ostruct (>= 0.2) opensearch-ruby (3.4.0) faraday (>= 1.0, < 3) multi_json (>= 1.0) + openssl (4.0.2) ostruct (0.6.3) parallel (1.20.1) - prometheus-client (4.2.5) + prometheus-client (5.0.0) base64 protocol-hpack (1.5.1) - protocol-http (0.53.0) - protocol-http1 (0.35.0) - protocol-http (~> 0.22) - protocol-http2 (0.22.1) + protocol-http (0.72.1) + protocol-http1 (0.41.1) + protocol-http (~> 0.68) + protocol-http2 (0.29.2) protocol-hpack (~> 1.4) - protocol-http (~> 0.47) - public_suffix (6.0.2) - racc (1.8.1) - rake (13.3.0) + protocol-http (~> 0.62) + protocol-url (0.19.0) + public_suffix (7.0.5) + rake (13.4.2) rdkafka (0.21.0) ffi (~> 1.15) mini_portile2 (~> 2.6) rake (> 12) - rexml (3.4.1) + rexml (3.4.4) ruby-kafka (1.5.0) digest-crc ruby-progressbar (1.13.0) @@ -290,16 +310,18 @@ GEM sigdump (~> 0.2.2) sfl (2.3) sigdump (0.2.5) - specinfra (2.94.1) + specinfra (2.94.2) base64 net-scp net-ssh (>= 2.7) net-telnet sfl strptime (0.2.5) - systemd-journal (2.1.1) + sys-proctable (1.3.0) + ffi (~> 1.1) + systemd-journal (2.1.2) ffi (~> 1.9) - td (0.19.0) + td (0.19.1) csv hirb (>= 0.4.5) msgpack @@ -311,7 +333,7 @@ GEM td-logger (>= 0.3.21, < 2) yajl-ruby (>= 1.3.1, < 2.0) zip-zip (~> 0.3) - td-client (3.0.0) + td-client (3.0.1) httpclient (>= 2.7) msgpack (>= 0.5.6, < 2) td-logger (0.5.0) @@ -320,100 +342,102 @@ GEM msgpack (>= 0.5.6, < 2.0) mutex_m (>= 0.2.0, < 1.0) td-client (>= 1.0.8, < 4.0) - traces (0.18.1) + timeout (0.6.1) tzinfo (2.0.6) concurrent-ruby (~> 1.0) - tzinfo-data (1.2025.2) + tzinfo-data (1.2026.5) tzinfo (>= 1.0.0) - uri (1.0.3) + uri (1.1.2) webhdfs (0.11.0) addressable - webrick (1.9.1) + webrick (1.9.2) win32-event (0.6.3) win32-ipc (>= 0.6.0) win32-eventlog (0.6.7) ffi win32-ipc (0.7.0) ffi - winevt_c (0.11.2) + win32-registry (0.1.2) + fiddle (~> 1.0) + winevt_c (0.11.6) yajl-ruby (1.4.3) zip-zip (0.3) rubyzip (>= 1.0.0) - zstd-ruby (1.5.7.0) + zstd-ruby (1.5.7.1) PLATFORMS aarch64-linux + aarch64-mingw-ucrt x64-mingw-ucrt x86_64-linux DEPENDENCIES - async (= 2.24.0) - async-http (= 0.89.0) - aws-partitions (= 1.1150.0) - aws-sdk-core (= 3.230.0) - aws-sdk-kms (= 1.110.0) - aws-sdk-s3 (= 1.197.0) - aws-sdk-sqs (= 1.101.0) + async (= 2.46.0) + async-http (= 0.105.0) + aws-partitions (= 1.1298.0) + aws-sdk-core (= 3.260.0) + aws-sdk-kms (= 1.135.0) + aws-sdk-s3 (= 1.235.0) + aws-sdk-sqs (= 1.122.0) aws-sigv4 (= 1.12.1) - bundler (= 2.7.2) - capng_c (= 0.2.3) + bundler (= 4.0.20) + capng_c (= 0.2.5) cmetrics (= 0.3.3) - cool.io (= 1.9.0) + cool.io (= 1.10.1) digest-murmurhash (= 1.1.1) - elasticsearch (= 8.19.0) - ffi (= 1.17.0) - ffi-win32-extensions (= 1.1.0) + elasticsearch (= 9.5.0) + ffi (= 1.17.4) + ffi-win32-extensions! fiddle (= 1.1.8) fluent-diagtool (= 1.0.5) fluent-plugin-elasticsearch (= 6.0.0) fluent-plugin-flowcounter-simple (= 0.1.0) - fluent-plugin-fluent-package-update-notifier (= 0.2.3) - fluent-plugin-kafka (= 0.19.5) + fluent-plugin-fluent-package-update-notifier (= 0.2.4) + fluent-plugin-kafka (= 0.19.8) fluent-plugin-metrics-cmetrics (= 0.1.2) fluent-plugin-obsolete-plugins (= 0.2.2) - fluent-plugin-opensearch (= 1.1.5) - fluent-plugin-opentelemetry (= 0.3.0) - fluent-plugin-parser-winevt_xml (= 0.2.8) - fluent-plugin-prometheus (= 2.2.1) + fluent-plugin-opensearch (= 1.1.8) + fluent-plugin-opentelemetry (= 0.5.4) + fluent-plugin-parser-winevt_xml (= 0.3.1) + fluent-plugin-prometheus (= 2.3.0) fluent-plugin-prometheus_pushgateway (= 0.2.1) fluent-plugin-record-modifier (= 2.2.1) - fluent-plugin-rewrite-tag-filter (= 2.4.0) - fluent-plugin-s3 (= 1.8.3) + fluent-plugin-rewrite-tag-filter (= 2.4.1) + fluent-plugin-s3 (= 1.8.6) fluent-plugin-sd-dns (= 0.1.0) fluent-plugin-sigdump (= 1.0.1) - fluent-plugin-systemd (= 1.1.1) + fluent-plugin-systemd (= 1.1.2) fluent-plugin-td (= 1.2.0) fluent-plugin-utmpx (= 0.5.0) fluent-plugin-webhdfs (= 1.6.0) - fluent-plugin-windows-eventlog (= 0.9.1) + fluent-plugin-windows-eventlog (= 0.9.3) fluent-plugin-windows-exporter (= 1.0.0) fluentd! - http_parser.rb (= 0.8.0) + http_parser.rb (= 0.8.1) httpclient (= 2.9.0) jmespath (= 1.6.2) mini_portile2 (= 2.8.9) - msgpack (= 1.8.0) - nokogiri (= 1.18.9) - oj (= 3.16.11) + msgpack (= 1.8.5) + oj (= 3.17.7) opensearch-ruby (= 3.4.0) - prometheus-client (= 4.2.5) + prometheus-client (= 5.0.0) rake rdkafka (= 0.21.0) ruby-kafka (= 1.5.0) serverengine (= 2.4.0) sigdump (= 0.2.5) - td (= 0.19.0) - td-client (= 3.0.0) + td (= 0.19.1) + td-client (= 3.0.1) tzinfo (= 2.0.6) - tzinfo-data (= 1.2025.2) + tzinfo-data (= 1.2026.5) webhdfs (= 0.11.0) - webrick (= 1.9.1) + webrick (= 1.9.2) win32-event (= 0.6.3) win32-eventlog (= 0.6.7) win32-ipc (= 0.7.0) win32-service! - winevt_c (= 0.11.2) + winevt_c (= 0.11.6) yajl-ruby (= 1.4.3) BUNDLED WITH - 2.7.2 + 4.0.20 diff --git a/fluent-package/Rakefile b/fluent-package/Rakefile index 47b061ed5..d3d6eb066 100755 --- a/fluent-package/Rakefile +++ b/fluent-package/Rakefile @@ -79,10 +79,27 @@ def windows? /mswin|mingw/ =~ RUBY_PLATFORM end +def windows_arm64? + windows? && /aarch64/ =~ RUBY_PLATFORM +end + +def bundled_ruby_installer_version + windows_arm64? ? BUNDLED_RUBY_INSTALLER_ARM64_VERSION : BUNDLED_RUBY_INSTALLER_X64_VERSION +end + def macos? /darwin/ =~ RUBY_PLATFORM end +def centos7? + return false unless File.exist?("/etc/os-release") + os_release = File.readlines("/etc/os-release").each_with_object({}) do |line, params| + key, _, value = line.chomp.partition("=") + params[key] = value.delete('"') + end + os_release["ID"] == "centos" and os_release["VERSION_ID"] == "7" +end + def ensure_directory(dirname) mkdir_p(dirname) unless File.exist?(dirname) if block_given? @@ -102,7 +119,7 @@ end def gem_dir_version if windows? - ruby_version = BUNDLED_RUBY_INSTALLER_X64_VERSION + ruby_version = bundled_ruby_installer_version else ruby_version = BUNDLED_RUBY_VERSION end @@ -175,11 +192,13 @@ class DownloadTask include Rake::DSL attr_reader :file_jemalloc_source - attr_reader :file_ruby_source, :file_ruby_installer_x64 + attr_reader :file_ruby_source, :file_ruby_installer attr_reader :file_fluentd_archive attr_reader :file_win32_service_archive + attr_reader :file_ffi_win32_extensions_archive attr_reader :files_ruby_gems attr_reader :file_openssl_source + attr_reader :file_openssl_lts_source def initialize(logger:) @logger = logger || Logger.new(STDOUT, level: Logger::Severity::INFO) @@ -190,7 +209,7 @@ class DownloadTask @file_jemalloc_source, @file_openssl_source, @file_ruby_source, - @file_ruby_installer_x64, + @file_ruby_installer, @file_fluentd_archive, *@files_ruby_gems ] @@ -201,15 +220,17 @@ class DownloadTask define_ruby_files define_fluentd_archive define_win32_service_archive if windows? + define_ffi_win32_extensions_archive if windows? define_gem_files define_openssl_file + define_openssl_lts_file namespace :download do desc "Download jemalloc source" task :jemalloc => [@file_jemalloc_source] desc "Download Ruby source" - task :ruby => [@file_ruby_source, @file_ruby_installer_x64] + task :ruby => [@file_ruby_source, @file_ruby_installer] desc "Clone fluentd repository and create a tarball" task :fluentd => [@file_fluentd_archive] @@ -217,11 +238,17 @@ class DownloadTask desc "Clone win32-service repository and create a tarball" task :win32_service => [@file_win32_service_archive] + desc "Clone ffi-win32-extensions repository and create a tarball" + task :ffi_win32_extensions => [@file_ffi_win32_extensions_archive] + desc "Download ruby gems" task :ruby_gems => @files_ruby_gems desc "Download openssl source" task :openssl => @file_openssl_source + + desc "Download openssl LTS source" + task :openssl_lts => @file_openssl_lts_source end end @@ -275,6 +302,17 @@ class DownloadTask end end + def define_openssl_lts_file + version = OPENSSL_FOR_LTS_VERSION + filename = "openssl-#{version}.tar.gz" + url_base = "https://www.openssl.org/source/" + @file_openssl_lts_source = File.join(DOWNLOADS_DIR, filename) + file @file_openssl_lts_source do + url = "#{url_base}/#{filename}" + download_file(url, filename, OPENSSL_FOR_LTS_SHA256SUM) + end + end + def define_ruby_files define_ruby_source_file define_ruby_installer_file @@ -293,15 +331,22 @@ class DownloadTask end def define_ruby_installer_file - version = BUNDLED_RUBY_INSTALLER_X64_VERSION - sha256sum = BUNDLED_RUBY_INSTALLER_X64_SHA256SUM - filename = "rubyinstaller-#{version}-x64.7z" + if windows_arm64? + version = BUNDLED_RUBY_INSTALLER_ARM64_VERSION + sha256sum = BUNDLED_RUBY_INSTALLER_ARM64_SHA256SUM + arch = "arm" + else + version = BUNDLED_RUBY_INSTALLER_X64_VERSION + sha256sum = BUNDLED_RUBY_INSTALLER_X64_SHA256SUM + arch = "x64" + end + filename = "rubyinstaller-#{version}-#{arch}.7z" url_base = "https://github.com/oneclick/rubyinstaller2/releases/download/" url = "#{url_base}RubyInstaller-#{version}/#{filename}" - @file_ruby_installer_x64 = File.join(DOWNLOADS_DIR, filename) + @file_ruby_installer = File.join(DOWNLOADS_DIR, filename) - file @file_ruby_installer_x64 do + file @file_ruby_installer do download_file(url, filename, sha256sum) end end @@ -340,6 +385,21 @@ class DownloadTask end end + def define_ffi_win32_extensions_archive + @file_ffi_win32_extensions_archive = File.join(DOWNLOADS_DIR, "ffi-win32-extensions.tar.gz") + file @file_ffi_win32_extensions_archive do + ensure_directory(DOWNLOADS_DIR) do + dirname = "ffi-win32-extensions" + rm_rf(dirname) if File.exist?(dirname) + sh("git", "clone", "https://github.com/fluent-plugins-nursery/ffi-win32-extensions.git") + cd("ffi-win32-extensions") do + sh("git", "checkout", "fluent-package") + end + sh(*tar_command, "cvfz", "#{dirname}.tar.gz", dirname) + end + end + end + def define_gem_files paths = [] Dir.glob("#{DOWNLOADS_DIR}/*.gem") do |path| @@ -424,10 +484,12 @@ class BuildTask end desc "Install OpenSSL" - task :openssl => [:"download:openssl"] do + task :openssl => [:"download:openssl", :"download:openssl_lts"] do if macos? build_openssl create_certs + elsif centos7? + build_openssl_lts end end @@ -445,7 +507,7 @@ class BuildTask end desc "Install ruby gems" - task :ruby_gems => windows? ? [:"download:ruby_gems", :fluentd, :win32_service] : [:"download:ruby_gems", :fluentd] do + task :ruby_gems => windows? ? [:"download:ruby_gems", :fluentd, :win32_service, :ffi_win32_extensions] : [:"download:ruby_gems", :fluentd] do puts "::group::Install ruby gems" if ENV["CI"] gem_install("bundler", BUNDLER_VERSION) @@ -454,6 +516,17 @@ class BuildTask ENV["INSTALL_GEM_FROM_LOCAL_REPO"] = "yes" # Workaround for "Compatibility with CMake < 3.5 has been removed" error ENV["CMAKE_POLICY_VERSION_MINIMUM"] = "3.5" + if windows? + # Ensure to set pem, it avoids "unable to get local issuer certificate" error + ENV["SSL_CERT_FILE"] = File.join(STAGING_DIR, + "lib/ruby/#{BUNDLED_RUBY_VERSION.rpartition('.').first}.0/etc/ssl/cert.pem") + elsif centos7? + ENV["SSL_CERT_FILE"] = "/etc/pki/tls/certs/ca-bundle.crt" + ENV["CPPFLAGS"] = "-I#{File.join(install_prefix, 'include')}" + ENV["LDFLAGS"] = "-L#{File.join(install_prefix, 'lib')} -Wl,-rpath,#{File.join(install_prefix, 'lib')}" + ENV["PKG_CONFIG_PATH"] = File.join(install_prefix, "lib", "pkgconfig") + end + sh(bundle_command, "_#{BUNDLER_VERSION}_", "install", "-j#{Etc.nprocessors}") # Ensure to install binstubs under /opt/td-agent/bin sh(gem_command, "pristine", "--only-executables", "--all", "--bindir", staging_bindir) @@ -496,6 +569,23 @@ class BuildTask end end + desc "Install ffi-win32-extensions" + task :ffi_win32_extensions => [:"download:ffi_win32_extensions"] do + cd(DOWNLOADS_DIR) do + tar_options = ["--no-same-owner", "--force-local"] + archive_path = @download_task.file_ffi_win32_extensions_archive + sh(*tar_command, "xvf", archive_path, *tar_options) unless File.exist?("ffi-win32-extensions") + cd("ffi-win32-extensions") do + sh("bundle", "install") + sh("rake", "gem:create") + sh("rake", "gem:create") + mkdir_p("pkg") + mv(Dir.glob("*.gem"), "pkg/") + setup_local_gem_repo + end + end + end + desc "Install all gems" task :gems => [:ruby_gems] @@ -795,6 +885,36 @@ class BuildTask puts "::endgroup::" if ENV["CI"] end + def build_openssl_lts + puts "::group::Build openssl from source" if ENV["CI"] + tarball = @download_task.file_openssl_lts_source + source_dir = tarball.sub(/\.tar\.gz$/, '') + sh(*tar_command, "xvf", tarball, "-C", DOWNLOADS_DIR) + configure_opts = [ + "--prefix=#{install_prefix}", + "--openssldir=#{File.join(install_prefix, 'etc', 'openssl')}", + "--libdir=lib", + "-Wl,-rpath,#{File.join(install_prefix, 'lib')}", + "enable-rc5", + "no-comp", + "no-docs", + "no-tests", + "no-zlib", + "shared", + "zlib", + ] + arch_opts = ["linux-x86_64"] + cd(source_dir) do + sh("perl", "./Configure", *(configure_opts + arch_opts)) + sh("make", "depend") + sh("make") + # For building rdkafka gem. The built openssl library for built Ruby cannot use without install. + sh("make", "install") + sh("make", "install", "DESTDIR=#{STAGING_DIR}") + end + puts "::endgroup::" if ENV["CI"] + end + def build_ruby_from_source puts "::group::Build ruby from source" if ENV["CI"] tarball = @download_task.file_ruby_source @@ -814,6 +934,8 @@ class BuildTask configure_opts.push("--without-tk") configure_opts.push("-C") configure_opts.push("--with-openssl-dir=#{File.join(STAGING_DIR, install_prefix)}") + elsif centos7? + configure_opts.push("--with-openssl-dir=#{File.join(STAGING_DIR, install_prefix)}") end cd(ruby_source_dir) do apply_ruby_patches @@ -828,7 +950,7 @@ class BuildTask def extract_ruby_installer ensure_directory(fluent_package_staging_dir) do - path = File.expand_path(@download_task.file_ruby_installer_x64) + path = File.expand_path(@download_task.file_ruby_installer) src_dir = File.basename(path).sub(/\.7z$/, '') sh("7z", "x", # Extract files with full paths @@ -842,7 +964,7 @@ class BuildTask def apply_ruby_installer_patches return if BUNDLED_RUBY_INSTALLER_PATCHES.nil? - ruby_version = BUNDLED_RUBY_INSTALLER_X64_VERSION.sub(/-\d+$/, '') + ruby_version = bundled_ruby_installer_version.sub(/-\d+$/, '') feature_version = ruby_version.sub(/\d+$/, '0') ruby_lib_dir = File.join(fluent_package_staging_dir, "lib", "ruby", feature_version) @@ -873,9 +995,17 @@ class BuildTask # These dlls are required to put in staging_bindir to run C++ based extension # included gem such as winevt_c. We didn't find how to link them statically yet. - dlls = [ - "libstdc++-6", - ] + dlls = if windows_arm64? + # MSYS2 for ARM64 uses clang, so the C++ runtime is libc++ instead of libstdc++. + [ + "libc++", + ] + else + [ + "libstdc++-6", + "libgcc_s_seh-1" + ] + end dlls.each do |dll| mingw_bin_path = RubyInstaller::Runtime.msys2_installation.mingw_bin_path windows_path = "#{mingw_bin_path}/#{dll}.dll" @@ -937,7 +1067,7 @@ class BuildTask def gem_dir_version if windows? - ruby_version = BUNDLED_RUBY_INSTALLER_X64_VERSION + ruby_version = bundled_ruby_installer_version else ruby_version = BUNDLED_RUBY_VERSION end @@ -1778,6 +1908,8 @@ SET ARCH=#{arch} def arch if RUBY_PLATFORM =~ /x64/ "x64" + elsif RUBY_PLATFORM =~ /aarch64/ + "arm64" elsif RUBY_PLATFORM =~ /i386/ "x86" else diff --git a/fluent-package/bump-version-v7.patch b/fluent-package/bump-version-v7.patch index 99aa820ff..49df88667 100644 --- a/fluent-package/bump-version-v7.patch +++ b/fluent-package/bump-version-v7.patch @@ -1,17 +1,17 @@ -From 57b6f35a86c63f715ce8c59a695c8fd933d292f6 Mon Sep 17 00:00:00 2001 +From f6306e5ebead0d755ed79909023a0fe2d2739e53 Mon Sep 17 00:00:00 2001 From: Kentaro Hayashi -Date: Thu, 20 Aug 2026 14:40:47 +0900 -Subject: [PATCH] Bump version to 7.0.0 +Date: Mon, 26 Oct 2026 12:08:20 +0900 +Subject: [PATCH] Update patch for v7 Signed-off-by: Kentaro Hayashi --- - fluent-package/config.rb | 10 +++++----- + fluent-package/config.rb | 14 +++++++------- fluent-package/debian/changelog | 6 ++++++ fluent-package/yum/fluent-package.spec.in | 3 +++ - 3 files changed, 14 insertions(+), 5 deletions(-) + 3 files changed, 16 insertions(+), 7 deletions(-) diff --git a/fluent-package/config.rb b/fluent-package/config.rb -index f505af6..65c449f 100644 +index 276eadf..d76a3b1 100644 --- a/fluent-package/config.rb +++ b/fluent-package/config.rb @@ -1,5 +1,5 @@ @@ -21,30 +21,34 @@ index f505af6..65c449f 100644 # Keep internal path (/opt/td-agent) for package name migration SERVICE_NAME = "fluentd" -@@ -23,8 +23,8 @@ OPENSSL_FOR_MACOS_SHA256SUM = "6c13d2bf38fdf31eac3ce2a347073673f5d63263398f1f69d - BUNDLER_VERSION= "2.7.2" +@@ -26,8 +26,8 @@ OPENSSL_FOR_LTS_VERSION = "3.5.8" + OPENSSL_FOR_LTS_SHA256SUM = "a8f84a39918ec6415ce765d9b429d313ba97b8143169c172e734b9514464f5b2" # https://www.ruby-lang.org/en/downloads/ (tar.gz) --BUNDLED_RUBY_VERSION = "3.4.9" --BUNDLED_RUBY_SOURCE_SHA256SUM = "7bb4d4f5e807cc27251d14d9d6086d182c5b25875191e44ab15b709cd7a7dd9c" -+BUNDLED_RUBY_VERSION = "4.0.6" -+BUNDLED_RUBY_SOURCE_SHA256SUM = "837d299e8f7ddf2be31a229a7a7e019d354979825117989acb3b32b1a9be262a" +-BUNDLED_RUBY_VERSION = "3.4.12" +-BUNDLED_RUBY_SOURCE_SHA256SUM = "5e5d85ad93b0adcccbad47733680f4892bd0078e3342437f7babce01c1872479" ++BUNDLED_RUBY_VERSION = "4.0.9" ++BUNDLED_RUBY_SOURCE_SHA256SUM = "c35350682ff050b79702d57ade4516e7336063f510155d19fb2fb5b3f3909511" BUNDLED_RUBY_PATCHES = [ # An example entry: -@@ -32,8 +32,8 @@ BUNDLED_RUBY_PATCHES = [ +@@ -35,10 +35,10 @@ BUNDLED_RUBY_PATCHES = [ ] # https://rubyinstaller.org/downloads/ (7-ZIP ARCHIVES) --BUNDLED_RUBY_INSTALLER_X64_VERSION = "3.4.9-1" --BUNDLED_RUBY_INSTALLER_X64_SHA256SUM = "4375268618b61dadf53bf8e54beaca74ea30580c90d3c47ea9f2a134bd3e494e" -+BUNDLED_RUBY_INSTALLER_X64_VERSION = "4.0.6-1" -+BUNDLED_RUBY_INSTALLER_X64_SHA256SUM = "328d7a86bea2f4c432783025050c9ffa1c36fcfc54ebccc466b63450ec3af223" +-BUNDLED_RUBY_INSTALLER_X64_VERSION = "3.4.12-1" +-BUNDLED_RUBY_INSTALLER_X64_SHA256SUM = "3806f164377824bcb17e1cf39b17d967e2bdc01e8547ce0254cd786dbe2cfe13" +-BUNDLED_RUBY_INSTALLER_ARM64_VERSION = "3.4.12-1" +-BUNDLED_RUBY_INSTALLER_ARM64_SHA256SUM = "6462eea40a8399420708518b82d121eec0d24daf5bb64abdf238a54d85362d29" ++BUNDLED_RUBY_INSTALLER_X64_VERSION = "4.0.9-1" ++BUNDLED_RUBY_INSTALLER_X64_SHA256SUM = "1dc0715916251a13c4f6a550a3da1f2c726bff869371fd573a65234c008f47b4" ++BUNDLED_RUBY_INSTALLER_ARM64_VERSION = "4.0.9-1" ++BUNDLED_RUBY_INSTALLER_ARM64_SHA256SUM = "d13273600bff5ca349f3866a0492517b144510ceb916525e891e2e1a3f728b78" # Files under rubyinstaller/ are patches for RubyInstaller's binary package. # Other patches for Ruby's source tree which can be shared with BUNDLED_RUBY_PATCHES. diff --git a/fluent-package/debian/changelog b/fluent-package/debian/changelog -index 8b17497..de4615c 100644 +index d14de2a..f3754a7 100644 --- a/fluent-package/debian/changelog +++ b/fluent-package/debian/changelog @@ -1,3 +1,9 @@ @@ -58,7 +62,7 @@ index 8b17497..de4615c 100644 * New upstream release. diff --git a/fluent-package/yum/fluent-package.spec.in b/fluent-package/yum/fluent-package.spec.in -index ad9eb89..e6ede97 100644 +index 8157ae6..e343ef6 100644 --- a/fluent-package/yum/fluent-package.spec.in +++ b/fluent-package/yum/fluent-package.spec.in @@ -482,6 +482,9 @@ fi @@ -68,7 +72,7 @@ index ad9eb89..e6ede97 100644 +* Sun Aug 29 2027 Shizuo Fujita - 7.0.0-1 +- New upstream release. + - * Wed Aug 05 2026 Shizuo Fujita - 6.1.0-1 + * Thu Oct 29 2026 Shizuo Fujita - 6.1.0-1 - New upstream release. -- diff --git a/fluent-package/config.rb b/fluent-package/config.rb index f505af694..276eadf34 100644 --- a/fluent-package/config.rb +++ b/fluent-package/config.rb @@ -7,7 +7,7 @@ PACKAGE_DIR = "fluent" COMPAT_PACKAGE_DIR = COMPAT_SERVICE_NAME -FLUENTD_REVISION = 'ed15edc4b7c86c1fcea3fbf326b7c42325e6fc71' # v1.19.0 +FLUENTD_REVISION = 'f727da51501ff8d29adcc62a12995294e023724d' # v1.20.0 pre 2026/09/28 FLUENTD_LOCAL_GEM_REPO = "file://" + File.expand_path(File.join(__dir__, "local_gem_repo")) # https://github.com/jemalloc/jemalloc/releases @@ -20,11 +20,14 @@ OPENSSL_FOR_MACOS_VERSION = "3.0.8" OPENSSL_FOR_MACOS_SHA256SUM = "6c13d2bf38fdf31eac3ce2a347073673f5d63263398f1f69d0df4a41253e4b3e" -BUNDLER_VERSION= "2.7.2" +BUNDLER_VERSION= "4.0.20" + +OPENSSL_FOR_LTS_VERSION = "3.5.8" +OPENSSL_FOR_LTS_SHA256SUM = "a8f84a39918ec6415ce765d9b429d313ba97b8143169c172e734b9514464f5b2" # https://www.ruby-lang.org/en/downloads/ (tar.gz) -BUNDLED_RUBY_VERSION = "3.4.9" -BUNDLED_RUBY_SOURCE_SHA256SUM = "7bb4d4f5e807cc27251d14d9d6086d182c5b25875191e44ab15b709cd7a7dd9c" +BUNDLED_RUBY_VERSION = "3.4.12" +BUNDLED_RUBY_SOURCE_SHA256SUM = "5e5d85ad93b0adcccbad47733680f4892bd0078e3342437f7babce01c1872479" BUNDLED_RUBY_PATCHES = [ # An example entry: @@ -32,8 +35,10 @@ ] # https://rubyinstaller.org/downloads/ (7-ZIP ARCHIVES) -BUNDLED_RUBY_INSTALLER_X64_VERSION = "3.4.9-1" -BUNDLED_RUBY_INSTALLER_X64_SHA256SUM = "4375268618b61dadf53bf8e54beaca74ea30580c90d3c47ea9f2a134bd3e494e" +BUNDLED_RUBY_INSTALLER_X64_VERSION = "3.4.12-1" +BUNDLED_RUBY_INSTALLER_X64_SHA256SUM = "3806f164377824bcb17e1cf39b17d967e2bdc01e8547ce0254cd786dbe2cfe13" +BUNDLED_RUBY_INSTALLER_ARM64_VERSION = "3.4.12-1" +BUNDLED_RUBY_INSTALLER_ARM64_SHA256SUM = "6462eea40a8399420708518b82d121eec0d24daf5bb64abdf238a54d85362d29" # Files under rubyinstaller/ are patches for RubyInstaller's binary package. # Other patches for Ruby's source tree which can be shared with BUNDLED_RUBY_PATCHES. diff --git a/fluent-package/debian/changelog b/fluent-package/debian/changelog index 8b174974f..d14de2ab2 100644 --- a/fluent-package/debian/changelog +++ b/fluent-package/debian/changelog @@ -2,7 +2,7 @@ fluent-package (6.1.0-1) unstable; urgency=low * New upstream release. - -- Shizuo Fujita Wed, 05 Aug 2026 05:12:35 -0000 + -- Shizuo Fujita Thu, 29 Oct 2026 05:12:35 -0000 fluent-package (6.0.0-1) unstable; urgency=low diff --git a/fluent-package/msi/Dockerfile b/fluent-package/msi/Dockerfile index b0035ba92..56569f3d0 100644 --- a/fluent-package/msi/Dockerfile +++ b/fluent-package/msi/Dockerfile @@ -35,8 +35,8 @@ RUN \ choco install -y git wixtoolset 7zip && \ # Required CMake 3.x to build cmetrics gem choco install -y cmake --version=3.31.6 --installargs 'ADD_CMAKE_TO_PATH=System' && \ - choco install -y msys2 --params /NoUpdate --version=20250221.0.0 && \ - choco install ruby -y --version=3.4.9.1 && \ + choco install -y msys2 --params /NoUpdate --version=20260611.0.0 && \ + choco install ruby -y --version=3.4.10.1 && \ refreshenv && \ ridk install 3 && \ gem install --no-document --force bundler builder diff --git a/fluent-package/msi/load-extensions-test.ps1 b/fluent-package/msi/load-extensions-test.ps1 new file mode 100644 index 000000000..1e69a83ee --- /dev/null +++ b/fluent-package/msi/load-extensions-test.ps1 @@ -0,0 +1,13 @@ +$ErrorActionPreference = 'Stop' + +$msi = ((Get-Item "C:\\fluentd\\fluent-package\\msi\\repositories\\fluent-package-*.msi") | Sort-Object -Descending { $_.LastWriteTime } | Select-Object -First 1).FullName +Write-Host "Installing ${msi} ..." + +Start-Process msiexec -ArgumentList "/i", $msi, "/quiet" -Wait -NoNewWindow + +$ENV:PATH = "C:\Windows\System32;C:\Windows" + +C:\opt\fluent\bin\ruby.exe C:\fluentd\fluent-package\msi\load-extensions-test.rb +if ($LASTEXITCODE -ne 0) { + [Environment]::Exit($LASTEXITCODE) +} diff --git a/fluent-package/msi/load-extensions-test.rb b/fluent-package/msi/load-extensions-test.rb new file mode 100644 index 000000000..10cdbcb19 --- /dev/null +++ b/fluent-package/msi/load-extensions-test.rb @@ -0,0 +1,29 @@ +require "fiddle/import" + +begin + msys_path = RubyInstaller::Runtime.msys2_installation.msys_path + abort "MSYS2 in #{msys_path} would hide DLLs missing from the package. Run this test without MSYS2." +rescue RubyInstaller::Runtime::Msys2Installation::MsysNotFound +end + +module Kernel32 + extend Fiddle::Importer + dlload "kernel32.dll" + extern "void* LoadLibraryW(void*)" +end + +ruby_api_version = RUBY_VERSION[/\A\d+\.\d+/] +for_other_ruby_version = ->(path) { path.split("/").any? { |dir| dir.match?(/\A\d+\.\d+\z/) && dir != ruby_api_version } } +libraries = Dir.glob("C:/opt/fluent/lib/ruby/**/*.so").reject(&for_other_ruby_version) +abort "No extension library is found." if libraries.empty? + +failed = libraries.select do |path| + wide_path = (path.tr("/", "\\") + "\0").encode("UTF-16LE") + Kernel32.LoadLibraryW(wide_path).null? +end + +failed.each do |path| + puts "Failed to load: #{path}" +end +puts "Loaded #{libraries.size - failed.size}/#{libraries.size} extension libraries" +exit(failed.empty?) diff --git a/fluent-package/msi/source.wxs b/fluent-package/msi/source.wxs index 95641d74e..0cd154708 100644 --- a/fluent-package/msi/source.wxs +++ b/fluent-package/msi/source.wxs @@ -13,9 +13,15 @@ - + + + + + diff --git a/fluent-package/test-tools/elasticsearch.conf b/fluent-package/test-tools/elasticsearch.conf index 35d64f45f..ef3cb475d 100644 --- a/fluent-package/test-tools/elasticsearch.conf +++ b/fluent-package/test-tools/elasticsearch.conf @@ -13,5 +13,7 @@ host localhost port 9200 #logstash_format true + verify_es_version_at_startup false + default_elasticsearch_version 9 index_name fluentd-test diff --git a/fluent-package/yum/almalinux-9/Dockerfile b/fluent-package/yum/almalinux-9/Dockerfile index fd9e1c168..e835a691c 100644 --- a/fluent-package/yum/almalinux-9/Dockerfile +++ b/fluent-package/yum/almalinux-9/Dockerfile @@ -26,14 +26,15 @@ ARG DEBUG RUN \ quiet=$([ "${DEBUG}" = "yes" ] || echo "--quiet") && \ dnf install redhat-release -y && \ + dnf module enable ruby:3.1 -y && \ dnf install --enablerepo=crb -y ${quiet} \ make \ gcc-c++-11.3.1-4.3.el9.alma \ glibc-devel-2.34-60.el9_2.7 \ - ruby-devel-3.0.4-160.el9_0 \ - rubygems-3.2.33-160.el9_0 \ - rubygem-rake-13.0.3-160.el9_0 \ - rubygem-bundler-2.2.33-160.el9_0 \ + ruby-devel-3.1.2-141.module_el9.1.0+8+503f6fbd \ + rubygems-3.3.7-141.module_el9.1.0+8+503f6fbd \ + rubygem-rake-13.0.6-141.module_el9.1.0+8+503f6fbd \ + rubygem-bundler-2.3.7-141.module_el9.1.0+8+503f6fbd \ libcap-ng-devel \ libedit-devel \ ncurses-devel \ diff --git a/fluent-package/yum/fluent-package.spec.in b/fluent-package/yum/fluent-package.spec.in index ad9eb89ce..8157ae6b8 100644 --- a/fluent-package/yum/fluent-package.spec.in +++ b/fluent-package/yum/fluent-package.spec.in @@ -482,7 +482,7 @@ fi # NOTE: %{_tmpfilesdir} is available since CentOS 7 %attr(0755,fluentd,fluentd) %dir /tmp/@PACKAGE_DIR@ %changelog -* Wed Aug 05 2026 Shizuo Fujita - 6.1.0-1 +* Thu Oct 29 2026 Shizuo Fujita - 6.1.0-1 - New upstream release. * Fri Aug 29 2025 Kentaro Hayashi - 6.0.0-1