Skip to content

Commit

Permalink
Package build: Fix FPM dependency issues (#504)
Browse files Browse the repository at this point in the history
This contains two different fixes:

- For Debian, pin dotenv version to last one that supports Ruby 2.7
  This is an interim fix until we can upgrade the Ruby version used for
  fpm in the build scripts. That is slightly complicated due to the base
  OS being intentionally old (to keep an older glibc base version).

- For CentOS, use Ruby 3.0 to avoid problems with Ruby 2.7 and fpm
  jordansissel/fpm#2048 (comment)
  • Loading branch information
lfittl authored Mar 6, 2024
1 parent f162116 commit 03509ed
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion packages/src/Dockerfile.build.deb-systemd
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ RUN apt-get update -qq \
&& apt-get install -y -q build-essential curl git ruby ruby-dev

# FPM
RUN gem install public_suffix -v 4.0.7 && gem install fpm -v 1.14.1
RUN gem install public_suffix -v 4.0.7 && gem install dotenv -v 2.8.1 && gem install fpm -v 1.14.1

# Golang
RUN curl -o go.tar.gz -sSL "https://go.dev/dl/go${GOVERSION}.linux-${TARGETARCH}.tar.gz"
Expand Down
6 changes: 4 additions & 2 deletions packages/src/Dockerfile.build.rpm-systemd
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,12 @@ ENV ROOT_DIR /root
ENV SOURCE_DIR /source

# Packages required for both building and packaging
RUN yum install -y centos-release-scl scl-utils tar make git rpmdevtools gcc && yum install -y rh-ruby27 rh-ruby27-ruby-devel
#
# This uses Ruby 3.0 since 2.7 (which still used for Debian builds) does not work with fpm: https://github.com/jordansissel/fpm/issues/2048#issuecomment-1972196104
RUN yum install -y centos-release-scl scl-utils tar make git rpmdevtools gcc && yum install -y rh-ruby30 rh-ruby30-ruby-devel

# FPM
RUN source scl_source enable rh-ruby27 && gem install fpm -v 1.14.1
RUN source scl_source enable rh-ruby30 && gem install fpm -v 1.14.1

# Golang
RUN curl -o go.tar.gz -sSL "https://go.dev/dl/go${GOVERSION}.linux-${TARGETARCH}.tar.gz"
Expand Down

0 comments on commit 03509ed

Please sign in to comment.