Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion fluent-package/Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@

require File.expand_path('../config.rb', __FILE__)

def platform_centos7?
return false unless File.exist?("/etc/os-release")
os_info = File.read("/etc/os-release")
os_info.include?("CentOS Linux 7")
end

source "https://rubygems.org"

# core gems
Expand Down Expand Up @@ -102,7 +108,10 @@ not_windows_platforms = [:ruby]
gem "capng_c", "0.2.3", platforms: not_windows_platforms
# Use newer bundled rdkafka with librdkafka 2.8.0 to support AlmaLinux 10
# (librdkafka 2.8.0 supports "OpenSSL without the ENGINE component")
gem "rdkafka", "0.21.0", platforms: not_windows_platforms
# librdkafka 2.8.0 can't be built on CentOS 7.
unless platform_centos7?
gem "rdkafka", "0.21.0", platforms: not_windows_platforms
end
# Keep systemd-journal 2.0.0 and f-p-systemd 1.1.0 until regression issue is fixed
# See https://github.com/ledbettj/systemd-journal/pull/109
gem "systemd-journal", "2.0.0", platforms: not_windows_platforms
Expand Down
97 changes: 58 additions & 39 deletions fluent-package/yum/centos-7/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,45 +15,64 @@
# specific language governing permissions and limitations
# under the License.

ARG FROM=centos:7
ARG FROM=ghcr.io/fluent/fluent-package-centos-7
FROM ${FROM}

COPY qemu-* /usr/bin/
## The following setting had used for initial building ghcr.io/fluent/fluent-package-centos-7.

ARG DEBUG

RUN \
quiet=$([ "${DEBUG}" = "yes" ] || echo "--quiet") && \
yum update -y ${quiet} && \
yum install -y ${quiet} centos-release-scl && \
yum install -y ${quiet} epel-release && \
yum groupinstall -y ${quiet} "Development Tools" && \
yum install -y ${quiet} \
devtoolset-11 \
rh-ruby26-ruby-devel \
rh-ruby26-rubygems \
rh-ruby26-rubygem-rake \
rh-ruby26-rubygem-bundler \
libedit-devel \
ncurses-devel \
libyaml-devel \
libffi-devel \
git \
cyrus-sasl-devel \
nss-softokn-freebl-devel \
pkg-config \
rpm-build \
rpmdevtools \
redhat-rpm-config \
openssl-devel \
tar \
zlib-devel \
rpmlint \
cmake3 && \
# raise IPv4 priority
echo "precedence ::ffff:0:0/96 100" > /etc/gai.conf && \
# enable multiplatform feature (bundler 2.4.22 is the latest version which supports ruby 2.6)
source /opt/rh/rh-ruby26/enable && gem install --no-document --install-dir /opt/rh/rh-ruby26/root/usr/share/gems bundler:2.4.22 builder && \
scl enable devtoolset-11 bash && \
yum clean ${quiet} all && \
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
# ARG FROM=centos:7
# FROM ${FROM}
#
# COPY qemu-* /usr/bin/
#
# ARG DEBUG
#
# RUN sed -i'' -e 's/^mirrorlist/#mirrorlist/g' \
# -e 's/^#baseurl/baseurl/g' \
# -e 's,mirror.centos.org/centos/$releasever,vault.centos.org/7.9.2009,g' \
# /etc/yum.repos.d/CentOS-Base.repo
#
# RUN \
# quiet=$([ "${DEBUG}" = "yes" ] || echo "--quiet") && \
# yum update -y ${quiet} && \
# yum install -y ${quiet} centos-release-scl && \
# sed -i'' -e 's/^mirrorlist/#mirrorlist/g' \
# -e 's/^# baseurl/baseurl/g' \
# -e 's,mirror.centos.org/centos/7,vault.centos.org/7.9.2009,g' \
# /etc/yum.repos.d/CentOS-SCLo-scl.repo && \
# sed -i'' -e 's/^mirrorlist/#mirrorlist/g' \
# -e 's/^#baseurl/baseurl/g' \
# -e 's,mirror.centos.org/centos/7,vault.centos.org/7.9.2009,g' \
# /etc/yum.repos.d/CentOS-SCLo-scl-rh.repo && \
# yum install -y ${quiet} epel-release && \
# yum groupinstall -y ${quiet} "Development Tools" && \
# yum install -y ${quiet} \
# devtoolset-11 \
# rh-ruby26-ruby-devel \
# rh-ruby26-rubygems \
# rh-ruby26-rubygem-rake \
# rh-ruby26-rubygem-bundler \
# libcap-ng-devel \
# libedit-devel \
# ncurses-devel \
# libyaml-devel \
# libffi-devel \
# git \
# cyrus-sasl-devel \
# nss-softokn-freebl-devel \
# pkg-config \
# rpm-build \
# rpmdevtools \
# redhat-rpm-config \
# openssl-devel \
# tar \
# zlib-devel \
# rpmlint \
# cmake3 && \
# # raise IPv4 priority
# echo "precedence ::ffff:0:0/96 100" > /etc/gai.conf && \
# # enable multiplatform feature (bundler 2.4.22 is the latest version which supports ruby 2.6)
# source /opt/rh/rh-ruby26/enable && gem install --no-document --install-dir /opt/rh/rh-ruby26/root/usr/share/gems bundler:2.4.22 builder && \
# scl enable devtoolset-11 bash && \
# yum clean ${quiet} all && \
# curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
6 changes: 2 additions & 4 deletions fluent-package/yum/fluent-package.spec.in
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,8 @@
%define install_plugins /tmp/@PACKAGE_DIR@/.install_plugins
%define pid_for_auto_restart /tmp/@PACKAGE_DIR@/.pid_for_auto_restart

# Omit the brp-python-bytecompile automagic because post hook for ffi fails on AmazonLinux 2.
%if %{_amazon_ver} == 2
%global __brp_python_bytecompile %{nil}
%endif
# Stop interrupting by bytecopile errors. The errors are causes on Amazon Linux 2 and CentOS 7.
%global _python_bytecompile_errors_terminate_build 0

%global __provides_exclude_from ^/opt/%{name}/.*\\.so.*
%global __requires_exclude libjemalloc.*|libruby.*|/opt/%{name}/.*
Expand Down