]> git.pld-linux.org Git - packages/convertfs.git/commitdiff
- added safety patch. Still needs work
authoraredridel <aredridel@pld-linux.org>
Sun, 24 Aug 2003 04:59:56 +0000 (04:59 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    convertfs-safety.patch -> 1.1
    convertfs.spec -> 1.2

convertfs-safety.patch [new file with mode: 0644]
convertfs.spec

diff --git a/convertfs-safety.patch b/convertfs-safety.patch
new file mode 100644 (file)
index 0000000..6514ce9
--- /dev/null
@@ -0,0 +1,67 @@
+diff -ur convertfs-orig/contrib/convertfs convertfs/contrib/convertfs
+--- convertfs-orig/contrib/convertfs   2002-03-18 09:15:15.000000000 -0700
++++ convertfs/contrib/convertfs        2003-08-23 22:57:29.000000000 -0600
+@@ -119,13 +119,23 @@
+ }
+ error() {
++      echo "Trying to clean up" 1>&2
+   umount $loopdev 2>/dev/null
+   losetup -d $loopdev 2>/dev/null
+   umount $dev 2>/dev/null
+-  rm -rf $tmp
++      rmdir $fs1root
++      rmdir $fs2root
++      rmdir $tmp
+   exit 1
+ }
++for I in devclone devremap prepindex; do
++      if [ -z "$(which "$I")" ]; then
++              echo "Your it is not complete" 1>&2
++              exit 1
++      fi
++done
++
+ # device to convert
+ dev=$1
+ # filesystem to convert from
+@@ -192,7 +202,7 @@
+ echo "== Creating clone of \`$from_fs_type' filesystem that's on \`$dev'. =="
+ umount $dev 2>/dev/null
+ mount -t $from_fs_type $dev $fs1root || error
+-./devclone $dev $fsimage || error
++devclone $dev $fsimage || error
+ echo "===== Creating destination \`$to_fs_type' filesystem. ====="
+ umount $loopdev 2>/dev/null
+@@ -207,6 +217,7 @@
+          [ "x$file" != "x$fsindex_name" ] &&
+          [ "x$file" != "xlost+found" ] &&
+          [ "x$file" != "x$fssuper_name" ]; then
++               # FIXME: this needs work if $file's size is > free space
+               mv -f $fs1root/$file $fs2root/ || error
+       fi
+ done
+@@ -216,17 +227,17 @@
+ losetup -d $loopdev 2>/dev/null
+ echo "=== Preparing info for block relocation ==="
+-./prepindex $fsimage $fsindex $fssuper || error
++prepindex $fsimage $fsindex $fssuper || error
+ umount $dev || error
+ dd if=$fssuper of=$dev || exit
+ sync
+ echo "============ Relocating blocks ============"
+-./devremap $dev || exit
++devremap $dev || exit
+ echo "=== Filesystem conversion accomplished! ==="
+ rm -rf $tmp
+ echo "NOTE: If you want to boot the new filesystem on \`$dev' you"
+ echo "      should edit \`/etc/fstab' and add something like this."
+-echo "      $dev   /   $to_fs_type   defaults   1   1"
++echo "      $dev   /mountpoint   $to_fs_type   defaults   1   1"
+Only in convertfs/contrib: convertfs~
index 8f6ccff93588ab8d36356c6268c6e7a224c30250..e531d2fcaaddc850e7de0d1bcd2fc196ba677488 100644 (file)
@@ -6,6 +6,7 @@ License:        GPL
 Group:         Applications/System
 Source0:       http://tzukanov.narod.ru/convertfs/%{name}-%{version}.tar.gz
 # Source0-md5: 10fcab200d3722f008274ed11fe643af
+Patch0:        %{name}-safety.patch
 URL:           http://tzukanov.narod.ru/convertfs/
 Requires:      util-linux
 Requires:      coreutils
@@ -28,6 +29,7 @@ read/write, and as long as primary filesystem supports sparse files.
 
 %prep
 %setup  -q -n %{name}
+%patch0 -p1
 
 %build
 sed -i -e 's#gcc#%{__cc}#g' Makefile
This page took 0.070905 seconds and 4 git commands to generate.