First full build
This commit is contained in:
5
build.sh
5
build.sh
@@ -198,15 +198,16 @@ if [ -z "${DEPLOY_COMPRESSION}" ] && [ "${DEPLOY_ZIP:-1}" = "0" ]; then
|
||||
echo "Please update your config file"
|
||||
DEPLOY_COMPRESSION=none
|
||||
fi
|
||||
export DEPLOY_COMPRESSION=${DEPLOY_COMPRESSION:-zip}
|
||||
export DEPLOY_COMPRESSION=${DEPLOY_COMPRESSION:-xz}
|
||||
export COMPRESSION_LEVEL=${COMPRESSION_LEVEL:-6}
|
||||
export LOG_FILE="${WORK_DIR}/build.log"
|
||||
|
||||
export TARGET_HOSTNAME=${TARGET_HOSTNAME:-raspberrypi}
|
||||
|
||||
export FIRST_USER_NAME=${FIRST_USER_NAME:-setup}
|
||||
export FIRST_USER_NAME=${FIRST_USER_NAME:-system}
|
||||
export FIRST_USER_PASS
|
||||
export DISABLE_FIRST_BOOT_USER_RENAME=${DISABLE_FIRST_BOOT_USER_RENAME:-0}
|
||||
export FIRST_USER_ISSYSTEM=${FIRST_USER_ISSYSTEM:-true}
|
||||
export WPA_COUNTRY
|
||||
export ENABLE_SSH="${ENABLE_SSH:-0}"
|
||||
export PUBKEY_ONLY_SSH="${PUBKEY_ONLY_SSH:-0}"
|
||||
|
@@ -1 +1 @@
|
||||
userconf-pi
|
||||
#userconf-pi
|
||||
|
@@ -1,9 +1,9 @@
|
||||
#!/bin/bash -e
|
||||
|
||||
if [[ "${DISABLE_FIRST_BOOT_USER_RENAME}" == "0" ]]; then
|
||||
on_chroot <<- EOF
|
||||
SUDO_USER="${FIRST_USER_NAME}" rename-user -f -s
|
||||
EOF
|
||||
else
|
||||
rm -f "${ROOTFS_DIR}/etc/xdg/autostart/piwiz.desktop"
|
||||
fi
|
||||
#if [[ "${DISABLE_FIRST_BOOT_USER_RENAME}" == "0" ]]; then
|
||||
# on_chroot <<- EOF
|
||||
# SUDO_USER="${FIRST_USER_NAME}" rename-user -f -s
|
||||
# EOF
|
||||
#else
|
||||
# rm -f "${ROOTFS_DIR}/etc/xdg/autostart/piwiz.desktop"
|
||||
#fi
|
||||
|
@@ -3,8 +3,8 @@
|
||||
rm -f "${ROOTFS_DIR}/etc/apt/apt.conf.d/51cache"
|
||||
find "${ROOTFS_DIR}/var/lib/apt/lists/" -type f -delete
|
||||
on_chroot << EOF
|
||||
apt-file update
|
||||
apt-get update
|
||||
apt-get -y dist-upgrade --auto-remove --purge
|
||||
apt-get clean
|
||||
apt-file update
|
||||
EOF
|
||||
|
@@ -6,8 +6,10 @@ IMGID="$(dd if="${IMG_FILE}" skip=440 bs=1 count=4 2>/dev/null | xxd -e | cut -f
|
||||
|
||||
BOOT_PARTUUID="${IMGID}-01"
|
||||
ROOT_PARTUUID="${IMGID}-02"
|
||||
#HOME_PARTUUID="${IMGID}-03"
|
||||
|
||||
sed -i "s/BOOTDEV/PARTUUID=${BOOT_PARTUUID}/" "${ROOTFS_DIR}/etc/fstab"
|
||||
sed -i "s/ROOTDEV/PARTUUID=${ROOT_PARTUUID}/" "${ROOTFS_DIR}/etc/fstab"
|
||||
#sed -i "s/HOMEDEV/PARTUUID=${HOME_PARTUUID}/" "${ROOTFS_DIR}/etc/fstab"
|
||||
|
||||
sed -i "s/ROOTDEV/PARTUUID=${ROOT_PARTUUID}/" "${ROOTFS_DIR}/boot/firmware/cmdline.txt"
|
||||
|
@@ -19,9 +19,9 @@ if [ -f "${ROOTFS_DIR}/etc/initramfs-tools/update-initramfs.conf" ]; then
|
||||
sed -i 's/^MODULES=.*/MODULES=dep/' "${ROOTFS_DIR}/etc/initramfs-tools/initramfs.conf"
|
||||
fi
|
||||
|
||||
if [ -d "${ROOTFS_DIR}/home/${FIRST_USER_NAME}/.config" ]; then
|
||||
chmod 700 "${ROOTFS_DIR}/home/${FIRST_USER_NAME}/.config"
|
||||
fi
|
||||
#if [ -d "${ROOTFS_DIR}/home/${FIRST_USER_NAME}/.config" ]; then
|
||||
# chmod 700 "${ROOTFS_DIR}/home/${FIRST_USER_NAME}/.config"
|
||||
#fi
|
||||
|
||||
rm -f "${ROOTFS_DIR}/usr/bin/qemu-arm-static"
|
||||
|
||||
|
@@ -18,7 +18,7 @@ ALIGN="$((4 * 1024 * 1024))"
|
||||
# some overhead (since actual space usage is usually rounded up to the
|
||||
# filesystem block size) and gives some free space on the resulting
|
||||
# image.
|
||||
ROOT_MARGIN="$(echo "($ROOT_SIZE * 0.2 + 200 * 1024 * 1024) / 1" | bc)"
|
||||
ROOT_MARGIN="$(echo "($ROOT_SIZE * 0.2 + 400 * 1024 * 1024) / 1" | bc)"
|
||||
|
||||
BOOT_PART_START=$((ALIGN))
|
||||
BOOT_PART_SIZE=$(((BOOT_SIZE + ALIGN - 1) / ALIGN * ALIGN))
|
||||
|
@@ -12,7 +12,6 @@ bootstrap(){
|
||||
BOOTSTRAP_ARGS+=(--arch arm64)
|
||||
BOOTSTRAP_ARGS+=(--include gnupg)
|
||||
BOOTSTRAP_ARGS+=(--components "main,contrib,non-free")
|
||||
#BOOTSTRAP_ARGS+=(--keyring "${STAGE_DIR}/files/raspberrypi.gpg")
|
||||
BOOTSTRAP_ARGS+=(--exclude=info,ifupdown)
|
||||
BOOTSTRAP_ARGS+=(--include=ca-certificates)
|
||||
BOOTSTRAP_ARGS+=("$@")
|
||||
|
@@ -1,12 +1,14 @@
|
||||
#!/bin/bash -e
|
||||
|
||||
# Configure apt sources
|
||||
install -m 644 files/sources.list "${ROOTFS_DIR}/etc/apt/"
|
||||
install -m 644 files/raspi.list "${ROOTFS_DIR}/etc/apt/sources.list.d/"
|
||||
#install -m 644 files/oxmc.list "${ROOTFS_DIR}/etc/apt/sources.list.d/"
|
||||
install -m 644 files/oxmc.list "${ROOTFS_DIR}/etc/apt/sources.list.d/"
|
||||
sed -i "s/RELEASE/${RELEASE}/g" "${ROOTFS_DIR}/etc/apt/sources.list"
|
||||
sed -i "s/RELEASE/${RELEASE}/g" "${ROOTFS_DIR}/etc/apt/sources.list.d/raspi.list"
|
||||
#sed -i "s/RELEASE/${RELEASE}/g" "${ROOTFS_DIR}/etc/apt/sources.list.d/oxmc.list"
|
||||
sed -i "s/RELEASE/${RELEASE}/g" "${ROOTFS_DIR}/etc/apt/sources.list.d/oxmc.list"
|
||||
|
||||
# Configure apt proxy
|
||||
if [ -n "$APT_PROXY" ]; then
|
||||
install -m 644 files/51cache "${ROOTFS_DIR}/etc/apt/apt.conf.d/51cache"
|
||||
sed "${ROOTFS_DIR}/etc/apt/apt.conf.d/51cache" -i -e "s|APT_PROXY|${APT_PROXY}|"
|
||||
@@ -14,10 +16,18 @@ else
|
||||
rm -f "${ROOTFS_DIR}/etc/apt/apt.conf.d/51cache"
|
||||
fi
|
||||
|
||||
# Configure apt preferences
|
||||
install -m 644 files/apt-chillcraftos-prefs "${ROOTFS_DIR}/etc/apt/preferences.d/"
|
||||
|
||||
# Add raspberrypi-archive-keyring to apt
|
||||
cat files/raspberrypi.gpg.key | gpg --dearmor > "${STAGE_WORK_DIR}/raspberrypi-archive-stable.gpg"
|
||||
install -m 644 "${STAGE_WORK_DIR}/raspberrypi-archive-stable.gpg" "${ROOTFS_DIR}/etc/apt/trusted.gpg.d/"
|
||||
#cat files/oxmc.gpg.key | gpg --dearmor > "${STAGE_WORK_DIR}/oxmc.gpg"
|
||||
#install -m 644 "${STAGE_WORK_DIR}/oxmc.gpg" "${ROOTFS_DIR}/etc/apt/trusted.gpg.d/"
|
||||
|
||||
# Add oxmc-archive-keyring to apt
|
||||
cat files/oxmc.gpg.key | gpg --dearmor > "${STAGE_WORK_DIR}/oxmc.gpg"
|
||||
install -m 644 "${STAGE_WORK_DIR}/oxmc.gpg" "${ROOTFS_DIR}/etc/apt/trusted.gpg.d/"
|
||||
|
||||
# Add armhf and arm64 architectures, update and upgrade and cache policy
|
||||
on_chroot <<- \EOF
|
||||
ARCH="$(dpkg --print-architecture)"
|
||||
if [ "$ARCH" = "armhf" ]; then
|
||||
@@ -27,4 +37,5 @@ on_chroot <<- \EOF
|
||||
fi
|
||||
apt-get update
|
||||
apt-get dist-upgrade -y
|
||||
apt-cache policy
|
||||
EOF
|
||||
|
3
stage0/00-configure-apt/files/apt-chillcraftos-prefs
Normal file
3
stage0/00-configure-apt/files/apt-chillcraftos-prefs
Normal file
@@ -0,0 +1,3 @@
|
||||
Package: *
|
||||
Pin: release o=cdn.oxmc.me/apt, n=bookworm
|
||||
Pin-Priority: 1001
|
@@ -1,3 +1,3 @@
|
||||
deb http://apt.oxmc.me/ RELEASE main
|
||||
deb https://cdn.oxmc.me/apt RELEASE main
|
||||
# Uncomment line below then 'apt-get update' to enable 'apt-get source'
|
||||
#deb-src http://apt.oxmc.me/ RELEASE main
|
||||
#deb-src https://cdn.oxmc.me/apt RELEASE main
|
Binary file not shown.
@@ -2,11 +2,16 @@
|
||||
|
||||
install -v -m 644 files/fstab "${ROOTFS_DIR}/etc/fstab"
|
||||
# SteamOS like readonly root
|
||||
install -m 644 files/system-readonly "${ROOTFS_DIR}/sbin/"
|
||||
install -m 755 files/system-readonly "${ROOTFS_DIR}/sbin/"
|
||||
|
||||
on_chroot << EOF
|
||||
if ! id -u ${FIRST_USER_NAME} >/dev/null 2>&1; then
|
||||
#adduser --disabled-password --gecos "" ${FIRST_USER_NAME}
|
||||
if [ "${FIRST_USER_ISSYSTEM}" = "true" ]; then
|
||||
useradd -r -M -d / ${FIRST_USER_NAME}
|
||||
else
|
||||
adduser --disabled-password --gecos "" ${FIRST_USER_NAME}
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ -n "${FIRST_USER_PASS}" ]; then
|
||||
@@ -14,5 +19,3 @@ if [ -n "${FIRST_USER_PASS}" ]; then
|
||||
fi
|
||||
echo "root:root" | chpasswd
|
||||
EOF
|
||||
|
||||
|
||||
|
@@ -2,4 +2,4 @@ proc /proc proc defaults 0 0
|
||||
BOOTDEV /boot/firmware vfat defaults 0 2
|
||||
ROOTDEV / ext4 defaults,noatime 0 1
|
||||
# For /home (always writable):
|
||||
LABEL=home /home ext4 defaults 0 2
|
||||
#LABEL=home /home ext4 defaults 0 2
|
@@ -6,7 +6,7 @@ if [ "$1" == "enable" ]; then
|
||||
echo "Enabling read-only mode..."
|
||||
|
||||
# Modify fstab to set root filesystem as read-only
|
||||
sudo sed -i 's|\(ROOTDEV.* / .* ext4 \)defaults,noatime|\1ro,noatime|' "$FSTAB_FILE"
|
||||
sudo sed -i 's|\(PARTUUID=[^ ]* / .* ext4 \)defaults,noatime|\1ro,noatime|' "$FSTAB_FILE"
|
||||
|
||||
# Remount root as read-only
|
||||
sudo mount -o remount,ro /
|
||||
@@ -17,7 +17,7 @@ elif [ "$1" == "disable" ]; then
|
||||
echo "Disabling read-only mode..."
|
||||
|
||||
# Modify fstab to set root filesystem as writable
|
||||
sudo sed -i 's|\(ROOTDEV.* / .* ext4 \)ro,noatime|\1defaults,noatime|' "$FSTAB_FILE"
|
||||
sudo sed -i 's|\(PARTUUID=[^ ]* / .* ext4 \)ro,noatime|\1defaults,noatime|' "$FSTAB_FILE"
|
||||
|
||||
# Remount root as writable
|
||||
sudo mount -o remount,rw /
|
||||
|
@@ -1,5 +1,5 @@
|
||||
gstreamer1.0-x gstreamer1.0-plugins-base gstreamer1.0-plugins-good gstreamer1.0-plugins-bad gstreamer1.0-alsa gstreamer1.0-libav
|
||||
evince gtk2-engines alsa-utils
|
||||
gtk2-engines alsa-utils
|
||||
desktop-base
|
||||
git
|
||||
gvfs
|
||||
@@ -9,7 +9,7 @@ gldriver-test
|
||||
fonts-droid-fallback
|
||||
fonts-liberation2
|
||||
obconf
|
||||
raindrop
|
||||
python3-pyqt5
|
||||
python3-opengl
|
||||
vulkan-tools mesa-vulkan-drivers
|
||||
libopengl0
|
@@ -1,8 +1,6 @@
|
||||
xserver-xorg xinit
|
||||
mousepad
|
||||
eom
|
||||
menu-xdg
|
||||
yad zenity xdg-utils
|
||||
gvfs-backends gvfs-fuse
|
||||
gdm3 gnome-themes-extra-data gnome-icon-theme
|
||||
gdm3 gnome-themes-extra-data gnome-icon-theme papirus-icon-theme
|
||||
gnome-keyring
|
||||
|
@@ -4,13 +4,11 @@ python3-pgzero
|
||||
python3-serial
|
||||
python3-pip
|
||||
python3-numpy
|
||||
rc-gui
|
||||
tree
|
||||
libgl1-mesa-dri libgles1 libgles2-mesa xcompmgr
|
||||
geany
|
||||
piclone
|
||||
python3-twython
|
||||
pprompt
|
||||
ffmpeg
|
||||
vlc
|
||||
rpi-imager
|
||||
plymouth os-release-snos hyfetch
|
@@ -1,2 +1 @@
|
||||
pi-package
|
||||
gnome-core gnome-tweaks gnome-shell-extension-no-annoyance gnome-shell-extension-manager gnome-shell-extension-gsconnect gnome-shell-extension-dash-to-panel gnome-shell-extension-bluetooth-quick-connect gnome-shell-extension-appindicator gnome-initial-setup
|
||||
gnome-session gnome-shell libpam-gnome-keyring gnome-control-center gnome-software network-manager-gnome pulseaudio gnome-terminal gnome-initial-setup gnome-tweaks gnome-shell-extension-no-annoyance gnome-shell-extension-manager gnome-shell-extension-gsconnect gnome-shell-extension-dash-to-panel gnome-shell-extension-bluetooth-quick-connect gnome-shell-extension-appindicator gnome-shell-extension-desktop-icons-ng
|
@@ -1,4 +0,0 @@
|
||||
#!/bin/bash -e
|
||||
|
||||
#polkit fixes
|
||||
install -m 644 files/polkit-admin.conf "${ROOTFS_DIR}/etc/polkit-1/localauthority.conf.d/51-admin.conf"
|
@@ -10,8 +10,3 @@ sed -i 's/#WaylandEnable=false/WaylandEnable=false/' /etc/gdm3/daemon.conf
|
||||
mkdir -p /var/lib/gdm
|
||||
touch /var/lib/gdm/run-initial-setup
|
||||
EOF
|
||||
|
||||
# Remove setup user (chill) [This allows for the user to be created in the first boot from the gnome-initial-setup]
|
||||
on_chroot << EOF
|
||||
deluser --remove-home --remove-all-files ${FIRST_USER_NAME}
|
||||
EOF
|
5
stage3/02-setup/files/vendor.conf
Normal file
5
stage3/02-setup/files/vendor.conf
Normal file
@@ -0,0 +1,5 @@
|
||||
[pages]
|
||||
# Pages to show when a user already exists
|
||||
existing_user_only=language;keyboard;timezone;goa;
|
||||
# Only show the following pages in a 'first boot' situation
|
||||
new_user_only=welcome;language;keyboard;timezone;account;network;privacy;goa;
|
@@ -1,5 +0,0 @@
|
||||
#!/bin/bash -e
|
||||
|
||||
on_chroot << EOF
|
||||
raspi-config nonint do_xcompmgr 0
|
||||
EOF
|
47
stage3/04-extras-fixes/00-run.sh
Executable file
47
stage3/04-extras-fixes/00-run.sh
Executable file
@@ -0,0 +1,47 @@
|
||||
#!/bin/bash -e
|
||||
|
||||
# Enable xcompmgr
|
||||
on_chroot << EOF
|
||||
raspi-config nonint do_xcompmgr 0
|
||||
EOF
|
||||
|
||||
# polkit fixes
|
||||
install -m 644 files/polkit-admin.conf "${ROOTFS_DIR}/etc/polkit-1/localauthority.conf.d/51-admin.conf"
|
||||
|
||||
# Set default gnome-extensions
|
||||
on_chroot << EOF
|
||||
# Create the necessary directories for dconf settings and profiles
|
||||
mkdir -p /etc/dconf/db/local.d
|
||||
mkdir -p /etc/dconf/profile
|
||||
|
||||
# Create the user profile to link user-db:user and system-db:local
|
||||
echo "user-db:user" > /etc/dconf/profile/user
|
||||
echo "system-db:local" >> /etc/dconf/profile/user
|
||||
EOF
|
||||
install -m 755 files/gnome-extensions "${ROOTFS_DIR}/etc/dconf/db/local.d/00-extensions"
|
||||
|
||||
# Set default Wallpaper
|
||||
on_chroot << EOF
|
||||
# Create the necessary directories for the wallpaper
|
||||
mkdir -p /usr/local/share/backgrounds
|
||||
EOF
|
||||
install -m 644 files/loveimage.png "${ROOTFS_DIR}/usr/local/share/backgrounds/loveimage.png"
|
||||
install -m 644 files/gnome-background "${ROOTFS_DIR}/etc/dconf/db/local.d/00-background"
|
||||
|
||||
# Run the dconf update as the first user
|
||||
on_chroot << EOF
|
||||
SUDO_USER="${FIRST_USER_NAME}" dconf update
|
||||
EOF
|
||||
|
||||
# Pi-Apps (this is a bash script that installs pi-apps when the user runs it, then gets overwritten by the actual pi-apps)
|
||||
install -m 755 files/pi-apps "${ROOTFS_DIR}/usr/bin/pi-apps"
|
||||
install -m 755 files/pi-apps.desktop "${ROOTFS_DIR}/usr/share/applications/pi-apps.desktop"
|
||||
install -m 644 files/pi-apps-logo.png "${ROOTFS_DIR}/usr/share/icons/hicolor/256x256/apps/pi-apps.png"
|
||||
|
||||
# Remove setup user (only if it's not a system account)
|
||||
on_chroot << EOF
|
||||
#deluser --remove-home --remove-all-files ${FIRST_USER_NAME}
|
||||
if [ "${FIRST_USER_ISSYSTEM}" = "false" ]; then
|
||||
deluser --remove-home --remove-all-files ${FIRST_USER_NAME}
|
||||
fi
|
||||
EOF
|
5
stage3/04-extras-fixes/files/gnome-background
Normal file
5
stage3/04-extras-fixes/files/gnome-background
Normal file
@@ -0,0 +1,5 @@
|
||||
[org/gnome/desktop/background]
|
||||
picture-uri='file:///usr/local/share/backgrounds/loveimage.png'
|
||||
picture-options='spanned'
|
||||
primary-color='000000'
|
||||
secondary-color='FFFFFF'
|
2
stage3/04-extras-fixes/files/gnome-extensions
Normal file
2
stage3/04-extras-fixes/files/gnome-extensions
Normal file
@@ -0,0 +1,2 @@
|
||||
[org/gnome/shell]
|
||||
enabled-extensions=['dash-to-panel@jderose9.github.com', 'ding@rastersoft.com', 'noannoyance@daase.net', 'ubuntu-appindicators@ubuntu.com', 'user-themes@gnome-shell-extensions.gcampax.github.com']
|
BIN
stage3/04-extras-fixes/files/loveimage.png
Normal file
BIN
stage3/04-extras-fixes/files/loveimage.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 3.8 MiB |
194
stage3/04-extras-fixes/files/pi-apps
Normal file
194
stage3/04-extras-fixes/files/pi-apps
Normal file
@@ -0,0 +1,194 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Check if ~/pi-apps or /usr/local/bin/pi-apps exists
|
||||
if [ -d ~/pi-apps ] || [ -f /usr/local/bin/pi-apps ]; then
|
||||
# Run the users pi-apps instead of installing it
|
||||
/usr/local/bin/pi-apps
|
||||
exit 0
|
||||
fi
|
||||
|
||||
function error {
|
||||
echo -e "\e[91m$1\e[39m"
|
||||
exit 1
|
||||
}
|
||||
|
||||
cd "$HOME"
|
||||
|
||||
#ensure non-root
|
||||
if [[ "$(id -u)" == 0 ]]; then
|
||||
error "Pi-Apps is not designed to be installed as root! Please try again as a regular user."
|
||||
fi
|
||||
|
||||
#ensure debian
|
||||
command -v apt >/dev/null || error "apt: command not found. Most likely this system is not running Debian."
|
||||
|
||||
#Ensure running arm processor
|
||||
if uname -m | grep -qi 'x86\|i686\|i386' ;then
|
||||
error "Pi-Apps is not supported on non-ARM CPU architectures. We encourage you to use your distro's app store, like Gnome Software or Discover Software Center."
|
||||
fi
|
||||
|
||||
sudo apt update || error "The command 'sudo apt update' failed. Before Pi-Apps will work, you must fix your apt package-management system."
|
||||
|
||||
#install dependencies
|
||||
dependencies='yad curl wget aria2 lsb-release software-properties-common apt-utils apt-transport-https gnupg imagemagick bc librsvg2-bin locales shellcheck git wmctrl xdotool x11-utils rsync unzip debsums libgtk3-perl bzip2'
|
||||
|
||||
if ! dpkg -s $dependencies &>/dev/null ;then
|
||||
sudo apt install $dependencies -y -f --no-install-recommends || error "Pi-Apps dependencies failed to install and so the Pi-Apps install has been aborted. Before Pi-Apps can be installed you must solve any errors above."
|
||||
fi
|
||||
|
||||
#remove annoying "YAD icon browser" launcher
|
||||
sudo rm -f /usr/share/applications/yad-icon-browser.desktop
|
||||
|
||||
#download pi-apps if folder missing
|
||||
DIRECTORY="$(readlink -f "$(dirname "$0")")"
|
||||
if [ -z "$DIRECTORY" ] || [ "$DIRECTORY" == "$HOME" ] || [ "$DIRECTORY" == bash ] || [ ! -f "${DIRECTORY}/api" ] || [ ! -f "${DIRECTORY}/gui" ];then
|
||||
DIRECTORY="$HOME/pi-apps"
|
||||
fi
|
||||
downloaded=0 #track if pi-apps was downloaded this time
|
||||
|
||||
#Re-download pi-apps folder in all cases if pi-apps already exists
|
||||
#users expect to use the install script to "restore" a working pi-apps install in incase their local version is somehow not working or corrupted
|
||||
if [ -d "$DIRECTORY" ];then
|
||||
rm -rf ~/pi-apps-forced-update
|
||||
|
||||
echo "Reinstalling Pi-Apps..."
|
||||
downloaded=1
|
||||
output="$(git clone --depth 1 https://github.com/Botspot/pi-apps ~/pi-apps-forced-update 2>&1)"
|
||||
if [ $? != 0 ] || [ ! -d "$DIRECTORY" ];then
|
||||
error "Pi-Apps download failed!\ngit clone output was: $output"
|
||||
fi
|
||||
cp -af "${DIRECTORY}/data" ~/pi-apps-forced-update
|
||||
cp -af "${DIRECTORY}/apps" ~/pi-apps-forced-update
|
||||
rm -rf "$DIRECTORY"
|
||||
mv -f ~/pi-apps-forced-update "$DIRECTORY"
|
||||
|
||||
#if pi-apps folder does not exist, download it
|
||||
elif [ ! -d "$DIRECTORY" ];then
|
||||
echo "Downloading Pi-Apps..."
|
||||
downloaded=1
|
||||
output="$(git clone --depth 1 https://github.com/Botspot/pi-apps "$DIRECTORY" 2>&1)"
|
||||
if [ $? != 0 ] || [ ! -d "$DIRECTORY" ];then
|
||||
error "Pi-Apps download failed!\ngit clone output was: $output"
|
||||
fi
|
||||
#click new installation analytics link
|
||||
"${DIRECTORY}/api" shlink_link script install
|
||||
fi
|
||||
|
||||
#Past this point, DIRECTORY variable populated with valid pi-apps directory
|
||||
|
||||
#if ChromeOS, install lxterminal
|
||||
if command -v garcon-terminal-handler >/dev/null ;then
|
||||
echo "In order to install apps on ChromeOS, a working terminal emulator is required.
|
||||
Installing lxterminal in 10 seconds... (press Ctrl+C to cancel)"
|
||||
sleep 10
|
||||
sudo apt install -yf lxterminal || error "Failed to install lxterminal on ChromeOS!"
|
||||
fi
|
||||
|
||||
#menu button
|
||||
if [ ! -f ~/.local/share/applications/pi-apps.desktop ];then
|
||||
echo "Creating menu button..."
|
||||
fi
|
||||
mkdir -p ~/.local/share/applications
|
||||
if [ -f /etc/xdg/menus/lxde-pi-applications.menu ];then #If on PiOS, place launcher in Accessories as it has always been there and is more intuitive there
|
||||
echo "[Desktop Entry]
|
||||
Name=Pi-Apps
|
||||
Comment=Raspberry Pi App Store for open source projects
|
||||
Exec=${DIRECTORY}/gui
|
||||
Icon=${DIRECTORY}/icons/logo.png
|
||||
Terminal=false
|
||||
StartupWMClass=Pi-Apps
|
||||
Type=Application
|
||||
Categories=Utility
|
||||
StartupNotify=true" > ~/.local/share/applications/pi-apps.desktop
|
||||
else #if not on PiOS, place launcher in Preferences to match the wider decision of putting app installers there (see PR #2388)
|
||||
echo "[Desktop Entry]
|
||||
Name=Pi-Apps
|
||||
Comment=Raspberry Pi App Store for open source projects
|
||||
Exec=${DIRECTORY}/gui
|
||||
Icon=${DIRECTORY}/icons/logo.png
|
||||
Terminal=false
|
||||
StartupWMClass=Pi-Apps
|
||||
Type=Application
|
||||
Categories=Utility;System;PackageManager;
|
||||
StartupNotify=true" > ~/.local/share/applications/pi-apps.desktop
|
||||
fi
|
||||
chmod 755 ~/.local/share/applications/pi-apps.desktop
|
||||
gio set ~/.local/share/applications/pi-apps.desktop "metadata::trusted" yes
|
||||
|
||||
#copy menu button to Desktop
|
||||
mkdir -p ~/Desktop
|
||||
cp -f ~/.local/share/applications/pi-apps.desktop ~/Desktop/
|
||||
|
||||
chmod 755 ~/Desktop/pi-apps.desktop
|
||||
gio set ~/Desktop/pi-apps.desktop "metadata::trusted" yes
|
||||
|
||||
#copy icon to local icons directory (necessary on some wayland DEs like on PiOS Wayfire)
|
||||
mkdir -p ~/.local/share/icons
|
||||
cp -f ${DIRECTORY}/icons/logo.png ~/.local/share/icons/pi-apps.png
|
||||
cp -f ${DIRECTORY}/icons/settings.png ~/.local/share/icons/pi-apps-settings.png
|
||||
|
||||
#settings menu button
|
||||
if [ ! -f ~/.local/share/applications/pi-apps-settings.desktop ];then
|
||||
echo "Creating Settings menu button..."
|
||||
fi
|
||||
echo "[Desktop Entry]
|
||||
Name=Pi-Apps Settings
|
||||
Comment=Configure Pi-Apps or create an App
|
||||
Exec=${DIRECTORY}/settings
|
||||
Icon=${DIRECTORY}/icons/settings.png
|
||||
Terminal=false
|
||||
StartupWMClass=Pi-Apps-Settings
|
||||
Type=Application
|
||||
Categories=Settings;
|
||||
StartupNotify=true" > ~/.local/share/applications/pi-apps-settings.desktop
|
||||
|
||||
if [ ! -f ~/.config/autostart/pi-apps-updater.desktop ];then
|
||||
echo "Creating autostarted updater..."
|
||||
fi
|
||||
mkdir -p ~/.config/autostart
|
||||
echo "[Desktop Entry]
|
||||
Name=Pi-Apps Updater
|
||||
Exec=${DIRECTORY}/updater onboot
|
||||
Icon=${DIRECTORY}/icons/logo.png
|
||||
Terminal=false
|
||||
StartupWMClass=Pi-Apps
|
||||
Type=Application
|
||||
X-GNOME-Autostart-enabled=true
|
||||
Hidden=false
|
||||
NoDisplay=false" > ~/.config/autostart/pi-apps-updater.desktop
|
||||
|
||||
mkdir -p "${DIRECTORY}/data/status" "${DIRECTORY}/data/update-status" \
|
||||
"${DIRECTORY}/data/preload" "${DIRECTORY}/data/settings" \
|
||||
"${DIRECTORY}/data/status" "${DIRECTORY}/data/update-status" \
|
||||
"${DIRECTORY}/data/categories"
|
||||
|
||||
#pi-apps terminal command
|
||||
if [ ! -f /usr/local/bin/pi-apps ] || ! cat /usr/local/bin/pi-apps | grep -q "${DIRECTORY}/gui" ;then
|
||||
echo "#!/bin/bash
|
||||
${DIRECTORY}/gui"' "$@"' | sudo tee /usr/local/bin/pi-apps >/dev/null
|
||||
sudo chmod +x /usr/local/bin/pi-apps
|
||||
fi
|
||||
|
||||
#check if system is broken
|
||||
errors="$("${DIRECTORY}/api" is_supported_system)" || error "$errors"
|
||||
|
||||
#preload app list
|
||||
if [ ! -f "$DIRECTORY/data/preload/LIST-" ];then
|
||||
echo "Preloading app list..."
|
||||
fi
|
||||
"${DIRECTORY}/preload" yad &>/dev/null
|
||||
|
||||
#Run runonce entries
|
||||
"${DIRECTORY}/etc/runonce-entries" &>/dev/null
|
||||
|
||||
#Determine message of the day. If announcements file missing or over a day old, download it.
|
||||
if [ ! -f "${DIRECTORY}/data/announcements" ] || [ ! -z "$(find "${DIRECTORY}/data/announcements" -mtime +1 -print)" ]; then
|
||||
wget https://raw.githubusercontent.com/Botspot/pi-apps-announcements/main/message -qO "${DIRECTORY}/data/announcements"
|
||||
fi
|
||||
|
||||
if [ $downloaded == 1 ];then
|
||||
echo "Installation complete. Pi-Apps can be launched from the start menu or by running the command 'pi-apps'."
|
||||
echo "Further explanation for how to use Pi-Apps can be found on our getting started webpage: https://pi-apps.io/wiki/getting-started/running-pi-apps/"
|
||||
else
|
||||
echo -e "Please note that Pi-Apps has NOT been freshly downloaded, because $DIRECTORY already exists."
|
||||
fi
|
BIN
stage3/04-extras-fixes/files/pi-apps-logo.png
Normal file
BIN
stage3/04-extras-fixes/files/pi-apps-logo.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 81 KiB |
10
stage3/04-extras-fixes/files/pi-apps.desktop
Normal file
10
stage3/04-extras-fixes/files/pi-apps.desktop
Normal file
@@ -0,0 +1,10 @@
|
||||
[Desktop Entry]
|
||||
Name=Pi-Apps
|
||||
Comment=Raspberry Pi App Store for open source projects
|
||||
Exec=/usr/bin/pi-apps
|
||||
Icon=/usr/share/icons/hicolor/256x256/apps/pi-apps.png
|
||||
Terminal=false
|
||||
StartupWMClass=Pi-Apps
|
||||
Type=Application
|
||||
Categories=Utility;System;PackageManager;
|
||||
StartupNotify=true
|
@@ -1,2 +0,0 @@
|
||||
cups
|
||||
system-config-printer
|
@@ -1,5 +0,0 @@
|
||||
#!/bin/bash -e
|
||||
|
||||
on_chroot <<EOF
|
||||
adduser "$FIRST_USER_NAME" lpadmin
|
||||
EOF
|
@@ -1,5 +0,0 @@
|
||||
[pages]
|
||||
# Pages to show when a user already exists
|
||||
existing_user_only=language;keyboard;timezone;goa;
|
||||
# Only show the privacy page in the 'first boot' situation
|
||||
new_user_only=welcome;language;keyboard;network;account;privacy;
|
Reference in New Issue
Block a user