aboutsummaryrefslogtreecommitdiff
path: root/system/secure-delete
diff options
context:
space:
mode:
authorEdinaldo P. Silva <edps.mundognu@gmail.com>2015-09-20 09:56:17 +0700
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2015-09-20 09:56:17 +0700
commit574c359c7893f4c3fd800f6f41f45defbd33c4ef (patch)
treebed644ebfa4f5650ab2d4c8c1495b298eaf8bd3b /system/secure-delete
parenta0b8800b04368441e036ae3ce2f37e4b3d1ac18d (diff)
system/secure-delete: Update patch.
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'system/secure-delete')
-rw-r--r--system/secure-delete/secure-delete.SlackBuild9
-rw-r--r--system/secure-delete/secure-delete_3.1-6.diff (renamed from system/secure-delete/secure-delete.diff)227
2 files changed, 233 insertions, 3 deletions
diff --git a/system/secure-delete/secure-delete.SlackBuild b/system/secure-delete/secure-delete.SlackBuild
index f511e7feb0a5..fb5b0199d413 100644
--- a/system/secure-delete/secure-delete.SlackBuild
+++ b/system/secure-delete/secure-delete.SlackBuild
@@ -23,9 +23,8 @@
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
PRGNAM=secure-delete
-SRCNAM=secure_delete
VERSION=${VERSION:-3.1}
-BUILD=${BUILD:-3}
+BUILD=${BUILD:-4}
TAG=${TAG:-_SBo}
if [ -z "$ARCH" ]; then
@@ -57,6 +56,8 @@ fi
set -e
+SRCNAM="secure_delete"
+
rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
@@ -71,7 +72,7 @@ find -L . \
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
-patch -p1 < $CWD/secure-delete.diff
+patch -p1 < $CWD/secure-delete_3.1-6.diff
make prefix=/usr DESTDIR=$PKG
find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \
@@ -90,6 +91,8 @@ DOCS="CHANGES README secure_delete.doc TODO usenix6-gutmann.doc"
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cp -a $DOCS $PKG/usr/doc/$PRGNAM-$VERSION
+cp -a debian/changelog $PKG/usr/doc/$PRGNAM-$VERSION/changelog.Debian
+cp -a debian/README.Debian $PKG/usr/doc/$PRGNAM-$VERSION/README.Debian
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
mkdir -p $PKG/install
diff --git a/system/secure-delete/secure-delete.diff b/system/secure-delete/secure-delete_3.1-6.diff
index e31199944c88..288092f59a32 100644
--- a/system/secure-delete/secure-delete.diff
+++ b/system/secure-delete/secure-delete_3.1-6.diff
@@ -249,3 +249,230 @@
-.I smem
+.I sdmem
(1)
+--- secure-delete-3.1.orig/debian/docs
++++ secure-delete-3.1/debian/docs
+@@ -0,0 +1,4 @@
++README
++TODO
++secure_delete.doc
++usenix6-gutmann.doc
+--- secure-delete-3.1.orig/debian/control
++++ secure-delete-3.1/debian/control
+@@ -0,0 +1,13 @@
++Source: secure-delete
++Section: utils
++Priority: optional
++Maintainer: Robert Lemmen <robertle@semistable.com>
++Build-Depends: debhelper (>= 7.0.0)
++Standards-Version: 3.9.4
++
++Package: secure-delete
++Architecture: any
++Depends: ${shlibs:Depends}, ${misc:Depends}
++Description: tools to wipe files, free disk space, swap and memory
++ Gutmann method based tools for securely wiping data from files, free
++ disk space, swap and memory: srm, sfill, sswap and sdmem.
+--- secure-delete-3.1.orig/debian/compat
++++ secure-delete-3.1/debian/compat
+@@ -0,0 +1 @@
++7
+--- secure-delete-3.1.orig/debian/changelog
++++ secure-delete-3.1/debian/changelog
+@@ -0,0 +1,46 @@
++secure-delete (3.1-6) unstable; urgency=low
++
++ * Enable hardening flags during build
++ * Update packaging
++ * Bump standards-version
++ * Fix a few minus-vs-hyphen bugs in manpages
++ * Fixed a few typos (closes: #486018, #653260)
++ * Tone down description a little bit and include binary names
++ (closes: #680336, #538151)
++
++ -- Robert Lemmen <robertle@semistable.com> Fri, 05 Jul 2013 08:50:37 +0100
++
++secure-delete (3.1-5) unstable; urgency=low
++
++ * Rename smem to sdmem to avoid name clash with smem package
++ * Bumped Standards-Version to 3.8.3 and related fixes
++
++ -- Robert Lemmen <robertle@semistable.com> Tue, 05 Jan 2010 14:55:00 +0000
++
++secure-delete (3.1-4) unstable; urgency=low
++
++ * Fixed licensing info (closes: #428102)
++ * Fixed handling of nostrip build option (closes: #438009)
++
++ -- Robert Lemmen <robertle@semistable.com> Tue, 28 Aug 2007 13:21:17 +0200
++
++secure-delete (3.1-3) unstable; urgency=low
++
++ * Moved from experimental
++ * Added more documentation
++
++ -- Robert Lemmen <robertle@semistable.com> Thu, 5 Oct 2006 22:04:17 +0200
++
++secure-delete (3.1-2) experimental; urgency=low
++
++ * Upload to experimental instead of unstable.
++ * Added description on how to test security to README.Debian.
++
++ -- Robert Lemmen <robertle@semistable.com> Mon, 2 May 2005 11:55:11 +0200
++
++secure-delete (3.1-1) unstable; urgency=low
++
++ * Initial Release.
++
++ -- Robert Lemmen <robertle@semistable.com> Thu, 29 Jan 2004 18:09:26 +0100
++
+--- secure-delete-3.1.orig/debian/copyright
++++ secure-delete-3.1/debian/copyright
+@@ -0,0 +1,17 @@
++This package was debianized by Robert Lemmen <robertle@semistable.com> on
++Thu, 29 Jan 2004 18:09:26 +0100.
++
++It was downloaded from http://www.thc.org
++
++Upstream Author: van Hauser <vh@thc.org>
++
++Copyright: 1999-2004 van Hauser
++
++ You are free to distribute this software under the terms of
++ the GNU General Public License.
++ On Debian systems, the complete text of the GNU General Public
++ License can be found in /usr/share/common-licenses/GPL file.
++
++The file "usenix6-gutmann.doc" is licensed under the "Creative Commons
++Attribution 3.0" license, which you can find at
++http://creativecommons.org/licenses/by/3.0/
+--- secure-delete-3.1.orig/debian/watch
++++ secure-delete-3.1/debian/watch
+@@ -0,0 +1,3 @@
++version=2
++http://www.thc.org/releases.php .*secure[-_]delete-(.*)\.tar\.gz
++
+--- secure-delete-3.1.orig/debian/README.Debian
++++ secure-delete-3.1/debian/README.Debian
+@@ -0,0 +1,56 @@
++secure-delete for Debian
++------------------------
++
++The original package and debian versions prio to 3.1-5 contained a utility
++called smem that wiped memory. This utility seems to be of limited use and
++clashes with another binary of the same name, it is therefore renamed to sdmem.
++
++The source for secure_delete contains a 2.4 kernel module that turns every
++call to unlink() into a secure remove, this module is not yet part of this
++package for technical reasons. if you need it please "apt_get source
++secure-delete" and build it yourself for now.
++
++Also note that securely wiping data from magnetic media is a difficult task and
++depends a lot on the filesystem in question (among other things). So there is no
++guarantee that this program will work in your configuration, but you can and
++should check for yourself by creating a loopback filesystem, mountig it and
++creating a file in it, then securely wiping it and grepping for it's contents in
++the loopback file:
++
++dd if=/dev/zero of=disk bs=4096 count=1024
++mke2fs disk
++losetup /dev/loop0 disk
++mkdir test
++mount /dev/loop0 test
++cd test
++for ((i=0; i<10000; i++))
++do
++ echo "ofenrohr" >> file;
++done
++cd ..
++umount test
++losetup -d /dev/loop0
++grep "ofenrohr" disk
++--> this should result in a "binary file disk matches"
++losetup /dev/loop0 disk
++mount /dev/loop0 test
++cd test
++srm file
++cd ..
++umount test
++losetup -d /dev/loop0
++grep "ofenrohr" disk
++--> this should not find anything
++
++Please make sure you use the correct filesystem type and options during the
++mkfs!
++
++Another general problem of wiping data from disks is that most harddisks will
++occasionally mark a sector as "bad" and copy it's contents to a new location
++that the disk will pretend is at the original location. Since this is completely
++transparent, there is no way to access these sectors without touching the disks
++hardware. These sectors may then contain sensitive information that could be
++retrieved from the disk. If you want better security, use an encrypting
++filesystem (dm-crypt, loop-aes), and forget the key if you want to wipe it.
++
++ -- Robert Lemmen <robertle@semistable.com>, Thu, 29 Jan 2004 18:09:26 +0100
+--- secure-delete-3.1.orig/debian/rules
++++ secure-delete-3.1/debian/rules
+@@ -0,0 +1,59 @@
++#!/usr/bin/make -f
++
++# Uncomment this to turn on verbose mode.
++#export DH_VERBOSE=1
++
++CPPFLAGS:=$(shell dpkg-buildflags --get CPPFLAGS)
++CFLAGS:=$(shell dpkg-buildflags --get CFLAGS)
++CXXFLAGS:=$(shell dpkg-buildflags --get CXXFLAGS)
++LDFLAGS:=$(shell dpkg-buildflags --get LDFLAGS)
++
++build: build-arch build-indep
++build-arch: build-stamp
++build-indep: build-stamp
++
++build-stamp:
++ dh_testdir
++ CFLAGS="$(CFLAGS) $(CPPFLAGS) $(LDFLAGS)" $(MAKE)
++ touch build-stamp
++
++clean:
++ dh_testdir
++ dh_testroot
++ rm -f build-stamp
++ $(MAKE) clean
++ dh_clean
++
++install: build
++ dh_testdir
++ dh_testroot
++ dh_prep
++ dh_installdirs
++ $(MAKE) install prefix=$(CURDIR)/debian/secure-delete/usr
++
++
++binary-indep: build install
++
++binary-arch: build install
++ dh_testdir
++ dh_testroot
++ dh_installchangelogs CHANGES
++ dh_installdocs README TODO
++ dh_installman sfill.1 srm.1 smem.1 sswap.1
++ # rename smem
++ mv $(CURDIR)/debian/secure-delete/usr/bin/smem \
++ $(CURDIR)/debian/secure-delete/usr/bin/sdmem
++ mv $(CURDIR)/debian/secure-delete/usr/share/man/man1/smem.1 \
++ $(CURDIR)/debian/secure-delete/usr/share/man/man1/sdmem.1
++ dh_link
++ dh_strip
++ dh_compress
++ dh_fixperms
++ dh_installdeb
++ dh_shlibdeps
++ dh_gencontrol
++ dh_md5sums
++ dh_builddeb
++
++binary: binary-indep binary-arch
++.PHONY: build clean binary-indep binary-arch binary install
+--- secure-delete-3.1.orig/debian/source/format
++++ secure-delete-3.1/debian/source/format
+@@ -0,0 +1 @@
++1.0