Fix .deb source staging — preserve app/ subdir for Dockerfile
build-deb.sh used 'cp -r app/ source/' which renames app to source when source doesn't yet exist, dropping the app/ wrapper that the Dockerfile's COPY app/ /app/ depends on. The 2>/dev/null || true on the cp lines hid the resulting failures, so the .deb shipped a broken /opt/dupfinder/source/ that build-from-source could not use. Pre-create the source dir and copy each item to its explicit destination path. Bump package version to 1.0.1. Also rework dupfinder-setup.sh's image-prep step: prefer a local image, then a quiet registry pull, then build from the bundled source. Removes the loud registry-not-found error that scared users when the (unpublished) tocmo0nlord/dupfinder image wasn't on Docker Hub.
This commit is contained in:
16
debian/build-deb.sh
vendored
16
debian/build-deb.sh
vendored
@@ -13,7 +13,7 @@ BUILD_DIR="$REPO_ROOT/build/deb"
|
||||
|
||||
# ── Config ────────────────────────────────────────────────────────────────────
|
||||
PKG_NAME="dupfinder"
|
||||
PKG_VERSION="1.0.0"
|
||||
PKG_VERSION="1.0.1"
|
||||
PKG_ARCH="amd64"
|
||||
DEB_FILE="${PKG_NAME}_${PKG_VERSION}_${PKG_ARCH}.deb"
|
||||
|
||||
@@ -64,11 +64,15 @@ cp -r "$DEBIAN_DIR/files/." "$PKG_STAGE/"
|
||||
mkdir -p "$PKG_STAGE/opt/dupfinder"
|
||||
cp "$REPO_ROOT/docker-compose.yml" "$PKG_STAGE/opt/dupfinder/docker-compose.yml"
|
||||
|
||||
# Copy source as fallback build path
|
||||
cp -r "$REPO_ROOT/app" "$PKG_STAGE/opt/dupfinder/source/" 2>/dev/null || true
|
||||
cp -r "$REPO_ROOT/templates" "$PKG_STAGE/opt/dupfinder/source/" 2>/dev/null || true
|
||||
cp "$REPO_ROOT/Dockerfile" "$PKG_STAGE/opt/dupfinder/source/" 2>/dev/null || true
|
||||
cp "$REPO_ROOT/requirements.txt" "$PKG_STAGE/opt/dupfinder/source/" 2>/dev/null || true
|
||||
# Copy source as fallback build path. Preserve the app/ subdirectory layout
|
||||
# so the Dockerfile's `COPY app/ /app/` resolves correctly when building from
|
||||
# this staged source dir.
|
||||
SRC_STAGE="$PKG_STAGE/opt/dupfinder/source"
|
||||
mkdir -p "$SRC_STAGE"
|
||||
cp -r "$REPO_ROOT/app" "$SRC_STAGE/app"
|
||||
cp -r "$REPO_ROOT/templates" "$SRC_STAGE/templates"
|
||||
cp "$REPO_ROOT/Dockerfile" "$SRC_STAGE/Dockerfile"
|
||||
cp "$REPO_ROOT/requirements.txt" "$SRC_STAGE/requirements.txt"
|
||||
|
||||
# ── Fix file permissions ──────────────────────────────────────────────────────
|
||||
find "$PKG_STAGE" -type f -name "*.sh" -exec chmod 755 {} \;
|
||||
|
||||
Reference in New Issue
Block a user