ExnixOS-BY-MR/eznixOS12X-calamares+debian.../bldeznix12X.sh

386 lines
9.1 KiB
Bash
Raw Normal View History

2023-11-19 18:09:38 -01:00
#!/bin/bash
################################################################################
# bldeznix12X -- Revision: 12X -1 -- by Manuel rosa
# (GNU/General Public License version 3.0)
# Step by Step Live-build
################################################################################
PATH="/sbin:/usr/sbin:/usr/local/sbin:$PATH"
# Set the working folder variable
eznixOS="$(pwd)"
# Create the eznixOS folder, move into it removing stale mountpoints and files there.
[ -e eznixOS ] && [ ! -d eznixOS ] && rm -f eznixOS || [ ! -e eznixOS ] && mkdir eznixOS
cd eznixOS
umount $(mount | grep "${PWD}/chroot" | tac | cut -f3 -d" ") 2>/dev/null
# Set up build environment
lb config \
--binary-images iso-hybrid \
--mode debian \
--architectures amd64 \
--linux-flavours amd64 \
--distribution bookworm \
--archive-areas "main contrib non-free non-free-firmware" \
--debian-installer live \
--debian-installer-distribution bookworm \
--debian-installer-gui true \
--updates true \
--security true \
--backports true \
--cache true \
--apt-recommends true \
--firmware-binary true \
--firmware-chroot true \
--win32-loader false \
--iso-application $BLDDIR \
--iso-preparer eznix-https://sourceforge.net/projects/eznixos/ \
--iso-publisher eznix-https://sourceforge.net/projects/eznixos/ \
--iso-volume "eznixOS12X_${TODAY}" \
--image-name "eznixOS12X" \
--checksums sha512 \
--zsync false \
--clean \
--color \
"${@}"
# Install desktop and applications
mkdir -p $eznixOS/eznixOS/config/package-lists
echo "
accountsservice
arc-theme
asunder
atril
breeze-gtk-theme
breeze-icon-theme
dconf-cli
galculator
geany
gnome-keyring
gnome-nettool
gnome-system-tools
greybird-gtk-theme
gthumb
guvcview
gvfs-backends
gvfs-fuse
light-locker
lightdm
lightdm-gtk-greeter
lightdm-gtk-greeter-settings
mousepad
network-manager-gnome
network-manager-openconnect-gnome
network-manager-openvpn-gnome
numix-gtk-theme
pavucontrol
pulseaudio
remmina
simple-scan
system-config-printer
tango-icon-theme
transmission-gtk
xarchiver
xfce4
xfce4-goodies
xfce4-power-manager
xfce4-terminal
xscreensaver
" >> $eznixOS/eznixOS/config/package-lists/desktop.list.chroot
echo "
aisleriot
alsa-utils
apt-transport-https
audacious
audacious-plugins
autoconf
automake
bleachbit
btrfs-progs
build-essential
cdtool
cdrdao
cdrskin
cifs-utils
clonezilla
cryptsetup
cryptsetup-initramfs
cups
cups-filters
curl
dbus-x11
debconf
debhelper
dh-autoreconf
dialog
dirmngr
dkms
dos2unix
dosbox
dosfstools
dvdauthor
exfatprogs
faac
faad
fakeroot
ffmpeg
filezilla
firefox-esr
flac
foomatic-db
foomatic-db-engine
frei0r-plugins
fuse3
gdebi
ghostscript
gimp
gir1.2-ibus-1.0
gnome-disk-utility
gparted grsync
grub-pc
gstreamer1.0-plugins-bad
gstreamer1.0-plugins-ugly
gstreamer1.0-plugins-good
hardinfo
haveged
hplip-gui
htop
hunspell-en-us
hyphen-en-us
ibus
ibus-data
ibus-gtk
ibus-gtk3
iftop
im-config
inxi
isolinux
iw
jfsutils
keepassxc
lame
less
libegl1-mesa
libibus-1.0-5
libgl1-mesa-glx
libqt5opengl5
libreoffice-calc
libreoffice-draw
libreoffice-impress
libreoffice-writer
libreoffice-gtk3
libreoffice-help-en-us
libnss-mdns
libsmbclient
libxcb-xtest0
libxvidcore4
linux-headers-amd64
live-build
lsb-release
lshw
meld
mencoder
menu
mjpegtools
mpg321
mpv
mtools
mythes-en-us
neofetch
netcat-openbsd
ntfs-3g
nvidia-detect
openconnect
openvpn
openvpn-systemd-resolved
os-prober
p7zip-full
p7zip-rar
papirus-icon-theme
pciutils perl
plymouth
plymouth-label
plymouth-themes
plymouth-x11
policykit-1
printer-driver-gutenprint
python3-ibus-1.0
rar
samba-common-bin
simplescreenrecorder
smbclient
smplayer
smplayer-l10n
smplayer-themes
soundconverter
sox
squashfs-tools
streamripper
sudo
synaptic
syslinux
syslinux-common
testdisk
timeshift
twolame
udisks2
upower
unrar
unzip
webext-keepassxc-browser
wget
x11-common
x265
x264
xauth
xclip
xdg-utils
xfsprogs
xorg
xserver-xorg-input-all
xserver-xorg-video-all
xorriso
xterm
zip
zstd
zulucrypt-gui
zulumount-gui
" > $eznixOS/eznixOS/config/package-lists/extrapackages.list.chroot
## Add extra firmware packages
echo "
atmel-firmware
bluez-firmware
firmware-linux-free
midisport-firmware
firmware-misc-nonfree
firmware-amd-graphics
firmware-atheros
firmware-bnx2
firmware-bnx2x
firmware-brcm80211
firmware-cavium
firmware-intel-sound
firmware-iwlwifi
firmware-libertas
firmware-linux
firmware-linux-nonfree
firmware-misc-nonfree
firmware-myricom
firmware-netronome
firmware-netxen
firmware-qcom-media
firmware-qcom-soc
firmware-qlogic
firmware-realtek
firmware-samsung
firmware-siano
firmware-ti-connectivity
firmware-sof-signed
firmware-zd1211
" > $eznixOS/eznixOS/config/package-lists/firmware.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
" >> $eznixOS/eznixOS/config/package-lists/installer.list.binary
# Uncomment below line to include more Broadcom WiFi drivers:
# echo "
#b43-fwcutter
#firmware-b43-installer
#firmware-b43legacy-installer
#" > $eznixOS12X/eznixOS/config/package-lists/bcmfirmware.list.chroot
# Include the Calamares installer
mkdir -p $eznixOS/eznixOS/config/includes.chroot/etc/
cp -r $eznixOS/eznixOS12X/calamares/ $eznixOS/eznixOS/config/includes.chroot/etc/
echo "
calamares
calamares-settings-debian
" >> $eznixOS/eznixOS/config/package-lists/calamares.list.chroot
# Make folders in the chroot
mkdir -p $eznixOS/eznixOS/config/hooks/normal/
mkdir -p $eznixOS/eznixOS/config/packages.chroot/
mkdir -p $eznixOS/eznixOS/config/includes.chroot/etc/
mkdir -p $eznixOS/eznixOS/config/includes.chroot/usr/lib/
mkdir -p $eznixOS/eznixOS/config/includes.chroot/etc/default/
mkdir -p $eznixOS/eznixOS/config/includes.chroot/usr/local/bin/
mkdir -p $eznixOS/eznixOS/config/includes.chroot/etc/skel/.config/
mkdir -p $eznixOS/eznixOS/config/includes.chroot/usr/share/backgrounds/
mkdir -p $eznixOS/eznixOS/config/includes.chroot/usr/share/applications/
mkdir -p $eznixOS/eznixOS/config/includes.chroot/usr/share/icons/default/
mkdir -p $eznixOS/eznixOS/config/includes.chroot/etc/live/config.conf.d/
mkdir -p $eznixOS/eznixOS/config/includes.chroot/etc/lightdm
mkdir -p $eznixOS/eznixOS/config/includes.binary/
mkdir -p $eznixOS/eznixOS/config/includes.installer/usr/lib/finish-install.d/
mkdir -p $eznixOS/eznixOS/config/includes.installer//usr/share/
# Copy files into the chroot
cp -r $eznixOS/eznixOS12X $eznixOS/eznixOS/config/includes.chroot/usr/share/
cp -r $eznixOS/eznixOS12X/xfce4/ $eznixOS/eznixOS/config/includes.chroot/etc/skel/.config/
cp -r $eznixOS/eznixOS12X/bootloaders/* $eznixOS/eznixOS/config/includes.binary
cp -r $eznixOS/eznixOS12X/D-I-installer/graphics $eznixOS/eznixOS/config/includes.installer/usr/share
cp -r $eznixOS/eznixOS12X/D-I-installer/themes $eznixOS/eznixOS/config/includes.installer/usr/share
cp $eznixOS/eznixOS12X/hooks/* $eznixOS/eznixOS/config/hooks/normal/
cp $eznixOS/eznixOS12X/lightdm/* $eznixOS/eznixOS/config/includes.chroot/etc/lightdm/
cp $eznixOS/eznixOS12X/issue/* $eznixOS/eznixOS/config/includes.chroot/etc/
cp $eznixOS/eznixOS12X/grub/* $eznixOS/eznixOS/config/includes.chroot/etc/default/
cp $eznixOS/eznixOS12X/os-release/* $eznixOS/eznixOS/config/includes.chroot/usr/lib/
cp $eznixOS/eznixOS12X/scripts/* $eznixOS/eznixOS/config/includes.chroot/usr/local/bin/
cp $eznixOS/eznixOS12X/icons/* $eznixOS/eznixOS/config/includes.chroot/usr/share/icons/default/
cp $eznixOS/eznixOS12X/backgrounds/* $eznixOS/eznixOS/config/includes.chroot/usr/share/backgrounds/
cp $eznixOS/eznixOS12X/launchers/ezadmin.desktop $eznixOS/eznixOS/config/includes.chroot/usr/share/applications/
cp $eznixOS/eznixOS12X/live-user/* $eznixOS/eznixOS/config/includes.chroot/etc/live/config.conf.d
cp $eznixOS/eznixOS12X/D-I-installer/scripts/* $eznixOS/eznixOS/config/includes.installer/usr/lib/finish-install.d
cp $eznixOS/eznixOS12X/D-I-installer/preseed/* $eznixOS/eznixOS/config/includes.installer
# Uncomment below line if you have packages in the misc64 folder to include:
#cp $eznixOS/eznixOS12X/misc64/* $eznixOS/eznixOS/config/packages.chroot/
# Start the build process
# build the ISO #
lb build #--debug --verbose
# Disclaimer:
# THIS SOFTWARE IS PROVIDED BY EZNIX “AS IS” AND ANY EXPRESS OR IMPLIED
# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
# EVENT SHALL EZNIX BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
# BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
# IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE.