Production hardening: host-aware install, ownership contracts, firewall safety
This commit is contained in:
@@ -11,6 +11,11 @@ prepare_stage() {
|
||||
rm -rf "$STAGE_DIR"
|
||||
mkdir -p "$STAGE_DIR" "dist"
|
||||
copy_dir_contents "package" "$STAGE_DIR"
|
||||
chmod 0755 "$STAGE_DIR/install.sh"
|
||||
find "$STAGE_DIR" -type d -exec chmod 0755 {} +
|
||||
find "$STAGE_DIR" -type f -name "*.service" -exec chmod 0644 {} +
|
||||
find "$STAGE_DIR" -type f -name "*.tpl" -exec chmod 0644 {} +
|
||||
find "$STAGE_DIR/config" -type f -exec chmod 0644 {} +
|
||||
|
||||
rm -rf "$STAGE_DIR/orchestrator" "$STAGE_DIR/ui" "$STAGE_DIR/metadata"
|
||||
mkdir -p "$STAGE_DIR/orchestrator" "$STAGE_DIR/ui/hy2xs-admin" "$STAGE_DIR/metadata"
|
||||
@@ -87,5 +92,5 @@ create_archive() {
|
||||
local archive="dist/hy2xs-install-${version}.tar.gz"
|
||||
|
||||
rm -f "$archive"
|
||||
tar -C "tools/build/output" -czf "$archive" "hy2xs-install"
|
||||
tar --owner=0 --group=0 --numeric-owner -C "tools/build/output" -czf "$archive" "hy2xs-install"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user