chamesle

chamesle.org: the site of Chamesle, a small Linux distribution
git clone https://github.com/tortr-rs/chamesle
Log | Files | Refs | README

commit 79a9cd2ed8b09e9d84ccaccc713a1582aafd0465
parent fbd14d9ab2d51f7a5ba317e824ae69bb41f3011f
Author: torter <koubbamohamedrayan@gmail.com>
Date:   Thu, 22 Oct 2026 00:28:10 +0000

the version a system reports follows chamesle-base, not the iso it was installed from

Diffstat:
Mtools/pkg/build.sh | 6++++--
Mtools/pkg/chamesle-base/post-install | 6++++++
Mtools/pkg/chamesle-base/post-upgrade | 6++++++
Mtools/pkg/chamesle-base/recipe | 4++--
4 files changed, 18 insertions(+), 4 deletions(-)

diff --git a/tools/pkg/build.sh b/tools/pkg/build.sh @@ -68,9 +68,11 @@ d=$(echo $depends $sodeps) [ -z "$d" ] || info+=(--info "depends:$d") [ -z "${provides// }" ] || info+=(--info "provides:$(echo $provides)") [ -z "${replaces:-}" ] || info+=(--info "replaces:$replaces") -# install scripts, if the package has any (NAME/post-install and so on) +# install scripts, if the package has any (NAME/post-install and so on); @VERSION@ becomes the package's version for k in pre-install post-install pre-upgrade post-upgrade pre-deinstall post-deinstall; do - [ -f "$HERE/$1/$k" ] && info+=(--script "$k:$HERE/$1/$k") + [ -f "$HERE/$1/$k" ] || continue + sed "s/@VERSION@/$version/g" "$HERE/$1/$k" > "$W/$k" + info+=(--script "$k:$W/$k") done # packed as namespace root so the files are root's unshare --map-root-user --map-auto "$APK" mkpkg --files "$PKG" --output "$out" --sign-key "$KEY" "${info[@]}" diff --git a/tools/pkg/chamesle-base/post-install b/tools/pkg/chamesle-base/post-install @@ -1,4 +1,10 @@ #!/bin/sh # load them now too, no reboot needed /usr/lib/dinit/modules +# chamesle is rolling: the version the system says it runs is this package's, not the iso it came from +v=@VERSION@ +if grep -q '^ID=chamesle$' /etc/os-release 2>/dev/null; then + sed -i -E "s/^(PRETTY_NAME=\"Chamesle Linux )[0-9][0-9.]*/\1$v/; s/^VERSION=\"[0-9][0-9.]*/VERSION=\"$v/; s/^VERSION_ID=.*/VERSION_ID=\"$v\"/" /etc/os-release + [ -f /etc/issue ] && sed -i -E "s/^(Chamesle Linux )[0-9][0-9.]*/\1$v/" /etc/issue +fi exit 0 diff --git a/tools/pkg/chamesle-base/post-upgrade b/tools/pkg/chamesle-base/post-upgrade @@ -1,4 +1,10 @@ #!/bin/sh # load them now too, no reboot needed /usr/lib/dinit/modules +# chamesle is rolling: the version the system says it runs is this package's, not the iso it came from +v=@VERSION@ +if grep -q '^ID=chamesle$' /etc/os-release 2>/dev/null; then + sed -i -E "s/^(PRETTY_NAME=\"Chamesle Linux )[0-9][0-9.]*/\1$v/; s/^VERSION=\"[0-9][0-9.]*/VERSION=\"$v/; s/^VERSION_ID=.*/VERSION_ID=\"$v\"/" /etc/os-release + [ -f /etc/issue ] && sed -i -E "s/^(Chamesle Linux )[0-9][0-9.]*/\1$v/" /etc/issue +fi exit 0 diff --git a/tools/pkg/chamesle-base/recipe b/tools/pkg/chamesle-base/recipe @@ -1,6 +1,6 @@ name=chamesle-base -version=0.2.0 -rel=3 +version=0.2.1 +rel=1 desc="Chamesle system setup: kernel modules at boot, a few small touches" url=https://chamesle.org license=GPL-3.0-or-later