├── .github └── workflows │ ├── apt-arm.matrix.json │ ├── apt-arm.yml │ ├── apt.matrix.json │ ├── apt.yml │ ├── bundle-audit.yml │ ├── macos.yml │ ├── maintenance-bundle-update.yml │ ├── stale-actions.yml │ ├── windows.yml │ ├── yum-arm.matrix.json │ ├── yum-arm.yml │ ├── yum.matrix.json │ └── yum.yml ├── .gitignore ├── .rspec ├── CHANGELOG-v4.md ├── CHANGELOG.md ├── LICENSE ├── NEWS.md ├── README.md ├── Rakefile ├── TODO.md ├── Vagrantfile ├── data └── account │ └── travis-ci.com.hatake-buildbot.txt.gpg.hatake ├── fluent-apt-source ├── Rakefile ├── apt │ ├── debian-bookworm │ │ └── Dockerfile │ ├── debian-bullseye │ │ └── Dockerfile │ ├── debian-buster │ │ └── Dockerfile │ ├── debian-trixie │ │ └── Dockerfile │ ├── ubuntu-bionic │ │ └── Dockerfile │ ├── ubuntu-focal │ │ └── Dockerfile │ ├── ubuntu-jammy │ │ └── Dockerfile │ ├── ubuntu-noble │ │ └── Dockerfile │ └── ubuntu-xenial │ │ └── Dockerfile ├── debian │ ├── changelog │ ├── control │ ├── copyright │ ├── fluent-apt-source.install │ ├── fluent-apt-source.lintian-overrides │ ├── lintian │ │ └── fluent-apt-source │ │ │ ├── debian.profile │ │ │ └── ubuntu.profile │ ├── rules │ └── source │ │ ├── format │ │ └── lintian-overrides ├── fluent-package-signing-key.ashie.gpg ├── fluent-package-signing-key.fukuda.gpg ├── fluent-package-signing-key.hayashi.gpg └── fluent-package.pub ├── fluent-lts-apt-source ├── Rakefile ├── apt │ ├── debian-bookworm │ │ └── Dockerfile │ ├── debian-bullseye │ │ └── Dockerfile │ ├── debian-buster │ │ └── Dockerfile │ ├── debian-trixie │ │ └── Dockerfile │ ├── ubuntu-bionic │ │ └── Dockerfile │ ├── ubuntu-focal │ │ └── Dockerfile │ ├── ubuntu-jammy │ │ └── Dockerfile │ ├── ubuntu-noble │ │ └── Dockerfile │ └── ubuntu-xenial │ │ └── Dockerfile ├── convert-artifacts-layout.sh ├── debian │ ├── changelog │ ├── control │ ├── copyright │ ├── fluent-lts-apt-source.install │ ├── fluent-lts-apt-source.lintian-overrides │ ├── lintian │ │ └── fluent-lts-apt-source │ │ │ ├── debian.profile │ │ │ └── ubuntu.profile │ ├── rules │ └── source │ │ ├── format │ │ └── lintian-overrides └── fluent-package.pub ├── fluent-package ├── Gemfile ├── Gemfile.lock ├── Rakefile ├── apt │ ├── binstubs-test.sh │ ├── commonvar.sh │ ├── confluent-test.sh │ ├── debian-bookworm-arm64 │ │ └── from │ ├── debian-bookworm │ │ ├── Dockerfile │ │ └── qemu-dummy-static │ ├── debian-bullseye-arm64 │ │ └── from │ ├── debian-bullseye │ │ ├── Dockerfile │ │ └── qemu-dummy-static │ ├── debian-buster-arm64 │ │ └── from │ ├── debian-buster │ │ ├── Dockerfile │ │ └── qemu-dummy-static │ ├── debian-trixie-arm64 │ │ └── from │ ├── debian-trixie │ │ ├── Dockerfile │ │ └── qemu-dummy-static │ ├── install-test.sh │ ├── piuparts-test.sh │ ├── pkgsize-test.sh │ ├── serverspec-test.sh │ ├── systemd-test │ │ ├── downgrade-to-v4.sh │ │ ├── downgrade-to-v5-lts.sh │ │ ├── install-newly.sh │ │ ├── setup.sh │ │ ├── test.sh │ │ ├── update-from-v4.sh │ │ ├── update-from-v5-lts.sh │ │ ├── update-to-next-major-version.sh │ │ ├── update-to-next-version-service-status.sh │ │ ├── update-to-next-version-with-auto-and-manual.sh │ │ ├── update-to-next-version-with-backward-compat-for-v4.sh │ │ ├── update-to-next-version.sh │ │ └── update-without-data-lost.sh │ ├── ubuntu-bionic-arm64 │ │ └── from │ ├── ubuntu-bionic │ │ ├── Dockerfile │ │ └── qemu-dummy-static │ ├── ubuntu-focal-arm64 │ │ └── from │ ├── ubuntu-focal │ │ ├── Dockerfile │ │ └── qemu-dummy-static │ ├── ubuntu-hirsute │ │ ├── Dockerfile │ │ └── qemu-dummy-static │ ├── ubuntu-jammy-arm64 │ │ └── from │ ├── ubuntu-jammy │ │ ├── Dockerfile │ │ └── qemu-dummy-static │ ├── ubuntu-noble-arm64 │ │ └── from │ ├── ubuntu-noble │ │ ├── Dockerfile │ │ └── qemu-dummy-static │ └── ubuntu-xenial │ │ ├── Dockerfile │ │ └── qemu-dummy-static ├── binstubs-test.rb ├── bump-version-v6.patch ├── config.rb ├── convert-artifacts-layout.sh ├── debian │ ├── changelog │ ├── control │ ├── fluent-gem.1 │ ├── fluent-package.install │ ├── fluent-package.lintian-overrides │ ├── fluent-package.manpages │ ├── fluentd.1 │ ├── lintian │ │ └── fluent-package │ │ │ ├── debian.profile │ │ │ └── ubuntu.profile │ ├── rules │ ├── source │ │ ├── format │ │ └── lintian-overrides │ └── td.1 ├── debug-package-converter.sh ├── dmg │ ├── install-test.sh │ └── resources │ │ ├── dmg │ │ ├── background.png │ │ └── icon.png │ │ └── pkg │ │ ├── Distribution.xml.erb │ │ ├── assets │ │ ├── LICENSE.rtf │ │ └── welcome.html │ │ ├── fluentd.plist │ │ ├── postinstall.erb │ │ └── scripts │ │ └── .gitkeep ├── make-index-html.erb ├── make-index-html.rb ├── make-install-script.erb ├── make-install-script.rb ├── manage-fluent-repositories.sh ├── msi │ ├── Dockerfile │ ├── assets │ │ ├── LICENSE.rtf │ │ ├── banner_background.bmp │ │ ├── dialog_background.bmp │ │ ├── fluent-gem.bat │ │ ├── fluent-package-post-install.bat │ │ ├── fluent-package-post-migration.bat │ │ ├── fluent-package-post-toast.bat │ │ ├── fluent-package-post-toast.ps1 │ │ ├── fluent-package-prompt.bat │ │ ├── fluent-package-toast-icon.png │ │ ├── fluent-package-version.rb │ │ ├── fluentd.bat │ │ ├── icon.ico │ │ └── icon.png │ ├── build.bat │ ├── exclude-files.xslt │ ├── install-test.ps1 │ ├── localization-en-us.wxl │ ├── parameters.wxi.erb │ ├── pkgsize-test.ps1 │ ├── serverspec-test.ps1 │ ├── source.wxs │ ├── update-from-v4-test.ps1 │ └── update-from-v5-test.ps1 ├── run-confluent.sh ├── templates │ ├── etc │ │ ├── fluent │ │ │ └── fluentd.conf │ │ ├── logrotate.d │ │ │ └── fluentd │ │ ├── needrestart │ │ │ └── conf.d │ │ │ │ └── 50-fluent-package.conf │ │ └── systemd │ │ │ ├── fluentd.erb │ │ │ └── fluentd.service.erb │ ├── fluentd.plist.erb │ ├── package-scripts │ │ └── fluent-package │ │ │ └── deb │ │ │ ├── copyright │ │ │ ├── postinst │ │ │ ├── postrm │ │ │ ├── preinst │ │ │ └── prerm │ └── usr │ │ ├── bin │ │ └── td.erb │ │ ├── lib │ │ └── tmpfiles.d │ │ │ └── fluentd.conf │ │ └── sbin │ │ ├── fluent-gem.erb │ │ └── fluentd.erb ├── test-install-in-docker.sh ├── test-tools │ ├── fluentd.conf │ ├── logdata-sender.rb │ └── rsyslog.conf ├── test-verify-repo.sh ├── toolbelt │ ├── README.md │ ├── install-amazon1-td-agent3.sh │ ├── install-amazon2-fluent-package5-lts.sh │ ├── install-amazon2-fluent-package5.sh │ ├── install-amazon2-td-agent3.sh │ ├── install-amazon2-td-agent4.sh │ ├── install-amazon2023-fluent-package5-lts.sh │ ├── install-amazon2023-fluent-package5.sh │ ├── install-debian-bookworm-fluent-package5-lts.sh │ ├── install-debian-bookworm-fluent-package5.sh │ ├── install-debian-bullseye-fluent-package5-lts.sh │ ├── install-debian-bullseye-fluent-package5.sh │ ├── install-debian-bullseye-td-agent4.sh │ ├── install-debian-buster-td-agent3.sh │ ├── install-debian-buster-td-agent4.sh │ ├── install-debian-jessie-td-agent2.sh │ ├── install-debian-jessie-td-agent3.sh │ ├── install-debian-lenny.sh │ ├── install-debian-squeeze-td-agent2.sh │ ├── install-debian-stretch-td-agent2.5.sh │ ├── install-debian-stretch-td-agent2.sh │ ├── install-debian-stretch-td-agent3.sh │ ├── install-debian-wheezy-td-agent2.sh │ ├── install-redhat-fluent-package5-lts.sh │ ├── install-redhat-fluent-package5.sh │ ├── install-redhat-td-agent2.5.sh │ ├── install-redhat-td-agent2.sh │ ├── install-redhat-td-agent3.sh │ ├── install-redhat-td-agent4.sh │ ├── install-redhat.sh │ ├── install-redhat5-td-agent2.sh │ ├── install-ubuntu-bionic-td-agent2.5.sh │ ├── install-ubuntu-bionic-td-agent3.sh │ ├── install-ubuntu-bionic-td-agent4.sh │ ├── install-ubuntu-focal-fluent-package5-lts.sh │ ├── install-ubuntu-focal-fluent-package5.sh │ ├── install-ubuntu-focal-td-agent4.sh │ ├── install-ubuntu-jammy-fluent-package5-lts.sh │ ├── install-ubuntu-jammy-fluent-package5.sh │ ├── install-ubuntu-jammy-td-agent4.sh │ ├── install-ubuntu-lucid-td-agent2.sh │ ├── install-ubuntu-lucid.sh │ ├── install-ubuntu-noble-fluent-package5-lts.sh │ ├── install-ubuntu-noble-fluent-package5.sh │ ├── install-ubuntu-precise-td-agent2.sh │ ├── install-ubuntu-precise.sh │ ├── install-ubuntu-trusty-td-agent2.5.sh │ ├── install-ubuntu-trusty-td-agent2.sh │ ├── install-ubuntu-trusty-td-agent3.sh │ ├── install-ubuntu-xenial-td-agent2.5.sh │ ├── install-ubuntu-xenial-td-agent2.sh │ ├── install-ubuntu-xenial-td-agent3.sh │ └── install-ubuntu-xenial-td-agent4.sh └── yum │ ├── almalinux-10-aarch64 │ └── from │ ├── almalinux-10 │ ├── Dockerfile │ └── qemu-dummy-static │ ├── almalinux-9-aarch64 │ └── from │ ├── almalinux-9 │ ├── Dockerfile │ └── qemu-dummy-static │ ├── amazonlinux-2-aarch64 │ └── from │ ├── amazonlinux-2 │ ├── Dockerfile │ └── qemu-dummy-static │ ├── amazonlinux-2023-aarch64 │ └── from │ ├── amazonlinux-2023 │ ├── Dockerfile │ └── qemu-dummy-static │ ├── binstubs-test.sh │ ├── centos-7-aarch64 │ ├── Dockerfile │ └── from │ ├── centos-7 │ ├── Dockerfile │ └── qemu-dummy-static │ ├── centos-8-aarch64 │ └── from │ ├── centos-8-ppc64le │ └── from │ ├── centos-8 │ ├── Dockerfile │ └── qemu-dummy-static │ ├── centos-stream-8 │ ├── Dockerfile │ └── qemu-dummy-static │ ├── confluent-test.sh │ ├── fluent-package.spec.in │ ├── install-test.sh │ ├── opensuse-42 │ ├── Dockerfile │ └── qemu-dummy-static │ ├── pkgsize-test.sh │ ├── rockylinux-8-aarch64 │ └── from │ ├── rockylinux-8 │ ├── Dockerfile │ └── qemu-dummy-static │ ├── rpmlint.config │ ├── serverspec-test.sh │ └── systemd-test │ ├── commonvar.sh │ ├── downgrade-to-v4.sh │ ├── downgrade-to-v5-lts.sh │ ├── install-newly.sh │ ├── setup-rpmrebuild.sh │ ├── test.sh │ ├── update-from-v4.sh │ ├── update-from-v5-lts.sh │ ├── update-to-next-major-version.sh │ ├── update-to-next-version-service-status.sh │ ├── update-to-next-version-with-auto-and-manual.sh │ ├── update-to-next-version-with-backward-compat-for-v4.sh │ ├── update-to-next-version.sh │ └── update-without-data-lost.sh ├── lib ├── apt │ └── build.sh ├── package-task.rb └── yum │ └── build.sh └── serverspec ├── kafka └── confluent.rb ├── linux └── td-agent.rb ├── spec_helper.rb ├── test.conf └── windows └── td-agent.rb /.github/workflows/apt-arm.matrix.json: -------------------------------------------------------------------------------- 1 | { 2 | "include": [ 3 | { 4 | "label": "Debian bookworm arm64", 5 | "rake-job": "debian-bookworm", 6 | "test-docker-image": "arm64v8/debian:bookworm" 7 | }, 8 | { 9 | "label": "Debian trixie arm64", 10 | "rake-job": "debian-trixie", 11 | "test-docker-image": "arm64v8/debian:trixie" 12 | }, 13 | { 14 | "label": "Ubuntu Jammy arm64", 15 | "rake-job": "ubuntu-jammy", 16 | "rake-options": "LINTIAN=no", 17 | "test-docker-image": "arm64v8/ubuntu:jammy" 18 | }, 19 | { 20 | "label": "Ubuntu Noble arm64", 21 | "rake-job": "ubuntu-noble", 22 | "rake-options": "LINTIAN=no", 23 | "test-docker-image": "arm64v8/ubuntu:noble" 24 | } 25 | ] 26 | } 27 | -------------------------------------------------------------------------------- /.github/workflows/apt.matrix.json: -------------------------------------------------------------------------------- 1 | { 2 | "include": [ 3 | { 4 | "label": "Debian bookworm amd64", 5 | "rake-job": "debian-bookworm", 6 | "test-docker-image": "debian:bookworm" 7 | }, 8 | { 9 | "label": "Debian trixie amd64", 10 | "rake-job": "debian-trixie", 11 | "test-docker-image": "debian:trixie" 12 | }, 13 | { 14 | "label": "Ubuntu Jammy amd64", 15 | "rake-job": "ubuntu-jammy", 16 | "test-docker-image": "ubuntu:jammy" 17 | }, 18 | { 19 | "label": "Ubuntu Noble amd64", 20 | "rake-job": "ubuntu-noble", 21 | "test-docker-image": "ubuntu:noble" 22 | } 23 | ] 24 | } 25 | -------------------------------------------------------------------------------- /.github/workflows/bundle-audit.yml: -------------------------------------------------------------------------------- 1 | name: Bundle audit 2 | on: 3 | push: 4 | branches: 5 | - master 6 | - fluent-package-v5 7 | pull_request: 8 | workflow_dispatch: 9 | concurrency: 10 | group: ${{ github.head_ref || github.sha }}-${{ github.workflow }} 11 | cancel-in-progress: true 12 | jobs: 13 | build: 14 | name: Audit 15 | timeout-minutes: 90 16 | strategy: 17 | fail-fast: false 18 | runs-on: windows-2022 19 | steps: 20 | - name: Set up Ruby 21 | uses: ruby/setup-ruby@v1 22 | with: 23 | ruby-version: 3.2 24 | - uses: actions/checkout@v4 25 | - name: Build 26 | run: | 27 | gem install bundle-audit 28 | cd fluent-package 29 | bundle-audit check --update 30 | -------------------------------------------------------------------------------- /.github/workflows/macos.yml: -------------------------------------------------------------------------------- 1 | name: macOS 2 | on: 3 | push: 4 | branches: 5 | - master 6 | - fluent-package-v5 7 | pull_request: 8 | concurrency: 9 | group: ${{ github.head_ref || github.sha }}-${{ github.workflow }} 10 | cancel-in-progress: true 11 | jobs: 12 | build: 13 | name: Build 14 | timeout-minutes: 30 15 | strategy: 16 | fail-fast: false 17 | runs-on: macos-latest 18 | steps: 19 | - uses: actions/checkout@v4 20 | - name: Install cmake 21 | run: | 22 | brew install cmake 23 | - name: Install Rust 24 | run: | 25 | curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y 26 | - name: Install gems 27 | run: | 28 | gem install bundler builder 29 | - name: Build 30 | run: | 31 | sudo mkdir /opt/fluent 32 | sudo chown $(whoami) /opt/fluent 33 | rm -rf fluent/staging 34 | rake dmg:selfbuild PATH="$HOME/.cargo/bin:$PATH" 35 | - name: Upload fluent-package dmg 36 | uses: actions/upload-artifact@master 37 | with: 38 | name: packages-macos 39 | path: fluent-package/dmg/*.dmg 40 | test: 41 | name: Test 42 | needs: build 43 | runs-on: macos-latest 44 | steps: 45 | - uses: actions/checkout@v4 46 | - uses: actions/download-artifact@v4 47 | with: 48 | name: packages-macos 49 | - name: Run test 50 | run: fluent-package/dmg/install-test.sh *.dmg 51 | -------------------------------------------------------------------------------- /.github/workflows/maintenance-bundle-update.yml: -------------------------------------------------------------------------------- 1 | name: Maintenance - Bundle Update 2 | 3 | on: 4 | workflow_dispatch 5 | 6 | permissions: 7 | contents: write 8 | pull-requests: write 9 | 10 | jobs: 11 | bundle-update: 12 | runs-on: windows-latest 13 | env: 14 | GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} 15 | steps: 16 | - name: Set up Ruby 17 | uses: ruby/setup-ruby@v1 18 | with: 19 | ruby-version: 3.2 # Use same Ruby version with fluent-package bundled 20 | - uses: actions/checkout@v4 21 | - name: Bundle Update 22 | run: | 23 | cd fluent-package 24 | gem install bundler:2.3.27 25 | bundle _2.3.27_ update -j 4 26 | - name: Create Pull Request 27 | run: | 28 | $today=Get-Date -Format "yyyy-MM-dd" 29 | $branch="maintenance/bundle-update/${today}" 30 | 31 | git config user.name "github-actions[bot]" 32 | git config user.email "41898282+github-actions[bot]@users.noreply.github.com" 33 | git switch --create $branch 34 | git add fluent-package/Gemfile.lock 35 | git commit --message "Update Gemfile.lock" --signoff 36 | git push origin $branch 37 | gh pr create --title "Update Gemfile.lock" --body "Update Gemfile.lock by maintenance workflow" 38 | -------------------------------------------------------------------------------- /.github/workflows/stale-actions.yml: -------------------------------------------------------------------------------- 1 | name: "Mark or close stale issues and PRs" 2 | on: 3 | schedule: 4 | - cron: "00 10 * * *" 5 | 6 | jobs: 7 | stale: 8 | runs-on: ubuntu-latest 9 | steps: 10 | - uses: actions/stale@v9 11 | with: 12 | repo-token: ${{ secrets.GITHUB_TOKEN }} 13 | days-before-stale: 90 14 | days-before-close: 30 15 | stale-issue-message: "This issue has been automatically marked as stale because it has been open 90 days with no activity. Remove stale label or comment or this issue will be closed in 30 days" 16 | stale-pr-message: "This PR has been automatically marked as stale because it has been open 90 days with no activity. Remove stale label or comment or this PR will be closed in 30 days" 17 | close-issue-message: "This issue was automatically closed because of stale in 30 days" 18 | close-pr-message: "This PR was automatically closed because of stale in 30 days" 19 | stale-pr-label: "stale" 20 | stale-issue-label: "stale" 21 | exempt-issue-labels: "bug,CI,documentation,enhancement,good first issue,help wanted,question,wait upstream release,Windows" 22 | exempt-pr-labels: "bug,CI,documentation,enhancement,good first issue,help wanted,question,wait upstream release,Windows" 23 | -------------------------------------------------------------------------------- /.github/workflows/yum-arm.matrix.json: -------------------------------------------------------------------------------- 1 | { 2 | "include": [ 3 | { 4 | "label": "RockyLinux 8 aarch64", 5 | "rake-job": "rockylinux-8", 6 | "test-docker-image": "arm64v8/rockylinux:8" 7 | }, 8 | { 9 | "label": "AlmaLinux 9 aarch64", 10 | "rake-job": "almalinux-9", 11 | "test-docker-image": "arm64v8/almalinux:9" 12 | }, 13 | { 14 | "label": "AlmaLinux 10 aarch64", 15 | "rake-job": "almalinux-10", 16 | "test-docker-image": "arm64v8/almalinux:10" 17 | }, 18 | { 19 | "label": "Amazon Linux 2023 aarch64", 20 | "rake-job": "amazonlinux-2023", 21 | "test-docker-image": "arm64v8/amazonlinux:2023" 22 | } 23 | ] 24 | } 25 | -------------------------------------------------------------------------------- /.github/workflows/yum.matrix.json: -------------------------------------------------------------------------------- 1 | { 2 | "include": [ 3 | { 4 | "label": "RockyLinux 8 x86_64", 5 | "rake-job": "rockylinux-8", 6 | "test-docker-image": "rockylinux:8", 7 | "centos-stream": false 8 | }, 9 | { 10 | "label": "AlmaLinux 9 x86_64", 11 | "rake-job": "almalinux-9", 12 | "test-docker-image": "almalinux:9", 13 | "centos-stream": false 14 | }, 15 | { 16 | "label": "AlmaLinux 10 x86_64", 17 | "rake-job": "almalinux-10", 18 | "test-docker-image": "almalinux:10", 19 | "centos-stream": false 20 | }, 21 | { 22 | "label": "Amazon Linux 2023 x86_64", 23 | "rake-job": "amazonlinux-2023", 24 | "test-docker-image": "amazonlinux:2023", 25 | "centos-stream": false 26 | } 27 | ] 28 | } 29 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .bundle/ 2 | .vagrant/ 3 | /vendor/ 4 | /fluent-package/staging/ 5 | /fluent-package/debian/post* 6 | /fluent-package/debian/copyright 7 | /fluent-package/debian/source/include-binaries 8 | /fluent-package/downloads/ 9 | /fluent-package/yum/build.sh 10 | /fluent-package/yum/repositories/ 11 | /fluent-package/yum/tmp/ 12 | /fluent-package/yum/env.sh 13 | /fluent-package/apt/build.sh 14 | /fluent-package/apt/env.sh 15 | /fluent-package/apt/repositories/ 16 | /fluent-package/apt/tmp/ 17 | /fluent-package/msi/env.bat 18 | /fluent-package/msi/parameters.wxi 19 | /fluent-package/msi/project-files.wxs 20 | /fluent-package/dmg/dmg/ 21 | /fluent-package/dmg/resources/pkg/Distribution.xml 22 | /fluent-package/dmg/td-agent.icns 23 | /fluent-package/dmg/td-agent.iconset/ 24 | /fluent-package/dmg/td-agent.rsrc 25 | /fluent-package/dmg/resources/pkg/scripts/postinstall 26 | /fluent-package/dmg/resources/dmg/td-agent.osascript 27 | /fluent-apt-source/apt/build.sh 28 | /fluent-apt-source/apt/env.sh 29 | /fluent-apt-source/apt/repositories/ 30 | /fluent-apt-source/apt/tmp/ 31 | *.wixobj 32 | *.wixpdb 33 | *.msi 34 | *.gz 35 | *.DS_Store 36 | -------------------------------------------------------------------------------- /.rspec: -------------------------------------------------------------------------------- 1 | --color 2 | --format documentation 3 | -------------------------------------------------------------------------------- /NEWS.md: -------------------------------------------------------------------------------- 1 | # Td Agent Builder news 2 | 3 | ## T.B.D. UNRELEASED 4 | 5 | ### General 6 | 7 | * Unified into `Gemfile` instead of `core_gems.rb` and `plugin_gems.rb`. [GitHub#142] 8 | - It simplify a management of bundled gem files. Note that 9 | this change requires newer bundler - bundler 2.2.0.rc1 or later. 10 | * Added Serverspec test cases [GitHub#174, #180] 11 | - It was expected to reduce degraded bugs. 12 | 13 | ### macOS 14 | 15 | * macos: Added to support building macOS installer [GitHub#192] 16 | 17 | ## Release v4.0.1 - 2020/08/18 18 | 19 | ### General 20 | 21 | * Added `lockfile:update` rake task to update lock file. [GitHub#161] 22 | - Execute `cd td-agent && rake lockfile:update` for updating bundled Gems. 23 | 24 | ### Deb Packages 25 | 26 | * Added `td-agent-apt-source` package to install apt key and .source [GitHub#181] 27 | - It enables `apt install td-agent-apt-source && apt install td-agent`. 28 | 29 | ### MSI Packages 30 | 31 | * msi: Fixed a bug that required dll.a was removed unexpectedly. 32 | - This bug causes failure to build for C extensions. [GitHub#130] 33 | * msi: Fixed to use TD_AGENT_TOPDIR in td-agent.conf. [GitHub#131] 34 | - It fixes the problem that c:/var is always created automatically. 35 | It was changed to respect installed directory (c:/opt/td-agent/var...) 36 | 37 | ## Release v4.0.0 - 2020/07/02 38 | 39 | ### General 40 | 41 | * Migrated build system from Omnibus. 42 | 43 | ## Deb Packages 44 | 45 | * Fixed to clean up lintian errors and warnings. 46 | 47 | ### RPM Packages 48 | 49 | * Fixed to clean up rpmlint errors and warnings. 50 | * Improved to support Amazon Linux 2. [GitHub#74] 51 | 52 | ### MSI Packages 53 | 54 | * Improved to support install/uninstall Fluentd as fluentdwinsvc service. [GitHub#122] 55 | -------------------------------------------------------------------------------- /TODO.md: -------------------------------------------------------------------------------- 1 | # TODO about fluent-package-builder 2 | 3 | ## Enable lintian check on Ubuntu Focal (Arm64) 4 | 5 | See https://github.com/fluent-plugins-nursery/fluent-package-builder/issues/65 6 | 7 | Because of stucking lintian process, we can't enable 8 | lintian check on Ubuntu Focal (Arm64) and Groovy. 9 | 10 | The reason why lintian process stalls is caused by IO::Async and 11 | that dependency was removed since lintian 2.92.0 [1], so we can 12 | remove this workaround from Ubuntu Hirsute (21.04) or later. 13 | 14 | [1] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=964770 15 | -------------------------------------------------------------------------------- /Vagrantfile: -------------------------------------------------------------------------------- 1 | # -*- mode: ruby -*- 2 | # vi: set ft=ruby : 3 | 4 | # Vagrantfile API/syntax version. Don't touch unless you know what you're doing! 5 | VAGRANTFILE_API_VERSION = "2" 6 | 7 | Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| 8 | vms = [ 9 | { 10 | :id => "debian-bullseye", 11 | :box => "bento/debian-11", 12 | }, 13 | { 14 | :id => "debian-bookworm", 15 | :box => "bento/debian-12", 16 | }, 17 | { 18 | :id => "ubuntu-focal", 19 | :box => "bento/ubuntu-20.04", 20 | }, 21 | { 22 | :id => "ubuntu-jammy", 23 | :box => "bento/ubuntu-22.04", 24 | }, 25 | { 26 | :id => "centos-7", 27 | :box => "bento/centos-7", 28 | }, 29 | { 30 | :id => "rockylinux-8", 31 | :box => "bento/rockylinux-8", 32 | }, 33 | { 34 | :id => "almalinux-9", 35 | :box => "bento/almalinux-9", 36 | }, 37 | { 38 | :id => "amazonlinux-2", 39 | :box => "bento/amazonlinux-2", 40 | }, 41 | { 42 | :id => "amazonlinux-2023", 43 | :box => "bento/amazonlinux-2023", 44 | }, 45 | ] 46 | 47 | n_cpus = ENV["BOX_N_CPUS"]&.to_i || 2 48 | memory = ENV["BOX_MEMORY"]&.to_i || 2048 49 | vms.each_with_index do |vm, idx| 50 | id = vm[:id] 51 | box = vm[:box] || id 52 | config.vm.define(id) do |node| 53 | node.vm.box = box 54 | node.vm.provider("virtualbox") do |virtual_box| 55 | virtual_box.cpus = n_cpus if n_cpus 56 | virtual_box.memory = memory if memory 57 | end 58 | end 59 | mount_dir = ENV["BOX_MOUNT_DIR"] || "." 60 | config.vm.synced_folder mount_dir, "/host" 61 | end 62 | end 63 | -------------------------------------------------------------------------------- /data/account/travis-ci.com.hatake-buildbot.txt.gpg.hatake: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fluent/fluent-package-builder/f13df648989c4d40b70ce0b4f14443b9759e5854/data/account/travis-ci.com.hatake-buildbot.txt.gpg.hatake -------------------------------------------------------------------------------- /fluent-apt-source/apt/debian-bookworm/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM debian:bookworm 2 | 3 | RUN \ 4 | echo "debconf debconf/frontend select Noninteractive" | \ 5 | debconf-set-selections 6 | 7 | ARG DEBUG 8 | 9 | RUN \ 10 | quiet=$([ "${DEBUG}" = "yes" ] || echo "-qq") && \ 11 | apt update ${quiet} && \ 12 | apt install -y -V ${quiet} \ 13 | debhelper \ 14 | devscripts \ 15 | gnupg && \ 16 | apt clean && \ 17 | rm -rf /var/lib/apt/lists/* 18 | -------------------------------------------------------------------------------- /fluent-apt-source/apt/debian-bullseye/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM debian:bullseye 2 | 3 | RUN \ 4 | echo "debconf debconf/frontend select Noninteractive" | \ 5 | debconf-set-selections 6 | 7 | ARG DEBUG 8 | 9 | RUN \ 10 | quiet=$([ "${DEBUG}" = "yes" ] || echo "-qq") && \ 11 | apt update ${quiet} && \ 12 | apt install -y -V ${quiet} \ 13 | debhelper \ 14 | devscripts \ 15 | gnupg && \ 16 | apt clean && \ 17 | rm -rf /var/lib/apt/lists/* 18 | -------------------------------------------------------------------------------- /fluent-apt-source/apt/debian-buster/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM debian:buster 2 | 3 | RUN \ 4 | echo "debconf debconf/frontend select Noninteractive" | \ 5 | debconf-set-selections 6 | 7 | ARG DEBUG 8 | 9 | RUN \ 10 | quiet=$([ "${DEBUG}" = "yes" ] || echo "-qq") && \ 11 | apt update ${quiet} && \ 12 | apt install -y -V ${quiet} \ 13 | debhelper \ 14 | devscripts \ 15 | gnupg && \ 16 | apt clean && \ 17 | rm -rf /var/lib/apt/lists/* 18 | -------------------------------------------------------------------------------- /fluent-apt-source/apt/debian-trixie/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM debian:trixie 2 | 3 | RUN \ 4 | echo "debconf debconf/frontend select Noninteractive" | \ 5 | debconf-set-selections 6 | 7 | ARG DEBUG 8 | 9 | RUN \ 10 | quiet=$([ "${DEBUG}" = "yes" ] || echo "-qq") && \ 11 | apt update ${quiet} && \ 12 | apt install -y -V ${quiet} \ 13 | debhelper \ 14 | devscripts \ 15 | gnupg && \ 16 | apt clean && \ 17 | rm -rf /var/lib/apt/lists/* 18 | -------------------------------------------------------------------------------- /fluent-apt-source/apt/ubuntu-bionic/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM ubuntu:bionic 2 | 3 | RUN \ 4 | echo "debconf debconf/frontend select Noninteractive" | \ 5 | debconf-set-selections 6 | 7 | ARG DEBUG 8 | 9 | RUN \ 10 | quiet=$([ "${DEBUG}" = "yes" ] || echo "-qq") && \ 11 | apt update ${quiet} && \ 12 | apt install -y -V ${quiet} \ 13 | debhelper \ 14 | devscripts \ 15 | gnupg && \ 16 | apt clean && \ 17 | rm -rf /var/lib/apt/lists/* 18 | -------------------------------------------------------------------------------- /fluent-apt-source/apt/ubuntu-focal/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM ubuntu:focal 2 | 3 | RUN \ 4 | echo "debconf debconf/frontend select Noninteractive" | \ 5 | debconf-set-selections 6 | 7 | ARG DEBUG 8 | 9 | RUN \ 10 | quiet=$([ "${DEBUG}" = "yes" ] || echo "-qq") && \ 11 | apt update ${quiet} && \ 12 | apt install -y -V ${quiet} \ 13 | debhelper \ 14 | devscripts \ 15 | gnupg && \ 16 | apt clean && \ 17 | rm -rf /var/lib/apt/lists/* 18 | -------------------------------------------------------------------------------- /fluent-apt-source/apt/ubuntu-jammy/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM ubuntu:jammy 2 | 3 | RUN \ 4 | echo "debconf debconf/frontend select Noninteractive" | \ 5 | debconf-set-selections 6 | 7 | ARG DEBUG 8 | 9 | RUN \ 10 | quiet=$([ "${DEBUG}" = "yes" ] || echo "-qq") && \ 11 | apt update ${quiet} && \ 12 | apt install -y -V ${quiet} \ 13 | debhelper \ 14 | devscripts \ 15 | gnupg && \ 16 | apt clean && \ 17 | rm -rf /var/lib/apt/lists/* 18 | -------------------------------------------------------------------------------- /fluent-apt-source/apt/ubuntu-noble/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM ubuntu:noble 2 | 3 | RUN \ 4 | echo "debconf debconf/frontend select Noninteractive" | \ 5 | debconf-set-selections 6 | 7 | ARG DEBUG 8 | 9 | RUN \ 10 | quiet=$([ "${DEBUG}" = "yes" ] || echo "-qq") && \ 11 | apt update ${quiet} && \ 12 | apt install -y -V ${quiet} \ 13 | debhelper \ 14 | devscripts \ 15 | gnupg && \ 16 | apt clean && \ 17 | rm -rf /var/lib/apt/lists/* 18 | -------------------------------------------------------------------------------- /fluent-apt-source/apt/ubuntu-xenial/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM ubuntu:xenial 2 | 3 | RUN \ 4 | echo "debconf debconf/frontend select Noninteractive" | \ 5 | debconf-set-selections 6 | 7 | ARG DEBUG 8 | 9 | RUN \ 10 | quiet=$([ "${DEBUG}" = "yes" ] || echo "-qq") && \ 11 | apt update ${quiet} && \ 12 | apt install -y -V ${quiet} \ 13 | debhelper \ 14 | devscripts \ 15 | gnupg && \ 16 | apt clean && \ 17 | rm -rf /var/lib/apt/lists/* 18 | -------------------------------------------------------------------------------- /fluent-apt-source/debian/changelog: -------------------------------------------------------------------------------- 1 | fluent-apt-source (2025.1.8-1) unstable; urgency=medium 2 | 3 | * New upstream release. 4 | * Use armored keyring for APT repository to support newer apt. 5 | 6 | -- Kentaro Hayashi Wed, 08 Jan 2025 16:31:51 +0900 7 | 8 | fluent-apt-source (2023.6.29-1) unstable; urgency=medium 9 | 10 | * New upstream release. 11 | * Added new Fluent Package Official Signing Key. 12 | 13 | -- Kentaro Hayashi Mon, 26 Jun 2023 18:06:04 +0900 14 | 15 | fluentd-apt-source (2023.1.13-1) unstable; urgency=medium 16 | 17 | * Fix incorrect priority. changed from important to optional. (GitHub#422) 18 | See https://www.debian.org/doc/debian-policy/ch-archive.html#priorities. 19 | 20 | -- Kentaro Hayashi Fri, 13 Jan 2023 10:53:41 +0900 21 | 22 | fluentd-apt-source (2020.8.25-1) unstable; urgency=low 23 | 24 | * New upstream release. 25 | 26 | -- Kentaro Hayashi Tue, 25 Aug 2020 10:43:00 +0900 27 | -------------------------------------------------------------------------------- /fluent-apt-source/debian/control: -------------------------------------------------------------------------------- 1 | Source: fluent-apt-source 2 | Section: misc 3 | Priority: optional 4 | Maintainer: Fluentd developers 5 | Build-Depends: 6 | debhelper-compat (= 12), 7 | gnupg, 8 | lsb-release 9 | Standards-Version: 4.5.0 10 | Homepage: https://www.fluentd.org/ 11 | 12 | Package: fluent-apt-source 13 | Section: misc 14 | Architecture: all 15 | Depends: 16 | ${misc:Depends}, 17 | gnupg 18 | Replaces: fluentd-apt-source (<< 2023.6.29-1) 19 | Breaks: fluentd-apt-source (<< 2023.6.29-1) 20 | Description: GnuPG archive key and APT source of the Fluent Package archive 21 | The Fluentd project digitally signs its Release files. This package 22 | contains the archive key used for that. 23 | 24 | Package: fluentd-apt-source 25 | Section: oldlibs 26 | Architecture: all 27 | Depends: 28 | ${misc:Depends}, 29 | fluent-apt-source 30 | Description: Transitional package for fluent-apt-source 31 | This is a transitional package for fluent-apt-source. 32 | . 33 | It can be safely be removed. 34 | -------------------------------------------------------------------------------- /fluent-apt-source/debian/fluent-apt-source.install: -------------------------------------------------------------------------------- 1 | etc/apt/sources.list.d/* 2 | usr/share/keyrings/* 3 | -------------------------------------------------------------------------------- /fluent-apt-source/debian/fluent-apt-source.lintian-overrides: -------------------------------------------------------------------------------- 1 | fluent-apt-source: new-package-should-close-itp-bug 2 | -------------------------------------------------------------------------------- /fluent-apt-source/debian/lintian/fluent-apt-source/debian.profile: -------------------------------------------------------------------------------- 1 | Profile: fluent-apt-source/main 2 | Extends: debian/main 3 | Disable-Tags: dir-or-file-in-opt 4 | -------------------------------------------------------------------------------- /fluent-apt-source/debian/lintian/fluent-apt-source/ubuntu.profile: -------------------------------------------------------------------------------- 1 | Profile: fluent-apt-source/main 2 | Extends: ubuntu/main 3 | Disable-Tags: dir-or-file-in-opt 4 | -------------------------------------------------------------------------------- /fluent-apt-source/debian/rules: -------------------------------------------------------------------------------- 1 | #!/usr/bin/make -f 2 | # -*- makefile-gmake -*- 3 | # 4 | # Uncomment this to turn on verbose mode. 5 | #export DH_VERBOSE=1 6 | # This has to be exported to make some magic below work. 7 | export DH_OPTIONS 8 | 9 | %: 10 | dh $@ 11 | 12 | # As aptly doesn't support zstd yet, so as a workaround, force default 13 | # package compression to xz 14 | override_dh_builddeb: 15 | dh_builddeb -- -Zxz 16 | 17 | 18 | override_dh_auto_build: 19 | gpg \ 20 | --no-default-keyring \ 21 | --keyring ./fluent-archive-keyring.kbx \ 22 | --import keys 23 | gpg \ 24 | --no-default-keyring \ 25 | --keyring ./fluent-archive-keyring.kbx \ 26 | --import fluent-package.pub 27 | gpg \ 28 | --no-default-keyring \ 29 | --keyring ./fluent-archive-keyring.kbx \ 30 | --armor \ 31 | --export > ./fluent-archive-keyring.asc 32 | 33 | ( \ 34 | distribution=$$(lsb_release --id --short | tr 'A-Z' 'a-z'); \ 35 | code_name=$$(lsb_release --codename --short); \ 36 | if [ $${distribution} = "ubuntu" ]; then \ 37 | component=contrib; \ 38 | else \ 39 | component=main; \ 40 | fi; \ 41 | echo "Types: deb"; \ 42 | echo "URIs: https://packages.treasuredata.com/5/$${distribution}/$${code_name}/"; \ 43 | echo "Suites: $${code_name}"; \ 44 | echo "Components: contrib"; \ 45 | echo "Signed-By: /usr/share/keyrings/fluent-archive-keyring.asc"; \ 46 | ) > fluent.sources 47 | 48 | override_dh_install: 49 | install -d debian/tmp/usr/share/keyrings/ 50 | install -m 0644 fluent-archive-keyring.asc \ 51 | debian/tmp/usr/share/keyrings/ 52 | 53 | install -d debian/tmp/etc/apt/sources.list.d/ 54 | install -m 0644 fluent.sources \ 55 | debian/tmp/etc/apt/sources.list.d/ 56 | 57 | dh_install 58 | -------------------------------------------------------------------------------- /fluent-apt-source/debian/source/format: -------------------------------------------------------------------------------- 1 | 3.0 (quilt) 2 | -------------------------------------------------------------------------------- /fluent-apt-source/debian/source/lintian-overrides: -------------------------------------------------------------------------------- 1 | fluent-apt-source source: changelog-should-mention-nmu 2 | fluent-apt-source source: source-nmu-has-incorrect-version-number 3 | # When development machine has switched to aptly 1.4.0+ds1-7 or later, 4 | # remove the following (bookworm or later, ubuntu 22.10 or later) 5 | fluent-apt-source: debian-rules-should-not-use-custom-compression-settings 6 | -------------------------------------------------------------------------------- /fluent-apt-source/fluent-package-signing-key.ashie.gpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fluent/fluent-package-builder/f13df648989c4d40b70ce0b4f14443b9759e5854/fluent-apt-source/fluent-package-signing-key.ashie.gpg -------------------------------------------------------------------------------- /fluent-apt-source/fluent-package-signing-key.fukuda.gpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fluent/fluent-package-builder/f13df648989c4d40b70ce0b4f14443b9759e5854/fluent-apt-source/fluent-package-signing-key.fukuda.gpg -------------------------------------------------------------------------------- /fluent-apt-source/fluent-package-signing-key.hayashi.gpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fluent/fluent-package-builder/f13df648989c4d40b70ce0b4f14443b9759e5854/fluent-apt-source/fluent-package-signing-key.hayashi.gpg -------------------------------------------------------------------------------- /fluent-lts-apt-source/apt/debian-bookworm/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM debian:bookworm 2 | 3 | RUN \ 4 | echo "debconf debconf/frontend select Noninteractive" | \ 5 | debconf-set-selections 6 | 7 | ARG DEBUG 8 | 9 | RUN \ 10 | quiet=$([ "${DEBUG}" = "yes" ] || echo "-qq") && \ 11 | apt update ${quiet} && \ 12 | apt install -y -V ${quiet} \ 13 | debhelper \ 14 | devscripts \ 15 | gnupg && \ 16 | apt clean && \ 17 | rm -rf /var/lib/apt/lists/* 18 | -------------------------------------------------------------------------------- /fluent-lts-apt-source/apt/debian-bullseye/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM debian:bullseye 2 | 3 | RUN \ 4 | echo "debconf debconf/frontend select Noninteractive" | \ 5 | debconf-set-selections 6 | 7 | ARG DEBUG 8 | 9 | RUN \ 10 | quiet=$([ "${DEBUG}" = "yes" ] || echo "-qq") && \ 11 | apt update ${quiet} && \ 12 | apt install -y -V ${quiet} \ 13 | debhelper \ 14 | devscripts \ 15 | gnupg && \ 16 | apt clean && \ 17 | rm -rf /var/lib/apt/lists/* 18 | -------------------------------------------------------------------------------- /fluent-lts-apt-source/apt/debian-buster/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM debian:buster 2 | 3 | RUN \ 4 | echo "debconf debconf/frontend select Noninteractive" | \ 5 | debconf-set-selections 6 | 7 | ARG DEBUG 8 | 9 | RUN \ 10 | quiet=$([ "${DEBUG}" = "yes" ] || echo "-qq") && \ 11 | apt update ${quiet} && \ 12 | apt install -y -V ${quiet} \ 13 | debhelper \ 14 | devscripts \ 15 | gnupg && \ 16 | apt clean && \ 17 | rm -rf /var/lib/apt/lists/* 18 | -------------------------------------------------------------------------------- /fluent-lts-apt-source/apt/debian-trixie/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM debian:trixie 2 | 3 | RUN \ 4 | echo "debconf debconf/frontend select Noninteractive" | \ 5 | debconf-set-selections 6 | 7 | ARG DEBUG 8 | 9 | RUN \ 10 | quiet=$([ "${DEBUG}" = "yes" ] || echo "-qq") && \ 11 | apt update ${quiet} && \ 12 | apt install -y -V ${quiet} \ 13 | debhelper \ 14 | devscripts \ 15 | gnupg && \ 16 | apt clean && \ 17 | rm -rf /var/lib/apt/lists/* 18 | -------------------------------------------------------------------------------- /fluent-lts-apt-source/apt/ubuntu-bionic/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM ubuntu:bionic 2 | 3 | RUN \ 4 | echo "debconf debconf/frontend select Noninteractive" | \ 5 | debconf-set-selections 6 | 7 | ARG DEBUG 8 | 9 | RUN \ 10 | quiet=$([ "${DEBUG}" = "yes" ] || echo "-qq") && \ 11 | apt update ${quiet} && \ 12 | apt install -y -V ${quiet} \ 13 | debhelper \ 14 | devscripts \ 15 | gnupg && \ 16 | apt clean && \ 17 | rm -rf /var/lib/apt/lists/* 18 | -------------------------------------------------------------------------------- /fluent-lts-apt-source/apt/ubuntu-focal/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM ubuntu:focal 2 | 3 | RUN \ 4 | echo "debconf debconf/frontend select Noninteractive" | \ 5 | debconf-set-selections 6 | 7 | ARG DEBUG 8 | 9 | RUN \ 10 | quiet=$([ "${DEBUG}" = "yes" ] || echo "-qq") && \ 11 | apt update ${quiet} && \ 12 | apt install -y -V ${quiet} \ 13 | debhelper \ 14 | devscripts \ 15 | gnupg && \ 16 | apt clean && \ 17 | rm -rf /var/lib/apt/lists/* 18 | -------------------------------------------------------------------------------- /fluent-lts-apt-source/apt/ubuntu-jammy/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM ubuntu:jammy 2 | 3 | RUN \ 4 | echo "debconf debconf/frontend select Noninteractive" | \ 5 | debconf-set-selections 6 | 7 | ARG DEBUG 8 | 9 | RUN \ 10 | quiet=$([ "${DEBUG}" = "yes" ] || echo "-qq") && \ 11 | apt update ${quiet} && \ 12 | apt install -y -V ${quiet} \ 13 | debhelper \ 14 | devscripts \ 15 | gnupg && \ 16 | apt clean && \ 17 | rm -rf /var/lib/apt/lists/* 18 | -------------------------------------------------------------------------------- /fluent-lts-apt-source/apt/ubuntu-noble/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM ubuntu:noble 2 | 3 | RUN \ 4 | echo "debconf debconf/frontend select Noninteractive" | \ 5 | debconf-set-selections 6 | 7 | ARG DEBUG 8 | 9 | RUN \ 10 | quiet=$([ "${DEBUG}" = "yes" ] || echo "-qq") && \ 11 | apt update ${quiet} && \ 12 | apt install -y -V ${quiet} \ 13 | debhelper \ 14 | devscripts \ 15 | gnupg && \ 16 | apt clean && \ 17 | rm -rf /var/lib/apt/lists/* 18 | -------------------------------------------------------------------------------- /fluent-lts-apt-source/apt/ubuntu-xenial/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM ubuntu:xenial 2 | 3 | RUN \ 4 | echo "debconf debconf/frontend select Noninteractive" | \ 5 | debconf-set-selections 6 | 7 | ARG DEBUG 8 | 9 | RUN \ 10 | quiet=$([ "${DEBUG}" = "yes" ] || echo "-qq") && \ 11 | apt update ${quiet} && \ 12 | apt install -y -V ${quiet} \ 13 | debhelper \ 14 | devscripts \ 15 | gnupg && \ 16 | apt clean && \ 17 | rm -rf /var/lib/apt/lists/* 18 | -------------------------------------------------------------------------------- /fluent-lts-apt-source/debian/changelog: -------------------------------------------------------------------------------- 1 | fluent-lts-apt-source (2025.1.8-1) unstable; urgency=medium 2 | 3 | * New upstream release. 4 | * Use armored keyring for APT repository to support newer apt. 5 | 6 | -- Kentaro Hayashi Wed, 08 Jan 2025 16:31:51 +0900 7 | 8 | fluent-lts-apt-source (2023.7.29-1) unstable; urgency=medium 9 | 10 | * New upstream release. 11 | * Added new Fluent Package Official Signing Key. 12 | 13 | -- Kentaro Hayashi Wed, 08 Jan 2025 16:31:21 +0900 14 | -------------------------------------------------------------------------------- /fluent-lts-apt-source/debian/control: -------------------------------------------------------------------------------- 1 | Source: fluent-lts-apt-source 2 | Section: misc 3 | Priority: optional 4 | Maintainer: Fluentd developers 5 | Build-Depends: 6 | debhelper-compat (= 12), 7 | gnupg, 8 | lsb-release 9 | Standards-Version: 4.5.0 10 | Homepage: https://www.fluentd.org/ 11 | 12 | Package: fluent-lts-apt-source 13 | Section: misc 14 | Architecture: all 15 | Depends: 16 | ${misc:Depends}, 17 | gnupg 18 | Conflicts: fluent-apt-source, fluentd-apt-source 19 | Description: GnuPG archive key and APT source of the Fluent Package (LTS) archive 20 | The Fluentd project digitally signs its Release files. This package 21 | contains the archive key used for that. 22 | -------------------------------------------------------------------------------- /fluent-lts-apt-source/debian/fluent-lts-apt-source.install: -------------------------------------------------------------------------------- 1 | etc/apt/sources.list.d/* 2 | usr/share/keyrings/* 3 | -------------------------------------------------------------------------------- /fluent-lts-apt-source/debian/fluent-lts-apt-source.lintian-overrides: -------------------------------------------------------------------------------- 1 | fluent-lts-apt-source: new-package-should-close-itp-bug 2 | -------------------------------------------------------------------------------- /fluent-lts-apt-source/debian/lintian/fluent-lts-apt-source/debian.profile: -------------------------------------------------------------------------------- 1 | Profile: fluent-lts-apt-source/main 2 | Extends: debian/main 3 | Disable-Tags: dir-or-file-in-opt 4 | -------------------------------------------------------------------------------- /fluent-lts-apt-source/debian/lintian/fluent-lts-apt-source/ubuntu.profile: -------------------------------------------------------------------------------- 1 | Profile: fluent-lts-apt-source/main 2 | Extends: ubuntu/main 3 | Disable-Tags: dir-or-file-in-opt 4 | -------------------------------------------------------------------------------- /fluent-lts-apt-source/debian/rules: -------------------------------------------------------------------------------- 1 | #!/usr/bin/make -f 2 | # -*- makefile-gmake -*- 3 | # 4 | # Uncomment this to turn on verbose mode. 5 | #export DH_VERBOSE=1 6 | # This has to be exported to make some magic below work. 7 | export DH_OPTIONS 8 | 9 | %: 10 | dh $@ 11 | 12 | # As aptly doesn't support zstd yet, so as a workaround, force default 13 | # package compression to xz 14 | override_dh_builddeb: 15 | dh_builddeb -- -Zxz 16 | 17 | 18 | override_dh_auto_build: 19 | gpg \ 20 | --no-default-keyring \ 21 | --keyring ./fluent-lts-archive-keyring.kbx \ 22 | --import keys 23 | gpg \ 24 | --no-default-keyring \ 25 | --keyring ./fluent-lts-archive-keyring.kbx \ 26 | --import fluent-package.pub 27 | gpg \ 28 | --no-default-keyring \ 29 | --keyring ./fluent-lts-archive-keyring.kbx \ 30 | --armor \ 31 | --export > ./fluent-lts-archive-keyring.asc 32 | 33 | ( \ 34 | distribution=$$(lsb_release --id --short | tr 'A-Z' 'a-z'); \ 35 | code_name=$$(lsb_release --codename --short); \ 36 | if [ $${distribution} = "ubuntu" ]; then \ 37 | component=contrib; \ 38 | else \ 39 | component=main; \ 40 | fi; \ 41 | echo "Types: deb"; \ 42 | echo "URIs: https://packages.treasuredata.com/lts/5/$${distribution}/$${code_name}/"; \ 43 | echo "Suites: $${code_name}"; \ 44 | echo "Components: contrib"; \ 45 | echo "Signed-By: /usr/share/keyrings/fluent-lts-archive-keyring.asc"; \ 46 | ) > fluent-lts.sources 47 | 48 | override_dh_install: 49 | install -d debian/tmp/usr/share/keyrings/ 50 | install -m 0644 fluent-lts-archive-keyring.asc \ 51 | debian/tmp/usr/share/keyrings/ 52 | 53 | install -d debian/tmp/etc/apt/sources.list.d/ 54 | install -m 0644 fluent-lts.sources \ 55 | debian/tmp/etc/apt/sources.list.d/ 56 | 57 | dh_install 58 | -------------------------------------------------------------------------------- /fluent-lts-apt-source/debian/source/format: -------------------------------------------------------------------------------- 1 | 3.0 (quilt) 2 | -------------------------------------------------------------------------------- /fluent-lts-apt-source/debian/source/lintian-overrides: -------------------------------------------------------------------------------- 1 | fluent-lts-apt-source source: changelog-should-mention-nmu 2 | fluent-lts-apt-source source: source-nmu-has-incorrect-version-number 3 | # When development machine has switched to aptly 1.4.0+ds1-7 or later, 4 | # remove the following (bookworm or later, ubuntu 22.10 or later) 5 | fluent-lts-apt-source: debian-rules-should-not-use-custom-compression-settings 6 | -------------------------------------------------------------------------------- /fluent-package/apt/binstubs-test.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -exu 4 | 5 | echo "BINSTUBS TEST" 6 | if [ "$CI" = "true" ]; then 7 | echo "::group::Setup binstubs test" 8 | fi 9 | 10 | apt update 11 | apt install -V -y lsb-release 12 | 13 | . $(dirname $0)/commonvar.sh 14 | 15 | apt install -V -y \ 16 | ${repositories_dir}/${distribution}/pool/${code_name}/${channel}/*/*/*_${architecture}.deb 17 | 18 | if [ "$CI" = "true" ]; then 19 | echo "::endgroup::" 20 | fi 21 | /opt/fluent/bin/ruby /fluentd/fluent-package/binstubs-test.rb 22 | if [ $? -eq 0 ]; then 23 | echo "Checking existence of binstubs: OK" 24 | else 25 | echo "Checking existence of binstubs: NG" 26 | exit 1 27 | fi 28 | -------------------------------------------------------------------------------- /fluent-package/apt/commonvar.sh: -------------------------------------------------------------------------------- 1 | code_name=$(lsb_release --codename --short) 2 | architecture=$(dpkg --print-architecture) 3 | repositories_dir=/fluentd/fluent-package/apt/repositories 4 | java_jdk=openjdk-11-jre 5 | td_agent_version=4.5.2 6 | fluent_package_lts_version=5.0.5 7 | 8 | case ${code_name} in 9 | jammy|noble) 10 | distribution=ubuntu 11 | channel=universe 12 | mirror=http://archive.ubuntu.com/ubuntu/ 13 | if [ "$architecture" = "arm64" ]; then 14 | echo "For ${code_name} (arm64), use ubuntu-ports" 15 | mirror=http://ports.ubuntu.com/ubuntu-ports 16 | fi 17 | ;; 18 | bookworm) 19 | distribution=debian 20 | channel=main 21 | mirror=http://deb.debian.org/debian 22 | java_jdk=openjdk-17-jre 23 | ;; 24 | trixie) 25 | distribution=debian 26 | channel=main 27 | mirror=http://deb.debian.org/debian 28 | java_jdk=openjdk-25-jre-headless 29 | ;; 30 | esac 31 | 32 | function test_suppressed_needrestart() 33 | { 34 | LOG_FILE=$1 35 | # Test: needrestart was suppressed 36 | if dpkg-query --show --showformat='${Version}' needrestart ; then 37 | case $code_name in 38 | focal) 39 | # dpkg-query succeeds even though needrestart is not installed. 40 | (! grep "No services need to be restarted." $LOG_FILE) 41 | ;; 42 | *) 43 | grep "No services need to be restarted." $LOG_FILE 44 | ;; 45 | esac 46 | fi 47 | } 48 | -------------------------------------------------------------------------------- /fluent-package/apt/confluent-test.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -exu 4 | 5 | if [ "$CI" = "true" ]; then 6 | echo "::group::Setup confluent test" 7 | fi 8 | 9 | export DEBIAN_FRONTEND=noninteractive 10 | 11 | apt update 12 | apt install -V -y lsb-release 13 | 14 | . $(dirname $0)/commonvar.sh 15 | 16 | apt install -V -y \ 17 | ${repositories_dir}/${distribution}/pool/${code_name}/${channel}/*/*/*_${architecture}.deb 18 | 19 | fluentd --version 20 | 21 | case ${code_name} in 22 | xenial) 23 | apt install -V -y gnupg2 wget apt-transport-https 24 | ;; 25 | *) 26 | apt install -V -y gnupg2 wget 27 | ;; 28 | esac 29 | 30 | /usr/sbin/fluent-gem install --no-document serverspec 31 | wget https://packages.confluent.io/deb/7.6/archive.key 32 | gpg2 --homedir /tmp --no-default-keyring --keyring gnupg-ring:/usr/share/keyrings/confluent-archive-keyring.gpg --import archive.key 33 | chmod 644 /usr/share/keyrings/confluent-archive-keyring.gpg 34 | echo "deb [arch=${architecture} signed-by=/usr/share/keyrings/confluent-archive-keyring.gpg] https://packages.confluent.io/deb/7.6 stable main" > /etc/apt/sources.list.d/confluent.list 35 | apt update && apt install -y confluent-community-2.13 ${java_jdk} netcat-openbsd 36 | 37 | CONFLUENT_SCRIPT=$(dirname $(realpath $0))/../run-confluent.sh 38 | echo ${CONFLUENT_SCRIPT} 39 | bash ${CONFLUENT_SCRIPT} 40 | 41 | if [ "$CI" = "true" ]; then 42 | echo "::endgroup::" 43 | fi 44 | 45 | export PATH=/opt/fluent/bin:$PATH 46 | export INSTALLATION_TEST=true 47 | /usr/sbin/fluentd -c /fluentd/serverspec/test.conf & 48 | cd /fluentd && rake serverspec:kafka 49 | -------------------------------------------------------------------------------- /fluent-package/apt/debian-bookworm-arm64/from: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | 18 | arm64v8/debian:bookworm 19 | -------------------------------------------------------------------------------- /fluent-package/apt/debian-bookworm/qemu-dummy-static: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # Licensed to the Apache Software Foundation (ASF) under one 4 | # or more contributor license agreements. See the NOTICE file 5 | # distributed with this work for additional information 6 | # regarding copyright ownership. The ASF licenses this file 7 | # to you under the Apache License, Version 2.0 (the 8 | # "License"); you may not use this file except in compliance 9 | # with the License. You may obtain a copy of the License at 10 | # 11 | # http://www.apache.org/licenses/LICENSE-2.0 12 | # 13 | # Unless required by applicable law or agreed to in writing, 14 | # software distributed under the License is distributed on an 15 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16 | # KIND, either express or implied. See the License for the 17 | # specific language governing permissions and limitations 18 | # under the License. 19 | 20 | # Do nothing. This exists only for not requiring qemu-aarch64-static copy. 21 | # Recent Debian (buster or later) and Ubuntu (18.10 or later) on amd64 hosts or 22 | # arm64 host don't require qemu-aarch64-static in Docker image. But old Debian 23 | # and Ubuntu hosts on amd64 require qemu-aarch64-static in Docker image. 24 | # 25 | # We use "COPY qemu* /usr/bin/" in Dockerfile. If we don't put any "qemnu*", 26 | # the "COPY" is failed. It means that we always require "qemu*" even if we 27 | # use recent Debian/Ubuntu or arm64 host. If we have this dummy "qemu*" file, 28 | # the "COPY" isn't failed. It means that we can copy "qemu*" only when we 29 | # need. 30 | # 31 | # See also "script" in dev/tasks/linux-packages/azure.linux.arm64.yml. 32 | # Azure Pipelines uses old Ubuntu (18.04). 33 | # So we need to put "qemu-aarch64-static" into this directory. 34 | -------------------------------------------------------------------------------- /fluent-package/apt/debian-bullseye-arm64/from: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | 18 | arm64v8/debian:bullseye 19 | -------------------------------------------------------------------------------- /fluent-package/apt/debian-bullseye/qemu-dummy-static: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # Licensed to the Apache Software Foundation (ASF) under one 4 | # or more contributor license agreements. See the NOTICE file 5 | # distributed with this work for additional information 6 | # regarding copyright ownership. The ASF licenses this file 7 | # to you under the Apache License, Version 2.0 (the 8 | # "License"); you may not use this file except in compliance 9 | # with the License. You may obtain a copy of the License at 10 | # 11 | # http://www.apache.org/licenses/LICENSE-2.0 12 | # 13 | # Unless required by applicable law or agreed to in writing, 14 | # software distributed under the License is distributed on an 15 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16 | # KIND, either express or implied. See the License for the 17 | # specific language governing permissions and limitations 18 | # under the License. 19 | 20 | # Do nothing. This exists only for not requiring qemu-aarch64-static copy. 21 | # Recent Debian (buster or later) and Ubuntu (18.10 or later) on amd64 hosts or 22 | # arm64 host don't require qemu-aarch64-static in Docker image. But old Debian 23 | # and Ubuntu hosts on amd64 require qemu-aarch64-static in Docker image. 24 | # 25 | # We use "COPY qemu* /usr/bin/" in Dockerfile. If we don't put any "qemnu*", 26 | # the "COPY" is failed. It means that we always require "qemu*" even if we 27 | # use recent Debian/Ubuntu or arm64 host. If we have this dummy "qemu*" file, 28 | # the "COPY" isn't failed. It means that we can copy "qemu*" only when we 29 | # need. 30 | # 31 | # See also "script" in dev/tasks/linux-packages/azure.linux.arm64.yml. 32 | # Azure Pipelines uses old Ubuntu (18.04). 33 | # So we need to put "qemu-aarch64-static" into this directory. 34 | -------------------------------------------------------------------------------- /fluent-package/apt/debian-buster-arm64/from: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | 18 | arm64v8/debian:buster 19 | -------------------------------------------------------------------------------- /fluent-package/apt/debian-buster/qemu-dummy-static: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # Licensed to the Apache Software Foundation (ASF) under one 4 | # or more contributor license agreements. See the NOTICE file 5 | # distributed with this work for additional information 6 | # regarding copyright ownership. The ASF licenses this file 7 | # to you under the Apache License, Version 2.0 (the 8 | # "License"); you may not use this file except in compliance 9 | # with the License. You may obtain a copy of the License at 10 | # 11 | # http://www.apache.org/licenses/LICENSE-2.0 12 | # 13 | # Unless required by applicable law or agreed to in writing, 14 | # software distributed under the License is distributed on an 15 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16 | # KIND, either express or implied. See the License for the 17 | # specific language governing permissions and limitations 18 | # under the License. 19 | 20 | # Do nothing. This exists only for not requiring qemu-aarch64-static copy. 21 | # Recent Debian (buster or later) and Ubuntu (18.10 or later) on amd64 hosts or 22 | # arm64 host don't require qemu-aarch64-static in Docker image. But old Debian 23 | # and Ubuntu hosts on amd64 require qemu-aarch64-static in Docker image. 24 | # 25 | # We use "COPY qemu* /usr/bin/" in Dockerfile. If we don't put any "qemnu*", 26 | # the "COPY" is failed. It means that we always require "qemu*" even if we 27 | # use recent Debian/Ubuntu or arm64 host. If we have this dummy "qemu*" file, 28 | # the "COPY" isn't failed. It means that we can copy "qemu*" only when we 29 | # need. 30 | # 31 | # See also "script" in dev/tasks/linux-packages/azure.linux.arm64.yml. 32 | # Azure Pipelines uses old Ubuntu (18.04). 33 | # So we need to put "qemu-aarch64-static" into this directory. 34 | -------------------------------------------------------------------------------- /fluent-package/apt/debian-trixie-arm64/from: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | 18 | arm64v8/debian:trixie 19 | -------------------------------------------------------------------------------- /fluent-package/apt/debian-trixie/qemu-dummy-static: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # Licensed to the Apache Software Foundation (ASF) under one 4 | # or more contributor license agreements. See the NOTICE file 5 | # distributed with this work for additional information 6 | # regarding copyright ownership. The ASF licenses this file 7 | # to you under the Apache License, Version 2.0 (the 8 | # "License"); you may not use this file except in compliance 9 | # with the License. You may obtain a copy of the License at 10 | # 11 | # http://www.apache.org/licenses/LICENSE-2.0 12 | # 13 | # Unless required by applicable law or agreed to in writing, 14 | # software distributed under the License is distributed on an 15 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16 | # KIND, either express or implied. See the License for the 17 | # specific language governing permissions and limitations 18 | # under the License. 19 | 20 | # Do nothing. This exists only for not requiring qemu-aarch64-static copy. 21 | # Recent Debian (buster or later) and Ubuntu (18.10 or later) on amd64 hosts or 22 | # arm64 host don't require qemu-aarch64-static in Docker image. But old Debian 23 | # and Ubuntu hosts on amd64 require qemu-aarch64-static in Docker image. 24 | # 25 | # We use "COPY qemu* /usr/bin/" in Dockerfile. If we don't put any "qemnu*", 26 | # the "COPY" is failed. It means that we always require "qemu*" even if we 27 | # use recent Debian/Ubuntu or arm64 host. If we have this dummy "qemu*" file, 28 | # the "COPY" isn't failed. It means that we can copy "qemu*" only when we 29 | # need. 30 | # 31 | # See also "script" in dev/tasks/linux-packages/azure.linux.arm64.yml. 32 | # Azure Pipelines uses old Ubuntu (18.04). 33 | # So we need to put "qemu-aarch64-static" into this directory. 34 | -------------------------------------------------------------------------------- /fluent-package/apt/serverspec-test.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -exu 4 | 5 | export DEBIAN_FRONTEND=noninteractive 6 | 7 | if [ "$CI" = "true" ]; then 8 | echo "::group::Setup serverspec test" 9 | fi 10 | 11 | apt update --quiet 12 | apt install -V -y --quiet lsb-release 13 | 14 | . $(dirname $0)/commonvar.sh 15 | 16 | apt install -V -y --quiet \ 17 | ${repositories_dir}/${distribution}/pool/${code_name}/${channel}/*/*/*_${architecture}.deb 18 | 19 | fluentd --version 20 | 21 | if [ "$CI" = "true" ]; then 22 | echo "::endgroup::" 23 | fi 24 | 25 | export PATH=/opt/fluent/bin:$PATH 26 | export INSTALLATION_TEST=true 27 | /usr/sbin/fluent-gem install --no-document serverspec 28 | cd /fluentd && rake serverspec:linux 29 | -------------------------------------------------------------------------------- /fluent-package/apt/systemd-test/downgrade-to-v5-lts.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -exu 4 | 5 | . $(dirname $0)/../commonvar.sh 6 | 7 | # Install v5 LTS to register the repository 8 | curl --fail --silent --show-error --location https://toolbelt.treasuredata.com/sh/install-${distribution}-${code_name}-fluent-package5-lts.sh | sh 9 | 10 | sudo apt purge -y fluent-package 11 | 12 | # Install the current 13 | sudo apt install -V -y \ 14 | /host/${distribution}/pool/${code_name}/${channel}/*/*/fluent-package_*_${architecture}.deb 15 | 16 | # Test: service status 17 | systemctl status --no-pager fluentd 18 | systemctl status --no-pager td-agent 19 | main_pid=$(eval $(systemctl show td-agent --property=MainPID) && echo $MainPID) 20 | 21 | # Downgrade to v5 LTS 22 | apt install -V -y fluent-package=${fluent_package_lts_version}-1 --allow-downgrades 23 | 24 | systemctl status --no-pager fluentd 25 | systemctl status --no-pager td-agent 26 | 27 | # Fluentd should be restarted. 28 | # NOTE: Unlike RPM, the restart behavior depends on TO-side. So, it restarts. 29 | test $main_pid -ne $(eval $(systemctl show fluentd --property=MainPID) && echo $MainPID) 30 | -------------------------------------------------------------------------------- /fluent-package/apt/systemd-test/install-newly.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -exu 4 | 5 | . $(dirname $0)/../commonvar.sh 6 | 7 | case $1 in 8 | local) 9 | sudo apt install -V -y \ 10 | /host/${distribution}/pool/${code_name}/${channel}/*/*/fluent-package_*_${architecture}.deb 11 | ;; 12 | v5) 13 | curl --fail --silent --show-error --location https://toolbelt.treasuredata.com/sh/install-${distribution}-${code_name}-fluent-package5.sh | sh 14 | ;; 15 | lts) 16 | curl --fail --silent --show-error --location https://toolbelt.treasuredata.com/sh/install-${distribution}-${code_name}-fluent-package5-lts.sh | sh 17 | ;; 18 | esac 19 | 20 | systemctl status --no-pager fluentd 21 | 22 | sleep 3 23 | test -e /var/log/fluent/fluentd.log 24 | (! grep -e '\[warn\]' -e '\[error\]' -e '\[fatal\]' /var/log/fluent/fluentd.log) 25 | 26 | # Test: fluent-diagtool 27 | sudo fluent-gem install fluent-plugin-concat 28 | /opt/fluent/bin/fluent-diagtool -t fluentd -o /tmp 29 | test $(find /tmp/ -name gem_local_list.output | xargs cat) = "fluent-plugin-concat" 30 | 31 | # Test: Guard duplicated instance 32 | (! sudo /usr/sbin/fluentd) 33 | (! sudo /usr/sbin/fluentd -v) 34 | sudo /usr/sbin/fluentd --dry-run 35 | 36 | sudo apt remove -y fluent-package 37 | 38 | case ${code_name} in 39 | bookworm|trixie|noble) 40 | # no dead fluentd.service symlink in /etc/systemd/system 41 | (! test -h /etc/systemd/system/fluentd.service) 42 | test -h /etc/systemd/system/multi-user.target.wants/fluentd.service 43 | (! test -s /etc/systemd/system/multi-user.target.wants/fluentd.service) 44 | ;; 45 | *) 46 | # dead fluentd.service symlink in /etc/systemd/system 47 | test -h /etc/systemd/system/fluentd.service 48 | (! test -s /etc/systemd/system/fluentd.service) 49 | test -h /etc/systemd/system/multi-user.target.wants/fluentd.service 50 | (! test -s /etc/systemd/system/multi-user.target.wants/fluentd.service) 51 | ;; 52 | esac 53 | test -h /etc/systemd/system/td-agent.service 54 | (! test -s /etc/systemd/system/td-agent.service) 55 | (! systemctl status fluentd) 56 | 57 | -------------------------------------------------------------------------------- /fluent-package/apt/systemd-test/setup.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -exu 4 | 5 | sudo apt update 6 | sudo apt install -V -y lsb-release curl 7 | -------------------------------------------------------------------------------- /fluent-package/apt/systemd-test/test.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | if [ $# -lt 2 ]; then 4 | echo "Error: Need to specify lxc image name and filename." 5 | echo "Ex. CI) $ ./test.sh ubuntu:20.04 install-newly.sh local" 6 | exit 1 7 | fi 8 | 9 | image=$1 10 | test_file=$2 11 | shift 2 12 | other_args="$@" 13 | dir="/host/fluent-package/apt/systemd-test" 14 | 15 | set -eux 16 | 17 | echo "::group::Run test: launch $image" 18 | sudo incus launch $image target --debug 19 | sleep 5 20 | echo "::endgroup::" 21 | echo "::group::Run test: configure $image" 22 | sudo incus config device add target host disk source=$PWD path=/host 23 | sudo incus list 24 | echo "::endgroup::" 25 | echo "::group::Run test: setup $image" 26 | sudo incus exec target -- $dir/setup.sh 27 | echo "::endgroup::" 28 | echo "::group::Run test: $test_file $other_args on $image" 29 | sudo incus exec target -- $dir/$test_file $other_args 30 | echo "::endgroup::" 31 | echo "::group::Run test: cleanup $image" 32 | sudo incus stop target 33 | sudo incus delete target 34 | echo "::endgroup::" 35 | echo -e "\nAll Success!\n" 36 | -------------------------------------------------------------------------------- /fluent-package/apt/systemd-test/update-to-next-major-version.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -exu 4 | 5 | . $(dirname $0)/../commonvar.sh 6 | 7 | service_restart=$1 8 | status_before_update=$2 # active / inactive 9 | 10 | # Install the current 11 | sudo apt install -V -y \ 12 | /host/${distribution}/pool/${code_name}/${channel}/*/*/fluent-package_*_${architecture}.deb 13 | 14 | if [ "$status_before_update" = inactive ]; then 15 | sudo systemctl stop fluentd 16 | fi 17 | 18 | # Set FLUENT_PACKAGE_SERVICE_RESTART 19 | sed -i "s/=auto/=$service_restart/" /etc/default/fluentd 20 | 21 | # Install plugin manually (plugin and gem) 22 | sudo /opt/fluent/bin/fluent-gem install --no-document fluent-plugin-concat 23 | sudo /opt/fluent/bin/fluent-gem install --no-document gqtp 24 | 25 | # Install next major version 26 | sudo apt install -V -y \ 27 | /host/v6-test/${distribution}/pool/${code_name}/${channel}/*/*/fluent-package_*_${architecture}.deb 2>&1 | tee upgrade.log 28 | 29 | # Test: needrestart was suppressed 30 | test_suppressed_needrestart upgrade.log 31 | 32 | # Test: Check whether plugin/gem were installed during upgrading 33 | if [ "$service_restart" != manual ] && [ "$status_before_update" = active ]; then 34 | # plugin gem should be installed automatically 35 | /opt/fluent/bin/fluent-gem list | grep fluent-plugin-concat 36 | # Non fluent-plugin- prefix gem should not be installed automatically 37 | (! /opt/fluent/bin/fluent-gem list | grep gqtp) 38 | else 39 | # plugin gem should not be installed automatically 40 | (! /opt/fluent/bin/fluent-gem list | grep fluent-plugin-concat) 41 | fi 42 | 43 | -------------------------------------------------------------------------------- /fluent-package/apt/systemd-test/update-to-next-version-with-auto-and-manual.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -exu 4 | 5 | . $(dirname $0)/../commonvar.sh 6 | 7 | package="/host/${distribution}/pool/${code_name}/${channel}/*/*/fluent-package_*_${architecture}.deb" 8 | 9 | # Make a dummy pacakge for the next version 10 | dpkg-deb -R /host/${distribution}/pool/${code_name}/${channel}/*/*/fluent-package_*_${architecture}.deb tmp 11 | last_ver=$(cat tmp/DEBIAN/control | grep "Version: " | sed -E "s/Version: ([0-9.]+)-([0-9]+)/\2/g") 12 | sed -i -E "s/Version: ([0-9.]+)-([0-9]+)/Version: \1-$(($last_ver+1))/g" tmp/DEBIAN/control 13 | dpkg-deb --build tmp next_version.deb 14 | 15 | # Upgrade package with auto feature 16 | sudo apt install -V -y $package 17 | main_pid=$(eval $(systemctl show fluentd --property=MainPID) && echo $MainPID) 18 | 19 | sudo apt install -V -y ./next_version.deb 20 | test $main_pid -eq $(eval $(systemctl show fluentd --property=MainPID) && echo $MainPID) 21 | 22 | # Main process should be replaced by USR2 signal in auto mode 23 | sleep 15 24 | test $main_pid -ne $(eval $(systemctl show fluentd --property=MainPID) && echo $MainPID) 25 | 26 | sudo apt purge -y fluent-package 27 | 28 | # Upgrade package with manual feature 29 | sudo apt install -V -y $package 30 | sudo systemctl enable --now fluentd 31 | sed -i 's/=auto/=manual/' /etc/default/fluentd 32 | main_pid=$(eval $(systemctl show fluentd --property=MainPID) && echo $MainPID) 33 | 34 | sudo apt install -V -y ./next_version.deb 35 | test $main_pid -eq $(eval $(systemctl show fluentd --property=MainPID) && echo $MainPID) 36 | 37 | # Main process should NOT be replaced until USR2 signal fired 38 | sleep 15 39 | test $main_pid -eq $(eval $(systemctl show fluentd --property=MainPID) && echo $MainPID) 40 | 41 | kill -USR2 $main_pid 42 | 43 | # Main process should be replaced by USR2 signal 44 | sleep 15 45 | test $main_pid -ne $(eval $(systemctl show fluentd --property=MainPID) && echo $MainPID) 46 | -------------------------------------------------------------------------------- /fluent-package/apt/ubuntu-bionic-arm64/from: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | 18 | arm64v8/ubuntu:bionic 19 | -------------------------------------------------------------------------------- /fluent-package/apt/ubuntu-bionic/qemu-dummy-static: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # Licensed to the Apache Software Foundation (ASF) under one 4 | # or more contributor license agreements. See the NOTICE file 5 | # distributed with this work for additional information 6 | # regarding copyright ownership. The ASF licenses this file 7 | # to you under the Apache License, Version 2.0 (the 8 | # "License"); you may not use this file except in compliance 9 | # with the License. You may obtain a copy of the License at 10 | # 11 | # http://www.apache.org/licenses/LICENSE-2.0 12 | # 13 | # Unless required by applicable law or agreed to in writing, 14 | # software distributed under the License is distributed on an 15 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16 | # KIND, either express or implied. See the License for the 17 | # specific language governing permissions and limitations 18 | # under the License. 19 | 20 | # Do nothing. This exists only for not requiring qemu-aarch64-static copy. 21 | # Recent Debian (buster or later) and Ubuntu (18.10 or later) on amd64 hosts or 22 | # arm64 host don't require qemu-aarch64-static in Docker image. But old Debian 23 | # and Ubuntu hosts on amd64 require qemu-aarch64-static in Docker image. 24 | # 25 | # We use "COPY qemu* /usr/bin/" in Dockerfile. If we don't put any "qemnu*", 26 | # the "COPY" is failed. It means that we always require "qemu*" even if we 27 | # use recent Debian/Ubuntu or arm64 host. If we have this dummy "qemu*" file, 28 | # the "COPY" isn't failed. It means that we can copy "qemu*" only when we 29 | # need. 30 | # 31 | # See also "script" in dev/tasks/linux-packages/azure.linux.arm64.yml. 32 | # Azure Pipelines uses old Ubuntu (18.04). 33 | # So we need to put "qemu-aarch64-static" into this directory. 34 | -------------------------------------------------------------------------------- /fluent-package/apt/ubuntu-focal-arm64/from: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | 18 | arm64v8/ubuntu:focal 19 | -------------------------------------------------------------------------------- /fluent-package/apt/ubuntu-focal/qemu-dummy-static: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # Licensed to the Apache Software Foundation (ASF) under one 4 | # or more contributor license agreements. See the NOTICE file 5 | # distributed with this work for additional information 6 | # regarding copyright ownership. The ASF licenses this file 7 | # to you under the Apache License, Version 2.0 (the 8 | # "License"); you may not use this file except in compliance 9 | # with the License. You may obtain a copy of the License at 10 | # 11 | # http://www.apache.org/licenses/LICENSE-2.0 12 | # 13 | # Unless required by applicable law or agreed to in writing, 14 | # software distributed under the License is distributed on an 15 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16 | # KIND, either express or implied. See the License for the 17 | # specific language governing permissions and limitations 18 | # under the License. 19 | 20 | # Do nothing. This exists only for not requiring qemu-aarch64-static copy. 21 | # Recent Debian (buster or later) and Ubuntu (18.10 or later) on amd64 hosts or 22 | # arm64 host don't require qemu-aarch64-static in Docker image. But old Debian 23 | # and Ubuntu hosts on amd64 require qemu-aarch64-static in Docker image. 24 | # 25 | # We use "COPY qemu* /usr/bin/" in Dockerfile. If we don't put any "qemnu*", 26 | # the "COPY" is failed. It means that we always require "qemu*" even if we 27 | # use recent Debian/Ubuntu or arm64 host. If we have this dummy "qemu*" file, 28 | # the "COPY" isn't failed. It means that we can copy "qemu*" only when we 29 | # need. 30 | # 31 | # See also "script" in dev/tasks/linux-packages/azure.linux.arm64.yml. 32 | # Azure Pipelines uses old Ubuntu (18.04). 33 | # So we need to put "qemu-aarch64-static" into this directory. 34 | -------------------------------------------------------------------------------- /fluent-package/apt/ubuntu-hirsute/Dockerfile: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | 18 | ARG FROM=ubuntu:hirsute 19 | FROM ${FROM} 20 | 21 | COPY qemu-* /usr/bin/ 22 | 23 | RUN \ 24 | echo "debconf debconf/frontend select Noninteractive" | \ 25 | debconf-set-selections 26 | 27 | ARG DEBUG 28 | 29 | RUN sed -i'' -e 's/^# deb-src/deb-src/g' /etc/apt/sources.list 30 | 31 | RUN \ 32 | quiet=$([ "${DEBUG}" = "yes" ] || echo "-qq") && \ 33 | apt update ${quiet} && \ 34 | apt install -y -V ${quiet} \ 35 | build-essential \ 36 | debhelper \ 37 | devscripts \ 38 | ruby-dev \ 39 | ruby-bundler \ 40 | libedit2 \ 41 | libncurses5-dev \ 42 | libyaml-dev \ 43 | git \ 44 | pkg-config \ 45 | libssl-dev \ 46 | libpq-dev \ 47 | tar \ 48 | lsb-release \ 49 | zlib1g-dev && \ 50 | apt build-dep -y ruby && \ 51 | apt clean && \ 52 | # raise IPv4 priority 53 | sed -i'' -e 's,#precedence ::ffff:0:0/96 100,precedence ::ffff:0:0/96 100,' /etc/gai.conf && \ 54 | # enable multiplatform feature 55 | gem install --no-document --install-dir /usr/share/rubygems-integration/all bundler builder && \ 56 | rm -rf /var/lib/apt/lists/* 57 | -------------------------------------------------------------------------------- /fluent-package/apt/ubuntu-hirsute/qemu-dummy-static: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # Licensed to the Apache Software Foundation (ASF) under one 4 | # or more contributor license agreements. See the NOTICE file 5 | # distributed with this work for additional information 6 | # regarding copyright ownership. The ASF licenses this file 7 | # to you under the Apache License, Version 2.0 (the 8 | # "License"); you may not use this file except in compliance 9 | # with the License. You may obtain a copy of the License at 10 | # 11 | # http://www.apache.org/licenses/LICENSE-2.0 12 | # 13 | # Unless required by applicable law or agreed to in writing, 14 | # software distributed under the License is distributed on an 15 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16 | # KIND, either express or implied. See the License for the 17 | # specific language governing permissions and limitations 18 | # under the License. 19 | 20 | # Do nothing. This exists only for not requiring qemu-aarch64-static copy. 21 | # Recent Debian (buster or later) and Ubuntu (18.10 or later) on amd64 hosts or 22 | # arm64 host don't require qemu-aarch64-static in Docker image. But old Debian 23 | # and Ubuntu hosts on amd64 require qemu-aarch64-static in Docker image. 24 | # 25 | # We use "COPY qemu* /usr/bin/" in Dockerfile. If we don't put any "qemnu*", 26 | # the "COPY" is failed. It means that we always require "qemu*" even if we 27 | # use recent Debian/Ubuntu or arm64 host. If we have this dummy "qemu*" file, 28 | # the "COPY" isn't failed. It means that we can copy "qemu*" only when we 29 | # need. 30 | # 31 | # See also "script" in dev/tasks/linux-packages/azure.linux.arm64.yml. 32 | # Azure Pipelines uses old Ubuntu (18.04). 33 | # So we need to put "qemu-aarch64-static" into this directory. 34 | -------------------------------------------------------------------------------- /fluent-package/apt/ubuntu-jammy-arm64/from: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | 18 | arm64v8/ubuntu:jammy 19 | -------------------------------------------------------------------------------- /fluent-package/apt/ubuntu-jammy/qemu-dummy-static: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # Licensed to the Apache Software Foundation (ASF) under one 4 | # or more contributor license agreements. See the NOTICE file 5 | # distributed with this work for additional information 6 | # regarding copyright ownership. The ASF licenses this file 7 | # to you under the Apache License, Version 2.0 (the 8 | # "License"); you may not use this file except in compliance 9 | # with the License. You may obtain a copy of the License at 10 | # 11 | # http://www.apache.org/licenses/LICENSE-2.0 12 | # 13 | # Unless required by applicable law or agreed to in writing, 14 | # software distributed under the License is distributed on an 15 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16 | # KIND, either express or implied. See the License for the 17 | # specific language governing permissions and limitations 18 | # under the License. 19 | 20 | # Do nothing. This exists only for not requiring qemu-aarch64-static copy. 21 | # Recent Debian (buster or later) and Ubuntu (18.10 or later) on amd64 hosts or 22 | # arm64 host don't require qemu-aarch64-static in Docker image. But old Debian 23 | # and Ubuntu hosts on amd64 require qemu-aarch64-static in Docker image. 24 | # 25 | # We use "COPY qemu* /usr/bin/" in Dockerfile. If we don't put any "qemnu*", 26 | # the "COPY" is failed. It means that we always require "qemu*" even if we 27 | # use recent Debian/Ubuntu or arm64 host. If we have this dummy "qemu*" file, 28 | # the "COPY" isn't failed. It means that we can copy "qemu*" only when we 29 | # need. 30 | # 31 | # See also "script" in dev/tasks/linux-packages/azure.linux.arm64.yml. 32 | # Azure Pipelines uses old Ubuntu (18.04). 33 | # So we need to put "qemu-aarch64-static" into this directory. 34 | -------------------------------------------------------------------------------- /fluent-package/apt/ubuntu-noble-arm64/from: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | 18 | arm64v8/ubuntu:noble 19 | -------------------------------------------------------------------------------- /fluent-package/apt/ubuntu-noble/qemu-dummy-static: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # Licensed to the Apache Software Foundation (ASF) under one 4 | # or more contributor license agreements. See the NOTICE file 5 | # distributed with this work for additional information 6 | # regarding copyright ownership. The ASF licenses this file 7 | # to you under the Apache License, Version 2.0 (the 8 | # "License"); you may not use this file except in compliance 9 | # with the License. You may obtain a copy of the License at 10 | # 11 | # http://www.apache.org/licenses/LICENSE-2.0 12 | # 13 | # Unless required by applicable law or agreed to in writing, 14 | # software distributed under the License is distributed on an 15 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16 | # KIND, either express or implied. See the License for the 17 | # specific language governing permissions and limitations 18 | # under the License. 19 | 20 | # Do nothing. This exists only for not requiring qemu-aarch64-static copy. 21 | # Recent Debian (buster or later) and Ubuntu (18.10 or later) on amd64 hosts or 22 | # arm64 host don't require qemu-aarch64-static in Docker image. But old Debian 23 | # and Ubuntu hosts on amd64 require qemu-aarch64-static in Docker image. 24 | # 25 | # We use "COPY qemu* /usr/bin/" in Dockerfile. If we don't put any "qemnu*", 26 | # the "COPY" is failed. It means that we always require "qemu*" even if we 27 | # use recent Debian/Ubuntu or arm64 host. If we have this dummy "qemu*" file, 28 | # the "COPY" isn't failed. It means that we can copy "qemu*" only when we 29 | # need. 30 | # 31 | # See also "script" in dev/tasks/linux-packages/azure.linux.arm64.yml. 32 | # Azure Pipelines uses old Ubuntu (18.04). 33 | # So we need to put "qemu-aarch64-static" into this directory. 34 | -------------------------------------------------------------------------------- /fluent-package/apt/ubuntu-xenial/qemu-dummy-static: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # Licensed to the Apache Software Foundation (ASF) under one 4 | # or more contributor license agreements. See the NOTICE file 5 | # distributed with this work for additional information 6 | # regarding copyright ownership. The ASF licenses this file 7 | # to you under the Apache License, Version 2.0 (the 8 | # "License"); you may not use this file except in compliance 9 | # with the License. You may obtain a copy of the License at 10 | # 11 | # http://www.apache.org/licenses/LICENSE-2.0 12 | # 13 | # Unless required by applicable law or agreed to in writing, 14 | # software distributed under the License is distributed on an 15 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16 | # KIND, either express or implied. See the License for the 17 | # specific language governing permissions and limitations 18 | # under the License. 19 | 20 | # Do nothing. This exists only for not requiring qemu-aarch64-static copy. 21 | # Recent Debian (buster or later) and Ubuntu (18.10 or later) on amd64 hosts or 22 | # arm64 host don't require qemu-aarch64-static in Docker image. But old Debian 23 | # and Ubuntu hosts on amd64 require qemu-aarch64-static in Docker image. 24 | # 25 | # We use "COPY qemu* /usr/bin/" in Dockerfile. If we don't put any "qemnu*", 26 | # the "COPY" is failed. It means that we always require "qemu*" even if we 27 | # use recent Debian/Ubuntu or arm64 host. If we have this dummy "qemu*" file, 28 | # the "COPY" isn't failed. It means that we can copy "qemu*" only when we 29 | # need. 30 | # 31 | # See also "script" in dev/tasks/linux-packages/azure.linux.arm64.yml. 32 | # Azure Pipelines uses old Ubuntu (18.04). 33 | # So we need to put "qemu-aarch64-static" into this directory. 34 | -------------------------------------------------------------------------------- /fluent-package/binstubs-test.rb: -------------------------------------------------------------------------------- 1 | #!/opt/td-agent/bin/ruby 2 | 3 | require "fileutils" 4 | require "tmpdir" 5 | require_relative "config" 6 | 7 | STUB_DIR=File.join(Dir.tmpdir, "stubs") 8 | FLUENT_PACKAGE_DIR="/opt/#{PACKAGE_DIR}" 9 | SHARE_DIR=File.join(FLUENT_PACKAGE_DIR, "share") 10 | 11 | # Copy Gemfile* to temporary directory to avoid permission error with bundle binstubs 12 | FileUtils.mkdir_p(STUB_DIR) 13 | %w(Gemfile Gemfile.lock config.rb).each do |name| 14 | FileUtils.cp(File.join(SHARE_DIR, name), STUB_DIR) 15 | end 16 | 17 | Dir.chdir(STUB_DIR) do 18 | # Install all stub files which is described in Gemfile 19 | gem_command = File.join(FLUENT_PACKAGE_DIR, "bin/gem") 20 | puts "::group::Create stub files" if ENV["CI"] 21 | system(gem_command, "pristine", "--all", "--only-executables", "--bindir", "#{STUB_DIR}/bin") 22 | puts "::endgroup::" if ENV["CI"] 23 | 24 | required_stub_paths = Dir.glob("#{STUB_DIR}/bin/*").each do |stub| 25 | basename = File.basename(stub) 26 | File.join(FLUENT_PACKAGE_DIR, "bin/#{basename}") 27 | end 28 | 29 | all_stub_exists = required_stub_paths.each.all? do |stub_path| 30 | File.exist?(stub_path) 31 | end 32 | 33 | if all_stub_exists 34 | required_stub_paths.map do |stub| 35 | basename = File.basename(stub) 36 | path = File.join(FLUENT_PACKAGE_DIR, "bin/#{basename}") 37 | puts "OK: #{path} exists" 38 | end 39 | else 40 | puts "ERROR: required stub files are not exist" 41 | required_stub_paths.each do |stub_path| 42 | unless File.exist?(stub_path) 43 | puts "Not found: <#{stub_path}>" 44 | end 45 | end 46 | exit 1 47 | end 48 | end 49 | exit 0 50 | -------------------------------------------------------------------------------- /fluent-package/config.rb: -------------------------------------------------------------------------------- 1 | PACKAGE_NAME = "fluent-package" 2 | PACKAGE_VERSION = "5.2.0" 3 | 4 | # Keep internal path (/opt/td-agent) for package name migration 5 | SERVICE_NAME = "fluentd" 6 | COMPAT_SERVICE_NAME = "td-agent" 7 | PACKAGE_DIR = "fluent" 8 | COMPAT_PACKAGE_DIR = COMPAT_SERVICE_NAME 9 | 10 | FLUENTD_REVISION = '46372ddd521870f6a203baefb5a598209486d0bc' # v1.18.0 11 | FLUENTD_LOCAL_GEM_REPO = "file://" + File.expand_path(File.join(__dir__, "local_gem_repo")) 12 | 13 | # https://github.com/jemalloc/jemalloc/releases 14 | # Use jemalloc 3.x to reduce memory usage 15 | # See https://github.com/fluent-plugins-nursery/fluent-package-builder/issues/305 16 | JEMALLOC_VERSION = "3.6.0" 17 | #JEMALLOC_VERSION = "5.2.1" 18 | 19 | # https://www.openssl.org/source/ 20 | OPENSSL_FOR_MACOS_VERSION = "3.0.8" 21 | OPENSSL_FOR_MACOS_SHA256SUM = "6c13d2bf38fdf31eac3ce2a347073673f5d63263398f1f69d0df4a41253e4b3e" 22 | 23 | BUNDLER_VERSION= "2.3.27" 24 | 25 | # https://www.ruby-lang.org/en/downloads/ (tar.gz) 26 | BUNDLED_RUBY_VERSION = "3.2.6" 27 | BUNDLED_RUBY_SOURCE_SHA256SUM = "d9cb65ecdf3f18669639f2638b63379ed6fbb17d93ae4e726d4eb2bf68a48370" 28 | 29 | BUNDLED_RUBY_PATCHES = [ 30 | # An example entry: 31 | # ["ruby-3.0/0001-ruby-resolv-Fix-confusion-of-received-response-messa.patch", ["= 3.0.1"]], 32 | ] 33 | 34 | # https://rubyinstaller.org/downloads/ (7-ZIP ARCHIVES) 35 | BUNDLED_RUBY_INSTALLER_X64_VERSION = "3.2.6-1" 36 | BUNDLED_RUBY_INSTALLER_X64_SHA256SUM = "549616f2964301616fd713e5590f024b63b28d6cc5e5033c87eff32e0d1fa2d2" 37 | 38 | # Files under rubyinstaller/ are patches for RubyInstaller's binary package. 39 | # Other patches for Ruby's source tree which can be shared with BUNDLED_RUBY_PATCHES. 40 | BUNDLED_RUBY_INSTALLER_PATCHES = [ 41 | ] 42 | -------------------------------------------------------------------------------- /fluent-package/debian/control: -------------------------------------------------------------------------------- 1 | Source: fluent-package 2 | Section: net 3 | Priority: optional 4 | Maintainer: Fluentd developers 5 | Uploaders: HATAKE Hiroshi 6 | Build-Depends: 7 | debhelper-compat (= 12), 8 | pkg-config, 9 | zlib1g-dev, 10 | ruby-dev, 11 | ruby-bundler, 12 | rake, 13 | libedit2, 14 | libncurses5-dev, 15 | libyaml-dev, 16 | libssl-dev 17 | Standards-Version: 4.5.0 18 | Homepage: https://www.fluentd.org/ 19 | 20 | Package: fluent-package 21 | Architecture: any 22 | Replaces: td-agent (<< 5.0.0-1) 23 | Breaks: td-agent (<< 5.0.0-1) 24 | Pre-Depends: adduser 25 | Depends: 26 | ${misc:Depends}, 27 | ${shlibs:Depends}, 28 | Description: All in one package of Fluentd 29 | Fluent Package is all in one package which contains Fluentd and 30 | related gem packages. This package was formerly known as 31 | Treasure Agent. 32 | . 33 | It is installable alongside with system's gem packages separately. 34 | 35 | Package: td-agent 36 | Section: oldlibs 37 | Architecture: all 38 | Depends: 39 | fluent-package, 40 | ${misc:Depends} 41 | Description: Transitional package 42 | This is a transitional package for fluent-package. 43 | . 44 | It can be safely be removed. 45 | -------------------------------------------------------------------------------- /fluent-package/debian/fluent-gem.1: -------------------------------------------------------------------------------- 1 | .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.48.1. 2 | .TH FLUENT-GEM "1" "June 2023" "fluent-gem 3.4.10" "FLUENT-PACKAGE" 3 | .SH NAME 4 | fluent-gem \- Gem command for server side agent (Fluent Package) 5 | .SH DESCRIPTION 6 | RubyGems is a package manager for Ruby. 7 | .IP 8 | Usage: 9 | .IP 10 | gem \fB\-h\fR/\-\-help 11 | gem \fB\-v\fR/\-\-version 12 | gem [global options...] command [arguments...] [options...] 13 | .IP 14 | Global options: 15 | .TP 16 | \fB\-C\fR PATH 17 | run as if gem was started in 18 | instead of the current working directory 19 | .IP 20 | Examples: 21 | .IP 22 | gem install rake 23 | gem list \fB\-\-local\fR 24 | gem build package.gemspec 25 | gem push package\-0.0.1.gem 26 | gem help install 27 | .IP 28 | Further help: 29 | .TP 30 | gem help commands 31 | list all 'gem' commands 32 | .TP 33 | gem help examples 34 | show some examples of usage 35 | .TP 36 | gem help gem_dependencies 37 | gem dependencies file guide 38 | .TP 39 | gem help platforms 40 | gem platforms guide 41 | .TP 42 | gem help 43 | show help on COMMAND 44 | .IP 45 | (e.g. 'gem help install') 46 | .TP 47 | gem server 48 | present a web page at 49 | http://localhost:8808/ 50 | with info about installed gems 51 | .IP 52 | Further information: 53 | .IP 54 | https://guides.rubygems.org 55 | -------------------------------------------------------------------------------- /fluent-package/debian/fluent-package.install: -------------------------------------------------------------------------------- 1 | opt/* 2 | usr/bin/* 3 | usr/sbin/* 4 | usr/lib/tmpfiles.d/* 5 | etc/logrotate.d/* 6 | etc/fluent/* 7 | etc/default/* 8 | etc/needrestart/conf.d/* 9 | lib/systemd/system/* 10 | -------------------------------------------------------------------------------- /fluent-package/debian/fluent-package.manpages: -------------------------------------------------------------------------------- 1 | debian/td.1 2 | debian/fluentd.1 3 | debian/fluent-gem.1 4 | -------------------------------------------------------------------------------- /fluent-package/debian/lintian/fluent-package/debian.profile: -------------------------------------------------------------------------------- 1 | Profile: fluent-package/main 2 | Extends: debian/main 3 | # * dir-or-file-in-opt 4 | # As fluent-package is installed under /opt 5 | # 6 | # * custom-library-search-path 7 | # Known before as binary-or-shlib-defines-rpath. 8 | # In contrast to Ubuntu, not need to specify old tag 9 | # because the version of lintian is newer than it. 10 | Disable-Tags: dir-or-file-in-opt, 11 | custom-library-search-path 12 | -------------------------------------------------------------------------------- /fluent-package/debian/lintian/fluent-package/ubuntu.profile: -------------------------------------------------------------------------------- 1 | Profile: fluent-package/main 2 | Extends: ubuntu/main 3 | # * dir-or-file-in-opt 4 | # As fluent-package is installed under /opt 5 | # 6 | # * binary-or-shlib-defines-rpath, 7 | # To work expectedly both of focal or later version, 8 | # the old tag name of custom-library-search-path 9 | # (binary-or-shlib-defines-rpath) must be specified. 10 | # 11 | Disable-Tags: dir-or-file-in-opt, 12 | binary-or-shlib-defines-rpath 13 | -------------------------------------------------------------------------------- /fluent-package/debian/rules: -------------------------------------------------------------------------------- 1 | #!/usr/bin/make -f 2 | 3 | export GEM2DEB_TEST_RUNNER = --check-dependencies 4 | export DH_RUBY = --gem-install 5 | 6 | %: 7 | dh $@ 8 | 9 | # As aptly doesn't support zstd yet, so as a workaround, force default 10 | # package compression to xz 11 | override_dh_builddeb: 12 | dh_builddeb -- -Zxz 13 | 14 | override_dh_auto_install: 15 | rake build:deb_config FLUENT_PACKAGE_STAGING_PATH="$(CURDIR)/debian/tmp" NO_VAR_RUN=1 16 | CI=$CI rake build:all FLUENT_PACKAGE_STAGING_PATH="$(CURDIR)/debian/tmp" PATH="$(HOME)/.cargo/bin:$(PATH)" 17 | dh_installman 18 | 19 | # Suppress forcing service start/restart in postinst by omitting 20 | # related start/restart hook script embedding. It does not omit 21 | # deb-systemd-helper enable/update-state fluentd.service 22 | override_dh_installsystemd: 23 | dh_installsystemd --no-restart-after-upgrade --no-stop-on-upgrade 24 | 25 | override_dh_auto_clean: 26 | rake clean 27 | dh_auto_clean 28 | -------------------------------------------------------------------------------- /fluent-package/debian/source/format: -------------------------------------------------------------------------------- 1 | 3.0 (quilt) 2 | -------------------------------------------------------------------------------- /fluent-package/debian/source/lintian-overrides: -------------------------------------------------------------------------------- 1 | fluent-package source: changelog-should-mention-nmu 2 | fluent-package source: source-nmu-has-incorrect-version-number 3 | # You can remove it if you switched aptly which supports zstd. 4 | fluent-package source: debian-rules-should-not-use-custom-compression-settings 5 | -------------------------------------------------------------------------------- /fluent-package/dmg/install-test.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | dmg_path=$1 4 | 5 | set -exu 6 | 7 | test -e $dmg_path 8 | 9 | hdiutil mount $dmg_path 10 | sudo installer -pkg /Volumes/fluent-package/*.pkg -target / -allowUntrusted 11 | sudo launchctl load /Library/LaunchDaemons/fluentd.plist 12 | hdiutil detach /Volumes/fluent-package 13 | 14 | sleep 10 # Wait for Fluentd to start up and run correctly. 15 | test $(sudo launchctl list fluentd | grep LastExitStatus | grep -oE "[0-9]+") = 0 16 | ! grep -q -e '\[warn\]' -e '\[error\]' -e '\[fatal\]' /var/log/fluent/fluentd.log 17 | 18 | sudo launchctl unload /Library/LaunchDaemons/fluentd.plist 19 | sudo rm -rf /opt/fluent/ /etc/td-agent/ /var/log/td-agent /Library/LaunchDaemons/fluentd.plist 20 | -------------------------------------------------------------------------------- /fluent-package/dmg/resources/dmg/background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fluent/fluent-package-builder/f13df648989c4d40b70ce0b4f14443b9759e5854/fluent-package/dmg/resources/dmg/background.png -------------------------------------------------------------------------------- /fluent-package/dmg/resources/dmg/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fluent/fluent-package-builder/f13df648989c4d40b70ce0b4f14443b9759e5854/fluent-package/dmg/resources/dmg/icon.png -------------------------------------------------------------------------------- /fluent-package/dmg/resources/pkg/Distribution.xml.erb: -------------------------------------------------------------------------------- 1 | 2 | 3 | Fluent Package v<%= pkg_version %> 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | fluent-package.pkg 12 | 13 | 14 | -------------------------------------------------------------------------------- /fluent-package/dmg/resources/pkg/assets/welcome.html: -------------------------------------------------------------------------------- 1 | This will install Fluent Package on your Mac. 2 | 3 | -------------------------------------------------- 4 | 5 | Thank you for trying Fluent Package! Have a fantastic day! 6 | 7 | You can start / stop Fluentd via launchctl command. 8 | 9 | - start fluentd 10 | 11 | % sudo launchctl load /Library/LaunchDaemons/fluentd.plist 12 | 13 | - stop fluentd 14 | 15 | % sudo launchctl unload /Library/LaunchDaemons/fluentd.plist 16 | 17 | If you have a question, please ask it on Fluentd Discussions: 18 | 19 | https://github.com/fluent/fluentd/discussions 20 | -------------------------------------------------------------------------------- /fluent-package/dmg/resources/pkg/fluentd.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /fluent-package/dmg/resources/pkg/postinstall.erb: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # 3 | # Create directories for <%= service_name %> 4 | # 5 | 6 | # Create <%= service_name %> related directories and files 7 | 8 | if [ ! -e "/var/log/<%= package_dir %>/" ]; then 9 | mkdir -p /var/log/<%= package_dir %>/ 10 | mkdir -p /var/log/<%= package_dir %>/buffer/ 11 | fi 12 | if [ ! -e "/var/run/<%= package_dir %>/" ]; then 13 | mkdir -p /var/run/<%= package_dir %>/ 14 | fi 15 | if [ ! -e "/etc/<%= package_dir %>/" ]; then 16 | mkdir -p /etc/<%= package_dir %>/ 17 | mkdir -p /etc/<%= package_dir %>/plugin 18 | fi 19 | if [ ! -e "/tmp/<%= package_dir %>/" ]; then 20 | mkdir -p /tmp/<%= package_dir %>/ 21 | fi 22 | 23 | exit 0 24 | -------------------------------------------------------------------------------- /fluent-package/dmg/resources/pkg/scripts/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fluent/fluent-package-builder/f13df648989c4d40b70ce0b4f14443b9759e5854/fluent-package/dmg/resources/pkg/scripts/.gitkeep -------------------------------------------------------------------------------- /fluent-package/make-index-html.rb: -------------------------------------------------------------------------------- 1 | require 'erb' 2 | require 'find' 3 | require 'pathname' 4 | require 'optparse' 5 | 6 | options = { 7 | site: "https://fluentd.cdn.cncf.io", 8 | verbose: false, 9 | channel: "5,lts,test" 10 | } 11 | 12 | opt = OptionParser.new 13 | opt.on("-s", "--site URL", "Specify distribution site (e.g. https://fluentd.cdn.cncf.io)") { |v| options[:site] = v } 14 | opt.on("-v", "--verbose", "Enable verbose logging") { options[:verbose] = true } 15 | opt.on("-c", "--channel TARGET_CHANNEL", "Specify channel with comma separated (e.g. --channel 5,lts)") { |v| options[:channel] = v } 16 | top_dir = opt.parse!(ARGV).first 17 | 18 | unless File.exist?(top_dir) 19 | puts "#{top_dir} not found" 20 | exit 1 21 | end 22 | 23 | template_path = File.expand_path("#{File.dirname(__FILE__)}/#{File.basename(__FILE__, '.rb')}.erb") 24 | puts "Template path: #{template_path}" 25 | Find.find("#{top_dir}/#{options[:channel]}") do |path| 26 | Find.prune if File.file?(path) 27 | puts "Updating: #{path} ..." if options[:verbose] 28 | index_path = File.expand_path(File.join(path, "index.html")) 29 | Dir.chdir(path) do 30 | files = Dir.glob("*") 31 | relative_path = Pathname.new(path).relative_path_from(top_dir).to_s 32 | erb = ERB.new(File.read(template_path)).result(binding) 33 | File.open(index_path, "w+") do |file| 34 | file.puts(erb) 35 | puts "Generated: #{index_path}" if options[:verbose] 36 | end 37 | end 38 | end 39 | -------------------------------------------------------------------------------- /fluent-package/msi/Dockerfile: -------------------------------------------------------------------------------- 1 | # 2 | # fluent-package-builder 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | # 16 | 17 | # The latest chocolatey requires .net 4.8, and wixtoolset requires .net 3.5, 18 | # To satisfy both of them without reboot, use sdk image. 19 | ARG FROM=mcr.microsoft.com/dotnet/framework/sdk:3.5-windowsservercore-ltsc2022 20 | FROM ${FROM} 21 | 22 | # Launch the following command as if cmd /S /C ... 23 | SHELL ["cmd", "/S", "/C"] 24 | 25 | # Install Chocolatey to set up toolchain 26 | RUN @"%SystemRoot%\System32\WindowsPowerShell\v1.0\powershell.exe" -NoProfile -InputFormat None -ExecutionPolicy Bypass -Command "[System.Net.ServicePointManager]::SecurityProtocol = 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))" && SET "PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin" 27 | 28 | # Install toolchain 29 | RUN \ 30 | choco feature disable --name=showDownloadProgress && \ 31 | choco install -y git wixtoolset 7zip && \ 32 | # Required CMake 3.x to build cmetrics gem 33 | choco install -y cmake --version=3.31.6 --installargs 'ADD_CMAKE_TO_PATH=System' && \ 34 | choco install -y msys2 --params /NoUpdate --version=20250221.0.0 && \ 35 | choco install ruby -y --version=3.2.8.1 && \ 36 | refreshenv && \ 37 | ridk install 3 && \ 38 | gem install --no-document --force bundler builder 39 | -------------------------------------------------------------------------------- /fluent-package/msi/assets/banner_background.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fluent/fluent-package-builder/f13df648989c4d40b70ce0b4f14443b9759e5854/fluent-package/msi/assets/banner_background.bmp -------------------------------------------------------------------------------- /fluent-package/msi/assets/dialog_background.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fluent/fluent-package-builder/f13df648989c4d40b70ce0b4f14443b9759e5854/fluent-package/msi/assets/dialog_background.bmp -------------------------------------------------------------------------------- /fluent-package/msi/assets/fluent-gem.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | setlocal 3 | 4 | if "%~nx0" == "td-agent-gem.bat" ( 5 | set "FLUENT_PACKAGE_TOPDIR=%~dp0..\" 6 | ) else ( 7 | set "FLUENT_PACKAGE_TOPDIR=%~dp0" 8 | ) 9 | set "FLUENT_PACKAGE_BINDIR=%FLUENT_PACKAGE_TOPDIR%bin" 10 | set PATH=%FLUENT_PACKAGE_BINDIR%;%PATH% 11 | for /f "usebackq" %%i in (`^""%FLUENT_PACKAGE_BINDIR%\ruby.exe" -rrbconfig -e "print RbConfig::CONFIG['ruby_version']"^"`) do set RUBY_VERSION=%%i 12 | set "GEM_HOME=%FLUENT_PACKAGE_TOPDIR%lib\ruby\gems\%RUBY_VERSION%" 13 | set "GEM_PATH=%FLUENT_PACKAGE_TOPDIR%lib\ruby\gems\%RUBY_VERSION%" 14 | "%FLUENT_PACKAGE_BINDIR%\fluent-gem" %* 15 | 16 | endlocal 17 | -------------------------------------------------------------------------------- /fluent-package/msi/assets/fluent-package-post-install.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | title Fluent-package post install script 3 | if not "%~dp0" == "C:\opt\fluent\bin\" ( 4 | "%~dp0gem" pristine --only-executables --all 5 | ) 6 | -------------------------------------------------------------------------------- /fluent-package/msi/assets/fluent-package-post-toast.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | title Fluent-package post toast script 3 | if exist "C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe" ( 4 | if exist "%~dp0..\bin\fluent-package-post-toast.ps1" ( 5 | "C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe" "%~dp0..\bin\fluent-package-post-toast.ps1" 6 | ) 7 | ) 8 | -------------------------------------------------------------------------------- /fluent-package/msi/assets/fluent-package-post-toast.ps1: -------------------------------------------------------------------------------- 1 | $binDir = $(Split-Path $MyInvocation.MyCommand.Path -Parent) 2 | $topDir = $(Split-Path $binDir -Parent) 3 | $xml = @" 4 | 5 | 6 | 7 | Fluentd logo 8 | Fluent Package has been installed! 9 | If you want enterprise technical support, access the following URL 10 | https://www.fluentd.org/enterprise=services 11 | 12 | 13 | 14 | 15 | 16 | 17 | "@ 18 | $XmlDocument = [Windows.Data.Xml.Dom.XmlDocument, Windows.Data.Xml.Dom.XmlDocument, ContentType = WindowsRuntime]::New() 19 | $XmlDocument.loadXml($xml) 20 | # Fluent Package Command Prompt 21 | $App = $(Get-StartApps -Name "Fluent Package Command Prompt") 22 | $AppId = $App.AppID 23 | [Windows.UI.Notifications.ToastNotificationManager, Windows.UI.Notifications, ContentType = WindowsRuntime]::CreateToastNotifier($AppId).Show($XmlDocument) 24 | -------------------------------------------------------------------------------- /fluent-package/msi/assets/fluent-package-prompt.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | set "PATH=%~dp0bin;%PATH%" 3 | set "PATH=%~dp0;%PATH%" 4 | title Fluent Package Command Prompt 5 | -------------------------------------------------------------------------------- /fluent-package/msi/assets/fluent-package-toast-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fluent/fluent-package-builder/f13df648989c4d40b70ce0b4f14443b9759e5854/fluent-package/msi/assets/fluent-package-toast-icon.png -------------------------------------------------------------------------------- /fluent-package/msi/assets/fluent-package-version.rb: -------------------------------------------------------------------------------- 1 | require 'rubygems' 2 | require 'fluent/version' 3 | 4 | fluent_package_config = File.expand_path(File.join(File.dirname(__FILE__), "../share/config")) 5 | require fluent_package_config 6 | 7 | puts "fluent-package #{PACKAGE_VERSION} fluentd #{Fluent::VERSION} (#{FLUENTD_REVISION})" 8 | -------------------------------------------------------------------------------- /fluent-package/msi/assets/icon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fluent/fluent-package-builder/f13df648989c4d40b70ce0b4f14443b9759e5854/fluent-package/msi/assets/icon.ico -------------------------------------------------------------------------------- /fluent-package/msi/assets/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fluent/fluent-package-builder/f13df648989c4d40b70ce0b4f14443b9759e5854/fluent-package/msi/assets/icon.png -------------------------------------------------------------------------------- /fluent-package/msi/build.bat: -------------------------------------------------------------------------------- 1 | SET SRC_DIR=%~dp0 2 | CALL "%SRC_DIR%env.bat" 3 | 4 | tar xvf "%SRC_DIR%..\%PACKAGE%-%VERSION%.tar.gz" 5 | cd "%PACKAGE%-%VERSION%" 6 | rake msi:selfbuild FLUENT_PACKAGE_STAGING_PATH="C:/opt/fluent" FLUENT_PACKAGE_MSI_OUTPUT_PATH="%SRC_DIR%\repositories" 7 | -------------------------------------------------------------------------------- /fluent-package/msi/exclude-files.xslt: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 25 | 26 | 30 | 31 | 32 | -------------------------------------------------------------------------------- /fluent-package/msi/localization-en-us.wxl: -------------------------------------------------------------------------------- 1 | 2 | 3 | 1033 4 | Fluent Package 5 | Fluentd Project 6 | {\WixUI_Font_Bigger}Welcome to the [ProductName] Setup Wizard 7 | 8 | {\WixUI_Font_Title_White}End-User License Agreement 9 | {\WixUI_Font_Normal_White}Please read the following license agreement carefully 10 | 11 | {\WixUI_Font_Title_White}Destination Folder 12 | {\WixUI_Font_Normal_White}Click Next to install to the default folder or click Change to choose another. 13 | 14 | {\WixUI_Font_Title_White}Installing [ProductName] 15 | 16 | {\WixUI_Font_Title_White}Ready to install [ProductName] 17 | 18 | Fluent Package 19 | 20 | This package requires minimum OS version: Windows 7/Windows Server 2008 R2 or greater. 21 | A newer version of [ProductName] is already installed. 22 | Extracting files, please wait... 23 | 24 | -------------------------------------------------------------------------------- /fluent-package/msi/parameters.wxi.erb: -------------------------------------------------------------------------------- 1 | 2 | 3 | " ?> 4 | " ?> 5 | 6 | 7 | -------------------------------------------------------------------------------- /fluent-package/msi/serverspec-test.ps1: -------------------------------------------------------------------------------- 1 | $ErrorActionPreference = 'Stop' 2 | 3 | $msi = ((Get-Item "C:\\fluentd\\fluent-package\\msi\\repositories\\fluent-package-*.msi") | Sort-Object -Descending { $_.LastWriteTime } | Select-Object -First 1).FullName 4 | Write-Host "Installing ${msi} ..." 5 | 6 | Start-Process msiexec -ArgumentList "/i", $msi, "/quiet" -Wait -NoNewWindow 7 | Start-Service fluentdwinsvc 8 | 9 | $ENV:PATH="C:\\opt\\fluent\\bin;" + $ENV:PATH 10 | $ENV:PATH="C:\\opt\\fluent;" + $ENV:PATH 11 | 12 | td-agent --version 13 | 14 | td-agent-gem install --no-document serverspec 15 | $ENV:INSTALLATION_TEST=$TRUE 16 | cd C:\fluentd; rake serverspec:windows 17 | 18 | $exitcode = $LASTEXITCODE 19 | if ($exitcode -ne 0) { 20 | [Environment]::Exit($exitcode) 21 | } 22 | 23 | $ENV:FLUENT_PACKAGE_TOPDIR="C:\\opt\\fluent" 24 | fluent-gem install --no-document fluent-plugin-concat 25 | fluent-diagtool -t fluentd -o $env:TEMP 26 | $plugins = (Get-ChildItem -Path $env:TEMP -Recurse -Filter gem_local_list.output) | Get-Content 27 | if ($plugins -ne "fluent-plugin-concat") { 28 | Write-Host "Failed to list manually installed plugins: ${plugins}" 29 | [Environment]::Exit(1) 30 | } 31 | 32 | -------------------------------------------------------------------------------- /fluent-package/msi/update-from-v4-test.ps1: -------------------------------------------------------------------------------- 1 | $ErrorActionPreference = 'Stop' 2 | $ProgressPreference = 'SilentlyContinue' 3 | Set-PSDebug -Trace 1 4 | 5 | # Install v4 6 | Invoke-WebRequest "https://s3.amazonaws.com/packages.treasuredata.com/4/windows/td-agent-4.5.2-x64.msi" -OutFile "td-agent-4.5.2-x64.msi" 7 | Start-Process msiexec -ArgumentList "/i", "td-agent-4.5.2-x64.msi", "/quiet" -Wait -NoNewWindow 8 | Start-Sleep 30 # Must wait until all processes are surely started. 9 | $test_setting = @' 10 | 11 | @type sample 12 | tag test 13 | 14 | 15 | @type file 16 | path "#{ENV['TD_AGENT_TOPDIR']}/output/test" 17 | 18 | @type memory 19 | flush_mode immediate 20 | 21 | 22 | '@ 23 | Add-Content -Path "C:\\opt\\td-agent\\etc\\td-agent\\td-agent.conf" -Encoding UTF8 -Value $test_setting 24 | Restart-Service fluentdwinsvc 25 | Start-Sleep 30 # Must wait until all processes are surely started. 26 | 27 | # Update to v5 28 | $new_package = ((Get-Item "C:\\fluentd\\fluent-package\\msi\\repositories\\fluent-package-*.msi") | Sort-Object -Descending { $_.LastWriteTime } | Select-Object -First 1).FullName 29 | Start-Process msiexec -ArgumentList "/i", $new_package, "/quiet" -Wait -NoNewWindow 30 | Start-Service fluentdwinsvc 31 | Start-Sleep 30 # Must wait until all processes are surely started. 32 | 33 | # Test: Access to the configs with the old path 34 | If (-Not (Test-Path "C:\\opt\\td-agent\\etc\\td-agent\\fluentd.conf")) { 35 | [Environment]::Exit(1) 36 | } 37 | If (-Not (Test-Path "C:\\opt\\td-agent\\etc\\td-agent\\td-agent.conf")) { 38 | [Environment]::Exit(1) 39 | } 40 | 41 | # Test: Keep the old log files 42 | If ((Get-ChildItem "C:\\opt\\td-agent\\*.log").Count -eq 0) { 43 | [Environment]::Exit(1) 44 | } 45 | 46 | # Test: The previous config works as before 47 | $output_files = Get-ChildItem "C:\\opt\\td-agent\\output" 48 | Start-Sleep 5 49 | $output_files_after_sleep = Get-ChildItem "C:\\opt\\td-agent\\output" 50 | If ($output_files_after_sleep.Count -le $output_files.Count) { 51 | [Environment]::Exit(1) 52 | } 53 | -------------------------------------------------------------------------------- /fluent-package/run-confluent.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/bash 2 | 3 | export KAFKA_OPTS=-Dzookeeper.4lw.commands.whitelist=ruok 4 | /usr/bin/zookeeper-server-start /etc/kafka/zookeeper.properties & 5 | N_POLLING=30 6 | n=1 7 | while true ; do 8 | sleep 1 9 | status=$(echo ruok | nc localhost 2181) 10 | if [ "$status" = "imok" ]; then 11 | break 12 | fi 13 | n=$((n + 1)) 14 | if [ $n -ge $N_POLLING ]; then 15 | echo "failed to get response from zookeeper-server" 16 | exit 1 17 | fi 18 | done 19 | /usr/bin/kafka-server-start /etc/kafka/server.properties & 20 | n=1 21 | while true ; do 22 | sleep 1 23 | status=$(/usr/bin/zookeeper-shell localhost:2181 ls /brokers/ids | sed -n 6p) 24 | if [ "$status" = "[0]" ]; then 25 | break 26 | fi 27 | n=$((n + 1)) 28 | if [ $n -ge $N_POLLING ]; then 29 | echo "failed to get response from kafka-server" 30 | exit 1 31 | fi 32 | done 33 | /usr/bin/kafka-topics --create --bootstrap-server localhost:9092 --replication-factor 1 --partitions 1 --topic test 34 | -------------------------------------------------------------------------------- /fluent-package/templates/etc/logrotate.d/fluentd: -------------------------------------------------------------------------------- 1 | /var/log/<%= package_dir %>/<%= service_name %>.log { 2 | daily 3 | rotate 30 4 | compress 5 | delaycompress 6 | notifempty 7 | <% if pkg_type == 'deb' %> 8 | create 640 _<%= service_name %> _<%= service_name %> 9 | <% else %> 10 | create 640 <%= service_name %> <%= service_name %> 11 | <% end %> 12 | sharedscripts 13 | postrotate 14 | pid=/var/run/<%= package_dir %>/<%= service_name %>.pid 15 | if [ -s "$pid" ] 16 | then 17 | kill -USR1 "$(cat $pid)" 18 | fi 19 | endscript 20 | } 21 | -------------------------------------------------------------------------------- /fluent-package/templates/etc/needrestart/conf.d/50-fluent-package.conf: -------------------------------------------------------------------------------- 1 | # Configuration for needrestart 2 | 3 | # Always suppress restarting by needrestart. 4 | $nrconf{blacklist_rc} = [ 5 | qr(^fluentd\.service$) 6 | ]; 7 | -------------------------------------------------------------------------------- /fluent-package/templates/etc/systemd/fluentd.erb: -------------------------------------------------------------------------------- 1 | FLUENT_PACKAGE_OPTIONS="" 2 | # Control method to upgrade service (auto/manual) restart 3 | FLUENT_PACKAGE_SERVICE_RESTART=auto 4 | -------------------------------------------------------------------------------- /fluent-package/templates/etc/systemd/fluentd.service.erb: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=<%= service_name %>: All in one package of Fluentd 3 | Documentation=https://docs.fluentd.org/ 4 | After=network-online.target 5 | Wants=network-online.target 6 | 7 | [Service] 8 | <% if pkg_type == 'deb' %> 9 | User=_<%= Shellwords.shellescape(service_name) %> 10 | Group=_<%= Shellwords.shellescape(service_name) %> 11 | <% else %> 12 | User=<%= Shellwords.shellescape(service_name) %> 13 | Group=<%= Shellwords.shellescape(service_name) %> 14 | <% end %> 15 | LimitNOFILE=65536 16 | Environment=LD_PRELOAD=<%= install_path %>/lib/libjemalloc.so 17 | Environment=FLUENT_CONF=/etc/<%= package_dir %>/<%= service_name %>.conf 18 | Environment=FLUENT_PLUGIN=/etc/<%= package_dir %>/plugin 19 | Environment=FLUENT_SOCKET=/var/run/<%= package_dir %>/<%= service_name %>.sock 20 | Environment=FLUENT_PACKAGE_LOG_FILE=/var/log/<%= package_dir %>/<%= service_name %>.log 21 | <% if pkg_type == 'deb' %> 22 | EnvironmentFile=-/etc/default/<%= service_name %> 23 | <% else %> 24 | EnvironmentFile=-/etc/sysconfig/<%= service_name %> 25 | <% end %> 26 | PIDFile=<%= Shellwords.shellescape("/var/run/#{package_dir}/#{service_name}.pid") %> 27 | RuntimeDirectory=<%= Shellwords.shellescape(package_dir) %> 28 | Type=forking 29 | # XXX: Fix fluentd executables path 30 | ExecStart=/opt/<%= package_dir %>/bin/fluentd --log $FLUENT_PACKAGE_LOG_FILE --daemon <%= Shellwords.shellescape("/var/run/#{package_dir}/#{service_name}.pid") %> $FLUENT_PACKAGE_OPTIONS 31 | ExecStop=/bin/kill -TERM ${MAINPID} 32 | ExecReload=/bin/kill -HUP ${MAINPID} 33 | Restart=always 34 | TimeoutStopSec=120 35 | 36 | [Install] 37 | WantedBy=multi-user.target 38 | Alias=<%= compat_service_name %>.service 39 | -------------------------------------------------------------------------------- /fluent-package/templates/fluentd.plist.erb: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | KeepAlive 6 | 7 | Label 8 | <%= service_name %> 9 | ProgramArguments 10 | 11 | /opt/<%= package_dir %>/sbin/<%= service_name %> 12 | --log 13 | /var/log/<%= package_dir %>/<%= service_name %>.log 14 | --use-v1-config 15 | 16 | RunAtLoad 17 | 18 | WorkingDirectory 19 | <%= install_path %> 20 | 21 | 22 | -------------------------------------------------------------------------------- /fluent-package/templates/package-scripts/fluent-package/deb/preinst: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | set -e 4 | 5 | # Summary of how this script can be called: 6 | # * 'install' 7 | # * 'install' 8 | # * 'upgrade' 9 | # * 'abort-upgrade' 10 | # for details, see https://www.debian.org/doc/debian-policy/ or 11 | # the debian-policy package. 12 | 13 | mark_auto_restart_ready() { 14 | # Copy tmp files made by FROM-side because they should be cleaned postrm of FROM-side. 15 | # (To ensure cleanup, tmp files should be cleaned by its own-side). 16 | # The sequence of these tmp files is as follows: 17 | # 1. FROM-prerm(upgrade): Leave tmp files if need. 18 | # 2. TO-preinst(upgrade): Copy tmp files for TO-side. 19 | # 3. FROM-postrm(upgrade): Clean tmp files of FROM-side(1.). 20 | # 4. TO-postinst(configure): Use and clean tmp files of TO-side(2.). 21 | if [ -f "/tmp/<%= package_dir %>/.plugin_list" ]; then 22 | cp "/tmp/<%= package_dir %>/.plugin_list" "/tmp/<%= package_dir %>/.previous_plugin_list" 23 | fi 24 | if [ -f "/tmp/<%= package_dir %>/.main_pid" ]; then 25 | cp "/tmp/<%= package_dir %>/.main_pid" "/tmp/<%= package_dir %>/.pid_for_auto_restart" 26 | fi 27 | } 28 | 29 | case "$1" in 30 | upgrade) 31 | mark_auto_restart_ready 32 | ;; 33 | abort-upgrade) 34 | ;; 35 | install) 36 | ;; 37 | *) 38 | echo "preinst called with unknown argument '$1'" >&2 39 | exit 1 40 | ;; 41 | esac 42 | 43 | # dh_installdeb will replace this with shell code automatically 44 | # generated by other debhelper scripts. 45 | 46 | #DEBHELPER# 47 | 48 | exit 0 49 | -------------------------------------------------------------------------------- /fluent-package/templates/usr/bin/td.erb: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | export GEM_HOME="<%= gem_install_path %>/" 3 | export GEM_PATH="<%= gem_install_path %>/" 4 | <%= install_path %>/bin/td "$@" 5 | -------------------------------------------------------------------------------- /fluent-package/templates/usr/lib/tmpfiles.d/fluentd.conf: -------------------------------------------------------------------------------- 1 | <% if pkg_type == "deb" %> 2 | d /tmp/<%= package_dir %> 0755 _<%= service_name %> _<%= service_name %> - - 3 | <% else %> 4 | d /tmp/<%= package_dir %> 0755 <%= service_name %> <%= service_name %> - - 5 | <% end %> 6 | <% if pkg_type == "deb" %> 7 | <% if ENV["NO_VAR_RUN"] %> 8 | d /run/<%= package_dir %> 0755 _<%= service_name %> _<%= service_name %> - - 9 | <% else %> 10 | d /var/run/<%= package_dir %> 0755 _<%= service_name %> _<%= service_name %> - - 11 | <% end %> 12 | <% else %> 13 | <% if ENV["NO_VAR_RUN"] %> 14 | d /run/<%= package_dir %> 0755 <%= service_name %> <%= service_name %> - - 15 | <% else %> 16 | d /var/run/<%= package_dir %> 0755 <%= service_name %> <%= service_name %> - - 17 | <% end %> 18 | <% end %> 19 | 20 | # Exclude <%= service_name %> 21 | x /tmp/<%= package_dir %> 22 | -------------------------------------------------------------------------------- /fluent-package/templates/usr/sbin/fluent-gem.erb: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | export GEM_HOME="<%= gem_install_path %>/" 3 | export GEM_PATH="<%= gem_install_path %>/" 4 | <%= install_path %>/bin/fluent-gem "$@" 5 | -------------------------------------------------------------------------------- /fluent-package/templates/usr/sbin/fluentd.erb: -------------------------------------------------------------------------------- 1 | #!<%= install_path %>/bin/ruby 2 | ENV["GEM_HOME"]="<%= gem_install_path %>/" 3 | ENV["GEM_PATH"]="<%= gem_install_path %>/" 4 | ENV["FLUENT_CONF"]="/etc/<%= package_dir %>/<%= service_name %>.conf" 5 | ENV["FLUENT_PLUGIN"]="/etc/<%= package_dir %>/plugin" 6 | ENV["FLUENT_SOCKET"]="/var/run/<%= package_dir %>/<%= service_name %>.sock" 7 | if ARGV.include?("--version") 8 | require "<%= install_path %>/share/config" 9 | Dir.glob("<%= install_path %>/lib/ruby/**/gems/**/fluent/version.rb").each do |v| 10 | require v.delete_suffix(".rb") 11 | end 12 | puts "fluent-package #{PACKAGE_VERSION} fluentd #{Fluent::VERSION} (#{FLUENTD_REVISION})" 13 | exit 0 14 | end 15 | 16 | if RUBY_PLATFORM =~ /linux/ 17 | prevent_duplicate_launch = system("systemctl", "is-active", "fluentd", out: IO::NULL) 18 | if prevent_duplicate_launch 19 | if ["-c", "--config", "--dry-run", "-h", "--help", "--show-plugin-config"].none? {|allowing_opt| ARGV.include? allowing_opt} 20 | puts("Error: Can't start duplicate Fluentd instance with the default config.") 21 | if ARGV.include?("-v") 22 | puts("To take the version, please use '--version', not '-v' ('--verbose').") 23 | end 24 | puts </bin/fluentd" 35 | -------------------------------------------------------------------------------- /fluent-package/test-tools/fluentd.conf: -------------------------------------------------------------------------------- 1 | 2 | @type udp 3 | tag test_udp 4 | 5 | port 5170 6 | bind 0.0.0.0 7 | 8 | 9 | @type none 10 | 11 | 12 | 13 | 14 | @type tcp 15 | tag test_tcp 16 | 17 | port 5170 18 | bind 0.0.0.0 19 | 20 | 21 | @type none 22 | 23 | 24 | 25 | 26 | @type syslog 27 | port 5140 28 | bind 0.0.0.0 29 | tag test_syslog 30 | 31 | 32 | 33 | @type file 34 | path /var/log/fluent/test_udp 35 | 36 | 37 | @type file 38 | path /var/log/fluent/test_udp-buffer 39 | flush_method interval 40 | flush_mode interval 41 | flush_interval 10 42 | flush_at_shutdown true 43 | 44 | 45 | 46 | 47 | @type file 48 | path /var/log/fluent/test_tcp 49 | 50 | 51 | @type file 52 | path /var/log/fluent/test_tcp-buffer 53 | flush_method interval 54 | flush_mode interval 55 | flush_interval 10 56 | flush_at_shutdown true 57 | 58 | 59 | 60 | 61 | @type file 62 | path /var/log/fluent/test_syslog 63 | 64 | 65 | @type file 66 | path /var/log/fluent/test_syslog-buffer 67 | flush_method interval 68 | flush_mode interval 69 | flush_interval 10 70 | flush_at_shutdown true 71 | 72 | 73 | -------------------------------------------------------------------------------- /fluent-package/test-tools/logdata-sender.rb: -------------------------------------------------------------------------------- 1 | require "socket" 2 | require "syslog" 3 | require "optparse" 4 | 5 | udp_data_count = 50 6 | tcp_data_count = 60 7 | syslog_data_count = 70 8 | syslog_identifer = "test-syslog" 9 | output_duration_sec = 4.0 10 | 11 | opt = OptionParser.new 12 | opt.on("--udp-data-count num") { |v| udp_data_count = v.to_i } 13 | opt.on("--tcp-data-count num") { |v| tcp_data_count = v.to_i } 14 | opt.on("--syslog-data-count num") { |v| syslog_data_count = v.to_i } 15 | opt.on("--syslog-identifer name") { |v| syslog_identifer = v } 16 | opt.on("--duration num") { |v| output_duration_sec = v.to_f } 17 | opt.parse!(ARGV) 18 | 19 | threads = [] 20 | 21 | ## UDP 22 | threads << Thread.new do 23 | i = 0 24 | begin 25 | s = UDPSocket.open 26 | s.connect("localhost", 5170) 27 | 28 | loop do 29 | break if i == udp_data_count 30 | s.puts "[udp][#{i}] hello" 31 | i += 1 32 | sleep (output_duration_sec / udp_data_count) 33 | end 34 | rescue Errno::ECONNRESET, Errno::ECONNREFUSED 35 | retry 36 | end 37 | ensure 38 | s.close 39 | end 40 | 41 | ## TCP 42 | threads << Thread.new do 43 | i = 0 44 | begin 45 | s = TCPSocket.open("localhost", 5170) 46 | 47 | loop do 48 | break if i == tcp_data_count 49 | s.puts "[tcp][#{i}] hello" 50 | i += 1 51 | sleep (output_duration_sec / tcp_data_count) 52 | end 53 | rescue Errno::ECONNRESET, Errno::ECONNREFUSED 54 | retry 55 | end 56 | ensure 57 | s.close 58 | end 59 | 60 | ## Syslog 61 | threads << Thread.new do 62 | Syslog.open(syslog_identifer) 63 | i = 0 64 | loop do 65 | break if i == syslog_data_count 66 | Syslog.info("[syslog][#{i}] hello") 67 | i += 1 68 | sleep (output_duration_sec / syslog_data_count) 69 | end 70 | ensure 71 | Syslog.close 72 | end 73 | 74 | threads.each(&:join) 75 | -------------------------------------------------------------------------------- /fluent-package/test-tools/rsyslog.conf: -------------------------------------------------------------------------------- 1 | user.* @127.0.0.1:5140 2 | -------------------------------------------------------------------------------- /fluent-package/test-verify-repo.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # 4 | # Usage: test-verify-repo.sh 5.0.3 5 | # 6 | # It try to verify whether fluent-package is installable or not 7 | # from test/experimental/5, test/experimental/lts/5 8 | # 9 | 10 | function test_deb() { 11 | for d in $DEB_TARGETS; do 12 | if [ $d = "dummy" ]; then 13 | continue 14 | fi 15 | for r in $REPO_TARGETS; do 16 | echo "TEST: on $d $r" 17 | LOG=install-${d/:/-}-on-${r//\//-}.log 18 | docker run --rm -v $(pwd):/work $d /work/test-install-in-docker.sh $USER $r $VERSION 2>&1 | tee $LOG 19 | if [ ${PIPESTATUS[0]} -eq 0 ]; then 20 | RESULTS="$RESULTS\nOK: $d $r" 21 | else 22 | RESULTS="$RESULTS\nNG: $d $r" 23 | fi 24 | done 25 | done 26 | } 27 | 28 | function test_rpm() { 29 | for d in $RPM_TARGETS; do 30 | if [ $d = "dummy" ]; then 31 | continue 32 | fi 33 | for r in $REPO_TARGETS; do 34 | echo "TEST: on $d $r" 35 | LOG=install-${d/:/-}-on-${r//\//-}.log 36 | docker run --rm -v $(pwd):/work $d /work/test-install-in-docker.sh $USER $r $VERSION 2>&1 | tee $LOG 37 | if [ ${PIPESTATUS[0]} -eq 0 ]; then 38 | RESULTS="$RESULTS\nOK: $d $r" 39 | else 40 | RESULTS="$RESULTS\nNG: $d $r" 41 | fi 42 | done 43 | done 44 | } 45 | 46 | if [ $# -ne 1 ]; then 47 | echo "Usage: test-verify-repo 5.0.3" 48 | exit 1 49 | fi 50 | 51 | VERSION=$1 52 | 53 | if [ -z "$DEB_TARGETS" ]; then 54 | DEB_TARGETS="debian:bullseye debian:bookworm ubuntu:focal ubuntu:jammy ubuntu:noble" 55 | fi 56 | if [ -z "$RPM_TARGETS" ]; then 57 | RPM_TARGETS="almalinux:8 rockylinux:9 amazonlinux:2023" 58 | fi 59 | if [ -z "$REPO_TARGETS" ]; then 60 | REPO_TARGETS="exp/5 exp/lts/5" 61 | fi 62 | 63 | echo "DEB_TARGETS: $DEB_TARGETS" 64 | echo "RPM_TARGETS: $RPM_TARGETS" 65 | echo "REPO_TARGETS: $REPO_TARGETS" 66 | # give a grace period to terminate (Ctrl+C) 67 | sleep 3 68 | RESULTS="" 69 | test_deb 70 | test_rpm 71 | grep "Failed to install" install-*.log 72 | echo -e $RESULTS 73 | -------------------------------------------------------------------------------- /fluent-package/toolbelt/README.md: -------------------------------------------------------------------------------- 1 | # toolbelt/*.sh Introduction 2 | 3 | This directory is created to archive original installation scripts 4 | which are hosted on toolbelt.treasuredata.com. 5 | 6 | These installation script was dynamically generated on 7 | https://toolbelt.treasuredata.com and source code was hosted on 8 | TreasureData's private repository. 9 | 10 | It rely on deploying commercial cloud service and if we lost access to 11 | that private repository, can't manage them anymore. As a workaround, 12 | support to generate similar install script and upload it as static 13 | file. make-install-script.rb now supports to generate static version 14 | of installation script, but to confirm compatibility some extent, 15 | original installation scripts should be archived to make it comparable 16 | with them. 17 | -------------------------------------------------------------------------------- /fluent-package/toolbelt/install-amazon1-td-agent3.sh: -------------------------------------------------------------------------------- 1 | echo "==============================" 2 | echo " td-agent Installation Script " 3 | echo "==============================" 4 | echo "This script requires superuser access to install rpm packages." 5 | echo "You will be prompted for your password by sudo." 6 | 7 | # clear any previous sudo permission 8 | sudo -k 9 | 10 | # run inside sudo 11 | sudo sh <