Compare commits

...

37 commits

Author SHA1 Message Date
Alexandre Aubin
d589845423 Disable those name supposedly 'predictive' interface names 2019-02-27 04:10:46 +01:00
Alexandre Aubin
5726f098ff Prevent dhcp from setting the 'search' thing in /etc/resolv.conf 2019-02-24 16:31:08 +01:00
Alexandre Aubin
0e9927effa Y U No Resolvconf 2019-02-18 12:18:19 +00:00
Alexandre Aubin
12dab77503 Docker build seems to be much more reliable 2019-02-18 12:09:57 +00:00
Alexandre Aubin
1279e5707c Various tweaks for 3.4.x images 2019-02-18 12:09:04 +00:00
Alexandre Aubin
ce66addbca Merge tag '2018-11-13-raspbian-stretch' into yunohost-stretch 2018-11-24 04:07:24 +01:00
Alexandre Aubin
f79e3f99db
Add note about "modprobe binfmt_misc" 2018-08-25 13:20:08 +02:00
Alexandre Aubin
c1ba025130 Merge remote-tracking branch 'upstream/master' into yunohost-stretch 2018-08-25 00:38:21 +02:00
Alexandre Aubin
29e5455f03 Ugly patch to force resize2fs when logging in for the first time 2018-08-25 00:30:59 +02:00
Alexandre Aubin
0bf50b0def Have a nice message about running the postinstall when logging in ssh if yunohost aint installed 2018-05-09 02:34:02 +02:00
Alexandre Aubin
9c161f0b35 Merge remote-tracking branch 'upstream/master' into yunohost-stretch 2018-04-29 03:40:57 +02:00
Alexandre Aubin
4e89b2ce33 Fixing the previous dirty workaround... 2018-04-07 22:53:07 +02:00
Alexandre Aubin
4f0909c49b Adding ugly hack so that script is able to unmount the rootfs/image 2018-04-03 16:03:36 +02:00
Alexandre Aubin
0204dc0793 Cleaning yunohost installation stage + install insserv 2018-04-03 16:02:23 +02:00
Alexandre Aubin
dbe4d2910e Move export flags to stage3 2018-04-03 00:49:27 +02:00
Alexandre Aubin
184c1192c5 Enable ssh for root + set default password 2018-04-03 00:46:09 +02:00
Alexandre Aubin
c89a171cb0 Add yunohost notes to the README 2018-04-02 19:18:58 +02:00
Alexandre Aubin
c346c9e92c Some cleaning after the install of yunohost 2018-04-02 19:15:23 +02:00
Alexandre Aubin
3d6cf5687e Dirty workaround to update apt's db 2018-04-02 19:14:33 +02:00
Alexandre Aubin
0edc15f89d Forgot to remove this earlier 2018-04-02 19:13:08 +02:00
Alexandre Aubin
944ca3357b Forgot to readd the prerun.sh for stage3 :| 2018-03-13 15:00:21 +01:00
Alexandre Aubin
2f67040186 Don't create a 'pi' user 2018-03-08 21:20:00 +01:00
Alexandre Aubin
b8bd921eee Fetch install script from install.yunohost.org 2018-03-08 21:18:58 +01:00
Alexandre Aubin
f7ca8d84e8 Add yunohost installation as stage3 2018-03-08 17:53:23 +00:00
Alexandre Aubin
2ea945e62b Remove stage 3, 4, 5 2018-03-08 17:50:51 +00:00
Ben Pirt
a24618a683 Allow image building to be skipped for stages (#137) 2018-01-03 12:48:31 +00:00
andig
67d95f7e82 Correct help text (#145) 2018-01-02 18:17:07 +00:00
Ben Pirt
c677ef8763 Update README with some information on how the build works (#136) 2017-12-15 11:31:40 +00:00
Serge Schneider
add380ed55 stage2: install policykit-1
Closes #116
2017-12-13 11:17:58 +00:00
Serge Schneider
6bbb29b953 Update os.json 2017-11-24 10:12:09 +00:00
Serge Schneider
9c9e4774cd Update release notes 2017-11-24 10:12:08 +00:00
Serge Schneider
a977d7e59f Round image size up to nearest 4M block 2017-11-24 10:12:08 +00:00
Serge Schneider
5bb109dd70 Remove fonts-arkpandora 2017-11-24 07:10:45 +00:00
Serge Schneider
5be9e7d156 stage2: install man-db 2017-11-24 07:10:45 +00:00
Andrew Wedgbury
294c6e7bfe Remove /etc/vnc/updateid when finalising 2017-11-22 15:49:37 +00:00
XECDesign
204f79471d Fix typo in export-image
Fixes #132
2017-11-07 05:43:01 +00:00
XECDesign
f1e0bfd6a3 Label root partition
Fixes #131
2017-11-06 10:53:05 +00:00
32 changed files with 135 additions and 172 deletions

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -1,2 +0,0 @@
# Do you accept the Wolfram - Raspberry Pi® Bundle License Agreement?
wolfram-engine shared/accepted-wolfram-eula boolean true

View file

@ -1,2 +0,0 @@
NOOBS_NAME="Raspbian Lite"
NOOBS_DESCRIPTION="A port of Debian with no desktop environment"

View file

@ -1,2 +0,0 @@
# Adobe Flash Player. Copyright 1996-2015. Adobe Systems Incorporated. All Rights Reserved.
rpi-chromium-mods rpi-chromium-mods/adobe note

View file

@ -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

View file

@ -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

View file

@ -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

View 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

View file

@ -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

View file

@ -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
View file

@ -0,0 +1,2 @@
NOOBS_NAME="YunoHost Raspbian"
NOOBS_DESCRIPTION="A port of Debian Stretch for the Raspberry Pi with YunoHost pre-installed"

View file

@ -1,2 +0,0 @@
# Enable realtime process priority?
jackd2 jackd/tweak_rt_limits boolean true

View file

@ -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

View file

@ -1,3 +0,0 @@
timidity
pi-package
realvnc-vnc-server

View file

@ -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

View file

@ -1,4 +0,0 @@
hunspell-en-gb
hyphen-en-gb
wamerican
wbritish

View file

@ -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"

View file

@ -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"

View file

@ -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/"

View file

@ -1 +0,0 @@
*.pdf

View file

@ -1,4 +0,0 @@
IMG_SUFFIX=""
if [ "${USE_QEMU}" = "1" ]; then
export IMG_SUFFIX="${IMG_SUFFIX}-qemu"
fi

View file

@ -1,2 +0,0 @@
NOOBS_NAME="Raspbian"
NOOBS_DESCRIPTION="A port of Debian with the Raspberry Pi Desktop"

View file

@ -1,5 +0,0 @@
#!/bin/bash -e
if [ ! -d "${ROOTFS_DIR}" ]; then
copy_previous
fi

View file

@ -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

View file

@ -1,3 +0,0 @@
libreoffice-pi
libreoffice-help-en-gb
libreoffice-l10n-en-gb

View file

@ -1,4 +0,0 @@
IMG_SUFFIX="-full"
if [ "${USE_QEMU}" = "1" ]; then
export IMG_SUFFIX="${IMG_SUFFIX}-qemu"
fi

View file

@ -1,2 +0,0 @@
NOOBS_NAME="Raspbian Full"
NOOBS_DESCRIPTION="A port of Debian with desktop and recommended applications"

View file

@ -1,5 +0,0 @@
#!/bin/bash -e
if [ ! -d "${ROOTFS_DIR}" ]; then
copy_previous
fi