fix packaging ownership for Unraid
This commit is contained in:
+12
-1
@@ -1,6 +1,9 @@
|
||||
#!/bin/sh
|
||||
set -eu
|
||||
|
||||
# Keine macOS-Metadaten oder lokale UID 501 in das Unraid-Paket übernehmen.
|
||||
export COPYFILE_DISABLE=1
|
||||
|
||||
PLUGIN="u-navigator"
|
||||
VERSION="2026.07.14.r017"
|
||||
PKG_DIR="packages"
|
||||
@@ -15,7 +18,15 @@ cp server/public/app.js "$WORK_DIR/usr/local/emhttp/plugins/${PLUGIN}/assets/app
|
||||
cp server/public/styles.css "$WORK_DIR/usr/local/emhttp/plugins/${PLUGIN}/assets/styles.css"
|
||||
perl -0pi -e "s/__VERSION__/${VERSION}/g" "$WORK_DIR/usr/local/emhttp/plugins/${PLUGIN}/U-Navigator.page"
|
||||
|
||||
tar -czf "$PKG_DIR/$PKG_NAME" -C "$WORK_DIR" usr
|
||||
find "$WORK_DIR" -name '._*' -delete
|
||||
if tar --version 2>/dev/null | grep -q 'GNU tar'; then
|
||||
TAR_OWNER_FLAGS="--owner=0 --group=0 --numeric-owner"
|
||||
else
|
||||
TAR_OWNER_FLAGS="--uid 0 --gid 0 --uname root --gname root"
|
||||
fi
|
||||
# Die Argumente sind feste, intern definierte tar-Flags.
|
||||
# shellcheck disable=SC2086
|
||||
tar --no-xattrs $TAR_OWNER_FLAGS -czf "$PKG_DIR/$PKG_NAME" -C "$WORK_DIR" usr
|
||||
rm -rf "$WORK_DIR"
|
||||
|
||||
MD5="$(md5 -q "$PKG_DIR/$PKG_NAME" 2>/dev/null || md5sum "$PKG_DIR/$PKG_NAME" | awk '{print $1}')"
|
||||
|
||||
Reference in New Issue
Block a user