Skip to content

Commit 88f351c

Browse files
committed
feat: test upstream openvoxserver-ca#33 rootless fix
Replace our sed-based patches for rootless chown issues with the upstream file_system.rb from OpenVoxProject/openvoxserver-ca#33. The upstream PR introduces an ensure_ownership helper that skips chown when not running as root, which covers both the file_system.rb chown calls and the forcibly_symlink used by symlink_to_old_cadir in setup.rb. This eliminates the need for both of our previous sed patches. Signed-off-by: Simon Lauger <simon@lauger.de>
1 parent 9566137 commit 88f351c

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

images/openvox-server/Containerfile

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -151,12 +151,12 @@ RUN printf '%s\n' \
151151
&& puppetserver gem install --no-document openvox -v "${OPENVOX_VERSION}" \
152152
&& puppetserver gem install --no-document jruby-openssl -v 0.15.7
153153

154-
# Patch openvoxserver-ca to skip cadir symlink and chown (fails rootless)
155-
RUN find / -path '*/openvoxserver-ca-*/lib/puppetserver/ca/action/setup.rb' \
156-
-exec sed -i '/Puppetserver::Ca::Utils::Config\.symlink_to_old_cadir/ s/^/# /' {} + 2>/dev/null \
157-
; find / -path '*/openvoxserver-ca-*/lib/puppetserver/ca/utils/file_system.rb' \
158-
-exec sed -i 's/FileUtils\.chown/# FileUtils.chown/' {} + 2>/dev/null \
159-
; true
154+
# Replace openvoxserver-ca file_system.rb with upstream fix from
155+
# OpenVoxProject/openvoxserver-ca#33 (ensure_ownership helper skips chown
156+
# when not running as root, eliminating the need for our sed patches).
157+
RUN curl -fsSL https://raw.githubusercontent.com/OpenVoxProject/openvoxserver-ca/fix/chown-in-rootless-containers/lib/puppetserver/ca/utils/file_system.rb \
158+
-o /tmp/file_system.rb \
159+
&& cp /tmp/file_system.rb /opt/puppetlabs/server/data/puppetserver/vendored-jruby-gems/gems/openvoxserver-ca-*/lib/puppetserver/ca/utils/file_system.rb
160160

161161
################################################################################
162162
# Stage: autosign — compile the openvox-autosign Go binary

0 commit comments

Comments
 (0)