Permalink
Browse files

remasterpup2: option to use xz or gzip compression and fix for /dev/l…

…oop/X devices
  • Loading branch information...
1 parent e805bf8 commit b1791db44b9ec8979ac0395f4c6c47cf59354ca1 @wdlkmpx wdlkmpx committed Jan 11, 2017
Showing with 14 additions and 12 deletions.
  1. +14 −12 woof-code/rootfs-skeleton/usr/sbin/remasterpup2
@@ -39,7 +39,6 @@
#110808 PANZERKOPF: bug fix. 110822 reverted.
#120323 replace 'xmessage' with 'pupmessage'.
#120329 Xdialog bug --yesno supposed to "yes" "No" buttons, but they are "OK" "Cancel".
-#120512 01micko: support xz compression.
#120605 rerwin: omit /dev/snd content, /dev/.udev subdirectory and modem daemons from new master (because daemons reinstalled from firmware if needed).
#120606 rerwin: support users' replacement of stripped /root & /etc with complete directories (for "boot disk").
#120607 rerwin: Remove indicators/files for integrated user-installed packages.
@@ -118,15 +117,6 @@ $(eval_gettext "(No CD or .iso file has both 'initrd.gz' and '${PUPPYSFS}'.)")"
#LANG=C #faster, plus Xdialog happier.
KERNELVER="`uname -r`"
-#120512 01micko: set compression
-mksquashfs -help 2>&1 | grep -q 'xz' && COMP="-comp xz" || COMP=""
-case "$(uname -m)" in
- *86*)AOPT="-Xbcj x86" ;;
- *)AOPT="" ;; #todo add other arches
-esac
-COPTIONS=""${COMP}" "${AOPT}""
-#end set compression
-
#variables created at bootup by /initrd/usr/sbin/init...
. /etc/rc.d/PUPSTATE
[ "$PUP_LAYER" = "" ] && PUP_LAYER="/pup_ro2"
@@ -349,6 +339,7 @@ do
oPTN="^${ONELOOP} "
ONEISO="$(cat /proc/mounts | grep "$oPTN" | cut -f 2 -d ' ' | rev | cut -f 1 -d '+' | cut -f 1 -d '/' | rev)" #130301
[ "$ONEISO" = "" ] && continue #130301 precaution.
+ ONELOOP=$(echo "$ONELOOP" | sed 's|/loop/|/loop|')
VIRTUALCD="${VIRTUALCD} ${ONELOOP} ${ONEISO}"
done
m_14="$(gettext 'This remaster program needs to read some files off the current live-CD.')
@@ -415,6 +406,17 @@ Xdialog --wrap --left --title "$m_01" --default-no --ok-label "$Yes_lbl" --canc
[ $? -eq 0 ] && MKZDRV="yes" || MKZDRV=""
[ $? -eq 255 ] && exit #130223
+# set compression
+/usr/lib/gtkdialog/box_yesno --yes-label "xz (default)" --no-label "gzip" --yes-first --info \
+--yes-icon "execute.svg" --no-icon "execute.svg" \
+"$m_01" "$(gettext 'You can use xz or gzip compression. Choose one...')"
+case $? in
+1) COMP="-comp gzip" ;;
+*) COMP="-comp xz -Xbcj x86" ;;
+esac
+echo "COMP=${COMP}"
+# -
+
m_18="$(eval_gettext 'Creating the ${PUPPYSFS} file in ${WKGMNTPT}/puppylivecdbuild/.')
$(gettext 'This can take quite a long time, so please wait.... and wait...')
$(eval_gettext 'This window will disappear when ${PUPPYSFS} is finally created.')
@@ -453,8 +455,8 @@ TOPPLCDB=''
[ -e /puppylivecdbuild ] && TOPPLCDB='/puppylivecdbuild'
TOPPUPSFS=''
[ -e /${PUPPYSFS} ] && TOPPUPSFS="/${PUPPYSFS}"
-# display terminal only for the first stage because it takes the most of time. 'squash' is a function, see above. 120512 $COPTIONS added...
-squash / $WKGMNTPT/puppylivecdbuild/$PUPPYSFS ${COPTIONS} -e /etc /proc /initrd /var /tmp /archive /mnt /root $TOPPLCDB $ANOTHER_REMOVE $DIRHOME $DIRSYS $DIRLOST $TOPPUPSFS $DIRDEVSNDFILES $DIRDEVUDEV $ICONCACHE #120605 end #120721 avoid wildecards option, icon-theme.cache 121021
+# display terminal only for the first stage because it takes the most of time. 'squash' is a function, see above. 120512 $COMP added...
+squash / $WKGMNTPT/puppylivecdbuild/$PUPPYSFS ${COMP} -e /etc /proc /initrd /var /tmp /archive /mnt /root $TOPPLCDB $ANOTHER_REMOVE $DIRHOME $DIRSYS $DIRLOST $TOPPUPSFS $DIRDEVSNDFILES $DIRDEVUDEV $ICONCACHE #120605 end #120721 avoid wildecards option, icon-theme.cache 121021
sync
#add pristine folders (out of current puppy.sfs)...

0 comments on commit b1791db

Please sign in to comment.