Compare commits
37 commits
yunohost-b
...
yunohost-s
Author | SHA1 | Date | |
---|---|---|---|
|
d589845423 | ||
|
5726f098ff | ||
|
0e9927effa | ||
|
12dab77503 | ||
|
1279e5707c | ||
|
ce66addbca | ||
|
f79e3f99db | ||
|
c1ba025130 | ||
|
29e5455f03 | ||
|
0bf50b0def | ||
|
9c161f0b35 | ||
|
4e89b2ce33 | ||
|
4f0909c49b | ||
|
0204dc0793 | ||
|
dbe4d2910e | ||
|
184c1192c5 | ||
|
c89a171cb0 | ||
|
c346c9e92c | ||
|
3d6cf5687e | ||
|
0edc15f89d | ||
|
944ca3357b | ||
|
2f67040186 | ||
|
b8bd921eee | ||
|
f7ca8d84e8 | ||
|
2ea945e62b | ||
|
a24618a683 | ||
|
67d95f7e82 | ||
|
c677ef8763 | ||
|
add380ed55 | ||
|
6bbb29b953 | ||
|
9c9e4774cd | ||
|
a977d7e59f | ||
|
5bb109dd70 | ||
|
5be9e7d156 | ||
|
294c6e7bfe | ||
|
204f79471d | ||
|
f1e0bfd6a3 |
32 changed files with 135 additions and 172 deletions
20
README.md
20
README.md
|
@ -2,6 +2,25 @@
|
|||
|
||||
_Tool used to create the raspberrypi.org Raspbian images_
|
||||
|
||||
## YunoHost notes
|
||||
|
||||
This branch keeps the stage 0, 1 and 2 to build a lite raspbian image,
|
||||
then stage 3 corresponds to the YunoHost install.
|
||||
|
||||
The build was found to run correctly with :
|
||||
- A 2 GB Digital Ocean VPS running Ubuntu Xenial 16.04 x64
|
||||
- debootstrap 1.0.93 (c.f. https://packages.debian.org/buster/all/debootstrap/download )
|
||||
- qemu-user-static 2.8 (c.f. https://packages.debian.org/stretch/amd64/qemu-user-static/download )
|
||||
- `modprobe binfmt_misc` if there are some issue with debootstrap
|
||||
- Gotta install docker-ce ... following the official doc :s
|
||||
|
||||
To run the build, git clone this repo/branch, install the dependencies, then run :
|
||||
|
||||
```
|
||||
export IMG_NAME="yunohost"
|
||||
export USE_QEMU="1"
|
||||
./build-docker.sh
|
||||
```
|
||||
|
||||
## Dependencies
|
||||
|
||||
|
@ -111,7 +130,6 @@ The following process is followed to build images:
|
|||
separated, per line.
|
||||
|
||||
- **00-packages-nr** - As 00-packages, except these will be installed using
|
||||
the ```--no-install-recommends -y``` parameters to apt-get.
|
||||
|
||||
- **00-patches** - A directory containing patch files to be applied, using quilt.
|
||||
If a file named 'EDIT' is present in the directory, the build process will
|
||||
|
|
|
@ -95,7 +95,7 @@ export -f on_chroot
|
|||
update_issue() {
|
||||
local GIT_HASH
|
||||
GIT_HASH=$(git rev-parse HEAD)
|
||||
echo -e "Raspberry Pi reference ${IMG_DATE}\nGenerated using pi-gen, https://github.com/RPi-Distro/pi-gen, ${GIT_HASH}, ${1}" > "${ROOTFS_DIR}/etc/rpi-issue"
|
||||
echo -e "YunoHost image for Raspberry Pi\nGenerated using https://github.com/YunoHost/rpi-image, ${GIT_HASH}, ${1}" > "${ROOTFS_DIR}/etc/rpi-issue"
|
||||
}
|
||||
export -f update_issue
|
||||
|
||||
|
|
|
@ -5,10 +5,6 @@ install -m 644 files/noclear.conf "${ROOTFS_DIR}/etc/systemd/system/getty@tty1.s
|
|||
install -v -m 644 files/fstab "${ROOTFS_DIR}/etc/fstab"
|
||||
|
||||
on_chroot << EOF
|
||||
if ! id -u pi >/dev/null 2>&1; then
|
||||
adduser --disabled-password --gecos "" pi
|
||||
fi
|
||||
echo "pi:raspberry" | chpasswd
|
||||
echo "root:root" | chpasswd
|
||||
EOF
|
||||
|
||||
|
|
|
@ -36,9 +36,6 @@ on_chroot << \EOF
|
|||
for GRP in input spi i2c gpio; do
|
||||
groupadd -f -r "$GRP"
|
||||
done
|
||||
for GRP in adm dialout cdrom audio users sudo video games plugdev input gpio spi i2c netdev; do
|
||||
adduser pi $GRP
|
||||
done
|
||||
EOF
|
||||
|
||||
on_chroot << EOF
|
||||
|
@ -50,3 +47,10 @@ usermod --pass='*' root
|
|||
EOF
|
||||
|
||||
rm -f "${ROOTFS_DIR}/etc/ssh/"ssh_host_*_key*
|
||||
|
||||
|
||||
# Dirty hack, ... otherwise the build script says in the next step that it cant
|
||||
# install wpasupplicant...
|
||||
on_chroot << EOF
|
||||
apt-get update
|
||||
EOF
|
||||
|
|
|
@ -1,2 +0,0 @@
|
|||
# Do you accept the Wolfram - Raspberry Pi® Bundle License Agreement?
|
||||
wolfram-engine shared/accepted-wolfram-eula boolean true
|
|
@ -1,2 +0,0 @@
|
|||
NOOBS_NAME="Raspbian Lite"
|
||||
NOOBS_DESCRIPTION="A port of Debian with no desktop environment"
|
|
@ -1,2 +0,0 @@
|
|||
# Adobe Flash Player. Copyright 1996-2015. Adobe Systems Incorporated. All Rights Reserved.
|
||||
rpi-chromium-mods rpi-chromium-mods/adobe note
|
|
@ -1,14 +0,0 @@
|
|||
gstreamer1.0-x gstreamer1.0-omx gstreamer1.0-plugins-base gstreamer1.0-plugins-good gstreamer1.0-plugins-bad gstreamer1.0-alsa gstreamer1.0-libav
|
||||
qpdfview gtk2-engines alsa-utils
|
||||
desktop-base
|
||||
git
|
||||
omxplayer
|
||||
raspberrypi-artwork
|
||||
policykit-1
|
||||
gvfs
|
||||
rfkill
|
||||
chromium-browser rpi-chromium-mods
|
||||
gldriver-test
|
||||
fonts-droid-fallback
|
||||
fonts-liberation2
|
||||
obconf
|
|
@ -1,6 +0,0 @@
|
|||
xserver-xorg-video-fbdev xserver-xorg xinit xserver-xorg-video-fbturbo
|
||||
epiphany-browser
|
||||
lxde lxtask menu-xdg gksu
|
||||
netsurf-gtk zenity xdg-utils
|
||||
gvfs-backends gvfs-fuse
|
||||
lightdm gnome-themes-standard-data gnome-icon-theme
|
|
@ -1,8 +0,0 @@
|
|||
#!/bin/bash -e
|
||||
|
||||
on_chroot << EOF
|
||||
update-alternatives --install /usr/bin/x-www-browser \
|
||||
x-www-browser /usr/bin/chromium-browser 86
|
||||
update-alternatives --install /usr/bin/gnome-www-browser \
|
||||
gnome-www-browser /usr/bin/chromium-browser 86
|
||||
EOF
|
71
stage3/00-install-yunohost/00-run.sh
Executable file
71
stage3/00-install-yunohost/00-run.sh
Executable file
|
@ -0,0 +1,71 @@
|
|||
#!/bin/bash -e
|
||||
|
||||
# Prevent dhcp setting the "search" thing in /etc/resolv.conf, leads to many
|
||||
# weird stuff (e.g. with numericable) where any domain will ping >.>
|
||||
on_chroot << EOF
|
||||
echo 'supersede domain-name "";' >> /etc/dhcp/dhclient.conf
|
||||
echo 'supersede domain-search "";' >> /etc/dhcp/dhclient.conf
|
||||
echo 'supersede search ""; ' >> /etc/dhcp/dhclient.conf
|
||||
EOF
|
||||
|
||||
# Disable those damn supposedly "predictive" interface names
|
||||
# c.f. https://unix.stackexchange.com/a/338730
|
||||
on_chroot << EOF
|
||||
ln -s /dev/null /etc/systemd/network/99-default.link
|
||||
EOF
|
||||
|
||||
# Avahi and mysql/mariadb needs to do some stuff which conflicts with
|
||||
# the "change the root password asap" so we disable it. In fact, now
|
||||
# that YunoHost 3.3 syncs the password with admin password at
|
||||
# postinstall we are happy with not triggering a password change at
|
||||
# first boot. Assuming that ARM-boards won't be exposed to global
|
||||
# network right after booting the first time ...
|
||||
on_chroot << EOF
|
||||
chage -d 99999999 root
|
||||
EOF
|
||||
|
||||
# Run the actual install
|
||||
on_chroot << EOF
|
||||
apt-get install insserv resolvconf -y
|
||||
curl https://install.yunohost.org/stretch | bash -s -- -a
|
||||
rm -f /etc/ssh/ssh_host_*
|
||||
EOF
|
||||
|
||||
echo "Enabling ssh login for root + setting default password"
|
||||
on_chroot << EOF
|
||||
touch /boot/ssh
|
||||
sed -i '/PermitRootLogin/c\PermitRootLogin yes' /etc/ssh/sshd_config
|
||||
echo "root:yunohost" | chpasswd
|
||||
EOF
|
||||
|
||||
install -m 755 files/check_yunohost_is_installed.sh "${ROOTFS_DIR}/etc/profile.d/"
|
||||
|
||||
echo "Cleaning ..."
|
||||
on_chroot << EOF
|
||||
apt-get clean
|
||||
find /var/log -type f -exec rm {} \;
|
||||
EOF
|
||||
|
||||
# Gotta manually kill those stuff which are some sort of daemon running
|
||||
# for slapd / nscd / nslcd ... otherwise the script is unable to unmount
|
||||
# the rootfs/image after that ?
|
||||
while lsof 2>/dev/null | grep -q /root/rpi-image/work/*/export-image/rootfs/dev;
|
||||
do
|
||||
for PID in `ps -ef --forest | grep "qemu-arm-static" | grep -v "grep" | grep "nginx\|nscd\|slapd\|nslcd" | awk '{print $2}'`
|
||||
do
|
||||
echo "Killing $PID"
|
||||
kill -9 $PID || true
|
||||
sleep 1
|
||||
done
|
||||
sleep 5
|
||||
done
|
||||
while ps -ef --forest | grep "qemu-arm-static" | grep -v "grep"
|
||||
do
|
||||
for PID in `ps -ef --forest | grep "qemu-arm-static" | grep -v "grep" | grep "nginx\|nscd\|slapd\|nslcd" | awk '{print $2}'`
|
||||
do
|
||||
echo "Killing $PID"
|
||||
kill -9 $PID || true
|
||||
sleep 1
|
||||
done
|
||||
sleep 5
|
||||
done
|
|
@ -0,0 +1,35 @@
|
|||
#!/bin/sh
|
||||
|
||||
if [ -n "$BASH_VERSION" ] && [ "$-" != "${-#*i}" ]; then
|
||||
|
||||
# Trigger resize2fs_once in case it wasnt triggered so far ...
|
||||
if [ -f "/etc/init.d/resize2fs_once" ];
|
||||
then
|
||||
systemctl restart resize2fs_once
|
||||
fi
|
||||
|
||||
if [ ! -f "/etc/yunohost/installed" ];
|
||||
then
|
||||
normal=$(printf '\033[0m')
|
||||
bold=$(printf '\033[1m')
|
||||
blue=$(printf '\033[34m')
|
||||
|
||||
IPS=$(hostname --all-ip-address | sed 's/ /\n /g')
|
||||
cat << EOF
|
||||
======================================================================
|
||||
${bold}${blue}
|
||||
Congratulations on setting up your YunoHost server !
|
||||
${normal}${bold}
|
||||
To finish the installation, you should run the postinstallation.
|
||||
You can find documentation about it on :${normal}
|
||||
https://yunohost.org/postinstall
|
||||
${normal}${bold}
|
||||
You can run it from the command line interface with :${normal}
|
||||
$ yunohost tools postinstall
|
||||
${normal}${bold}
|
||||
Or from a browser by accessing one of your local IP :${normal}
|
||||
$IPS${normal}
|
||||
======================================================================
|
||||
EOF
|
||||
fi
|
||||
fi
|
|
@ -1,3 +0,0 @@
|
|||
#!/bin/bash -e
|
||||
|
||||
rm -f "${ROOTFS_DIR}/etc/systemd/system/dhcpcd.service.d/wait.conf"
|
2
stage3/EXPORT_NOOBS
Normal file
2
stage3/EXPORT_NOOBS
Normal file
|
@ -0,0 +1,2 @@
|
|||
NOOBS_NAME="YunoHost Raspbian"
|
||||
NOOBS_DESCRIPTION="A port of Debian Stretch for the Raspberry Pi with YunoHost pre-installed"
|
|
@ -1,2 +0,0 @@
|
|||
# Enable realtime process priority?
|
||||
jackd2 jackd/tweak_rt_limits boolean true
|
|
@ -1,27 +0,0 @@
|
|||
java-common oracle-java8-jdk
|
||||
python idle python3-pygame python-pygame python-tk
|
||||
python3 idle3 python3-tk
|
||||
python3-pgzero
|
||||
python-serial python3-serial
|
||||
python-picamera python3-picamera
|
||||
debian-reference-en dillo
|
||||
raspberrypi-net-mods raspberrypi-ui-mods
|
||||
python-pip python3-pip
|
||||
python3-numpy
|
||||
pypy
|
||||
alacarte rc-gui sense-hat
|
||||
tree
|
||||
libgl1-mesa-dri libgles1-mesa libgles2-mesa xcompmgr
|
||||
geany
|
||||
piclone
|
||||
wiringpi pigpio python-pigpio python3-pigpio raspi-gpio python-gpiozero python3-gpiozero python3-rpi.gpio
|
||||
python-spidev python3-spidev
|
||||
python-twython python3-twython
|
||||
python-smbus python3-smbus
|
||||
python-flask python3-flask
|
||||
python-picraft python3-picraft
|
||||
pprompt
|
||||
piwiz
|
||||
rp-prefapps
|
||||
libav-tools
|
||||
vlc
|
|
@ -1,3 +0,0 @@
|
|||
timidity
|
||||
pi-package
|
||||
realvnc-vnc-server
|
|
@ -1,22 +0,0 @@
|
|||
python-automationhat python3-automationhat
|
||||
python-blinkt python3-blinkt
|
||||
python-cap1xxx python3-cap1xxx
|
||||
python-drumhat python3-drumhat
|
||||
python-envirophat python3-envirophat
|
||||
python-explorerhat python3-explorerhat
|
||||
python-fourletterphat python3-fourletterphat
|
||||
python-microdotphat python3-microdotphat
|
||||
python-mote python3-mote
|
||||
python-motephat python3-motephat
|
||||
python-phatbeat python3-phatbeat
|
||||
python-pianohat python3-pianohat
|
||||
python-piglow python3-piglow
|
||||
python-rainbowhat python3-rainbowhat
|
||||
python-scrollphat python3-scrollphat
|
||||
python-scrollphathd python3-scrollphathd
|
||||
python-sn3218 python3-sn3218
|
||||
python-skywriter python3-skywriter
|
||||
python-touchphat python3-touchphat
|
||||
python-buttonshim python3-buttonshim
|
||||
python-unicornhathd python3-unicornhathd
|
||||
python-pantilthat python3-pantilthat
|
|
@ -1,4 +0,0 @@
|
|||
hunspell-en-gb
|
||||
hyphen-en-gb
|
||||
wamerican
|
||||
wbritish
|
|
@ -1,4 +0,0 @@
|
|||
#!/bin/bash -e
|
||||
|
||||
ln -sf /etc/systemd/system/autologin@.service \
|
||||
"${ROOTFS_DIR}/etc/systemd/system/getty.target.wants/getty@tty1.service"
|
|
@ -1,7 +0,0 @@
|
|||
#!/bin/bash -e
|
||||
|
||||
#Alacarte fixes
|
||||
install -v -o 1000 -g 1000 -d "${ROOTFS_DIR}/home/pi/.local"
|
||||
install -v -o 1000 -g 1000 -d "${ROOTFS_DIR}/home/pi/.local/share"
|
||||
install -v -o 1000 -g 1000 -d "${ROOTFS_DIR}/home/pi/.local/share/applications"
|
||||
install -v -o 1000 -g 1000 -d "${ROOTFS_DIR}/home/pi/.local/share/desktop-directories"
|
|
@ -1,16 +0,0 @@
|
|||
#!/bin/sh -e
|
||||
|
||||
magpi_regex="MagPi[[:digit:]]*.pdf"
|
||||
magpi_loc="https://www.raspberrypi.org/magpi-issues"
|
||||
magpi_latest="$(curl "$magpi_loc/?C=M;O=D" -s | grep "$magpi_regex" -m 1 -o | head -n 1)"
|
||||
|
||||
if [ ! -f "files/$magpi_latest" ]; then
|
||||
find files/ -regextype grep -regex "files/$magpi_regex" -delete
|
||||
wget "$magpi_loc/$magpi_latest" -O "files/$magpi_latest"
|
||||
fi
|
||||
|
||||
file "files/$magpi_latest" | grep -q "PDF document"
|
||||
|
||||
install -v -o 1000 -g 1000 -d "${ROOTFS_DIR}/home/pi/MagPi"
|
||||
install -v -o 1000 -g 1000 -m 644 "files/$magpi_latest" "${ROOTFS_DIR}/home/pi/MagPi/"
|
||||
|
1
stage4/03-magpi/files/.gitignore
vendored
1
stage4/03-magpi/files/.gitignore
vendored
|
@ -1 +0,0 @@
|
|||
*.pdf
|
|
@ -1,4 +0,0 @@
|
|||
IMG_SUFFIX=""
|
||||
if [ "${USE_QEMU}" = "1" ]; then
|
||||
export IMG_SUFFIX="${IMG_SUFFIX}-qemu"
|
||||
fi
|
|
@ -1,2 +0,0 @@
|
|||
NOOBS_NAME="Raspbian"
|
||||
NOOBS_DESCRIPTION="A port of Debian with the Raspberry Pi Desktop"
|
|
@ -1,5 +0,0 @@
|
|||
#!/bin/bash -e
|
||||
|
||||
if [ ! -d "${ROOTFS_DIR}" ]; then
|
||||
copy_previous
|
||||
fi
|
|
@ -1,15 +0,0 @@
|
|||
python3-thonny
|
||||
sonic-pi
|
||||
scratch nuscratch scratch2
|
||||
smartsim
|
||||
|
||||
minecraft-pi python-minecraftpi
|
||||
python-sense-emu sense-emu-tools python-sense-emu-doc
|
||||
|
||||
wolfram-engine
|
||||
claws-mail
|
||||
greenfoot bluej
|
||||
nodered
|
||||
realvnc-vnc-viewer
|
||||
|
||||
python-games
|
|
@ -1,3 +0,0 @@
|
|||
libreoffice-pi
|
||||
libreoffice-help-en-gb
|
||||
libreoffice-l10n-en-gb
|
|
@ -1,4 +0,0 @@
|
|||
IMG_SUFFIX="-full"
|
||||
if [ "${USE_QEMU}" = "1" ]; then
|
||||
export IMG_SUFFIX="${IMG_SUFFIX}-qemu"
|
||||
fi
|
|
@ -1,2 +0,0 @@
|
|||
NOOBS_NAME="Raspbian Full"
|
||||
NOOBS_DESCRIPTION="A port of Debian with desktop and recommended applications"
|
|
@ -1,5 +0,0 @@
|
|||
#!/bin/bash -e
|
||||
|
||||
if [ ! -d "${ROOTFS_DIR}" ]; then
|
||||
copy_previous
|
||||
fi
|
Loading…
Reference in a new issue