Skip to content

Commit

Permalink
chore: workaround podman image scp leaving behind temporary files in …
Browse files Browse the repository at this point in the history
…/var/tmp (ublue-os#2052)
  • Loading branch information
detiber authored Dec 16, 2024
1 parent c524b00 commit 8512e3c
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions Justfile
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,9 @@ rechunk image="bluefin" tag="latest" flavor="main" ghcr="0" pipeline="0":
# Load into Rootful Podman
ID=$(just sudoif podman images --filter reference=localhost/"${image_name}":"${tag}" --format "'{{ '{{.ID}}' }}'")
if [[ -z "$ID" ]]; then
just sudoif podman image scp ${UID}@localhost::localhost/"${image_name}":"${tag}" root@localhost::localhost/"${image_name}":"${tag}"
COPYTMP=$(mktemp -p "${PWD}" -d -t podman_scp.XXXXXXXXXX)
just sudoif TMPDIR=${COPYTMP} podman image scp ${UID}@localhost::localhost/"${image_name}":"${tag}" root@localhost::localhost/"${image_name}":"${tag}"
rm -rf "${COPYTMP}"
fi

# Prep Container
Expand Down Expand Up @@ -476,7 +478,9 @@ build-iso image="bluefin" tag="latest" flavor="main" ghcr="0" pipeline="0":

# Load Image into rootful podman
if [[ "${UID}" -gt 0 && {{ ghcr }} == "0" ]]; then
just sudoif podman image scp "${UID}"@localhost::"${IMAGE_FULL}" root@localhost::"${IMAGE_FULL}"
COPYTMP=$(mktemp -p "${PWD}" -d -t podman_scp.XXXXXXXXXX)
just sudoif TMPDIR=${COPYTMP} podman image scp "${UID}"@localhost::"${IMAGE_FULL}" root@localhost::"${IMAGE_FULL}"
rm -rf "${COPYTMP}"
fi

FLATPAK_DIR_SHORTNAME="bluefin_flatpaks"
Expand Down

0 comments on commit 8512e3c

Please sign in to comment.