summaryrefslogtreecommitdiff
path: root/system
diff options
context:
space:
mode:
authorAndrey Maraev <andrew.maraev60@yandex.ru>2013-12-26 19:57:10 +0700
committerErik Hanson <erik@slackbuilds.org>2014-01-07 11:13:56 -0600
commit4016fa8d9d5469222de8a5d39e4c4a74167dea1d (patch)
tree558e4c01153559f2a9e4a1325a9bcf202517e066 /system
parent1b4960b6698c05876d1aa7d0138dae1722fca016 (diff)
downloadslackbuilds-4016fa8d9d5469222de8a5d39e4c4a74167dea1d.tar.gz
system/diskscan: Added (tool to scan a block device).
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'system')
-rw-r--r--system/diskscan/README9
-rw-r--r--system/diskscan/diskscan.SlackBuild83
-rw-r--r--system/diskscan/diskscan.info10
-rw-r--r--system/diskscan/slack-desc19
4 files changed, 121 insertions, 0 deletions
diff --git a/system/diskscan/README b/system/diskscan/README
new file mode 100644
index 0000000000..44c4ac5beb
--- /dev/null
+++ b/system/diskscan/README
@@ -0,0 +1,9 @@
+DiskScan is a tool to scan a block device and check if there are unreadable
+sectors, in addition it uses read latency times as an assessment for a near
+failure as sectors that are problematic to read usually entail many retries.
+
+Diskscan will only perform reads in its disk surface scan so it is not
+destructive in any way and it will report on all the key metrics needed to
+decide if the disk is good or not.
+
+
diff --git a/system/diskscan/diskscan.SlackBuild b/system/diskscan/diskscan.SlackBuild
new file mode 100644
index 0000000000..dbc761a226
--- /dev/null
+++ b/system/diskscan/diskscan.SlackBuild
@@ -0,0 +1,83 @@
+#!/bin/sh
+
+# Slackware build script for diskscan
+
+# Written by Andrey Maraev <andrew.maraev60@yandex.ru>
+
+
+PRGNAM=diskscan
+VERSION=${VERSION:-0.13}
+BUILD=${BUILD:-1}
+TAG=${TAG:-_SBo}
+
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) ARCH=i486 ;;
+ arm*) ARCH=arm ;;
+ *) ARCH=$( uname -m ) ;;
+ esac
+fi
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp/SBo}
+PKG=$TMP/package-$PRGNAM
+OUTPUT=${OUTPUT:-/tmp}
+
+if [ "$ARCH" = "i486" ]; then
+ SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "i686" ]; then
+ SLKCFLAGS="-O2 -march=i686 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+ LIBDIRSUFFIX="64"
+else
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+fi
+
+set -e
+
+rm -rf $PKG
+mkdir -p $TMP $PKG $OUTPUT
+cd $TMP
+rm -rf $PRGNAM-$VERSION
+tar xvf $CWD/$PRGNAM-$VERSION.tar.gz || tar xvf $CWD/$VERSION.tar.gz
+cd $PRGNAM-$VERSION
+
+# fix doc and man patch
+sed -i "s!/share/man!/man!g" install.do
+sed -i "s!/share/doc/diskscan!/doc/diskscan-$VERSION!g" install.do
+
+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 640 -o -perm 600 -o -perm 444 \
+ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
+
+CFLAGS="$SLKCFLAGS" \
+CXXFLAGS="$SLKCFLAGS" \
+
+make
+make install DESTDIR=$PKG
+
+find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \
+ | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
+
+find $PKG/usr/man -type f -exec gzip -9 {} \;
+for i in $( find $PKG/usr/man -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done
+
+
+mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
+cp -a \
+ COPYING README.md \
+ $PKG/usr/doc/$PRGNAM-$VERSION
+cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
+
+mkdir -p $PKG/install
+cat $CWD/slack-desc > $PKG/install/slack-desc
+
+cd $PKG
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
diff --git a/system/diskscan/diskscan.info b/system/diskscan/diskscan.info
new file mode 100644
index 0000000000..a2b08e964a
--- /dev/null
+++ b/system/diskscan/diskscan.info
@@ -0,0 +1,10 @@
+PRGNAM="diskscan"
+VERSION="0.13"
+HOMEPAGE="http://blog.disksurvey.org/proj/diskscan"
+DOWNLOAD="https://github.com/baruch/diskscan/archive/0.13.tar.gz"
+MD5SUM="47fd46468083a19794aa24ee24191087"
+DOWNLOAD_x86_64=""
+MD5SUM_x86_64=""
+REQUIRES="BeautifulSoup Markdown"
+MAINTAINER="Andrey Maraev"
+EMAIL="andrew.maraev60@yandex.ru"
diff --git a/system/diskscan/slack-desc b/system/diskscan/slack-desc
new file mode 100644
index 0000000000..4e2e31912d
--- /dev/null
+++ b/system/diskscan/slack-desc
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description.
+# Line up the first '|' above the ':' following the base package name, and
+# the '|' on the right side marks the last column you can put a character in.
+# You must make exactly 11 lines for the formatting to be correct. It's also
+# customary to leave one space after the ':' except on otherwise blank lines.
+
+ |-----handy-ruler------------------------------------------------------|
+diskscan: diskscan (tool to scan a block device)
+diskscan:
+diskscan: Diskscan is a tool to scan a block device and check if there are
+diskscan: unreadable sectors,in addition it uses read latency times as an
+diskscan: assessment for a near failure as sectors that are problematic to read
+diskscan:
+diskscan: Diskscan will only perform reads in its disk surface scan so it is
+diskscan: not destructive.
+diskscan:
+diskscan: Homepage-http://blog.disksurvey.org/proj/diskscan
+diskscan: