MRTestRepo/PepBld-unstable.sh

270 lines
8.7 KiB
Bash
Executable File

#!/bin/bash
PATH="/sbin:/usr/sbin:/usr/local/sbin:$PATH"
#exec 3>&1 4>&2
#trap 'exec 2>&4 1>&3' 0 1 2 3
#exec 1>log.out 2>&1
# Set the working folder variable
uchinanchu="$(pwd)"
# Create the build folder, move into it and remove unneeded files there.
[ -e fusato ] && [ ! -d fusato ] && (rm -f fusato ; mkdir fusato) || mkdir fusato
cd fusato
umount -v $(mount | grep "${PWD}/chroot" | tac | cut -f3 -d" ") 2>/dev/null
for i in ./* ./.build ./cache/bootstrap ./cache/contents.chroot ; 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/build/config for a full list of examples.
# Up above is the manual description of what options I used so far.
lb config \
--clean \
--color \
--quiet \
--archive-areas "main contrib non-free" \
--architectures amd64 \
--apt-recommends false \
--backports true \
--binary-images iso-hybrid \
--cache true \
--mode debian \
--distribution bullseye \
--firmware-binary true \
--firmware-chroot true \
--iso-application "PeppermintOS" \
--iso-preparer "PeppermintOS-https://peppermintos.com/" \
--iso-publisher "Peppermint OS Team" \
--iso-volume "PeppermintOS" \
--image-name "PepOS" \
--linux-flavours amd64 \
--security true \
--updates true \
--win32-loader false \
--checksums sha512 \
--zsync false \
# Install the XFCE Desktop
mkdir -p ./config/package-lists/
echo xfce4 > ./config/package-lists/desktop.list.chroot
# Install software
echo "# Install software to the squashfs for calamares to unpack to the OS.
arandr
arc-theme
calamares-settings-debian
calamares
curl
dbus-x11
dconf-editor
dconf-gsettings-backend
desktop-base
dkms
dmraid
dosfstools
e2fsprogs
exo-utils
firmware-linux
firmware-linux-free
firmware-linux-nonfree
firmware-misc-nonfree
gir1.2-webkit2-4.0
gparted
gnome-disk-utility
grub-pc
host
initramfs-tools
libnss3
libnss-mdns
lightdm
lightdm-gtk-greeter
live-boot
live-config
locales
locales-all
menulibre
mokutil
mtools
neofetch
network-manager-gnome
ntfs-3g
ntp
os-prober
pavucontrol
pulseaudio
pulseaudio-module-zeroconf
plymouth
plymouth-label
plymouth-themes
python3-apt
python3-bs4
python3-pip
python3-pyqt5.qtsvg
python3-pyqt5.qtwebengine
python3-pyqt5.qtwebkit
python3-requests
python3-tk
python3-ttkthemes
rsync
screenfetch
sqlite3
sudo
synaptic
user-setup
xdg-user-dirs
xfce4
xfce4-battery-plugin
xfce4-clipman-plugin
xfce4-notifyd
xfce4-power-manager
xfce4-power-manager-plugins
xfce4-taskmanager
xfce4-terminal
xfce4-screenshooter
xfce4-whiskermenu-plugin
yad
wireless-tools
wget
xauth
xinit
xorg
f2fs-tools
xfsprogs
" > ./config/package-lists/packages.list.chroot
# Get packages used ONLY by the live-session, to be stored in /pool by `lb`.
echo "# Packages required only by the live session.
efibootmgr
grub-common
grub2-common
grub-efi
grub-efi-amd64
grub-efi-amd64-bin
grub-efi-amd64-signed
grub-efi-ia32-bin
libefiboot1
libefivar1
mokutil
os-prober
shim-helpers-amd64-signed
shim-signed
shim-signed-common
shim-unsigned
" > ./config/package-lists/installer.list.binary
# Setup the build directory structures
#mkdir -p ./config/hooks/live
mkdir -p ./config/hooks/normal
mkdir -p ./config/packages.chroot
mkdir -p ./config/includes.binary
mkdir -p ./config/includes.bootstrap/etc
mkdir -p ./config/includes.chroot/etc/apt
mkdir -p ./config/includes.chroot/etc/apt/preferences.d
mkdir -p ./config/includes.chroot/etc/calamares
mkdir -p ./config/includes.chroot/etc/default
mkdir -p ./config/includes.chroot/etc/lightdm
mkdir -p ./config/includes.chroot/etc/live/config.conf.d
mkdir -p ./config/includes.chroot/etc/skel/.config/autostart
mkdir -p ./config/includes.chroot/etc/skel/.local/share
mkdir -p ./config/includes.chroot/etc/skel/Desktop
mkdir -p ./config/includes.chroot/etc/xdg/xfce4
mkdir -p ./config/includes.chroot/opt/pepconf
mkdir -p ./config/includes.chroot/opt/pypep/dbpep
mkdir -p ./config/includes.chroot/opt/startpep
mkdir -p ./config/includes.chroot/usr/bin
mkdir -p ./config/includes.chroot/usr/sbin
mkdir -p ./config/includes.chroot/usr/lib/live/config
#mkdir -p ./config/includes.chroot/usr/lib/peppermint/ice
mkdir -p ./config/includes.chroot/usr/share/applications
mkdir -p ./config/includes.chroot/usr/share/backgrounds
mkdir -p ./config/includes.chroot/usr/share/desktop-base
mkdir -p ./config/includes.chroot/usr/share/fonts/pepconf
mkdir -p ./config/includes.chroot/usr/share/icons/default
#mkdir -p ./config/includes.chroot/usr/share/ice/locale
mkdir -p ./config/includes.chroot/usr/share/peppermint
mkdir -p ./config/includes.chroot/usr/share/pixmaps
mkdir -p ./config/includes.chroot/usr/share/plymouth
mkdir -p ./config/includes.chroot/usr/share/polkit-1/actions
mkdir -p ./config/includes.chroot/usr/share/themes
mkdir -p ./config/includes.chroot/usr/share/xfce4/helpers
# Copy Multiple files to the bootstrap
cp $uchinanchu/pepissue/* ./config/includes.bootstrap/etc/
# Copy Single files to the chroot
cp $uchinanchu/pepaliases/bash_aliases ./config/includes.chroot/etc/skel/.bash_aliases
cp $uchinanchu/pepapplication/Install-peppermint.desktop ./config/includes.chroot/etc/skel/Desktop
cp $uchinanchu/pepcal/adddesktopicon/add-calamares-desktop-icon ./config/includes.chroot/usr/bin
cp $uchinanchu/pepcal/calamares/netinstall-* ./config/includes.chroot/etc/calamares
cp $uchinanchu/pepcal/calamares/settings.conf ./config/includes.chroot/etc/calamares
cp $uchinanchu/pepcal/calamares_*_amd64.deb ./config/packages.chroot
cp $uchinanchu/pepcal/install-peppermint ./config/includes.chroot/usr/bin
cp $uchinanchu/pepcal/sources-final ./config/includes.chroot/usr/sbin
cp $uchinanchu/pepdb/welval.db ./config/includes.chroot/opt/pypep/dbpep
cp $uchinanchu/peplightdm/lightdm.conf ./config/includes.chroot/etc/lightdm
cp $uchinanchu/peplightdm/lightdm-gtk-greeter.conf ./config/includes.chroot/etc/lightdm
cp $uchinanchu/../MakePackageLists.sh $uchinanchu/fusato/config/includes.chroot/usr/local/bin
# Copy Multiple files to the chroot
cp $uchinanchu/pepapplication/* ./config/includes.chroot/usr/share/applications
cp $uchinanchu/pepdeffileman/xfce4/* ./config/includes.chroot/etc/xdg/xfce4
cp $uchinanchu/pepdeffileman/helpers/* ./config/includes.chroot/usr/share/xfce4/helpers
cp $uchinanchu/pepfont/* ./config/includes.chroot/usr/share/fonts/pepconf
cp $uchinanchu/pepgrub/* ./config/includes.chroot/etc/default
cp $uchinanchu/pepissue/* ./config/includes.chroot/etc
cp $uchinanchu/pepissue/* ./config/includes.chroot/opt/pepconf
cp $uchinanchu/peppinunstable/* ./config/includes.chroot/etc/apt/preferences.d
cp $uchinanchu/peposrelease/* ./config/includes.chroot/usr/lib
cp $uchinanchu/peposrelease/* ./config/includes.chroot/opt/pepconf
cp $uchinanchu/peppackages/* ./config/packages.chroot
cp $uchinanchu/peppolkit/* ./config/includes.chroot/usr/share/polkit-1/actions
cp $uchinanchu/pepsources/* ./config/includes.chroot/etc/apt
cp $uchinanchu/pepsources/* ./config/includes.chroot/opt
cp $uchinanchu/pepuserconfig/* ./config/includes.chroot/etc/live/config.conf.d
cp $uchinanchu/pephooks/live/0030-user-setup ./config/includes.chroot/usr/lib/live/config
cp $uchinanchu/pephooks/normal/* ./config/hooks/normal
cp $uchinanchu/PepProPixMaps/* ./config/includes.chroot/usr/share/pixmaps
cp $uchinanchu/PepProTools/Welcome_auto.desktop ./config/includes.chroot/etc/skel/.config/autostart
cp $uchinanchu/PepProTools/* ./config/includes.chroot/opt/pypep
# Copy sub-directories and files recursively
cp -dr $uchinanchu/pepicons/Numix ./config/includes.chroot/usr/share/icons
cp -dr $uchinanchu/pepicons/Pepirus ./config/includes.chroot/usr/share/icons
cp -dr $uchinanchu/pepicons/Pepirus-Dark ./config/includes.chroot/usr/share/icons
cp -dr $uchinanchu/peptheme/Peppermint-10-Red-Dark ./config/includes.chroot/usr/share/themes
cp -r $uchinanchu/pepcal/calamares/branding ./config/includes.chroot/etc/calamares
cp -r $uchinanchu/pepcal/calamares/modules ./config/includes.chroot/etc/calamares
cp -r $uchinanchu/pepdesktopbase/desktop-base ./config/includes.chroot/usr/share/
cp -r $uchinanchu/pepnemo/nemo ./config/includes.chroot/etc/skel/.config
cp -r $uchinanchu/pepmenu/menus ./config/includes.chroot/etc/skel/.config
cp -r $uchinanchu/pepplymouth/plymouth ./config/includes.chroot/usr/share/
cp -r $uchinanchu/pepxfce/xfce4 ./config/includes.chroot/etc/skel/.config
# Copy files for the skinny build from here
cp $uchinanchu/pepunstable/pepcal/calamares/settings.conf ./config/includes.chroot/etc/calamares
cp $uchinanchu/pepunstable/pepcal/calamares/modules/* ./config/includes.chroot/etc/calamares
cp $uchinanchu/pepunstable/pepwallpaper/* ./config/includes.chroot/usr/share/backgrounds
cp -r $uchinanchu/pepunstable/peploadersplash/boot ./config/includes.binary
cp -r $uchinanchu/pepunstable/peploadersplash/isolinux ./config/includes.binary
# Build the ISO #
lb build #--debug --verbose