Improve OS
This commit is contained in:
Executable
+95
@@ -0,0 +1,95 @@
|
||||
#!/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 {} \;
|
||||
@@ -1,27 +0,0 @@
|
||||
#!/bin/bash -e
|
||||
|
||||
if [ "${ARCH}" != "amd64" ]; then
|
||||
echo "export-iso: skipping live package install for non-amd64 arch (${ARCH})"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
on_chroot << EOF
|
||||
apt-get install -y \
|
||||
grub-efi-amd64 \
|
||||
grub-efi-amd64-bin \
|
||||
live-boot \
|
||||
live-boot-initramfs-tools \
|
||||
live-config \
|
||||
live-config-systemd
|
||||
|
||||
apt-get install --no-install-recommends -y calamares calamares-settings-vesperos
|
||||
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
|
||||
@@ -46,6 +46,13 @@ FSTABEOF
|
||||
fi
|
||||
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
|
||||
EOF
|
||||
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.
|
||||
|
||||
@@ -1,7 +0,0 @@
|
||||
#!/bin/bash -e
|
||||
|
||||
[ "${LIVEINSTALL}" != "1" ] && exit 0
|
||||
|
||||
on_chroot << EOF
|
||||
apt-get install --no-install-recommends -y calamares calamares-settings-vesperos
|
||||
EOF
|
||||
@@ -1,21 +0,0 @@
|
||||
#!/bin/bash -e
|
||||
|
||||
[ "${LIVEINSTALL}" != "1" ] && exit 0
|
||||
|
||||
LIVEFS_FILE="${STAGE_WORK_DIR}/${IMG_FILENAME}${IMG_SUFFIX}.livefs.squashfs"
|
||||
|
||||
unmount "${ROOTFS_DIR}"
|
||||
|
||||
mksquashfs "${ROOTFS_DIR}" "${LIVEFS_FILE}" \
|
||||
-comp xz \
|
||||
-noappend \
|
||||
-e boot/efi
|
||||
|
||||
mkdir -p "${DEPLOY_DIR}"
|
||||
|
||||
VMLINUZ=$(find "${ROOTFS_DIR}/boot" -maxdepth 1 -name "vmlinuz-*" | sort | tail -1)
|
||||
INITRD=$(find "${ROOTFS_DIR}/boot" -maxdepth 1 -name "initrd.img-*" | sort | tail -1)
|
||||
|
||||
cp "${LIVEFS_FILE}" "${DEPLOY_DIR}/${ARCHIVE_FILENAME}${IMG_SUFFIX}.livefs.squashfs"
|
||||
[ -n "${VMLINUZ}" ] && cp "${VMLINUZ}" "${DEPLOY_DIR}/${ARCHIVE_FILENAME}${IMG_SUFFIX}.livefs.vmlinuz"
|
||||
[ -n "${INITRD}" ] && cp "${INITRD}" "${DEPLOY_DIR}/${ARCHIVE_FILENAME}${IMG_SUFFIX}.livefs.initrd.img"
|
||||
@@ -27,5 +27,5 @@ udisks2
|
||||
unzip zip p7zip-full
|
||||
file
|
||||
python3-venv
|
||||
hyfetch
|
||||
cups
|
||||
cups
|
||||
command-not-found
|
||||
@@ -1,2 +1,3 @@
|
||||
cifs-utils
|
||||
mkvtoolnix
|
||||
hyfetch
|
||||
@@ -6,9 +6,7 @@ gvfs
|
||||
rfkill
|
||||
fonts-droid-fallback
|
||||
fonts-liberation2
|
||||
obconf
|
||||
python3-pyqt5 python3-qtawesome
|
||||
python3-opengl
|
||||
vulkan-tools mesa-vulkan-drivers
|
||||
libopengl0
|
||||
command-not-found
|
||||
libopengl0
|
||||
Reference in New Issue
Block a user