commit 0f35424b0c505b61111056b124487320e1e7331f
parent 1efb49035ee7a17c6d9784b79d80d7be89eaed38
Author: torter <koubbamohamedrayan@gmail.com>
Date: Sun, 8 Nov 2026 13:44:46 +0000
package builder keeps apk downloads in ~/.cache/chamesle-apk and tries each step three times, sourceforge kept dropping gcc halfway. the desktops get a new release for the teal wallpaper
Diffstat:
5 files changed, 14 insertions(+), 9 deletions(-)
diff --git a/tools/pkg/build.sh b/tools/pkg/build.sh
@@ -9,12 +9,14 @@ TOP=$HERE/../..
APK=${APK:-apk}
REPO=${REPO:-$TOP/work/repo}
SRC=${SRC_CACHE:-$HOME/.cache/chamesle-src}
+APKCACHE=${APK_CACHE:-$HOME/.cache/chamesle-apk}
KEYDIR=${KEYDIR:-$HOME/.config/chamesle}
KEY=$(ls "$KEYDIR"/chamesle-*.rsa | sort | tail -n1)
ARCH=x86_64
# what it builds with comes from the repo here, or the public one when there's no full copy here
PULL=${PULL:-$( [ -f "$REPO/$ARCH/Packages.adb" ] && echo "$REPO" || echo https://master.dl.sourceforge.net/project/chameslerepos)}
+mkdir -p "$APKCACHE"
[ $# = 1 ] && [ -f "$HERE/$1/recipe" ] || { echo "usage: $0 NAME (one of: $(cd "$HERE" && ls */recipe | sed 's|/recipe||' | tr '\n' ' '))" >&2; exit 1; }
. "$HERE/$1/recipe"
@@ -45,11 +47,14 @@ cp "$HERE/$1/recipe" "$ROOT/build/"
[ -d "$HERE/$1/patches" ] && cp -r "$HERE/$1/patches" "$ROOT/build/"
unshare --map-root-user --map-auto --mount --pid --fork bash -euo pipefail -c '
-APK=$1 ROOT=$2 IN=$3 makedeps=$4 base=$5
+APK=$1 ROOT=$2 IN=$3 makedeps=$4 base=$5 CACHE=$6
+# downloads are kept in $CACHE, so a dropped connection only costs the file it dropped,
+# and each step gets three tries
+try() { "$@" || { sleep 5; "$@"; } || { sleep 20; "$@"; }; }
if [ -z "$base" ]; then
-"$APK" --root "$ROOT" --arch x86_64 add --initdb --no-cache --quiet --no-scripts base-files bash coreutils sed grep findutils
-"$APK" --root "$ROOT" --arch x86_64 fix --no-cache --quiet --reinstall $("$APK" --root "$ROOT" info --quiet)
-[ -z "$makedeps" ] || "$APK" --root "$ROOT" --arch x86_64 add --no-cache --quiet $makedeps
+try "$APK" --root "$ROOT" --arch x86_64 add --initdb --cache-dir "$CACHE" --quiet --no-scripts base-files bash coreutils sed grep findutils
+try "$APK" --root "$ROOT" --arch x86_64 fix --cache-dir "$CACHE" --quiet --reinstall $("$APK" --root "$ROOT" info --quiet)
+[ -z "$makedeps" ] || try "$APK" --root "$ROOT" --arch x86_64 add --cache-dir "$CACHE" --quiet $makedeps
fi
cat > "$ROOT/build/run" <<"EOF"
set -euo pipefail
@@ -61,7 +66,7 @@ export MAKEFLAGS=-j$(nproc) CFLAGS="-O2 -pipe" CXXFLAGS="-O2 -pipe"
build
EOF
"$IN" "$ROOT" /bin/bash /build/run
- ' - "$APK" "$ROOT" "$TOP/tools/in-image.sh" "$makedeps" "${BASE:-}"
+ ' - "$APK" "$ROOT" "$TOP/tools/in-image.sh" "$makedeps" "${BASE:-}" "$APKCACHE"
# shared libraries it links to, minus the ones it brings itself
PKG=$ROOT/build/pkg
diff --git a/tools/pkg/chamesle-cinnamon/recipe b/tools/pkg/chamesle-cinnamon/recipe
@@ -1,6 +1,6 @@
name=chamesle-cinnamon
version=0.7.0
-rel=2
+rel=3
desc="The Chamesle look for Cinnamon: wallpaper, theme settings, login screen, and fixes for its settings"
url=https://chamesle.org
license=GPL-3.0-or-later
diff --git a/tools/pkg/chamesle-kde/recipe b/tools/pkg/chamesle-kde/recipe
@@ -1,6 +1,6 @@
name=chamesle-kde
version=0.7.0
-rel=3
+rel=4
desc="The Chamesle look for KDE Plasma: the Matterhorn, Breeze with a dark taskbar, Inter and the Chamesle start button"
url=https://chamesle.org
license=GPL-3.0-or-later
diff --git a/tools/pkg/chamesle-mate/recipe b/tools/pkg/chamesle-mate/recipe
@@ -1,6 +1,6 @@
name=chamesle-mate
version=0.7.0
-rel=2
+rel=3
desc="The Chamesle look for MATE: wallpaper, panel, theme settings, login screen"
url=https://chamesle.org
license=GPL-3.0-or-later
diff --git a/tools/pkg/chamesle-xfce/recipe b/tools/pkg/chamesle-xfce/recipe
@@ -1,6 +1,6 @@
name=chamesle-xfce
version=0.7.0
-rel=2
+rel=3
desc="The Chamesle look for Xfce: wallpaper, panel, theme settings, login screen"
url=https://chamesle.org
license=GPL-3.0-or-later