Remove ISO export, improve file names, update packages

This commit is contained in:
2026-03-28 21:41:34 -07:00
parent 01f7143e9d
commit 4e163d64be
22 changed files with 73 additions and 278 deletions

View File

@@ -1,11 +0,0 @@
#!/bin/bash -e
if [[ "${ARCH}" == "arm64" || "${ARCH}" == "armhf" ]]; then
if [ ! -x "${ROOTFS_DIR}/usr/bin/qemu-arm-static" ]; then
cp /usr/bin/qemu-arm-static "${ROOTFS_DIR}/usr/bin/"
fi
if [ -e "${ROOTFS_DIR}/etc/ld.so.preload" ]; then
mv "${ROOTFS_DIR}/etc/ld.so.preload" "${ROOTFS_DIR}/etc/ld.so.preload.disabled"
fi
fi

View File

@@ -1,11 +0,0 @@
#!/bin/bash -e
rm -f "${ROOTFS_DIR}/etc/apt/apt.conf.d/51cache"
rm -f "${ROOTFS_DIR}/etc/apt/sources.list.d/00-temp.list"
find "${ROOTFS_DIR}/var/lib/apt/lists/" -type f -delete
on_chroot << EOF
apt-get update
apt-get -y dist-upgrade --auto-remove --purge
apt-get clean
apt-file update
EOF

View File

@@ -1,3 +0,0 @@
#!/bin/bash -e
install -m 644 files/resolv.conf "${ROOTFS_DIR}/etc/"

View File

@@ -1 +0,0 @@
nameserver 8.8.8.8

View File

@@ -1,95 +0,0 @@
#!/bin/bash -e
if [ "${ARCH}" != "amd64" ]; then
echo "export-iso: skipping live package install for non-amd64 arch (${ARCH})"
exit 0
else
on_chroot << EOF
apt-get install -y \
live-boot \
live-boot-initramfs-tools \
live-config \
live-config-systemd
EOF
on_chroot << EOF
apt-get install --no-install-recommends -y calamares calamares-settings-vesperos libcrack2 cracklib-runtime
EOF
# Write live-config user settings
mkdir -p "${ROOTFS_DIR}/etc/live"
cat > "${ROOTFS_DIR}/etc/live/config.conf" << EOF
LIVE_USERNAME="${LIVE_USERNAME:-user}"
LIVE_USER_FULLNAME="${LIVE_USER_FULLNAME:-Live User}"
LIVE_USER_DEFAULT_GROUPS="audio cdrom dip floppy video plugdev netdev bluetooth"
LIVE_USER_PASSWORD="${LIVE_USER_PASSWORD:-live}"
EOF
# Rewrite fstab for the live environment.
# live-boot manages root via overlayfs — build-time disk entries cause fsck failures at boot.
cat > "${ROOTFS_DIR}/etc/fstab" << 'FSTABEOF'
# Live system fstab — root is managed by live-boot via overlayfs, not this file.
tmpfs /tmp tmpfs defaults,nosuid,nodev 0 0
FSTABEOF
# Remove first-boot trigger so GDM uses autologin in the live session.
rm -f "${ROOTFS_DIR}/var/lib/gdm/run-initial-setup"
# Configure initramfs for live boot — squashfs and overlay are required
if [ -f "${ROOTFS_DIR}/etc/initramfs-tools/initramfs.conf" ]; then
sed -i 's/^MODULES=.*/MODULES=most/' "${ROOTFS_DIR}/etc/initramfs-tools/initramfs.conf"
fi
for mod in squashfs overlay; do
grep -qx "${mod}" "${ROOTFS_DIR}/etc/initramfs-tools/modules" 2>/dev/null || \
echo "${mod}" >> "${ROOTFS_DIR}/etc/initramfs-tools/modules"
done
fi
# Ensure update-initramfs actually runs — it silently exits if update_initramfs=no/disabled,
# which may have been set during the build to suppress apt-hook rebuilds.
# This mirrors what exports/iso/04-finalise does before calling update-initramfs.
if [ -f "${ROOTFS_DIR}/etc/initramfs-tools/update-initramfs.conf" ]; then
sed -i 's/^update_initramfs=.*/update_initramfs=yes/' "${ROOTFS_DIR}/etc/initramfs-tools/update-initramfs.conf"
fi
on_chroot <<- EOF
update-initramfs -k all -c
if hash hardlink 2>/dev/null; then
hardlink -t /usr/share/doc
fi
if [ -f /usr/lib/systemd/system/apt-listchanges.service ]; then
python3 -m apt_listchanges.populate_database --profile apt
systemctl disable apt-listchanges.timer
fi
install -m 755 -o systemd-timesync -g systemd-timesync -d /var/lib/systemd/timesync
install -m 644 -o systemd-timesync -g systemd-timesync /dev/null /var/lib/systemd/timesync/clock
EOF
rm -f "${ROOTFS_DIR}/usr/bin/qemu-arm-static"
if [ "${USE_QEMU}" != "1" ]; then
if [ -e "${ROOTFS_DIR}/etc/ld.so.preload.disabled" ]; then
mv "${ROOTFS_DIR}/etc/ld.so.preload.disabled" "${ROOTFS_DIR}/etc/ld.so.preload"
fi
fi
rm -f "${ROOTFS_DIR}/etc/network/interfaces.dpkg-old"
rm -f "${ROOTFS_DIR}/etc/apt/sources.list~"
rm -f "${ROOTFS_DIR}/etc/apt/trusted.gpg~"
rm -f "${ROOTFS_DIR}/etc/passwd-"
rm -f "${ROOTFS_DIR}/etc/group-"
rm -f "${ROOTFS_DIR}/etc/shadow-"
rm -f "${ROOTFS_DIR}/etc/gshadow-"
rm -f "${ROOTFS_DIR}/etc/subuid-"
rm -f "${ROOTFS_DIR}/etc/subgid-"
rm -f "${ROOTFS_DIR}"/var/cache/debconf/*-old
rm -f "${ROOTFS_DIR}"/var/lib/dpkg/*-old
rm -f "${ROOTFS_DIR}"/usr/share/icons/*/icon-theme.cache
rm -f "${ROOTFS_DIR}/var/lib/dbus/machine-id"
echo "uninitialized" > "${ROOTFS_DIR}/etc/machine-id"
ln -nsf /proc/mounts "${ROOTFS_DIR}/etc/mtab"
find "${ROOTFS_DIR}/var/log/" -type f -exec cp /dev/null {} \;

View File

@@ -1,124 +0,0 @@
#!/bin/bash -e
if [ "${ARCH}" != "amd64" ]; then
echo "export-iso: skipping ISO creation for non-amd64 arch (${ARCH})"
exit 0
fi
ISO_FILE="${STAGE_WORK_DIR}/${IMG_FILENAME}${IMG_SUFFIX}.iso"
ISO_TEMP_DIR="${STAGE_WORK_DIR}/iso_temp"
FINAL_ISO_FILE="${DEPLOY_DIR}/${ARCHIVE_FILENAME}${IMG_SUFFIX}.iso"
# Step 1: Rewrite fstab for the live environment.
# live-boot manages the root overlay via overlayfs — fstab root entry is unused at boot.
# Replace build-time placeholders so initramfs-tools fsck hook doesn't warn about unknown fs types.
cat > "${ROOTFS_DIR}/etc/fstab" << 'FSTABEOF'
# Live system fstab — root is managed by live-boot via overlayfs, not this file.
tmpfs /tmp tmpfs defaults,nosuid,nodev 0 0
FSTABEOF
# Remove first-boot trigger — in a live session GDM should use autologin, not gnome-initial-setup.
rm -f "${ROOTFS_DIR}/var/lib/gdm/run-initial-setup"
if [ -f "${ROOTFS_DIR}/etc/initramfs-tools/update-initramfs.conf" ]; then
sed -i 's/^update_initramfs=.*/update_initramfs=yes/' "${ROOTFS_DIR}/etc/initramfs-tools/update-initramfs.conf"
fi
if [ -f "${ROOTFS_DIR}/etc/initramfs-tools/initramfs.conf" ]; then
sed -i 's/^MODULES=.*/MODULES=most/' "${ROOTFS_DIR}/etc/initramfs-tools/initramfs.conf"
fi
# Explicitly include squashfs and overlay — live-boot needs both to mount the live root.
for mod in squashfs overlay; do
grep -qx "${mod}" "${ROOTFS_DIR}/etc/initramfs-tools/modules" 2>/dev/null || \
echo "${mod}" >> "${ROOTFS_DIR}/etc/initramfs-tools/modules"
done
# Step 2: Generate initramfs inside the chroot.
# live-boot-initramfs-tools is installed so the initrd will include live-boot hooks.
on_chroot << EOF
update-initramfs -k all -c
if [ -x /etc/init.d/fake-hwclock ]; then
/etc/init.d/fake-hwclock stop
fi
EOF
# Step 3: Assemble ISO directory structure
mkdir -p "${ISO_TEMP_DIR}/boot/grub"
mkdir -p "${ISO_TEMP_DIR}/live"
# Copy kernel and initrd — find the latest versioned files in /boot
VMLINUZ=$(find "${ROOTFS_DIR}/boot" -maxdepth 1 -name "vmlinuz-*" -type f | sort -V | tail -1)
INITRD=$(find "${ROOTFS_DIR}/boot" -maxdepth 1 -name "initrd.img-*" -type f | sort -V | tail -1)
if [ -z "${VMLINUZ}" ] || [ ! -f "${VMLINUZ}" ]; then
echo "ERROR: Could not find kernel in ${ROOTFS_DIR}/boot/"
ls "${ROOTFS_DIR}/boot/" || true
exit 1
fi
if [ -z "${INITRD}" ] || [ ! -f "${INITRD}" ]; then
echo "ERROR: Could not find initrd in ${ROOTFS_DIR}/boot/"
ls "${ROOTFS_DIR}/boot/" || true
exit 1
fi
cp "${VMLINUZ}" "${ISO_TEMP_DIR}/boot/vmlinuz"
cp "${INITRD}" "${ISO_TEMP_DIR}/boot/initrd.img"
# Step 4: Write the GRUB menu config
cat > "${ISO_TEMP_DIR}/boot/grub/grub.cfg" << 'GRUBEOF'
set default=0
set timeout=5
insmod all_video
insmod gfxterm
menuentry "VesperOS Live" {
linux /boot/vmlinuz boot=live components splash
initrd /boot/initrd.img
}
menuentry "VesperOS Live (safe mode)" {
linux /boot/vmlinuz boot=live components nomodeset
initrd /boot/initrd.img
}
menuentry "VesperOS Live (text mode)" {
linux /boot/vmlinuz boot=live components systemd.unit=multi-user.target
initrd /boot/initrd.img
}
GRUBEOF
# Step 5: Create squashfs of the rootfs.
# live-boot will find this at /live/filesystem.squashfs on the boot medium.
# Unmount all virtual filesystems left mounted by on_chroot calls.
# The empty directories (proc, sys, dev, tmp, run) are left in place so
# live-boot can bind-mount into them at boot.
unmount "${ROOTFS_DIR}"
mksquashfs "${ROOTFS_DIR}" "${ISO_TEMP_DIR}/live/filesystem.squashfs" \
-comp xz \
-noappend \
-e boot/efi
# Write filesystem metadata used by installers and live tools
du -sx --block-size=1 "${ROOTFS_DIR}" | cut -f1 > "${ISO_TEMP_DIR}/live/filesystem.size"
mkdir -p "${ISO_TEMP_DIR}/.disk"
echo "VesperOS Trixie - $(date +%Y-%m-%d)" > "${ISO_TEMP_DIR}/.disk/info"
# Step 6: Build the ISO with grub-mkrescue (handles BIOS + UEFI automatically)
grub-mkrescue \
--output="${ISO_FILE}" \
"${ISO_TEMP_DIR}" \
-- \
-volid "VesperOS"
rm -rf "${ISO_TEMP_DIR}"
# Step 7: Deploy
mkdir -p "${DEPLOY_DIR}"
rm -f "${FINAL_ISO_FILE}"
cp "${ISO_FILE}" "${FINAL_ISO_FILE}"
echo "Live ISO created at ${FINAL_ISO_FILE}"

View File

@@ -1,9 +0,0 @@
#!/bin/bash -e
# For live ISO we don't need a disk image — just a plain working directory.
# Substages (apt cleanup, network config) run on_chroot against this directory.
rm -rf "${ROOTFS_DIR}"
mkdir -p "${ROOTFS_DIR}"
rsync -aHAXx --exclude /var/cache/apt/archives "${EXPORT_ROOTFS_DIR}/" "${ROOTFS_DIR}/"

View File

@@ -21,6 +21,7 @@ EOF
LIVE_USERNAME="${LIVE_USERNAME:-vesperos}"
LIVE_USER_FULLNAME="${LIVE_USER_FULLNAME:-Live User}"
LIVE_USER_DEFAULT_GROUPS="audio cdrom dip floppy video plugdev netdev bluetooth"
LIVE_USER_SHELL="/bin/zsh"
LIVE_USER_PASSWORD="${LIVE_USER_PASSWORD:-vesperos}"
LIVE_LOGIN="true"
EOF
@@ -63,6 +64,19 @@ EOF
# Enable live-config system wide, instead of via grub
on_chroot << EOF
systemctl enable live-config.service
EOF
# Live-only dconf: separate database + profile so the live wallpaper
# is shown in the live session but not on the real installed system.
mkdir -p "${ROOTFS_DIR}/etc/dconf/db/live.d"
install -m 644 files/live-default-settings "${ROOTFS_DIR}/etc/dconf/db/live.d/00-default-settings"
install -m 644 files/dconf-profile-live-user "${ROOTFS_DIR}/etc/dconf/profile/live"
# Hook sets DCONF_PROFILE=live for the live user at boot
install -m 755 files/9999-vesperos-dconf "${ROOTFS_DIR}/lib/live/config/9999-vesperos-dconf"
on_chroot << EOF
dconf update
EOF
fi
fi
@@ -70,7 +84,12 @@ fi
# If live install add calamares installer
if [ "${LIVEINSTALL}" == "1" ]; then
on_chroot << EOF
apt-get install --no-install-recommends -y calamares calamares-settings-vesperos libcrack2 cracklib-runtime
apt-get install --no-install-recommends -y \
calamares calamares-settings-vesperos \
libcrack2 cracklib-runtime \
squashfs-tools \
grub-efi-amd64 grub-pc-bin efibootmgr \
parted gdisk dosfstools e2fsprogs
EOF
fi

View File

@@ -0,0 +1,14 @@
#!/bin/sh
# Runs at live boot only. Sets DCONF_PROFILE=live for the live user
# so the live dconf database is used instead of the installed default.
# Source live-config variables (provides LIVE_USERNAME etc.)
. /etc/live/config.conf 2>/dev/null || true
LIVE_USER="${LIVE_USERNAME:-vesperos}"
LIVE_HOME="/home/${LIVE_USER}"
if [ -d "${LIVE_HOME}" ]; then
mkdir -p "${LIVE_HOME}/.config/environment.d"
echo 'DCONF_PROFILE=live' > "${LIVE_HOME}/.config/environment.d/dconf.conf"
chown -R "${LIVE_USER}:${LIVE_USER}" "${LIVE_HOME}/.config"
fi

View File

@@ -0,0 +1,3 @@
user-db:user
system-db:live
system-db:local

View File

@@ -0,0 +1,4 @@
[org/gnome/desktop/background]
picture-uri='file:///usr/share/backgrounds/vesperos-live.png'
picture-uri-dark='file:///usr/share/backgrounds/vesperos-live.png'
picture-options='zoom'

View File

@@ -0,0 +1,2 @@
qemu-guest-agent
open-vm-tools

View File

@@ -1,3 +1,4 @@
cifs-utils
mkvtoolnix
hyfetch
hyfetch
fastfetch

View File

@@ -0,0 +1,4 @@
#!/bin/bash -e
# Set the default shell to zsh in the adduser configuration, so that new users created with adduser (including the live session user) will have zsh as their default shell.
sed -i 's|^DSHELL=.*|DSHELL=/bin/zsh|' "${ROOTFS_DIR}/etc/adduser.conf"

View File

@@ -33,13 +33,12 @@ on_chroot << EOF
setupcon --force --save-only -v
EOF
# Set root password to locked
on_chroot << EOF
usermod --pass='*' root
#usermod --shell /bin/zsh root
EOF
#sed -i 's|^SHELL=.*|SHELL=/bin/zsh|' "${ROOTFS_DIR}/etc/default/useradd"
rm -f "${ROOTFS_DIR}/etc/ssh/"ssh_host_*_key*
sed -i 's/^FONTFACE=.*/FONTFACE=""/;s/^FONTSIZE=.*/FONTSIZE=""/' "${ROOTFS_DIR}/etc/default/console-setup"

View File

@@ -1 +1,3 @@
firefox-esr
firefox-esr
spice-vdagent
open-vm-tools-desktop

View File

@@ -1 +1,2 @@
gnome-session gnome-shell libpam-gnome-keyring gnome-control-center gnome-software network-manager-gnome pulseaudio gnome-terminal gnome-online-accounts gnome-initial-setup gnome-tweaks gnome-shell-extension-manager gnome-shell-extension-user-theme gnome-shell-extension-zorin-taskbar gnome-shell-extension-no-annoyance gnome-shell-extension-gsconnect gnome-shell-extension-dash-to-panel gnome-shell-extension-appindicator gnome-shell-extension-desktop-icons-ng
gnome-session gnome-shell libpam-gnome-keyring gnome-control-center gnome-software network-manager-gnome pulseaudio gnome-terminal gnome-online-accounts gnome-initial-setup gnome-tweaks gnome-shell-extension-manager gnome-shell-extension-user-theme gnome-shell-extension-zorin-taskbar gnome-shell-extension-no-annoyance gnome-shell-extension-gsconnect gnome-shell-extension-dash-to-panel gnome-shell-extension-appindicator
#gnome-shell-extension-desktop-icons-ng

View File

@@ -1 +1 @@
wallpapers-chillcraft
#vesperos-theme

View File

@@ -27,18 +27,18 @@ fi
mkdir -p "${ROOTFS_DIR}/usr/share/gnome-initial-setup/"
install -m 644 files/vendor.conf "${ROOTFS_DIR}/usr/share/gnome-initial-setup/"
# Set default gnome-extensions
install -m 644 files/gnome-extensions "${ROOTFS_DIR}/etc/dconf/db/local.d/00-extensions"
# Set default gnome-extensions and thier respective settings
install -m 644 files/gnome-default-extensions "${ROOTFS_DIR}/etc/dconf/db/local.d/00-extensions"
# Install wallpapers
mkdir -p "${ROOTFS_DIR}/usr/local/share/backgrounds"
install -m 644 files/loveimage.png "${ROOTFS_DIR}/usr/local/share/backgrounds/loveimage.png"
install -m 644 files/neon-forest.png "${ROOTFS_DIR}/usr/local/share/backgrounds/neon-forest.png"
#mkdir -p "${ROOTFS_DIR}/usr/local/share/backgrounds"
#install -m 644 files/loveimage.png "${ROOTFS_DIR}/usr/local/share/backgrounds/loveimage.png"
#install -m 644 files/neon-forest.png "${ROOTFS_DIR}/usr/local/share/backgrounds/neon-forest.png"
# Set default settings (gnome-initial-setup)
install -m 644 files/gnome-initial-setup-default-settings "${ROOTFS_DIR}/etc/dconf/db/gnome-initial-setup.d/00-default-settings"
# Set default gnome settings
# Set default settings (gnome)
install -m 644 files/gnome-default-settings "${ROOTFS_DIR}/etc/dconf/db/local.d/00-default-settings"
# Update all dconf databases

View File

@@ -2,9 +2,9 @@
gtk-theme='Adwaita-dark'
color-scheme='prefer-dark'
[org/gnome/desktop/background]
picture-uri='file:///usr/local/share/backgrounds/neon-forest.png'
picture-uri-dark='file:///usr/local/share/backgrounds/neon-forest.png'
picture-options='spanned'
primary-color='000000'
secondary-color='FFFFFF'
#[org/gnome/desktop/background]
#picture-uri='file:///usr/local/share/backgrounds/neon-forest.png'
#picture-uri-dark='file:///usr/local/share/backgrounds/neon-forest.png'
#picture-options='spanned'
#primary-color='000000'
#secondary-color='FFFFFF'

View File

@@ -1,8 +1,8 @@
# This changes/sets the defaults for gnome-initial-setup's session
[org/gnome/desktop/background]
picture-uri='file:///usr/local/share/backgrounds/loveimage.png'
picture-options='zoom'
#[org/gnome/desktop/background]
#picture-uri='file:///usr/local/share/backgrounds/loveimage.png'
#picture-options='zoom'
[org/gnome/desktop/screensaver]
picture-uri='file:///usr/local/share/backgrounds/loveimage.png'
#[org/gnome/desktop/screensaver]
#picture-uri='file:///usr/local/share/backgrounds/loveimage.png'