diff options
-rwxr-xr-x | make_slackware_live.sh | 24 | ||||
-rw-r--r-- | pkglists/alien.lst | 4 | ||||
-rw-r--r-- | pkglists/mate.lst | 1 | ||||
-rw-r--r-- | pkglists/min.lst | 4 | ||||
-rw-r--r-- | pkglists/noxbase.lst | 2 | ||||
-rw-r--r-- | pkglists/x_base.lst | 3 | ||||
-rw-r--r-- | upslak.sh | 20 |
7 files changed, 40 insertions, 18 deletions
diff --git a/make_slackware_live.sh b/make_slackware_live.sh index b3f4910..e91f1a4 100755 --- a/make_slackware_live.sh +++ b/make_slackware_live.sh @@ -358,9 +358,9 @@ function cleanup() { umount ${LIVE_ROOTDIR}/sys 2>${DBGOUT} || true umount ${LIVE_ROOTDIR}/proc 2>${DBGOUT} || true umount ${LIVE_ROOTDIR}/dev 2>${DBGOUT} || true - umount ${LIVE_ROOTDIR} 2>${DBGOUT} || true + umount -R ${LIVE_ROOTDIR} 2>${DBGOUT} || true # Need to umount the squashfs modules too: - umount ${LIVE_WORK}/*_$$ 2>${DBGOUT} || true + umount -R ${LIVE_WORK}/*_$$ 2>${DBGOUT} || true rmdir ${LIVE_ROOTDIR} 2>${DBGOUT} rmdir ${LIVE_WORK}/*_$$ 2>${DBGOUT} @@ -1569,7 +1569,7 @@ else fi # Determine additional boot parameters to be added: -if [ -z ${KAPPEND} ]; then +if [ -z "${KAPPEND}" ]; then eval KAPPEND=\$KAPPEND_${LIVEDE} fi @@ -1604,7 +1604,7 @@ fi if [ "$FORCE" = "YES" ]; then echo "-- Removing old files and directories!" umount ${LIVE_ROOTDIR}/{proc,sys,dev} 2>${DBGOUT} || true - umount ${LIVE_ROOTDIR} 2>${DBGOUT} || true + umount -R ${LIVE_ROOTDIR} 2>${DBGOUT} || true rm -rf ${LIVE_STAGING}/${LIVEMAIN} ${LIVE_WORK} ${LIVE_ROOTDIR} fi @@ -1708,12 +1708,12 @@ for SPS in ${SL_SERIES} ; do echo "${THEDATE} (${BUILDER})" > ${INSTDIR}/${MARKER} echo "-- Installing the '${SPS}' series." - umount ${LIVE_ROOTDIR} 2>${DBGOUT} || true + umount -R ${LIVE_ROOTDIR} 2>${DBGOUT} || true mount -t overlay -o lowerdir=${RODIRS},upperdir=${INSTDIR},workdir=${LIVE_OVLDIR} overlay ${LIVE_ROOTDIR} # Install the package series: install_pkgs ${SPS} ${LIVE_ROOTDIR} ${MTYPE} - umount ${LIVE_ROOTDIR} || true + umount -R ${LIVE_ROOTDIR} || true if [ "$SPS" = "a" -a "$CORE2RAM" = "NO" ] || [ "$SPS" = "${MINLIST}" ]; then @@ -1782,7 +1782,7 @@ mkdir -p ${INSTDIR} echo "-- Configuring the base system." # -------------------------------------------------------------------------- # -umount ${LIVE_ROOTDIR} 2>${DBGOUT} || true +umount -R ${LIVE_ROOTDIR} 2>${DBGOUT} || true mount -t overlay -o lowerdir=${RODIRS},upperdir=${INSTDIR},workdir=${LIVE_OVLDIR} overlay ${LIVE_ROOTDIR} # Determine the kernel version in the Live OS: @@ -3359,6 +3359,10 @@ if [ -x ${LIVE_ROOTDIR}/etc/cron.daily/mlocate ]; then else LOCATE_BIN=slocate fi +# Mlocate needs a mounted /proc in the chroot: +if ! mount | grep -q 'on ${LIVE_ROOTDIR}/proc' ; then + mount --bind /proc ${LIVE_ROOTDIR}/proc +fi chroot ${LIVE_ROOTDIR} /etc/cron.daily/${LOCATE_BIN} 2>${DBGOUT} # ----------------------------------------------------------------------------- @@ -3366,7 +3370,7 @@ chroot ${LIVE_ROOTDIR} /etc/cron.daily/${LOCATE_BIN} 2>${DBGOUT} # ----------------------------------------------------------------------------- # Squash the configuration into its own module: -umount ${LIVE_ROOTDIR} 2>${DBGOUT} || true +umount -R ${LIVE_ROOTDIR} 2>${DBGOUT} || true mksquashfs ${INSTDIR} ${LIVE_MOD_SYS}/0099-${DISTRO}_zzzconf-${SL_VERSION}-${SL_ARCH}.sxz -noappend -comp ${SQ_COMP} ${SQ_COMP_PARAMS} rm -rf ${INSTDIR}/* @@ -3386,7 +3390,7 @@ unset INSTDIR # ----------------------------------------------------------------------------- echo "-- Preparing the system for live booting." -umount ${LIVE_ROOTDIR} 2>${DBGOUT} || true +umount -R ${LIVE_ROOTDIR} 2>${DBGOUT} || true mount -t overlay -o lowerdir=${RODIRS%:*},upperdir=${LIVE_BOOT},workdir=${LIVE_OVLDIR} overlay ${LIVE_ROOTDIR} mount --bind /proc ${LIVE_ROOTDIR}/proc @@ -3496,7 +3500,7 @@ rm -rf ${LIVE_ROOTDIR}/boot/initrd-tree # ... and cleanup these mounts again: umount ${LIVE_ROOTDIR}/{proc,sys,dev} || true -umount ${LIVE_ROOTDIR} || true +umount -R ${LIVE_ROOTDIR} || true # Paranoia: [ ! -z "${LIVE_BOOT}" ] && rm -rf ${LIVE_BOOT}/{etc,tmp,usr,var} 1>${DBGOUT} 2>${DBGOUT} diff --git a/pkglists/alien.lst b/pkglists/alien.lst index c5ba85b..9672d5f 100644 --- a/pkglists/alien.lst +++ b/pkglists/alien.lst @@ -20,7 +20,6 @@ gst-plugins-libav icedtea-web icu4c-compat keepassxc -#lame libreoffice #libreoffice-dict-af #libreoffice-dict-ar @@ -68,17 +67,14 @@ libreoffice libstatgrab #libtinfo libtorrent-rasterbar -#lumina #mkvtoolnix muparser netsurf nodejs -#nvme-cli openconnect openjdk11 #oxygen-gtk2 p7zip -#palemoon podofo poppler-qt5 python-twisted diff --git a/pkglists/mate.lst b/pkglists/mate.lst index bb90716..9436ec0 100644 --- a/pkglists/mate.lst +++ b/pkglists/mate.lst @@ -14,6 +14,7 @@ libgksu libgtop libgxps libpeas +libsoup3 libunique libunique3 libwnck3 diff --git a/pkglists/min.lst b/pkglists/min.lst index 3e19584..a2cf1f6 100644 --- a/pkglists/min.lst +++ b/pkglists/min.lst @@ -5,6 +5,7 @@ aaa_libraries aaa_terminfo acl attr +avahi bash bin binutils @@ -28,6 +29,7 @@ dialog diffutils dmidecode dnsmasq +duktape e2fsprogs ed elilo @@ -73,6 +75,7 @@ kmod krb5 less libassuan +libdaemon libedit libevent libgcrypt @@ -102,6 +105,7 @@ mozjs60 mozjs68 mozjs78 mozjs102 +mozjs115 ##mpfr mtr nano diff --git a/pkglists/noxbase.lst b/pkglists/noxbase.lst index 07dcca5..f8bab71 100644 --- a/pkglists/noxbase.lst +++ b/pkglists/noxbase.lst @@ -88,6 +88,7 @@ libnih libnl libnl3 libnotify +libnvme libogg libpcap libpciaccess @@ -132,6 +133,7 @@ newt nfs-utils nghttp2 nmap +nss-mdns ntfs-3g nvme-cli openexr diff --git a/pkglists/x_base.lst b/pkglists/x_base.lst index a7fc813..07a6ab8 100644 --- a/pkglists/x_base.lst +++ b/pkglists/x_base.lst @@ -24,6 +24,7 @@ cdrtools compositeproto cups cups-filters +cxxopts damageproto dbus-python dejavu-fonts-ttf @@ -63,6 +64,7 @@ fribidi fslsfonts fstobdf gcr +gcr4 gd gegl gexiv2 @@ -213,6 +215,7 @@ pycairo pygobject pygobject3 pygtk +python2-pycairo python-MarkupSafe python-distro qrencode @@ -127,6 +127,7 @@ MINFREE=${MINFREE:-10} # Variables to store content from an initrd we are going to refresh: OLDKERNELSIZE="" +OLDKMODDIRSIZE="" OLDWAIT="" # Record the version of the new kernel: @@ -627,7 +628,6 @@ function read_initrddir() { local INITVARS="$2" local OLDKVER local OLDMODDIR - local OLDKMODDIRSIZE local PREVMODDIR cd ${IMGDIR} @@ -1106,7 +1106,7 @@ if [ -f "${EXTENSION}" ]; then # User already mounted the USB linux partition; remove mountpoint: EXTENSION="${EXTENSION#$EXTMNT}" fi -elif [ "$(dirname ${EXTENSION})" == "." ]; then +elif [ -n "${EXTENSION}" && "$(dirname ${EXTENSION})" == "." ]; then # Containerfile was provided without leading slash, add one: EXTENSION="/${EXTENSION}" fi @@ -1214,7 +1214,7 @@ fi # Update the initrd with regard to USB wait time, liveinit, kernel: update_initrd ${USBMNT}/boot/initrd.img ${IMGDIR} -# Add the new modules as a squashfs module: +# Add the new kernel modules as a squashfs module: if [ $UPKERNEL -eq 1 ] && [ $NOLIVEMODS -eq 0 ]; then LIVE_MOD_SYS=$(dirname $(find ${USBMNT} -name "0099-${DISTRO}_zzzconf*.sxz" |head -1)) LIVE_MOD_ADD=$(dirname ${LIVE_MOD_SYS})/addons @@ -1280,7 +1280,19 @@ if [ $CHANGES2SXZ -eq 1 ]; then echo "*** Unable to create file '/mnt/live/changes/.wipe'!" echo "*** Are you sure you are running ${DISTRO^} Live Edition?" else - # Squash the persistence data into a Live .sxz module: + # Squash the persistence data into a Live .sxz module, + # but only if we find the space to do so: + CHANGESSIZE=$(du -sm /mnt/live/changes/ |tr '\t' ' ' |cut -d' ' -f1) + if [ $(( $USBPFREE - $CHANGESSIZE )) -lt $MINFREE ]; then + CHANGES2SXZ=-1 + fi + if [ $CHANGES2SXZ -eq -1 ]; then + echo "*** Not enough space to squash persistence data into a module." + # Don't wipe persistence data on next boot! + rm -f /mnt/live/changes/.wipe + cleanup + exit 1 + fi LIVE_MOD_SYS=$(dirname $(find ${USBMNT} -name "0099-${DISTRO}_zzzconf*.sxz" |head -1)) LIVE_MOD_ADD=$(dirname ${LIVE_MOD_SYS})/addons MODNAME="0100-${DISTRO}_customchanges-$(date +%Y%m%d%H%M%S).sxz" |