system/srm: Updated for version 1.2.15 + new maintainer.

Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
This commit is contained in:
Philip Lacroix 2015-11-05 01:39:52 +07:00 committed by Willy Sudiarto Raharjo
parent 70bf054b35
commit 9bd9c5cdf5
5 changed files with 69 additions and 45 deletions

View file

@ -1,14 +1,15 @@
srm is a secure replacement for rm(1). Unlike the standard rm, it overwrites
the data in the target files before unlinking them. This prevents command-line
recovery of the data by examining the raw block device. It may also help
frustrate physical examination of the disk, although it's unlikely that it can
completely prevent that type of recovery. It is, essentially, a paper shredder
for sensitive files.
recovery of the data by examining the raw block device. It may also help to
frustrate a physical examination of the disk, although it's unlikely that it can
completely protect against this type of recovery.
srm is ideal for personal computers or workstations with Internet connections.
It can help prevent malicious users from breaking in and undeleting personal
files, such as old emails. It's also useful for permanently removing files
from expensive media. For example, cleaning your diary off the zip disk you're
using to send vacation pictures to Uncle Lou. Because it uses the exact same
options as rm(1), srm is simple to use. Just subsitute it for rm whenever you
want to destroy files, rather than just unlinking them.
srm uses algorithms found in "Secure Deletion of Data from Magnetic and Solid-
State Memory" by Peter Gutmann and THC Secure Delete (the overwrite, truncate,
rename, unlink sequence).
Please note that srm will only work on file systems that overwrite blocks in
place. In particular, it will *NOT* work on reiserfs or the vast majority of
journaled file systems. It should work on ext2, FAT-based file systems, and
the BSD native file system. On ext3, srm will try to disable the journaling
of data (please see the verbose output if this fails).

View file

@ -11,9 +11,9 @@ srm:
srm: srm is a secure replacement for rm(1). Unlike the standard rm, it
srm: overwrites the data in the target files before unlinking them. This
srm: prevents command-line recovery of the data by examining the raw block
srm: device. It may also help frustrate physical examination of the disk,
srm: although it's unlikely that it can completely prevent that type of
srm: recovery. It is, essentially, a paper shredder for sensitive files
srm:
srm:
srm: device. It may also help frustrate a physical examination of the disk,
srm: although it's unlikely that it can completely protect against this
srm: type of recovery. Please note that srm will NOT work as expected with
srm: journaled filesystem (e.g. reiserfs, ext3).
srm:
srm: Homepage: http://srm.sourceforge.net/

View file

@ -0,0 +1,22 @@
diff -u1 -r a/doc/srm.1.in b/doc/srm.1.in
--- a/doc/srm.1.in 2015-11-04 12:15:38.438987109 +0100
+++ b/doc/srm.1.in 2015-11-04 12:24:27.481981163 +0100
@@ -45,3 +45,3 @@
\fB\-f\fR, \fB\-\-force\fR
-ignore nonexistent files, never prompt
+ignore non\-existent files, never prompt
.TP
diff -u1 -r a/src/main.c b/src/main.c
--- a/src/main.c 2015-11-04 12:52:07.568002966 +0100
+++ b/src/main.c 2015-11-04 12:54:09.159001600 +0100
@@ -90,7 +90,7 @@
"Usage: %s [OPTION]... [FILE]...\n"
- "Overwrite and remove (unlink) the files. By default use the 35-pass Gutmann\n"
+ "Overwrite and remove (unlink) the files. By default it uses the 35-pass Gutmann\n"
"method to overwrite files.\n"
"\n"
- " -d, --directory ignored (for compatability with rm(1))\n"
- " -f, --force ignore nonexistant files, never prompt\n"
+ " -d, --directory ignored (for compatibility with rm(1))\n"
+ " -f, --force ignore non-existent files, never prompt\n"
" -i, --interactive prompt before any removal\n"

View file

@ -1,8 +1,10 @@
#!/bin/sh
# Slackware build script for srm.
# Slackware build script for srm
# Copyright 2009-2010 Marco Bonetti <sid77 at slackware dot it>
# Copyright 2015 Philip Lacroix <slackph at posteo dot de>
#
# Copyright 2009-2010 Marco Bonetti <sid77@slackware.it>
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@ -24,7 +26,7 @@
PRGNAM=srm
VERSION=${VERSION:-1.2.10}
VERSION=${VERSION:-1.2.15}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
@ -41,8 +43,6 @@ TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
DOCS="AUTHORS ChangeLog COPYING README"
if [ "$ARCH" = "i486" ]; then
SLKCFLAGS="-O2 -march=i486 -mtune=i686"
LIBDIRSUFFIX=""
@ -63,41 +63,42 @@ rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
rm -rf $PRGNAM-$VERSION
tar xvf $CWD/$PRGNAM-$VERSION.tar.bz2
cd $PRGNAM-$VERSION
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 {} \;
\( -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 {} \;
# Fix typos in the --help output and man page.
patch -p1 < $CWD/srm-fix-typos.patch
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
./configure \
--prefix=/usr \
--libdir=/usr/lib${LIBDIRSUFFIX} \
--sysconfdir=/etc \
--localstatedir=/var \
--mandir=/usr/man \
--docdir=/usr/doc/$PRGNAM-$VERSION \
--build=$ARCH-slackware-linux
make
make install DESTDIR=$PKG
find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
| cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
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
( 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
)
PRGMAN=$PKG/usr/man/man1
PRGDOC=$PKG/usr/doc/$PRGNAM-$VERSION
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cp -a $DOCS $PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
# Compress man page.
gzip -9 $PRGMAN/$PRGNAM.1
# Install documentation.
mkdir -p $PRGDOC
cp -a AUTHORS COPYING ChangeLog INSTALL NEWS README TODO $PRGDOC
cat $CWD/$PRGNAM.SlackBuild > $PRGDOC/$PRGNAM.SlackBuild
mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc

View file

@ -1,10 +1,10 @@
PRGNAM="srm"
VERSION="1.2.10"
VERSION="1.2.15"
HOMEPAGE="http://srm.sourceforge.net/"
DOWNLOAD="http://downloads.sourceforge.net/srm/srm-1.2.10.tar.bz2"
MD5SUM="2eb97c550bd910c09f08ec7feaf4bec1"
DOWNLOAD="http://downloads.sourceforge.net/srm/srm-1.2.15.tar.gz"
MD5SUM="681cbb0950b25e300a3f6d680f57f56c"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
REQUIRES=""
MAINTAINER="Marco Bonetti"
EMAIL="sid77@slackware.it"
MAINTAINER="Philip Lacroix"
EMAIL="slackph at posteo dot de"