From 95627cb601d50e87c260c93dbcbec16c9f208cd6 Mon Sep 17 00:00:00 2001 From: hector <42570491+majinghe@users.noreply.github.com> Date: Mon, 10 Aug 2026 16:15:15 +0800 Subject: [PATCH] fix: create config file before fpm RPM packaging (#5924) The RPM build step fails because fpm's --config-files flag requires /etc/default/rustfs to exist in the staging area, but unlike the DEB build (which creates it in its package directory structure), the fpm command has no prior step creating this file. Create the config file in a temporary directory and pass it to fpm via a source=dest mapping, matching the DEB build's behavior. --- .github/workflows/package.yml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/.github/workflows/package.yml b/.github/workflows/package.yml index 53c60a0f2..d44205fa0 100644 --- a/.github/workflows/package.yml +++ b/.github/workflows/package.yml @@ -322,6 +322,17 @@ jobs: sudo apt-get update && sudo apt-get install -y ruby ruby-dev build-essential sudo gem install fpm + # Create config file for fpm (DEB build creates it in its package dir structure, + # but fpm needs the file to exist before packaging) + mkdir -p ./tmp-pkg/etc/default + cat > ./tmp-pkg/etc/default/rustfs << 'ENVEOF' + # RustFS Environment Configuration + # See https://rustfs.com/docs/ for more information + # RUSTFS_VOLUMES="" + # RUSTFS_ROOT_USER="" + # RUSTFS_ROOT_PASSWORD="" + ENVEOF + fpm -s dir -t rpm \ --name rustfs \ --version "$VERSION" \ @@ -362,6 +373,7 @@ jobs: ) \ --config-files /etc/default/rustfs \ ./bin/rustfs=/usr/bin/rustfs \ + ./tmp-pkg/etc/default/rustfs=/etc/default/rustfs \ deploy/build/rustfs.service=/lib/systemd/system/rustfs.service \ LICENSE=/usr/share/doc/rustfs/LICENSE \ README.md=/usr/share/doc/rustfs/README.md