Stripped down image, fixed broken packages

This commit is contained in:
Logan G 2020-08-20 13:58:29 -06:00
parent ac17df04b2
commit 58b3f4ca2c
Signed by: logan
GPG key ID: E328528C921E7A7A
23 changed files with 110 additions and 89 deletions

View file

@ -159,7 +159,7 @@ export ZIP_FILENAME="${ZIP_FILENAME:-"image_${IMG_DATE}-${IMG_NAME}"}"
export SCRIPT_DIR="${BASE_DIR}/scripts" export SCRIPT_DIR="${BASE_DIR}/scripts"
export WORK_DIR="${WORK_DIR:-"${BASE_DIR}/work/${IMG_DATE}-${IMG_NAME}"}" export WORK_DIR="${WORK_DIR:-"${BASE_DIR}/work/${IMG_DATE}-${IMG_NAME}"}"
export DEPLOY_DIR=${DEPLOY_DIR:-"${BASE_DIR}/deploy"} export DEPLOY_DIR=${DEPLOY_DIR:-"${BASE_DIR}/deploy"}
export DEPLOY_ZIP="${DEPLOY_ZIP:-1}" export DEPLOY_ZIP="${DEPLOY_ZIP:-2}"
export LOG_FILE="${WORK_DIR}/build.log" export LOG_FILE="${WORK_DIR}/build.log"
export TARGET_HOSTNAME=${TARGET_HOSTNAME:-raspberrypi} export TARGET_HOSTNAME=${TARGET_HOSTNAME:-raspberrypi}

View file

@ -94,6 +94,8 @@ if [ "${DEPLOY_ZIP}" == "1" ]; then
zip "${DEPLOY_DIR}/${ZIP_FILENAME}${IMG_SUFFIX}.zip" \ zip "${DEPLOY_DIR}/${ZIP_FILENAME}${IMG_SUFFIX}.zip" \
"$(basename "${IMG_FILE}")" "$(basename "${IMG_FILE}")"
popd > /dev/null popd > /dev/null
elif [ "${DEPLOY_ZIP}" == "2" ]; then
xz -z -c -T$(nproc) "$IMG_FILE" > "${DEPLOY_DIR}/${IMG_FILENAME}${IMG_SUFFIX}.img.xz"
else else
cp "$IMG_FILE" "$DEPLOY_DIR" cp "$IMG_FILE" "$DEPLOY_DIR"
fi fi

View file

@ -9,7 +9,7 @@ if ! id -u ${FIRST_USER_NAME} >/dev/null 2>&1; then
adduser --disabled-password --gecos "" ${FIRST_USER_NAME} adduser --disabled-password --gecos "" ${FIRST_USER_NAME}
fi fi
echo "${FIRST_USER_NAME}:${FIRST_USER_PASS}" | chpasswd echo "${FIRST_USER_NAME}:${FIRST_USER_PASS}" | chpasswd
echo "root:root" | chpasswd echo "root:$(cat /dev/urandom | tr -dc _A-Z-a-z-0-9 | head -c40)" | chpasswd
EOF EOF

View file

@ -1,13 +1,36 @@
ssh less fbset sudo psmisc strace ed ncdu crda ssh
console-setup keyboard-configuration debconf-utils parted unzip less
build-essential manpages-dev python bash-completion gdb pkg-config fbset
python-rpi.gpio v4l-utils sudo
psmisc
strace
ed
ncdu
crda
console-setup
keyboard-configuration
debconf-utils
parted
unzip
build-essential
git
manpages-dev
python
bash-completion
gdb
pkg-config
python-rpi.gpio
v4l-utils
avahi-daemon avahi-daemon
lua5.1 hardlink
luajit ca-certificates
hardlink ca-certificates curl curl
fake-hwclock nfs-common usbutils fake-hwclock
libraspberrypi-dev libraspberrypi-doc libfreetype6-dev nfs-common
usbutils
libraspberrypi-dev
libraspberrypi-doc
libfreetype6-dev
dosfstools dosfstools
dphys-swapfile dphys-swapfile
raspberrypi-sys-mods raspberrypi-sys-mods
@ -29,3 +52,6 @@ ntfs-3g
pciutils pciutils
rpi-eeprom rpi-eeprom
raspinfo raspinfo
rfkill
vim
unattended-upgrades

View file

@ -54,3 +54,12 @@ usermod --pass='*' root
EOF EOF
rm -f "${ROOTFS_DIR}/etc/ssh/"ssh_host_*_key* rm -f "${ROOTFS_DIR}/etc/ssh/"ssh_host_*_key*
rm -f "${ROOTFS_DIR}/etc/sudoers.d/010_pi-nopasswd" # Fuck you :)
echo "%sudo ALL=(ALL:ALL) ALL" > ${ROOTFS_DIR}/etc/sudoers.d/group
on_chroot << EOF
echo unattended-upgrades unattended-upgrades/enable_auto_updates boolean true | debconf-set-selections
dpkg-reconfigure -f noninteractive unattended-upgrades
EOF

View file

@ -1,4 +1,9 @@
wpasupplicant wireless-tools firmware-atheros firmware-brcm80211 firmware-libertas firmware-misc-nonfree firmware-realtek wpasupplicant
raspberrypi-net-mods wireless-tools
dhcpcd5 firmware-atheros
firmware-brcm80211
firmware-libertas
firmware-misc-nonfree
firmware-realtek
net-tools net-tools
network-manager

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

@ -8,13 +8,20 @@ qpdfview
gtk2-engines gtk2-engines
alsa-utils alsa-utils
desktop-base desktop-base
git
raspberrypi-artwork raspberrypi-artwork
policykit-1 policykit-1
lxqt-policykit
gvfs gvfs
rfkill
gldriver-test gldriver-test
fonts-droid-fallback fonts-droid-fallback
fonts-liberation2 fonts-liberation2
obconf obconf
arandr arandr
xfce4
xfce4-goodies
xfce4-pulseaudio-plugin
mate-screensaver
qt5ct
lxappearance
xcompmgr
firefox-esr

View file

@ -6,6 +6,6 @@ zenity
xdg-utils xdg-utils
gvfs-backends gvfs-backends
gvfs-fuse gvfs-fuse
lightdm sddm
gnome-themes-standard gnome-themes-standard
gnome-icon-theme gnome-icon-theme

View file

@ -1,8 +1,9 @@
#!/bin/bash -e #!/bin/bash -e
on_chroot << EOF on_chroot << EOF
systemctl enable sddm
update-alternatives --install /usr/bin/x-www-browser \ update-alternatives --install /usr/bin/x-www-browser \
x-www-browser /usr/bin/chromium-browser 86 x-www-browser /usr/bin/firefox-esr 86
update-alternatives --install /usr/bin/gnome-www-browser \ update-alternatives --install /usr/bin/gnome-www-browser \
gnome-www-browser /usr/bin/chromium-browser 86 gnome-www-browser /usr/bin/firefox-esr 86
EOF EOF

4
stage3/EXPORT_IMAGE Normal file
View file

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

View file

@ -1,25 +1,22 @@
python python3-pygame python-pygame python-tk python3-pygame
python3 python3-tk thonny python3
python3-tk
python3-pgzero python3-pgzero
python-serial python3-serial python3-serial
python-picamera python3-picamera python3-picamera
debian-reference-en dillo debian-reference-en dillo
raspberrypi-net-mods raspberrypi-ui-mods raspberrypi-ui-mods
python-pip python3-pip python3-pip
python3-numpy
pypy
alacarte rc-gui sense-hat alacarte rc-gui sense-hat
tree tree
libgl1-mesa-dri libgles1 libgles2-mesa xcompmgr libgl1-mesa-dri libgles1 libgles2-mesa
geany wiringpi pigpio python3-pigpio raspi-gpio python3-gpiozero python3-rpi.gpio
piclone python3-spidev
wiringpi pigpio python-pigpio python3-pigpio raspi-gpio python-gpiozero python3-gpiozero python3-rpi.gpio python3-twython
python-spidev python3-spidev python3-smbus
python-twython python3-twython python3-flask
python-smbus python3-smbus
python-flask python3-flask
pprompt pprompt
piwiz piwiz
rp-prefapps rp-prefapps
ffmpeg ffmpeg
vlc mpv

View file

@ -1,2 +1 @@
pi-package pi-package
realvnc-vnc-server

View file

@ -1,22 +1,22 @@
python-automationhat python3-automationhat python3-automationhat
python-blinkt python3-blinkt python3-blinkt
python-cap1xxx python3-cap1xxx python3-cap1xxx
python-drumhat python3-drumhat python3-drumhat
python-envirophat python3-envirophat python3-envirophat
python-explorerhat python3-explorerhat python3-explorerhat
python-fourletterphat python3-fourletterphat python3-fourletterphat
python-microdotphat python3-microdotphat python3-microdotphat
python-mote python3-mote python3-mote
python-motephat python3-motephat python3-motephat
python-phatbeat python3-phatbeat python3-phatbeat
python-pianohat python3-pianohat python3-pianohat
python-piglow python3-piglow python3-piglow
python-rainbowhat python3-rainbowhat python3-rainbowhat
python-scrollphat python3-scrollphat python3-scrollphat
python-scrollphathd python3-scrollphathd python3-scrollphathd
python-sn3218 python3-sn3218 python3-sn3218
python-skywriter python3-skywriter python3-skywriter
python-touchphat python3-touchphat python3-touchphat
python-buttonshim python3-buttonshim python3-buttonshim
python-unicornhathd python3-unicornhathd python3-unicornhathd
python-pantilthat python3-pantilthat python3-pantilthat

View file

@ -1,5 +0,0 @@
#!/bin/bash -e
on_chroot << EOF
SUDO_USER="${FIRST_USER_NAME}" raspi-config nonint do_boot_behaviour B4
EOF

View file

@ -1,15 +0,0 @@
#!/bin/sh -e
BOOKSHELF_URL="https://magpi.raspberrypi.org/bookshelf.xml"
GUIDE_URL="$(curl -s "$BOOKSHELF_URL" | awk -F '[<>]' "/<TITLE>Raspberry Pi Beginner's Guide v3<\/TITLE>/ {f=1; next} f==1 && /PDF/ {print \$3; exit}")"
OUTPUT="$(basename "$GUIDE_URL" | cut -f1 -d'?')"
if [ ! -f "files/$OUTPUT" ]; then
rm files/*.pdf -f
curl -s "$GUIDE_URL" -o "files/$OUTPUT"
fi
file "files/$OUTPUT" | grep -q "PDF document"
install -v -o 1000 -g 1000 -d "${ROOTFS_DIR}/home/${FIRST_USER_NAME}/Bookshelf"
install -v -o 1000 -g 1000 -m 644 "files/$OUTPUT" "${ROOTFS_DIR}/home/${FIRST_USER_NAME}/Bookshelf/"

View file

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

View file

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

View file

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

View file

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