Skip to content

Commit

Permalink
v0.19
Browse files Browse the repository at this point in the history
  • Loading branch information
jaclu committed Jul 11, 2024
1 parent 5cb7b07 commit c47100b
Show file tree
Hide file tree
Showing 33 changed files with 915 additions and 696 deletions.
33 changes: 10 additions & 23 deletions AOK_VARS
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
# Label for AOK builds, is also displayed by motd to indicate what
# AOK FS release is being used
#
AOK_VERSION="0.18"
AOK_VERSION="0.19"

#
# If defined this will be created as a no-password sudo capable user
Expand Down Expand Up @@ -133,36 +133,23 @@ USER_SHELL="/bin/bash"
# ALPINE_VERSION defines what Alpine release (minirootfs) will be used
# current releases can be found at: https://alpinelinux.org/releases/
#
# ALPINE_VERSION=3.15.11 # End of Alpine support 2023-11-01
# ALPINE_VERSION=3.16.9 # End of Alpine support 2024-05-23
# ALPINE_VERSION=3.17.8 # End of Alpine support 2024-11-22
# ALPINE_VERSION=3.18.7 # End of Alpine support 2025-05-09

# As of 2024-07-02 sudo insta-crashes iSH if using Alpine >= 3.19...
# sudo insta-crashes iSH if using Alpine >= 3.19... last checked 2024-07-02
# test: sudo ls
# AOK installs an older sudo (Alpine 3.14) on such releases, this
# solves the issue

#
# ALPINE_VERSION=3.17.8 # End of Alpine support 2024-11-22
# ALPINE_VERSION=3.18.7 # End of Alpine support 2025-05-09
# ALPINE_VERSION=3.19.2 # End of Alpine support 2025-11-01
ALPINE_VERSION=3.20.1 # End of Alpine support 2026-04-01

#
# For edge releases - Current development tree
# Format is the isodate featured in the minirootfs filename
# Meaning that: alpine-minirootfs-20230901-x86.tar.gz
# Would be requested as: ALPINE_VERSION="20230901"
#
# ALPINE_VERSION="20230901" # 3.19_alpha20230901
# ALPINE_VERSION="20230329" # 3.18_alpha20230329
# ALPINE_VERSION="20221110" # 3.17_alpha20221110
#
# If you need to detect if the build is an edge release in your
# .AOK_VARS, when making config desicions,
# you can check it thus:
# Meaning that: alpine-minirootfs-20240606-x86.tar.gz
# Would be requested as: ALPINE_VERSION="20240606"
#
# if echo "$ALPINE_VERSION" | grep -Eq '^[0-9]{8}$'; then
# echo "this is edge"
# fi
# ALPINE_VERSION="20240606" # 3.21.0_alpha20240606
#

#
Expand All @@ -174,7 +161,7 @@ ALPINE_VERSION=3.20.1 # End of Alpine support 2026-04-01
#
# Always installed packages
#
pkgs_tools="busybox-extras coreutils procps util-linux
pkgs_tools="busybox-extras coreutils util-linux
sudo shadow shadow-login tzdata findutils sed tar pigz file gawk
grep htop less sqlite fzf py3-pip ncdu"
pkgs_shells="bash zsh"
Expand Down Expand Up @@ -223,7 +210,7 @@ NODEJS_APKS='nodejs nodejs-dev'
# not development related man pages, those doing development are
# assumed to know what man pages they might need :)
#
DOCS_APKS="man-db man-pages busybox-doc coreutils-doc procps-ng-doc \
DOCS_APKS="man-db man-pages busybox-doc coreutils-doc \
sudo-doc shadow-doc shadow-login-doc tzdata-doc findutils-doc sed-doc \
tar-doc file-doc gawk-doc grep-doc htop-doc less-doc git-doc \
sqlite-doc fzf-doc py3-pip-doc ncdu-doc bash-doc zsh-doc openrc-doc \
Expand Down
1 change: 1 addition & 0 deletions Alpine/etc/motd_template
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,4 @@
Check ]8;;https://github.com/ish-app/ish\GitHub]8;;\ for more information,
or ask on the ]8;;https://discord.gg/HFAXj44\Discord]8;;\ if you
have questions.

18 changes: 10 additions & 8 deletions Alpine/setup_alpine.sh
Original file line number Diff line number Diff line change
Expand Up @@ -39,20 +39,22 @@ handle_apks() {

if ! min_release "3.16"; then
if [ -z "${CORE_APKS##*shadow-login*}" ]; then
# This package was introduced starting with Alpine 3.16
msg_3 "Excluding not yet available apk 'shadow-login"
msg_2 "Excluding packages not yet availabe before 3.16"
removing_unwanted_package "shadow-login"
removing_unwanted_package "py3-pendulum"
removing_unwanted_package "zsh-completions"
removing_unwanted_package "zsh-history-substring-search"
fi
fi
if ! min_release 3.18; then
msg_3 "Pre 3.18 procps was called procps-ng"
CORE_APKS="$(echo "$CORE_APKS" | sed 's/procps/procps-ng/')"
#if ! min_release 3.15; then
# msg_2 "Pre 3.15 procps was called procps-ng"
# CORE_APKS="$(echo "$CORE_APKS" | sed 's/procps/procps-ng/')"
# elif min_release "3.19"; then
# msg_3 "Alpine >= 3.19 - procps cant be used"
# removing_unwanted_package procps
fi
#fi
if min_release "3.20"; then
msg_3 "Alpine >= 3.20 - coreutils cant be used"
msg_2 "Alpine >= 3.20 - coreutils cant be used"
removing_unwanted_package coreutils
fi

Expand Down Expand Up @@ -136,7 +138,7 @@ prepare_env_etc() {
msg_2 "Adding apk repository - testing"
# cp /opt/AOK/Alpine/etc/repositories-edge /etc/apk/repositories
echo "$testing_repo" >>/etc/apk/repositories
elif min_release 3.17; then
elif min_release 3.19; then
#
# Only works for fairly recent releases, otherwise dependencies won't
# work.
Expand Down
7 changes: 2 additions & 5 deletions Alpine/usr_local_bin/aok-groups
Original file line number Diff line number Diff line change
Expand Up @@ -77,11 +77,8 @@ pkg_handling() {
#
# Some packages change depending on Alpine release
#
if ! min_release 3.18; then
packages="$(echo "$packages" | sed 's/procps-ng/procps/')"
if ! min_release 3.16; then
packages="$(echo "$packages" | sed 's/shadow-login-doc//')"
fi
if ! min_release 3.16; then
packages="$(echo "$packages" | sed 's/shadow-login-doc//')"
fi

# shellcheck disable=SC2086 # in this case it should expand
Expand Down
26 changes: 13 additions & 13 deletions Alpine/usr_local_sbin/update-motd
Original file line number Diff line number Diff line change
Expand Up @@ -38,23 +38,23 @@ f_obsolete="/etc/aok-release"
mv "$f_obsolete" "$f_aok_fs_release"
}

rm -f "$f_motd"

# create initial LF
echo >>"$f_motd"

if [ -e "$f_aok_fs_release" ]; then
echo "AOK-FS release: $(cat "$f_aok_fs_release")" >>"$f_motd"
fi

(
echo "Alpine release: $alp_rel"
echo "iSH release: $ish_rel"
echo
) >>"$f_motd"
echo >"$f_motd"

if [ -f "$f_motd_template" ]; then
cat "$f_motd_template" >>"$f_motd"
fi

/usr/local/bin/aok-versions >>"$f_motd"

#if [ -e "$f_aok_fs_release" ]; then
# echo "AOK-FS release: $(cat "$f_aok_fs_release")" >>"$f_motd"
#fi

#(
# echo "Alpine release: $alp_rel"
# echo "iSH release: $ish_rel"
# echo
#) >>"$f_motd"

/usr/local/bin/logger update-motd updated /etc/motd
12 changes: 11 additions & 1 deletion CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,17 @@

I will try to keep track of changes between releases here

## Upcomming release, available in main branch
## Upcomming release, available in devel branch

## 0.19

- simplified dest selection for wall
- better check if pigz is installed
- reshuffle of motd tasks
- added tools: aok_fs-save & aok_fs-replace
- updated skel files
- improved package selection for old releases
- added uptime -l to just show sysload

## 0.18

Expand Down
12 changes: 12 additions & 0 deletions Debian/etc/update-motd.d/25-deb-vers
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/bin/sh
#
# Part of https://github.com/jaclu/AOK-Filesystem-Tools
#
# License: MIT
#
# Copyright (c) 2024: [email protected]
#
# Displays Debian version
#

echo "Debian version: $(cat /etc/debian_version)"
18 changes: 0 additions & 18 deletions FamDeb/etc/update-motd.d/11-aok-release

This file was deleted.

17 changes: 0 additions & 17 deletions FamDeb/etc/update-motd.d/13-ish-release

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,5 @@
# Displays AOK release info
#

deb_version="/etc/debian_version"

if [ -e "$deb_version" ]; then
echo "Debian release: $(cat "$deb_version")"
fi
echo
#printf "\e[35m"
14 changes: 14 additions & 0 deletions FamDeb/etc/update-motd.d/26-ish-release
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#!/bin/sh
#
# Part of https://github.com/jaclu/AOK-Filesystem-Tools
#
# License: MIT
#
# Copyright (c) 2024: [email protected]
#
# Displays iSH version
#

ish_version="$(cat /proc/ish/version 2>/dev/null)"
[ -z "$ish_version" ] && ish_version="Cant be detected whilst chrooted"
echo "iSH release: $ish_version"
14 changes: 14 additions & 0 deletions FamDeb/etc/update-motd.d/27-aok-release
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#!/bin/sh
#
# Part of https://github.com/jaclu/AOK-Filesystem-Tools
#
# License: MIT
#
# Copyright (c) 2024: [email protected]
#
# Displays AOK release info
#

aok_release="$(cat /etc/aok-fs-release 2>/dev/null)"
[ -z "$aok_release" ] && aok_release="Not found: /etc/aok-fs-release"
echo "AOK-FS release: $aok_release"
13 changes: 13 additions & 0 deletions FamDeb/etc/update-motd.d/28-clear-color
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/bin/sh
#
# Part of https://github.com/jaclu/AOK-Filesystem-Tools
#
# License: MIT
#
# Copyright (c) 2024: [email protected]
#
# Clear color for aok version info
#

# printf "\e[0m"
echo
49 changes: 0 additions & 49 deletions TODO.md
Original file line number Diff line number Diff line change
Expand Up @@ -173,52 +173,3 @@ since it is about to become more usefull, i should update it to ensure it
is in line with the debian image when it comes to what is installed
out of the door

## procps alpine 3.20

alpine 3.20
procps issues

bin/pidof
-bin/pidwait
bin/ps
-bin/slabtop - unable
-bin/tload - unable
-bin/vmstat - unable
-bin/w - segfault
bin/watch
!sbin/sysctl
usr/bin/free
usr/bin/pgrep
usr/bin/pkill
usr/bin/pmap
usr/bin/pwdx
usr/bin/top
usr/bin/uptime - segfault

=== bins when procps not installed:

bin/pidwait - not found
bin/slabtop - not found
bin/tload - not found
bin/vmstat - not found
bin/w - not found
sbin/sysctl - fails

=== older procps

uptime
3.18 procps-ng-4.0.4-r0.apk
/usr/bin/uptime:
segfault

3.17 procps-3.3.17-r3.apk
/usr/bin/uptime:
Error: /proc must be mounted [despite it being mounted]

3.16 procps-3.3.17-r2.apk
/usr/bin/uptime:
Error: /proc must be mounted [despite it being mounted]

3.14 procps-3.3.17-r0
/usr/bin/uptime:
Error: /proc must be mounted [despite it being mounted]
6 changes: 3 additions & 3 deletions common_AOK/etc/skel/.common_rc
Original file line number Diff line number Diff line change
Expand Up @@ -35,17 +35,17 @@ set_current_shell_name() {
# The SHELL variable only displays initial login shell
# if you change shell, even using ` -l` to indicate
# doing a login shell, it doesnt change.
# Instead I add CURRENT_SHELL to indicate what this shell is
# Instead I add CURRENT_SHELL to indicate what this shell is.
# On Alpine ash is usually softlinked to busybox
#

# Determine the current shell
if [ -n "$FISH_VERSION" ]; then
CURRENT_SHELL="fish"
else
if [ -f /proc/$$/exe ]; then
case "$(basename "$(realpath /proc/$$/exe)")" in
ash | busybox) CURRENT_SHELL="ash" ;;
bash) CURRENT_SHELL="bash" ;;
dash) CURRENT_SHELL="dash" ;;
zsh) CURRENT_SHELL="zsh" ;;
*) CURRENT_SHELL="" ;; # unknown
esac
Expand Down
Loading

0 comments on commit c47100b

Please sign in to comment.