MRTestRepo/debian-64/build.sh

257 lines
7.6 KiB
Bash
Executable File

#!/bin/bash
################################################################################
# Title: build.sh
# Description: Script to build Peppermint ISO image
# Author: manuel rosa <manuelsilvarosa@gmail.com>
# Date: Outubro 29, 2023
# License: GPL-3.0-or-later
################################################################################
PATH="/sbin:/usr/sbin:/usr/local/sbin:$PATH"
# Set the working folder variable
fusato="$(pwd)"
# Create the fusato folder, move into it removing stale mountpoints and files there.
[ -e fusato ] && [ ! -d fusato ] && rm -f fusato || [ ! -e fusato ] && mkdir fusato
cd fusato
umount $(mount | grep "${PWD}/chroot" | tac | cut -f3 -d" ") 2>/dev/null
for i in * .build ; do [ $i = cache ] && continue || rm -rf $i ; done
# Set of the structure to be used for the ISO and Live system.
# See /usr/lib/live/fusato/config for a full list of examples.
# Up above is the manual description of what options I used so far.
lb config noauto \
--binary-images iso-hybrid \
--mode debian \
--architectures amd64 \
--linux-flavours amd64 \
--distribution bookworm \
--archive-areas "main contrib non-free non-free-firmware" \
--mirror-bootstrap https://deb.debian.org/debian \
--parent-mirror-bootstrap https://deb.debian.org/debian \
--parent-mirror-chroot https://deb.debian.org/debian \
--parent-mirror-chroot-security https://security.debian.org/debian-security \
--parent-mirror-binary https://deb.debian.org/debian \
--parent-mirror-binary-security https://security.debian.org/debian-security \
--mirror-chroot https://deb.debian.org/debian \
--mirror-chroot-security https://security.debian.org/debian-security \
--updates true \
--security true \
--backports false \
--cache true \
--apt-recommends true \
--firmware-binary true \
--firmware-chroot true \
--win32-loader false \
--iso-application "PeppermintOS" \
--win32-loader false \
--iso-preparer "PeppermintOS-https://peppermintos.com/" \
--iso-volume "PeppermintOS" \
--iso-publisher "Peppermint OS Team" \
--win32-loader false \
--checksums sha512 \
--zsync false \
"${@}"
# Install the Openbox window manager
mkdir -p $fusato/fusato/config/package-lists
echo xfce4 xfce4-goodies > $fusato/fusato/config/package-lists/desktop.list.chroot
# Install software
echo "# Install software to the squashfs for calamares to unpack to the OS.
accountsservice
alsa-utils
aptitude
apt-config-auto-update
baobab
bleachbit
bluez
blueman
calamares
calamares-settings-debian
catfish
console-setup
curl
cups
dbus-x11
desktop-base
dkms
dconf-editor
evince
f2fs-tools
ffmpegthumbnailer
#firefox-esr
#firefox-esr-l10n-all
fonts-cantarell
fonts-liberation
gdebi
gir1.2-webkit2-4.0
git
gnome-2048
gnome-calculator
gnome-chess
gnome-disk-utility
gnome-mahjongg
gnome-software
gnome-software-plugin-flatpak
gnome-software-plugin-snap
gnome-sudoku
gnome-system-tools
gparted
gvfs-backends
gimp
gimp-data-extras
gufw
guvcview
htop
inxi
inputattach
libreoffice
libreoffice-gtk3
libreoffice-l10n*
lightdm
lightdm-gtk-greeter
lightdm-gtk-greeter-settings
linux-headers-amd64
locales
marwaita-peppermint-gtk-theme
marwaita-gtk-theme
marwaita-for-xfwm
menulibre
mugshot
nala
neofetch
network-manager
network-manager-gnome
ntp
package-update-indicator
pavucontrol
plymouth
plymouth-themes
printer-driver-cups-pdf
pulseaudio
python3-pip
python3-tk
python3-pil.imagetk
qt5-style-plugins
qt5ct
samba
simple-scan
smartmontools
smbclient
sqlite3
synaptic
system-config-printer
tela-icon-theme
thunderbird
thunderbird-l10n-all
timeshift
tumbler
tumbler-plugins-extra
transmission-gtk
vlc
w64codecs
wget
wireless-tools
xscreensaver
xscreensaver-data
xscreensaver-data-extra
xscreensaver-gl
xscreensaver-gl-extra
xserver-xorg-input-all
xserver-xorg-input-synaptics
xserver-xorg-input-libinput
xserver-xorg-video-all
xserver-xorg-video-vmware
xserver-xorg
xorg
xdg-user-dirs-gtk
xfsprogs
xterm
" > $fusato/fusato/config/package-lists/packages.list.chroot
# Packages to be stored in /pool but not installed in the OS .
echo "# These packages are available to the installer, for offline use.
efibootmgr
grub2-common
grub-efi
grub-efi-amd64
grub-efi-amd64-bin
grub-efi-amd64-signed
libefiboot1
libefivar1
mokutil
os-prober
shim-helpers-amd64-signed
shim-signed
shim-signed-common
shim-unsigned
" > $fusato/fusato/config/package-lists/installer.list.binary
# Setup the chroot structure
mkdir -p $fusato/fusato/config/archives
mkdir -p $fusato/fusato/config/includes.binary
mkdir -p $fusato/fusato/config/hooks/live
mkdir -p $fusato/fusato/config/hooks/normal
mkdir -p $fusato/fusato/config/bootloaders
mkdir -p $fusato/fusato/config/packages.chroot
mkdir -p $fusato/fusato/config/includes.chroot/etc
mkdir -p $fusato/fusato/config/includes.chroot/usr/bin
mkdir -p $fusato/fusato/config/includes.chroot/usr/share/applications
mkdir -p $fusato/fusato/config/includes.chroot/etc/calamares
mkdir -p $fusato/fusato/config/includes.chroot/etc/live/config.conf.d
mkdir -p $fusato/fusato/config/includes.chroot/usr/sbin
mkdir -p $fusato/fusato/config/includes.chroot/etc/lightdm
mkdir -p $fusato/fusato/config/includes.chroot/usr/share/pixmaps
mkdir -p $fusato/fusato/config/includes.chroot/etc/skel/Desktop
mkdir -p $fusato/fusato/config/includes.chroot/etc/default
mkdir -p $fusato/fusato/config/includes.chroot/boot/grub/themes
mkdir -p $fusato/fusato/config/includes.chroot/etc/skel/.local/share/pmostools
mkdir -p $fusato/fusato/config/includes.chroot/opt/pypep/dbpep
mkdir -p $fusato/fusato/config/includes.chroot/opt/pepconf
mkdir -p $fusato/fusato/config/includes.chroot/usr/share/polkit-1/actions
mkdir -p $fusato/fusato/config/includes.chroot/usr/lib/python3/dist-packages
mkdir -p $fusato/fusato/config/includes.chroot/usr/share/fonts/pepconf
mkdir -p $fusato/fusato/config/includes.chroot/usr/lib/live/config
mkdir -p $fusato/fusato/config/includes.chroot/usr/local/bin
mkdir -p $fusato/fusato/config/includes.chroot/etc/skel/.local/share/pmostools
# Copy Configs to the chroot
cp $fusato/userconfig/* $fusato/fusato/config/includes.chroot/etc/live/config.conf.d
cp $fusato/applications/* $fusato/fusato/config/includes.chroot/usr/share/applications
cp $fusato/hooks/live/* $fusato/fusato/config/includes.chroot/usr/lib/live/config
cp $fusato/hooks/normal/* $fusato/fusato/config/hooks/normal
cp $fusato/grub/grub $fusato/fusato/config/includes.chroot/etc/default
cp $fusato/calamares/sources-debian/* $fusato/fusato/config/includes.chroot/usr/sbin
cp $fusato/calamares/install-peppermint $fusato/fusato/config/includes.chroot/usr/bin
cp $fusato/database/* $fusato/fusato/config/includes.chroot/opt/pypep/dbpep
cp $fusato/PepProPixMaps/* $fusato/fusato/config/includes.chroot/usr/share/pixmaps
cp $fusato/font/* $fusato/fusato/config/includes.chroot/usr/share/fonts/pepconf
cp $fusato/PepProTools/* $fusato/fusato/config/includes.chroot/usr/local/bin
cp $fusato/polkit/* $fusato/fusato/config/includes.chroot/usr/share/polkit-1/actions
cp $fusato/lightdm/* $fusato/fusato/config/includes.chroot/etc/lightdm
cp $fusato/pepconf/* $fusato/fusato/config/includes.chroot/opt/pepconf
cp -r $fusato/bootloaders/* $fusato/fusato/config/includes.binary
cp -r $fusato/repos/* $fusato/fusato/config/archives
cp -r $fusato/calamares/debian/* $fusato/fusato/config/includes.chroot/etc/calamares
cp -r $fusato/configs/* $fusato/fusato/config/includes.chroot/etc/
#cp -r $fusato/packages/* $fusato/fusato/config/packages.chroot
cp -r $fusato/grub/themes/* $fusato/fusato/config/includes.chroot/boot/grub/themes
cp -r $fusato/pmostools/* $fusato/fusato/config/includes.chroot/etc/skel/.local/share/pmostools
cp -r $fusato/pylibraries/* $fusato/fusato/config/includes.chroot/usr/lib/python3/dist-packages
# fusato the ISO #
lb build #--debug --verbose