aboutsummaryrefslogtreecommitdiff
path: root/system
diff options
context:
space:
mode:
Diffstat (limited to 'system')
-rw-r--r--system/safecopy/10_fix-manpage.patch335
-rw-r--r--system/safecopy/README9
-rw-r--r--system/safecopy/safecopy.SlackBuild50
-rw-r--r--system/safecopy/safecopy.info4
-rw-r--r--system/safecopy/slack-desc12
5 files changed, 381 insertions, 29 deletions
diff --git a/system/safecopy/10_fix-manpage.patch b/system/safecopy/10_fix-manpage.patch
new file mode 100644
index 000000000000..2f8c2503d00b
--- /dev/null
+++ b/system/safecopy/10_fix-manpage.patch
@@ -0,0 +1,335 @@
+Description: fix some hyphens used as minus sign and a spelling error.
+Author: Joao Eriberto Mota Filho <eriberto@debian.org>
+Last-Update: 2015-06-25
+Index: safecopy-1.7/src/safecopy.1
+===================================================================
+--- safecopy-1.7.orig/src/safecopy.1
++++ safecopy-1.7/src/safecopy.1
+@@ -33,13 +33,13 @@ devices (like tapes) you can try to use
+ controlled skip over the damaged part for you.
+ .PP
+ (For example by using "mt seek" and "mt tell" on an SCSI tape device)
+-See the "-S <seekscript>" parameter for details.
++See the "\-S <seekscript>" parameter for details.
+ .PP
+ Performance and success of this tool depend extremely on the device driver,
+ firmware and underlying hardware.
+ .PP
+ Currently safecopy supports RAW access to CDROM drives to read data directly of
+-a CD, bypassing some driver dependant error correction. This can speed up data
++a CD, bypassing some driver dependent error correction. This can speed up data
+ retrieval from CDs and reduce system load during recovery, as well as
+ increase the success rate. Safecopy uses the disc status syscall to determine
+ sector size and addressing of CDs. This fails on mixed-mode or multi-session
+@@ -95,20 +95,20 @@ specification.txt shipped with safecopy.
+ Preset to rescue most of the data fast,
+ using no retries and avoiding bad areas.
+ .IP
+-\fBPresets\fR: -f 10% -r 10% -R 1 -Z 0 -L 2 -M BaDbLoCk -o stage1.badblocks
++\fBPresets\fR: \-f 10% \-r 10% \-R 1 \-Z 0 \-L 2 \-M BaDbLoCk \-o stage1.badblocks
+ .TP
+ \fB\-\-stage2\fR
+ Preset to rescue more data, using no retries
+ but searching for exact ends of bad areas.
+ .IP
+-\fBPresets\fR: -f 128* -r 1* -R 1 -Z 0 -L 2 -I stage1.badblocks -o stage2.badblocks
++\fBPresets\fR: \-f 128* \-r 1* \-R 1 \-Z 0 \-L 2 \-I stage1.badblocks \-o stage2.badblocks
+ .TP
+ \fB\-\-stage3\fR
+ Preset to rescue everything that can be rescued
+ using maximum retries, head realignment tricks
+ and low level access.
+ .IP
+-\fBPresets\fR: -f 1* -r 1* -R 4 -Z 1 -L 2 -I stage2.badblocks -o stage3.badblocks
++\fBPresets\fR: \-f 1* \-r 1* \-R 4 \-Z 1 \-L 2 \-I stage2.badblocks \-o stage3.badblocks
+ .PP
+ All stage presets can be overridden by individual options.
+ .TP
+@@ -213,7 +213,7 @@ badblock list.
+ .IP
+ \fBImplies\fR: \-c 0 if \-c is not specified
+ .IP
+-\fBDefault\fR: none ( /dev/null if -c is given )
++\fBDefault\fR: none ( /dev/null if \-c is given )
+ .TP
+ \fB\-i\fR <\fIbytes\fR>
+ Blocksize to interpret the badblockfile given with \-I.
+@@ -225,7 +225,7 @@ Continue copying at this position.
+ This allows continuing if the output is a block device
+ with a fixed size as opposed to a growable file,
+ where safecopy cannot determine how far it already got.
+-The blocksize used is the same as for the -I option.
++The blocksize used is the same as for the \-I option.
+ .br
+ \-c 0 will continue at the current destination size.
+ .IP
+@@ -269,7 +269,7 @@ on any later run.
+ .IP
+ \fBWarning\fR:
+ When used in combination with incremental mode (\-I) this may overwrite data in
+-any block that occurs in the -I file. Blocks not in the \-I file, or covered
++any block that occurs in the \-I file. Blocks not in the \-I file, or covered
+ by the file specified with \-X are save from being overwritten.
+ .IP
+ \fBDefault\fR: none
+@@ -366,49 +366,49 @@ How do I...
+ - resurrect data as thoroughly as possible?
+ .IP
+ .B safecopy
+-source dest -f 1* -R 8 -Z 2
++source dest \-f 1* \-R 8 \-Z 2
+ .br
+ (assuming logical misalignment of blocks to sectors)
+ .IP
+ .B safecopy
+-source dest -f 1* -r 1 -R 8 -Z 2
++source dest \-f 1* \-r 1 \-R 8 \-Z 2
+ .TP
+ - resurrect data as fast as possible, or
+ .TP
+ - resurrect data with low risk of damaging the media further:
+-(you can use even higher values for -f and -r)
++(you can use even higher values for \-f and \-r)
+ .IP
+ .B safecopy
+-source dest -f 10% -R 0 -Z 0
++source dest \-f 10% \-R 0 \-Z 0
+ .TP
+ - resurrect some data fast, then read more data thoroughly later:
+ .IP
+ .B safecopy
+-source dest -f 10% -R 0 -Z 0 -o badblockfile
++source dest \-f 10% \-R 0 \-Z 0 \-o badblockfile
+ .br
+ .B safecopy
+-source dest -f 1* -R 8 -Z 2 -I badblockfile
++source dest \-f 1* \-R 8 \-Z 2 \-I badblockfile
+ .IP
+ .I Alternate approach using the new preset features:
+ .IP
+ .B safecopy
+-source dest --stage1
++source dest \-\-stage1
+ .IP
+ .B safecopy
+-source dest --stage2
++source dest \-\-stage2
+ .IP
+ .B safecopy
+-source dest --stage3
++source dest \-\-stage3
+ .TP
+ - utilize some friends CD-ROM drives to complete the data from my damaged CD:
+ .B safecopy
+-/dev/mydrive imagefile <someoptions> -b <myblocksize> -o myblockfile
++/dev/mydrive imagefile <someoptions> \-b <myblocksize> \-o myblockfile
+ .br
+ .B safecopy
+-/dev/otherdrive imagefile <someoptions> -b <otherblocksize> -I myblockfile -i <myblocksize> -o otherblockfile
++/dev/otherdrive imagefile <someoptions> \-b <otherblocksize> \-I myblockfile \-i <myblocksize> \-o otherblockfile
+ .br
+ .B safecopy
+-/dev/anotherdrive imagefile <someoptions> -b <anotherblocksize> -I otherblockfile -i <otherblocksize>
++/dev/anotherdrive imagefile <someoptions> \-b <anotherblocksize> \-I otherblockfile \-i <otherblocksize>
+ .TP
+ - interrupt and later resume a data rescue operation:
+ .B safecopy
+@@ -418,11 +418,11 @@ source dest
+ (safecopy aborts)
+ .br
+ .B safecopy
+-source dest -I /dev/null
++source dest \-I /dev/null
+ .TP
+ - interrupt and later resume a data rescue operation with correct badblocks output:
+ .B safecopy
+-source dest <options> -o badblockfile
++source dest <options> \-o badblockfile
+ .br
+ .B <CTRL+C>
+ (safecopy aborts)
+@@ -431,7 +431,7 @@ source dest <options> -o badblockfile
+ badblockfile savedbadblockfile
+ .br
+ .B safecopy
+-source dest -I /dev/null -o badblockfile
++source dest \-I /dev/null \-o badblockfile
+ .br
+ .B cat
+ badblockfile >>savedbadblockfile
+@@ -442,59 +442,59 @@ badblockfile >>savedbadblockfile
+ .br
+ .B
+ safecopy
+-source dest <options> -o badblockfile1
++source dest <options> \-o badblockfile1
+ .br
+ .B
+ safecopy
+-source dest <options> -I badblockfile1 -o badblockfile2
++source dest <options> \-I badblockfile1 \-o badblockfile2
+ .br
+ .B <CTRL+C>
+ (safecopy aborts)
+ .br
+-latest=$( tail -n 1 badblockfile2 )
++latest=$( tail \-n 1 badblockfile2 )
+ .br
+-if [ -z $latest ]; then latest=-1; fi;
++if [ \-z $latest ]; then latest=-1; fi;
+ .br
+ cat badblockfile1 | while read block; do
+ .br
+- [ $block -gt $latest ] && echo $block >>badblockfile2;
++ [ $block \-gt $latest ] && echo $block >>badblockfile2;
+ .br
+ done;
+ .br
+ .B
+ safecopy
+-source dest <options> -I badblockfile2 -o badblockfile3
++source dest <options> \-I badblockfile2 \-o badblockfile3
+ .TP
+ - find the corrupted files on a partially successful rescued file system:
+ .B safecopy
+-/dev/filesystem image -M CoRrUpTeD
++/dev/filesystem image \-M CoRrUpTeD
+ .br
+ .B fsck
+ image
+ .br
+ .B mount
+--o loop image /mnt/mountpoint
++\-o loop image /mnt/mountpoint
+ .br
+ .B grep
+--R /mnt/mountpoint "CoRrUpTeD"
++\-R /mnt/mountpoint "CoRrUpTeD"
+ .br
+ (hint: this might not find all affected files if the unreadable
+ parts are smaller in size than your marker string)
+ .TP
+ - exclude the previously known badblocks list of a filesystem from filesystem image creation:
+ .B dumpe2fs
+--b /dev/filesystem >badblocklist
++\-b /dev/filesystem >badblocklist
+ .br
+ .B safecopy
+-/dev/filesystem image -X badblocklist -x <blocksize of your fs>
++/dev/filesystem image \-X badblocklist \-x <blocksize of your fs>
+ .TP
+ - create an image of a device that starts at X and is Y in size:
+ .B safecopy
+-/dev/filesystem -b <bsize> -s <X/bsize> -l <Y/bsize>
++/dev/filesystem \-b <bsize> \-s <X/bsize> \-l <Y/bsize>
+ .TP
+ - combine two partial images of rescued data without access to the actual (damaged) source data:
+ (This is a bit tricky. You need to get badblocks lists for both files somehow
+-to make safecopy know where the missing data is. If you used the -M (mark)
++to make safecopy know where the missing data is. If you used the \-M (mark)
+ feature you might be able to automatically compute these, however this feature
+ is not provided by safecopy. Lets assume you have two badblocks files.
+ .IP
+@@ -518,7 +518,7 @@ not, swap them)
+ image2.dat combined.dat
+ .br
+ .B safecopy
+-image1.dat combined.dat -I image2.badblocks -i blocksize2 -X image1.badblocks -x blocksize1
++image1.dat combined.dat \-I image2.badblocks \-i blocksize2 \-X image1.badblocks \-x blocksize1
+ .br
+ (This gets you the combined data, but no output badblocklist.
+ The resulting badblocks list would be the badblocks that are
+@@ -532,7 +532,7 @@ a random open source project.)
+ .TP
+ - rescue data of a tape device:
+ If the tape device driver supports lseek(), treat it as any file,
+-otherwise utilize the "-S" option of safecopy with a to be
++otherwise utilize the "\-S" option of safecopy with a to be
+ self-written script to skip over the bad blocks.
+ (for example using "mt seek")
+ Make sure your tape device doesn't auto-rewind on close.
+@@ -554,7 +554,7 @@ Meanwhile safecopy supports low level fe
+ .PP
+ .TP
+ Q:
+-What exactly does the -Z option do?
++What exactly does the \-Z option do?
+ .TP
+ A:
+ Remember back in MS-DOS times when a floppy would make a "neek nark" sound 3
+@@ -576,22 +576,23 @@ CDRW drive, that even reads deeply and p
+ key, to make it unreadable) flawlessly. A CDRW drive of the same age at work
+ doesn't read any data from that part of the CD at all, while most DVD and combo
+ drives have bad blocks every couple hundred bytes. Make full use of safecopys
+-RAW access features if applicable. (-L 2 option)
++RAW access features if applicable. (\-L 2 option)
+ .IP
+ As a general guideline:
+--CDRW drives usually do better than read-only CD drives.
+ .br
+--CD only drives sometimes do better on CDs than DVD drives.
++\-CDRW drives usually do better than read-only CD drives.
+ .br
+--PC drives are sometimes better than laptop ones.
++\-CD only drives sometimes do better on CDs than DVD drives.
+ .br
+--A drive with a clean lens does better than a dirtball.
++\-PC drives are sometimes better than laptop ones.
+ .br
+--Cleaning up CDs helps.
++\-A drive with a clean lens does better than a dirtball.
+ .br
+--Unless you use chemicals.
++\-Cleaning up CDs helps.
+ .br
+--Using sticky tape on a CD will rip of the reflective layer permanently
++\-Unless you use chemicals.
++.br
++\-Using sticky tape on a CD will rip of the reflective layer permanently
+ rendering the disk unreadable.
+ .PP
+ .TP
+@@ -637,34 +638,34 @@ during operation.
+ .IP
+ When you rescue data, rescue good data first before attempting to
+ access bad sectors. Safecopy allows you to skip known problem sectors
+-using a badblock exclude file (-X) which you might be able to retrieve
++using a badblock exclude file (\-X) which you might be able to retrieve
+ from system logs or from the drive internal logs, via smartmontools or
+ similar software. Be aware that you might possibly need to convert
+ physical sector numbers into logical block numbers depending on your
+ source.
+ .IP
+ Also you should tell safecopy to jump out of any problematic areas ASAP
+-and continue somewhere else. Parameters "-f 10% -r 10% -R 0 -Z 0" would
++and continue somewhere else. Parameters "\-f 10% \-r 10% \-R 0 \-Z 0" would
+ do the trick by making safecopy skip 10% of the device content and
+ continue there without backtracking. You can always attempt to get the
+ data in between later, first get the supposedly good data on the rest
+ of the drive. Depending on the method of data recovery you plan on
+-using, it may make sense to mark the bad data with the "-M" option.
++using, it may make sense to mark the bad data with the "\-M" option.
+ This allows you to later find files affected by data corruption more
+-easily. Use the "-o" option to make safecopy write a badblock list
++easily. Use the "\-o" option to make safecopy write a badblock list
+ with all blocks skipped or unreadable.
+ .IP
+ When safecopy is done with this first run, you can attempt a second go
+-trying to get more data. Using smaller values for "-f" and allowing
+-safecopy to backtrack for the end of the affected area "-r 1*".
+-Be sure to use incremental mode "-I" to only read the blocks skipped
++trying to get more data. Using smaller values for "\-f" and allowing
++safecopy to backtrack for the end of the affected area "\-r 1*".
++Be sure to use incremental mode "\-I" to only read the blocks skipped
+ in the first run.
+ .IP
+ It may make sense to let the drive cool down between runs.
+ Once you got all the data from the "good" areas of the drive you can
+ risk more "thorough" access to it. Increase the numbers of retries
+-"-R" in case of bad blocks, maybe together with a head realignment
+-"-Z 1". "-f 1*" would make safecopy try to read on every single block,
++"\-R" in case of bad blocks, maybe together with a head realignment
++"\-Z 1". "\-f 1*" would make safecopy try to read on every single block,
+ not skipping over bad areas at all.
+ .IP
+ If your drive stops responding, power it down, let it cool down for a
diff --git a/system/safecopy/README b/system/safecopy/README
index 291c092666f4..58555d0cd98b 100644
--- a/system/safecopy/README
+++ b/system/safecopy/README
@@ -1,3 +1,10 @@
+safecopy (data recovery tool)
+
safecopy is a data recovery tool which tries to extract as much data as
-possible from a problematic (i.e. damaged sectors) source - like floppy
+possible from problematic (i.e. damaged sectors) sources - like floppy
drives, hard disk partitions, CDs, tape devices.
+
+safecopy claims to be useful in situations where other tools like dd
+would fail due to I/O errors.
+
+safecopy is released under GNU GPL v2 (or higher).
diff --git a/system/safecopy/safecopy.SlackBuild b/system/safecopy/safecopy.SlackBuild
index 0359cd834f57..6fe811b8cd95 100644
--- a/system/safecopy/safecopy.SlackBuild
+++ b/system/safecopy/safecopy.SlackBuild
@@ -4,6 +4,7 @@
# Home Page http://safecopy.sourceforge.net/
# Copyright (c) 2009-2012, Nishant Limbachia, Hoffman Estates, IL, USA
+# Copyright (c) 2024 B. Watson
# <nishant _AT_ mnspace _DOT_ net>
# All rights reserved.
#
@@ -25,11 +26,20 @@
# NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+# 20240826 bkw: BUILD=2
+# - new maintainer.
+# - get generic gnu INSTALL out of doc dir.
+# - clean up README and slack-desc slightly.
+# - add man page patch from Debian's 1.7-7.
+
+# TODO: see if anyone's patched this to make the test suite work.
+# Debian hasn't.
+
cd $(dirname $0) ; CWD=$(pwd)
PRGNAM="safecopy"
VERSION=${VERSION:-1.7}
-BUILD=${BUILD:-1}
+BUILD=${BUILD:-2}
TAG=${TAG:-_SBo}
PKGTYPE=${PKGTYPE:-tgz}
@@ -41,9 +51,6 @@ if [ -z "$ARCH" ]; then
esac
fi
-# If the variable PRINT_PACKAGE_NAME is set, then this script will report what
-# the name of the created package would be, and then exit. This information
-# could be useful to other scripts.
if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
exit 0
@@ -72,14 +79,13 @@ set -e
rm -fr $TMP/$PRGNAM-$VERSION $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
-tar xvf $CWD/$PRGNAM-$VERSION.tar.?z*
+tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
cd $PRGNAM-$VERSION
chown -R root:root .
-find -L . \
- \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 -o -perm 511 \) \
- -exec chmod 755 {} \; -o \
- \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
- -exec chmod 644 {} \;
+find -L . -perm /111 -a \! -perm 755 -a -exec chmod 755 {} + -o \
+ \! -perm /111 -a \! -perm 644 -a -exec chmod 644 {} +
+
+patch -p1 < $CWD/10_fix-manpage.patch
CFLAGS="$SLKCFLAGS" \
./configure \
@@ -91,18 +97,22 @@ CFLAGS="$SLKCFLAGS" \
--infodir=/usr/info
make
-make install-strip DESTDIR=$PKG
-### compress man pages
-( cd $PKG/usr/man
- find . -type f -exec gzip -9 {} \;
- for i in $(find . -type l) ; do ln -s $(readlink $i).gz $i.gz ; rm $i ; done
-)
+# 20240826 bkw: if we wanted to run the test suite, we'd do this:
+
+# cd simulator && ./configure && make && cd -
+# cd test ; PATH=.:$PATH sh test.sh ; cd -
+
+# However, the simulator seems to be broken (needs to be updated for
+# more recent glibc), so the test results are questionable.
+
+make install-strip DESTDIR=$PKG
+gzip -9 $PKG/usr/man/man*/*
-mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
-cp -a ChangeLog COPYING AUTHORS README INSTALL NEWS \
-specification.txt $PKG/usr/doc/$PRGNAM-$VERSION
-cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
+PKGDOC=$PKG/usr/doc/$PRGNAM-$VERSION
+mkdir -p $PKGDOC
+cp -a ChangeLog COPYING AUTHORS README NEWS specification.txt $PKGDOC
+cat $CWD/$PRGNAM.SlackBuild > $PKGDOC/$PRGNAM.SlackBuild
mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
diff --git a/system/safecopy/safecopy.info b/system/safecopy/safecopy.info
index 07de0633ccf9..ee188f7fdb81 100644
--- a/system/safecopy/safecopy.info
+++ b/system/safecopy/safecopy.info
@@ -6,5 +6,5 @@ MD5SUM="4213c03e9e6990ca9a288cc880526297"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
REQUIRES=""
-MAINTAINER="Nishant Limbachia"
-EMAIL="nishant@mnspace.net"
+MAINTAINER="B. Watson"
+EMAIL="urchlay@slackware.uk"
diff --git a/system/safecopy/slack-desc b/system/safecopy/slack-desc
index dd6d1fbc2d75..a0327849a7de 100644
--- a/system/safecopy/slack-desc
+++ b/system/safecopy/slack-desc
@@ -8,12 +8,12 @@
|-----handy-ruler------------------------------------------------------|
safecopy: safecopy (data recovery tool)
safecopy:
-safecopy: Safecopy is a data recovery tool which tries to extract as much
-safecopy: data as possible from a problematic (i.e.damaged sectors) sources
-safecopy: like floppy drives, hard disk partitions, CDs, tape devices etc.
-safecopy: Program claims to be useful in situations where other tools like
+safecopy: safecopy is a data recovery tool which tries to extract as much
+safecopy: data as possible from problematic (i.e. damaged sectors) sources
+safecopy: like floppy drives, hard disk partitions, CDs, tape devices, etc.
+safecopy: safecopy claims to be useful in situations where other tools like
safecopy: dd would fail due to I/O errors.
-safecopy: Safecopy is released under GNU GPL v2 (or higher).
+safecopy: safecopy is released under GNU GPL v2 (or higher).
safecopy:
-safecopy: Home Page: http://safecopy.sourceforge.net/
+safecopy: Homepage: http://safecopy.sourceforge.net/
safecopy: