My-distro-configs-ubuntu/my-distro-ubuntu-22.04-lts/build.sh

271 lines
7.1 KiB
Bash
Raw Normal View History

2022-11-09 09:44:02 -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
################################################################################
2022-11-09 09:44:02 -01:00
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
umount $(mount | grep "${PWD}/chroot" | tac | cut -f3 -d" ") 2>/dev/null
for i in * .build ; do [ $i = cache ] && continue || rm -rf $i ; done
2022-11-09 09:44:02 -01:00
# 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 ubuntu \
--architectures amd64 \
--linux-flavours generic \
--distribution jammy \
2022-11-09 09:44:02 -01:00
--archive-areas "main multiverse restricted universe" \
--mirror-bootstrap http://archive.ubuntu.com/ubuntu \
--parent-mirror-bootstrap http://archive.ubuntu.com/ubuntu \
--parent-mirror-chroot http://archive.ubuntu.com/ubuntu \
--parent-mirror-chroot-security http://security.ubuntu.com/ubuntu \
--parent-mirror-binary http://archive.ubuntu.com/ubuntu \
--parent-mirror-binary-security http://security.ubuntu.com/ubuntu \
--mirror-chroot http://archive.ubuntu.com/ubuntu \
--mirror-chroot-security http://security.ubuntu.com/ubuntu \
--updates true \
--security true \
--cache true \
--apt-recommends true \
--firmware-binary true \
--firmware-chroot true \
--iso-application "My-distro" \
--win32-loader false \
2022-11-11 15:54:22 -01:00
--iso-volume "My-distro-amd64" \
2022-11-09 09:44:02 -01:00
--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-generic
locales
language-selector-gnome
#update-manager
2022-11-15 09:15:45 -01:00
gnome-packagekit
2022-11-12 17:08:04 -01:00
adwaita-icon-theme-full
2022-11-09 09:44:02 -01:00
dkms
dbus-x11
ntp
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
2022-11-09 09:44:02 -01:00
libelf-dev
htop
package-update-indicator
gvfs-backends
samba
network-manager
network-manager-gnome
2022-11-11 09:58:08 -01:00
network-manager-pptp-gnome
2022-11-09 09:44:02 -01:00
bluez
blueman
gufw
gtk2-engines
plymouth
plymouth-themes
cups
system-config-printer
lightdm
lightdm-gtk-greeter
lightdm-gtk-greeter-settings
lightdm-autologin-greeter
2022-11-09 09:44:02 -01:00
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
gnome-software-plugin-snap
software-properties-gtk
fwupd
bleachbit
dconf-editor
gimp
gimp-data-extras
evince
xsane
2022-11-10 14:40:24 -01:00
nano
2022-11-09 09:44:02 -01:00
language-pack-de
language-pack-en
language-pack-fr
language-pack-pt
language-pack-it
language-pack-gnome-de
language-pack-gnome-es
language-pack-gnome-fr
language-pack-gnome-pt
language-pack-gnome-it
transmission-gtk
thunderbird
thunderbird-locale-pt-pt
thunderbird-locale-pt-br
thunderbird-locale-de
thunderbird-locale-en
thunderbird-locale-en-us
thunderbird-locale-es
libreoffice
libreoffice-gtk3
libreoffice-l10n-pt
libreoffice-l10n-pt-br
libreoffice-l10n-de
libreoffice-l10n-en-gb
libreoffice-l10n-es
printer-driver-cups-pdf
gnome-2048
gnome-chess
gnome-mahjongg
gnome-sudoku
guvcview
vlc
qt5-style-plugins
qt5ct
gdebi
f2fs-tools
xfsprogs
xfsdump
tumbler
tumbler-plugins-extra
ffmpegthumbnailer
linux-firmware
xterm
grub-pc
spice-vdagent
console-setup
2022-11-09 09:44:02 -01:00
" > $build/build/config/package-lists/packages.list.chroot
2022-11-16 13:07:06 -01:00
2022-11-13 19:05:23 -01:00
echo "# Installer packages to install the system to disk.
2022-11-16 13:07:06 -01:00
calamares
calamares-settings-debian
2022-11-13 18:59:16 -01:00
" > $build/build/config/package-lists/installer.list.chroot
2022-11-09 09:44:02 -01:00
# Packages to be stored in /pool but not installed in the OS .
echo "# These packages are available to the installer, for offline use.
2022-11-11 13:20:33 -01:00
b43-fwcutter
bcmwl-kernel-source
iucode-tool
setserial
user-setup
2022-11-09 09:44:02 -01:00
efibootmgr
grub-efi
2022-11-11 13:20:33 -01:00
secureboot-db
2022-11-09 09:44:02 -01:00
grub-efi-amd64
grub-efi-amd64-bin
grub-efi-amd64-signed
2022-11-11 13:20:33 -01:00
shim
2022-11-09 16:23:49 -01:00
shim-signed
2022-11-09 09:44:02 -01:00
" > $build/build/config/package-lists/installer.list.binary
# Setup the chroot structure
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
mkdir -p $build/build/config/includes.chroot/usr/share/applications
mkdir -p $build/build/config/includes.chroot/usr/share/backgrounds
2022-11-16 13:07:06 -01:00
mkdir -p $build/build/config/includes.chroot/etc/calamares
2022-11-09 09:44:02 -01:00
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/live/config.conf.d
2022-11-16 13:07:06 -01:00
mkdir -p $build/build/config/includes.chroot/usr/sbin
2022-11-09 09:44:02 -01:00
mkdir -p $build/build/config/includes.chroot/etc/lightdm
mkdir -p $build/build/config/includes.chroot/usr/share/pixmaps
2022-11-19 12:45:04 -01:00
mkdir -p $build/build/config/includes.chroot/usr/share/plymouth
mkdir -p $build/build/config/includes.chroot/usr/share/desktop-base
2022-11-12 20:54:31 -01:00
mkdir -p $build/build/config/includes.chroot/etc/default
2022-11-23 02:52:16 -01:00
mkdir -p $build/build/config/includes.chroot/boot/grub/themes
2022-11-09 09:44:02 -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
cp $build/hooks/live/* $build/build/config/hooks/live
cp $build/hooks/normal/* $build/build/config/hooks/normal
2022-11-12 17:08:04 -01:00
cp $build/install-debian/* $build/build/config/includes.chroot/usr/share/pixmaps
2022-11-16 13:07:06 -01:00
cp $build/sources-final/* $build/build/config/includes.chroot/usr/sbin
cp $build/bootloader-config/* $build/build/config/includes.chroot/usr/sbin
2022-11-23 02:52:16 -01:00
cp $build/grub/grub $build/build/config/includes.chroot/etc/default
2022-11-09 09:44:02 -01:00
cp -r $build/lightdm/* $build/build/config/includes.chroot/etc/lightdm
cp -r $build/bootloaders/* $build/build/config/includes.binary
2022-11-09 09:44:02 -01:00
cp -r $build/backgrounds/* $build/build/config/includes.chroot/usr/share/backgrounds
2022-11-16 13:07:06 -01:00
cp -r $build/calamares/* $build/build/config/includes.chroot/etc/calamares
2022-11-09 09:44:02 -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
2022-11-23 02:52:16 -01:00
cp -r $build/grub/themes/* $build/build/config/includes.chroot/boot/grub/themes
2022-11-17 09:59:42 -01:00
2022-11-09 09:44:02 -01:00
2022-11-12 17:08:04 -01:00
2022-11-09 09:44:02 -01:00
# Build the ISO #
lb build #--debug --verbose