Hello community,

here is the log from the commit of package live-fat-stick for openSUSE:Factory 
checked in at 2016-01-12 16:12:45
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/live-fat-stick (Old)
 and      /work/SRC/openSUSE:Factory/.live-fat-stick.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "live-fat-stick"

Changes:
--------
--- /work/SRC/openSUSE:Factory/live-fat-stick/live-fat-stick.changes    
2016-01-01 19:49:40.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.live-fat-stick.new/live-fat-stick.changes       
2016-01-12 16:12:56.000000000 +0100
@@ -1,0 +2,16 @@
+Sun Jan 10 05:10:05 UTC 2016 - [email protected]
+
+- Add syslinux availability only on ExclusiveArch ix86 x86_64
+  as suggested by [email protected]
+- disable suse specific macros on other distros
+-------------------------------------------------------------------
+Sun Dec 27 05:36:34 UTC 2015 - [email protected]
+
+- more cleanups, remove duplicated mounts, check before mounting 
+
+-------------------------------------------------------------------
+Sat Dec 26 13:09:02 UTC 2015 - [email protected]
+
+- Add ipxe network boot support 
+
+-------------------------------------------------------------------

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ live-fat-stick.spec ++++++
--- /var/tmp/diff_new_pack.Sp6QaL/_old  2016-01-12 16:12:58.000000000 +0100
+++ /var/tmp/diff_new_pack.Sp6QaL/_new  2016-01-12 16:12:58.000000000 +0100
@@ -32,8 +32,12 @@
 Requires:       parted
 Requires:       syslinux
 Requires:       util-linux
+%if 0%{?suse_version}
 BuildRequires:  update-desktop-files
+%endif
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
+# depends on syslinux, which exists only for the following arches:
+ExclusiveArch:  %ix86 x86_64 noarch
 BuildArch:      noarch
 
 %description
@@ -105,7 +109,11 @@
 
 %package -n live-usb-gui
 Requires:       live-fat-stick = %{version}
+%if 0%{?suse_version}
 Recommends:     zenity kdialog
+%else
+Requires:       zenity
+%endif
 Summary:        Create live usb stick on fat partition
 Group:          System/Management
 
@@ -130,7 +138,9 @@
 cp %{SOURCE2} %{buildroot}/%_datadir/applications/
 
 chmod 755 %{buildroot}/usr/bin/* 
+%if 0%{?suse_version}
 %suse_update_desktop_file live-usb-gui 
+%endif
 
 %post -n live-usb-gui
 %desktop_database_post

++++++ live-fat-stick ++++++
--- /var/tmp/diff_new_pack.Sp6QaL/_old  2016-01-12 16:12:58.000000000 +0100
+++ /var/tmp/diff_new_pack.Sp6QaL/_new  2016-01-12 16:12:58.000000000 +0100
@@ -34,14 +34,19 @@
        if [[ $distroname != isohybrid ]]; then
                 umount $isomount &>/dev/null             
                 umount $stickdevpart &>/dev/null
-               rm -rf $isomount &>/dev/null
+               rmdir $isomount &>/dev/null || echo "unable to remove 
$isomount, please remove manually"
                 umount $stickmount &>/dev/null
                while $(mount | grep $stickmount &>/dev/null); do
                        umount $stickdevpart &>/dev/null
                        sleep 2
                done
                rmdir $stickmount &>/dev/null || echo "unable to remove 
$stickmount, please remove manually"
-               rm $isopath &>/dev/null
+                if [[ -f $liveusbgui ]]; then
+                        rm $liveusbgui &>/dev/null
+                fi
+                if [[ -h $iso_symlink ]]; then
+                        rm "$iso_symlink" &>/dev/null
+                fi
        fi
 }
 clean_up () {
@@ -55,10 +60,6 @@
                echo "Your bootable usb stick is now ready"
                echo "have a lot of fun..."
        fi
-       if [[ -f $liveusbgui ]]; then
-               rm $liveusbgui &>/dev/null 
-               rm "$iso_symlink"
-       fi
 }
 trap "clean_up user_killed" SIGINT SIGTERM
 need_help() {
@@ -84,6 +85,7 @@
                 For Ubuntu      : live-fat-stick --ubuntu 
/path/to/ubuntu-filename.iso /dev/sdXY
                 For Mint        : live-fat-stick --mint 
/path/to/mint-filename.iso /dev/sdXY
                 For Fedora      : live-fat-stick --fedora 
/path/to/fedora-filename.iso /dev/sdXY
+                For iPXE        : live-fat-stick --ipxe /path/to/ipxe.iso 
/dev/sdXY
 
                 For isohybrid   : live-fat-stick --isohybrid 
/path/to/isohybridimage.iso /dev/sdX
 
@@ -121,8 +123,11 @@
                --isohybrid)
                distroname=isohybrid
                ;;
+                --ipxe)
+                distroname=ipxe
+                ;;
                 *)
-                echo "invalid arg -- $1"
+                echo "invalid arg -- $1, check spelling or if the distribution 
is supported"
                need_help
                 exit 1
                 ;;
@@ -168,13 +173,9 @@
         echo "Device $2 does not exist"
         exit 1
 fi
-distroname=${distroname:-suse}
-if [[ $distroname != suse ]] && [[ $distroname != ubuntu ]] && [[ $distroname 
!= fedora ]] && [[ $distroname != isohybrid ]]; then
-        echo "this distribution's iso is currently not supported, patch 
welcome"
-        exit 1
-fi
 
 #variables
+distroname=${distroname:-suse}
 isomount=$(mktemp -d)
 isopath=$(readlink -f "$1")
 iso_symlink=$(mktemp) ; rm $iso_symlink ; ln -s "$isopath" $iso_symlink
@@ -227,7 +228,6 @@
        fi
 }
 copy_kernel_initrd () {
-       mount $stickdevpart $stickmount &>/dev/null
        fuseiso $isopath $isomount &>/dev/null
        echo "copying kernel and initrd from iso image to $stickdevpart"
        if [[ $distroname == suse ]]; then
@@ -263,6 +263,10 @@
                mv "$stickmount/$isonameshort"/isolinux/vmlinuz0 
$syslinuxpath/linux-$isonameshort
                appendsection="append initrd=initrd-$isonameshort 
root=UUID=$stickuuid rootfstype=vfat rd.live.dir=/$isonameshort/LiveOS/ ro 
rd.live.image rd.luks=0 rd.md=0 rd.dm=0 quiet rhgb"
        fi
+       if [[ $distroname == ipxe ]]; then
+               mkdir -p $syslinuxpath
+               cp $isomount/ipxe.krn $syslinuxpath/linux-$isonameshort
+       fi
        umount $isomount &>/dev/null
 }
 syslinux_stuff () {
@@ -359,14 +363,25 @@
        try_cp_with_progress "$1" "$2"
 else
        mkdir $isomount $stickmount &>/dev/null
+       if mount | grep $stickdevpart &>/dev/null; then
+               if ! umount $stickdevpart &>/dev/null; then
+                       echo "$stickdevpart in use, please umount it before 
continuing"
+                       exit 1
+               fi
+       fi
        if ! mount $2 $stickmount &>/dev/null; then
                echo "unable to mount the usb stick partition"
                exit 1
        fi
        if [[ -e $stickmount/$isoname ]];then
                isopath=$stickmount/$isoname
+               echo "using existing $isoname on the stick"
        else
                isopath=$iso_symlink
+               if [[ $distroname != fedora ]]; then
+                       echo "copying $isoname to usb stick"
+                       try_cp_with_progress "$1" "$stickmount/$isoname"
+               fi
        fi
        if [[ -f $stickmount/fatstick ]]; then
                echo "the stick is already bootable stick"
@@ -376,23 +391,12 @@
                        add_menu_section
                fi
        else
-               umount $stickmount &>/dev/null || true
-               umount $stickdevpart &>/dev/null || true
-               umount $isopath &>/dev/null || true
                syslinux_stuff
                echo "creating menu entries"
                create_syslinux_cfg
                add_menu_section
        fi
        touch $stickmount/fatstick
-       if [[ $distroname != fedora ]]; then
-               if [[ ! -f $stickmount/$isoname ]]; then
-                       echo "copying $isoname to usb stick"
-                       try_cp_with_progress "$1" "$stickmount/$isoname"
-               else
-                       echo "using existing $isoname on the stick"
-               fi
-       fi
        thisscript=$(readlink -f $0)
        cp $thisscript $stickmount/ &>/dev/null || true
 fi

++++++ live-grub-stick ++++++
--- /var/tmp/diff_new_pack.Sp6QaL/_old  2016-01-12 16:12:58.000000000 +0100
+++ /var/tmp/diff_new_pack.Sp6QaL/_new  2016-01-12 16:12:58.000000000 +0100
@@ -34,14 +34,19 @@
        if [[ $distroname != isohybrid ]]; then
                 umount $isomount &>/dev/null             
                 umount $stickdevpart &>/dev/null
-               rm -rf $isomount &>/dev/null
+               rmdir $isomount &>/dev/null || echo "unable to remove 
$isomount, please remove manually"
                 umount $stickmount &>/dev/null
                while $(mount | grep $stickmount &>/dev/null); do
                        umount $stickdevpart &>/dev/null
                        sleep 2
                done
                rmdir $stickmount &>/dev/null || echo "unable to remove 
$stickmount, please remove manually"
-               rm $isopath &>/dev/null
+               if [[ -f $liveusbgui ]]; then
+                       rm $liveusbgui &>/dev/null
+               fi
+               if [[ -h $iso_symlink ]]; then
+                       rm "$iso_symlink" &>/dev/null
+               fi
        fi
 }
 clean_up () {
@@ -55,10 +60,6 @@
                echo "Your bootable usb stick is now ready"
                echo "have a lot of fun..."
        fi
-       if [[ -f $liveusbgui ]]; then
-               rm $liveusbgui &>/dev/null 
-               rm "$iso_symlink"
-       fi
 }
 trap "clean_up user_killed" SIGINT SIGTERM
 need_help() {
@@ -84,6 +85,7 @@
                 For Ubuntu      : live-grub-stick --ubuntu 
/path/to/ubuntu-filename.iso /dev/sdXY
                 For Mint        : live-grub-stick --mint 
/path/to/mint-filename.iso /dev/sdXY
                 For Fedora      : live-grub-stick --fedora 
/path/to/fedora-filename.iso /dev/sdXY
+                For iPXE        : live-grub-stick --ipxe /path/to/ipxe.iso 
/dev/sdXY
 
                 For isohybrid   : live-grub-stick --isohybrid 
/path/to/isohybridimage.iso /dev/sdX
 
@@ -121,8 +123,11 @@
                --isohybrid)
                distroname=isohybrid
                ;;
+                --ipxe)
+                distroname=ipxe
+                ;;
                 *)
-                echo "invalid arg -- $1"
+                echo "invalid arg -- $1, check spelling or if the distribution 
is supported"
                need_help
                 exit 1
                 ;;
@@ -168,13 +173,8 @@
         echo "Device $2 does not exist"
         exit 1
 fi
-distroname=${distroname:-suse}
-if [[ $distroname != suse ]] && [[ $distroname != ubuntu ]] && [[ $distroname 
!= fedora ]] && [[ $distroname != isohybrid ]]; then
-        echo "this distribution's iso is currently not supported, patch 
welcome"
-        exit 1
-fi
-
 #variables
+distroname=${distroname:-suse}
 isomount=$(mktemp -d)
 isopath=$(readlink -f "$1")
 iso_symlink=$(mktemp) ; rm $iso_symlink ; ln -s "$isopath" $iso_symlink
@@ -228,13 +228,12 @@
        fi
 }
 cfg_setup() {
-       mount $stickdevpart $stickmount &>/dev/null
        fuseiso $isopath $isomount &>/dev/null
+       if [[ -d $stickmount/boot ]];then
+               mkdir -p $stickmount/boot/
+       fi
        if [[ $distroname == suse ]]; then
-               if [[ ! -f $stickmount/fatstick ]]; then
-                       if [[ -d $stickmount/boot ]];then
-                               mkdir -p $stickmount/boot
-                       fi
+               if [[ ! -f $stickmount/grubstick ]]; then
                        echo "copying grub2 files to $stickmount/boot/"
                        cp -r $isomount/boot/grub2 $stickmount/boot/
                fi
@@ -254,6 +253,9 @@
                appendsection="linux (loop)/isolinux/vmlinuz0 
iso-scan/filename=/$isoname root=LABEL=$isolabel rootfstype=auto ro 
rd.live.image rd.luks=0 rd.md=0 rd.dm=0 quiet rhgb"
                appendsection2="initrd (loop)/isolinux/initrd0.img"
        fi
+       if [[ $distroname == ipxe ]]; then
+               appendsection="linux16 (loop)/ipxe.krn"
+       fi
        umount $isomount &>/dev/null
 }
 grub2_stuff () {
@@ -265,17 +267,21 @@
        cfg_setup
 }
 add_harddisk_section () {
-       if ! grep -q localboot $grubcfgpath; then
+       if ! grep -q harddisk $grubcfgpath; then
                cat <<EOF >>$grubcfgpath
 
-label harddisk
-       localboot 0x80
+menuentry 'Boot from harddisk' {
+       set root=(hd1)
+       chainloader +1
+}
+
+menuentry 'Reboot' {
+       reboot
+}
+
 EOF
        fi
 }
-add_menu_section_suse () {
-echo nothing
-}
 create_grub_cfg() {
         cat <<EOF >$grubcfgpath
 insmod fat
@@ -347,6 +353,7 @@
 }
 
 EOF
+add_harddisk_section
 }
 
 echo "Please make sure the following information is correct:"
@@ -359,16 +366,25 @@
        try_cp_with_progress "$1" "$2"
 else
        mkdir $isomount $stickmount &>/dev/null
+       if mount | grep $stickdevpart &>/dev/null; then
+               if ! umount $stickdevpart &>/dev/null; then
+                       echo "$stickdevpart in use, please umount it before 
continuing"
+                       exit 1
+               fi
+       fi
        if ! mount $2 $stickmount &>/dev/null; then
                echo "unable to mount the usb stick partition"
                exit 1
        fi
        if [[ -e $stickmount/$isoname ]];then
                isopath=$stickmount/$isoname
+               echo "using existing $isoname on the stick"
        else
                isopath=$iso_symlink
+               echo "copying $isoname to usb stick"
+               try_cp_with_progress "$1" "$stickmount/$isoname"
        fi
-       if [[ -f $stickmount/fatstick ]]; then
+       if [[ -f $stickmount/grubstick ]]; then
                echo "the stick is already bootable stick"
                if ! grep -q $isonameshort $grubcfgpath; then
                        echo "adding new image to boot menu"
@@ -380,17 +396,8 @@
                echo "creating menu entries"
                create_grub_cfg
                add_menu_section
-               umount $stickmount &>/dev/null || true
-               umount $stickdevpart &>/dev/null || true
-               umount $isopath &>/dev/null || true
-       fi
-       touch $stickmount/fatstick
-       if [[ ! -f $stickmount/$isoname ]]; then
-               echo "copying $isoname to usb stick"
-               try_cp_with_progress "$1" "$stickmount/$isoname"
-       else
-               echo "using existing $isoname on the stick"
        fi
+       touch $stickmount/grubstick
        thisscript=$(readlink -f $0)
        cp $thisscript $stickmount/ &>/dev/null || true
 fi

++++++ live-usb-gui ++++++
--- /var/tmp/diff_new_pack.Sp6QaL/_old  2016-01-12 16:12:58.000000000 +0100
+++ /var/tmp/diff_new_pack.Sp6QaL/_new  2016-01-12 16:12:58.000000000 +0100
@@ -46,7 +46,7 @@
 fileselectpath="/"
 fileselectfilter="*iso"
 usbselecttitle="Select the target USB device"
-distributionlist="suse fedora mint ubuntu isohybrid"
+distributionlist="suse fedora mint ubuntu ipxe isohybrid"
 distrotitle="Select the distribution of the iso"
 usbdevicelist=$(for i in `echo $(for i in $(find /dev/disk/by-path/ |grep 
usb); do readlink -f $i;done)`
        do
@@ -101,6 +101,9 @@
         isohybrid)
         option="isohybrid"
         ;;
+        ipxe)
+        option="--ipxe"
+        ;;
 esac
 
 if [ ! "$option" ]; then


Reply via email to