Skip to content

Commit c00b4ae

Browse files
authoredJul 23, 2024··
new version 0.0.13 (#45)
1 parent 96ad1ea commit c00b4ae

File tree

3 files changed

+72
-47
lines changed

3 files changed

+72
-47
lines changed
 

‎.github/workflows/build.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ jobs:
3232
- name: Download Raspios Lite ARM64 Image
3333
run: |
3434
cd repository/src/image-raspios_lite_arm64
35-
wget -c --trust-server-names 'https://downloads.raspberrypi.org/raspios_lite_arm64/images/raspios_lite_arm64-2022-09-26/2022-09-22-raspios-bullseye-arm64-lite.img.xz'
35+
wget -c --trust-server-names 'https://downloads.raspberrypi.org/raspios_lite_arm64/images/raspios_lite_arm64-2024-07-04/2024-07-04-raspios-bookworm-arm64-lite.img.xz'
3636
3737
- name: Update CustomPiOS Paths
3838
run: |

‎src/config

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
export DIST_NAME=cube
2-
export DIST_VERSION=0.0.11
2+
export DIST_VERSION=0.0.13
33
export MODULES="base(cube)"
44

55

‎src/modules/cube/start_chroot_script

+70-45
Original file line numberDiff line numberDiff line change
@@ -7,86 +7,111 @@ export LC_ALL=C
77

88
source /common.sh
99

10-
1110
unpack /filesystem/home/pi /home/"${BASE_USER}" "${BASE_USER}"
1211
unpack /filesystem/home/root /root root
1312
unpack /filesystem/boot /boot
1413

15-
# /boot/version.txt
16-
version="$DIST_NAME-$DIST_VERSION"
17-
echo "writing version.txt: $version"
18-
echo "$version" > /boot/version.txt
19-
20-
# cgroup for kubernetes
21-
sed -i -e 's#$# cgroup_memory=1 cgroup_enable=memory#' /boot/cmdline.txt
22-
23-
24-
## TODO better alternative enable by cli on first boot
25-
## because wifi country problem
2614
# Enable wifi by default
2715
for filename in /var/lib/systemd/rfkill/*:wlan ; do
2816
echo 0 > $filename
2917
done
3018

31-
apt update
32-
3319
# in case we are building from a regular raspbian image instead of the lite one...
34-
remove_extra=$(remove_if_installed scratch squeak-plugins-scratch squeak-vm wolfram-engine python-minecraftpi minecraft-pi sonic-pi oracle-java8-jdk bluej libreoffice-common libreoffice-core freepats greenfoot nodered)
35-
echo "removing:" $remove_extra
36-
apt remove -y --purge $remove_extra
20+
apt update
21+
remove=(
22+
scratch squeak-vm
23+
wolfram-engine
24+
sonic-pi
25+
libreoffice-common libreoffice-core
26+
freepats
27+
nodered
28+
)
29+
apt remove -y --purge "${remove[@]}"
3730
apt autoremove -y
3831

32+
# docker-ce
33+
install -m 0755 -d /etc/apt/keyrings
34+
curl -fsSL https://download.docker.com/linux/debian/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg
35+
chmod a+r /etc/apt/keyrings/docker.gpg
36+
echo \
37+
"deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/debian \
38+
$(. /etc/os-release && echo "$VERSION_CODENAME") stable" | \
39+
sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
40+
# nodejs
41+
curl -fsSL https://deb.nodesource.com/setup_18.x | bash -
42+
# kubernetes
43+
#curl -fsSL https://pkgs.k8s.io/core:/stable:/v1.30/deb/Release.key | sudo gpg --dearmor -o /etc/apt/keyrings/kubernetes-apt-keyring.gpg
44+
#chmod a+r /etc/apt/keyrings/kubernetes-apt-keyring.gpg
45+
#echo "deb [signed-by=/etc/apt/keyrings/kubernetes-apt-keyring.gpg] https://pkgs.k8s.io/core:/stable:/v1.30/deb/ /" | tee /etc/apt/sources.list.d/kubernetes.list
46+
47+
# install
48+
apt update
3949
install=(
40-
curl apt-transport-https # apt essentials
41-
jq # @treehouses/cli
42-
git vim screen # terminal development
43-
autossh tor # tunnel
44-
netcat avahi-daemon # network
45-
docker.io # container
46-
minicom bluez-tools libbluetooth-dev python3-pip python3-dbus # bluetooth
50+
jq # @treehouses/cli
51+
git vim screen dos2unix # terminal development
52+
autossh tor # tunnel
53+
netcat-openbsd avahi-daemon rfkill # network
54+
minicom bluez bluez-tools libbluetooth-dev python3-pip python3-dbus # bluetooth
55+
docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin # docker-ce
56+
nodejs # node
57+
dhcpcd5 # network
58+
#kubectl kubeadm kubelet # kube
4759
)
48-
apt install -y --force-yes "${install[@]}"
60+
apt install -y --allow-change-held-packages "${install[@]}"
4961

5062
# bluetooth for treehouses remote
5163
curl --silent --show-error --fail "https://raw.githubusercontent.com/treehouses/control/master/server.py" -o /usr/local/bin/bluetooth-server.py
5264
cat /usr/local/bin/bluetooth-server.py | grep ^class
5365
echo "switching bluetooth device class to 0x00010c - computer"
5466
sed -i -e 's/#Class = .*/Class = 0x00010c/g' /etc/bluetooth/main.conf
55-
pip3 install 'pybluez==0.23'
56-
57-
curl -fsSL https://deb.nodesource.com/setup_18.x | bash -
58-
curl https://packages.cloud.google.com/apt/doc/apt-key.gpg | apt-key add -
59-
echo "deb https://apt.kubernetes.io/ kubernetes-xenial main" | tee /etc/apt/sources.list.d/kubernetes.list
60-
apt update
61-
apt install -y nodejs kubectl kubeadm kubelet
62-
pip3 install docker-compose
67+
pip3 install git+https://github.com/pybluez/pybluez.git#egg=pybluez --break-system-packages
6368

69+
# @treehouses/cli
6470
mkdir -p /etc/bash_completion.d
6571
npm i -g @treehouses/cli
72+
73+
# ssh
74+
ssh-keygen -A
75+
ls -al /etc/ssh/
76+
systemctl enable ssh
77+
systemctl status ssh
78+
79+
# team
6680
mkdir -p /root/.ssh
6781
chmod go-rwx /root/.ssh
6882
treehouses sshkey github adduser dogi
69-
treehouses sshkey github adduser louhdy
70-
treehouses sshkey github adduser lanxel97
71-
treehouses sshkey github adduser wesitos
72-
treehouses sshkey github adduser lmmrssa
83+
treehouses sshkey github adduser mutugiii
84+
treehouses sshkey github adduser okuro3499
85+
treehouses sshkey github adduser xyb994
7386
treehouses sshkey github adduser hirotochigi
74-
treehouses sshkey github adduser jlkwong
7587
treehouses sshkey github adduser BryanGazali
7688
cp -R /root/.ssh /home/"${BASE_USER}"
7789
chown -R "${BASE_USER}": /home/"${BASE_USER}"/.ssh
7890

79-
echo " - reinstall iputils-ping"
80-
apt install --reinstall iputils-ping
91+
unpack /filesystem/root /
92+
93+
# hack
94+
systemctl enable rpibluetooth
8195

82-
# disable GUI at start
83-
#systemctl_if_exists disable lightdm.service || true
96+
# unstable
97+
#echo "deb http://deb.debian.org/debian/ sid main" > /etc/apt/sources.list.d/sid.list
98+
#apt update
99+
#unstable=(
100+
#)
101+
#apt install -y "${unstable[@]}"
102+
#rm /etc/apt/sources.list.d/sid.list
103+
#apt update
84104

85105
# cleanup
86106
apt clean
87107
apt autoremove -y
88108

89-
unpack /filesystem/root /
109+
# /boot/version.txt
110+
version="$DIST_NAME-$DIST_VERSION"
111+
echo "writing version.txt: $version"
112+
mkdir -p slashboot
113+
echo "$version" > slashboot/version.txt
114+
unpack slashboot /boot
90115

91-
# hack
92-
systemctl enable rpibluetooth
116+
# cgroup for kubernetes
117+
sed -i -e 's#$# cgroup_memory=1 cgroup_enable=memory#' /boot/cmdline.txt

0 commit comments

Comments
 (0)
Please sign in to comment.