My-distro-DI-configs/my-distro-devuan-32/build.sh

290 lines
8.4 KiB
Bash
Raw Normal View History

2023-10-29 15:43:55 -01:00
#!/bin/bash
################################################################################
# Title: build.sh
# Description: Script to build My-distro 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
build="$(pwd)"
# Create the build folder, move into it removing stale mountpoints and files there.
[ -e build ] && [ ! -d build ] && rm -f build || [ ! -e build ] && mkdir build
cd build
2023-10-29 15:43:55 -01:00
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/build/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 i386 \
--linux-flavours 686 \
--distribution daedalus \
--archive-areas "main contrib non-free non-free-firmware" \
--initsystem sysvinit \
2024-09-07 10:43:19 +00:00
--debootstrap-options --include=ca-certificates \
2023-10-29 15:43:55 -01:00
--mirror-bootstrap http://deb.devuan.org/merged \
--mirror-chroot http://deb.devuan.org/merged \
--mirror-chroot-security http://deb.devuan.org/merged \
--parent-mirror-bootstrap http://deb.devuan.org/merged \
--parent-mirror-binary http://deb.devuan.org/merged \
--parent-mirror-binary-security http://deb.devuan.org/merged \
--parent-mirror-chroot http://deb.devuan.org/merged \
--parent-mirror-chroot-security http://deb.devuan.org/merged \
--parent-mirror-debian-installer http://deb.devuan.org/devuan \
--uefi-secure-boot enable \
--debian-installer live \
--debian-installer-distribution daedalus \
--debian-installer-gui true \
--updates true \
--security true \
--backports false \
--cache true \
--apt-recommends true \
--firmware-binary true \
--firmware-chroot true \
--iso-application "My-distro" \
--win32-loader false \
--iso-volume "My-distro-i386_${TODAY}" \
--iso-publisher "Manuel rosa" \
--image-name "My-distro" \
--win32-loader false \
--checksums sha512 \
--zsync false \
"${@}"
# Install the Xfce Desktop
mkdir -p $build/build/config/package-lists
echo xfce4 xfce4-goodies > $build/build/config/package-lists/desktop.list.chroot
# Install software
echo "# Install software to the squashfs for calamares to unpack to the OS.
linux-headers-686
locales
dkms
dbus-x11
ntp
deb-multimedia-keyring
xorg
xserver-xorg
xserver-xorg-input-synaptics
xserver-xorg-input-all
xserver-xorg-video-vmware
xserver-xorg-video-all
ffmpeg
sox
twolame
lame
faad
gstreamer1.0-plugins-good
gstreamer1.0-plugins-ugly
gstreamer1.0-plugins-bad
gstreamer1.0-pulseaudio
unrar
rar
p7zip-full
p7zip-rar
zip
unzip
pulseaudio
pavucontrol
alsa-utils
aptitude
synaptic
gparted
apt-config-auto-update
libelf-dev
htop
package-update-indicator
gnome-packagekit
gvfs-backends
samba
gnome-packagekit
network-manager
network-manager-gnome
bluez
blueman
gufw
gtk2-engines
plymouth
plymouth-themes
cups
system-config-printer
lightdm
lightdm-gtk-greeter
lightdm-gtk-greeter-settings
menulibre
mugshot
xscreensaver
xscreensaver-data
xscreensaver-data-extra
xscreensaver-gl
xscreensaver-gl-extra
gnome-system-tools
gnome-disk-utility
gnome-calculator
neofetch
accountsservice
catfish
fuseiso
timeshift
gnome-software
gnome-software-plugin-flatpak
fwupd
bleachbit
dconf-editor
gimp
gimp-data-extras
evince
xsane
transmission-gtk
thunderbird
thunderbird-l10n-pt-br
thunderbird-l10n-pt-pt
thunderbird-l10n-de
thunderbird-l10n-en-gb
thunderbird-l10n-es-es
thunderbird-l10n-fr
thunderbird-l10n-it
libreoffice
libreoffice-gtk3
libreoffice-l10n-pt
libreoffice-l10n-pt-br
libreoffice-l10n-de
libreoffice-l10n-en-gb
libreoffice-l10n-es
libreoffice-l10n-fr
libreoffice-l10n-it
printer-driver-cups-pdf
gnome-2048
gnome-chess
gnome-mahjongg
gnome-sudoku
guvcview
vlc
qt5-style-plugins
qt5ct
calamares-settings-debian
firmware-linux
firmware-linux-free
firmware-linux-nonfree
firmware-misc-nonfree
firmware-realtek
firmware-atheros
firmware-bnx2
firmware-bnx2x
firmware-brcm80211
firmware-iwlwifi
firmware-libertas
firmware-netxen
firmware-zd1211
gdebi
f2fs-tools
xfsprogs
xfsdump
tumbler
tumbler-plugins-extra
ffmpegthumbnailer
xterm
git
curl
wget
2023-10-29 15:43:55 -01:00
spice-vdagent
console-setup
xdg-user-dirs-gtk
2023-10-29 15:43:55 -01:00
" > $build/build/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-ia32
grub-efi-ia32-bin
grub-efi-ia32-signed
libefiboot1
libefivar1
mokutil
os-prober
shim-helpers-i386-signed
shim-signed
shim-signed-common
shim-unsigned
" > $build/build/config/package-lists/installer.list.binary
# Setup the chroot structure
mkdir -p $build/build/config/archives
mkdir -p $build/build/config/includes.binary
mkdir -p $build/build/config/hooks/live
mkdir -p $build/build/config/hooks/normal
mkdir -p $build/build/config/bootloaders
mkdir -p $build/build/config/packages.chroot
mkdir -p $build/build/config/includes.chroot/etc
2024-01-12 12:28:37 -01:00
mkdir -p $build/build/config/includes.chroot/usr/lib/live/config
2024-01-30 17:30:04 -01:00
mkdir -p $build/build/config/includes.chroot/etc/live/config.conf.d
2023-10-29 15:43:55 -01:00
mkdir -p $build/build/config/includes.chroot/usr/share/applications
mkdir -p $build/build/config/includes.chroot/usr/share/backgrounds
mkdir -p $build/build/config/includes.chroot/etc/calamares
mkdir -p $build/build/config/includes.chroot/usr/share/icons
mkdir -p $build/build/config/includes.chroot/usr/share/themes
mkdir -p $build/build/config/includes.chroot/etc/dpkg/origins
mkdir -p $build/build/config/includes.chroot/usr/sbin
mkdir -p $build/build/config/includes.chroot/etc/lightdm
mkdir -p $build/build/config/includes.chroot/usr/share/pixmaps
mkdir -p $build/build/config/includes.chroot/usr/share/plymouth/themes
mkdir -p $build/build/config/includes.chroot/usr/share/desktop-base
mkdir -p $build/build/config/includes.chroot/etc/skel/Desktop
mkdir -p $build/build/config/includes.chroot/boot/grub/themes
2024-09-08 12:29:37 +00:00
mkdir -p $build/build/config/includes.chroot/usr/lib/calamares/modules
mkdir -p $build/build/config/includes.chroot/usr/share/glib-2.0/schemas
2023-10-29 15:43:55 -01:00
mkdir -p $build/build/config/includes.installer/usr/lib/finish-install.d
2024-09-08 12:29:37 +00:00
mkdir -p $build/build/config/includes.installer/usr/share
2023-10-29 15:43:55 -01:00
# Copy Configs to the chroot
cp $build/userconfig/* $build/build/config/includes.chroot/etc/live/config.conf.d
cp $build/applications/* $build/build/config/includes.chroot/usr/share/applications
2024-09-05 13:05:55 +00:00
cp $build/hooks/devuan/live/* $build/build/config/includes.chroot/usr/lib/live/config
cp $build/hooks/devuan/normal/* $build/build/config/hooks/normal
2023-10-29 15:43:55 -01:00
cp $build/install-debian/* $build/build/config/includes.chroot/usr/share/pixmaps
2024-09-08 12:21:20 +00:00
cp $build/calamares/schemas/* $build/build/config/includes.chroot/usr/share/glib-2.0/schemas
2024-09-05 13:05:55 +00:00
cp $build/calamares/devuan/sources-final/* $build/build/config/includes.chroot/usr/sbin
cp $build/calamares/scripts/* $build/build/config/includes.chroot/usr/sbin
2023-10-29 15:43:55 -01:00
cp $build/bootloader-config/* $build/build/config/includes.chroot/usr/sbin
2024-09-05 13:05:55 +00:00
cp $build/deb-installer/devuan/scripts/* $build/build/config/includes.installer/usr/lib/finish-install.d
cp $build/deb-installer/devuan/preseed/* $build/build/config/includes.installer
2023-10-29 15:43:55 -01:00
cp -r $build/lightdm/* $build/build/config/includes.chroot/etc/lightdm
2024-09-05 13:05:55 +00:00
cp -r $build/bootloaders/devuan/* $build/build/config/includes.binary
2023-10-29 15:43:55 -01:00
cp -r $build/repos/* $build/build/config/archives
cp -r $build/backgrounds/* $build/build/config/includes.chroot/usr/share/backgrounds
2024-09-05 13:05:55 +00:00
cp -r $build/calamares/devuan/calamares/* $build/build/config/includes.chroot/etc/calamares
2023-10-29 15:43:55 -01:00
cp -r $build/configs/* $build/build/config/includes.chroot/etc/
cp -r $build/icons/* $build/build/config/includes.chroot/usr/share/icons
cp -r $build/themes/* $build/build/config/includes.chroot/usr/share/themes
cp -r $build/packages/* $build/build/config/packages.chroot
cp -r $build/grub/devuan/themes/* $build/build/config/includes.chroot/boot/grub/themes
2024-09-05 13:05:55 +00:00
cp -r $build/deb-installer/devuan/graphics $build/build/config/includes.installer/usr/share
cp -r $build/deb-installer/devuan/themes $build/build/config/includes.installer/usr/share
2024-09-08 12:21:20 +00:00
cp -r $build/calamares/modules/* $build/build/config/includes.chroot/usr/lib/calamares/modules
2024-09-05 13:05:55 +00:00
#cp -r $build/packages/* $build/build/config/packages.chroot
2023-10-29 15:43:55 -01:00
# build the ISO #
lb build #--debug --verbose