diff options
author | shaun <shaun@FreeBSD.org> | 2006-11-29 07:35:01 +0800 |
---|---|---|
committer | shaun <shaun@FreeBSD.org> | 2006-11-29 07:35:01 +0800 |
commit | 383df1bd88819c82e51d0f56c97c93a427e1cc92 (patch) | |
tree | e9b4922397d511611241c34b168b452f844a5b4f | |
parent | 443ec73efb7170809dbd269d5e9189b8383e88ab (diff) | |
download | freebsd-ports-gnome-383df1bd88819c82e51d0f56c97c93a427e1cc92.tar.gz freebsd-ports-gnome-383df1bd88819c82e51d0f56c97c93a427e1cc92.tar.zst freebsd-ports-gnome-383df1bd88819c82e51d0f56c97c93a427e1cc92.zip |
Add sysutils/diskscrub:
This port performs disk scrubbing on either an entire disk, a single
file, or 'free space' (by creating a new file that fills the FS and
scrubbing that).
PR: ports/105980
Submitted by: Erik Greenwald <erik@smluc.org>
-rw-r--r-- | sysutils/Makefile | 1 | ||||
-rw-r--r-- | sysutils/diskscrub/Makefile | 40 | ||||
-rw-r--r-- | sysutils/diskscrub/distinfo | 3 | ||||
-rw-r--r-- | sysutils/diskscrub/files/extrapatch-freebsd4 | 16 | ||||
-rw-r--r-- | sysutils/diskscrub/pkg-descr | 17 |
5 files changed, 77 insertions, 0 deletions
diff --git a/sysutils/Makefile b/sysutils/Makefile index 60241dd67c1f..a7bc5b7af924 100644 --- a/sysutils/Makefile +++ b/sysutils/Makefile @@ -125,6 +125,7 @@ SUBDIR += diskcheckd SUBDIR += diskmark SUBDIR += diskprep + SUBDIR += diskscrub SUBDIR += disktool SUBDIR += disktype SUBDIR += diskusage diff --git a/sysutils/diskscrub/Makefile b/sysutils/diskscrub/Makefile new file mode 100644 index 000000000000..b9d3fc9eaf46 --- /dev/null +++ b/sysutils/diskscrub/Makefile @@ -0,0 +1,40 @@ +# New ports collection makefile for: diskscrub +# Date created: 28 November 2006 +# Whom: Erik Greenwald <erik@smluc.org> +# +# $FreeBSD$ +# + +PORTNAME= diskscrub +PORTVERSION= 1.8 +CATEGORIES= sysutils +MASTER_SITES= ${MASTER_SITE_SOURCEFORGE} +MASTER_SITE_SUBDIR= ${PORTNAME} +DISTNAME= scrub-${PORTVERSION} + +MAINTAINER= erik@smluc.org +COMMENT= Writes patterns on files to make retrieving the data more difficult + +MAN1= scrub.1 + +PLIST_FILES= bin/scrub + +USE_GMAKE= yes +USE_BZIP2= yes + +post-patch: + @${REINPLACE_CMD} -e 's/^CFLAGS=/CFLAGS?=/' \ + -e 's/^CC=/CC?=/' \ + ${WRKSRC}/Makefile + +do-install: + ${INSTALL_PROGRAM} ${WRKSRC}/scrub ${PREFIX}/bin/scrub + ${INSTALL_MAN} ${WRKSRC}/scrub.1 ${MAN1PREFIX}/man/man1/scrub.1 + +.include <bsd.port.pre.mk> + +.if ${OSVERSION} < 500000 +EXTRA_PATCHES= ${FILESDIR}/extrapatch-freebsd4 +.endif + +.include <bsd.port.post.mk> diff --git a/sysutils/diskscrub/distinfo b/sysutils/diskscrub/distinfo new file mode 100644 index 000000000000..2900f7241dac --- /dev/null +++ b/sysutils/diskscrub/distinfo @@ -0,0 +1,3 @@ +MD5 (scrub-1.8.tar.bz2) = 18230b4196b7854740820cda39ecccd0 +SHA256 (scrub-1.8.tar.bz2) = 6bca4b8c378bd066cb7512b92a341c0613609b2ac65fc1ca59d23f40054486e8 +SIZE (scrub-1.8.tar.bz2) = 29545 diff --git a/sysutils/diskscrub/files/extrapatch-freebsd4 b/sysutils/diskscrub/files/extrapatch-freebsd4 new file mode 100644 index 000000000000..a0916b57737c --- /dev/null +++ b/sysutils/diskscrub/files/extrapatch-freebsd4 @@ -0,0 +1,16 @@ +--- getsize.c.orig Thu Aug 17 05:15:45 2006 ++++ getsize.c Tue Nov 28 23:00:49 2006 +@@ -81,6 +81,13 @@ + #elif defined(__FreeBSD__) + /* scrub-1.7 tested freebsd 5.3-RELEASE-p5 */ + #include <sys/ioctl.h> ++#include <sys/queue.h> ++ ++#ifndef DIOCGMEDIASIZE ++#define DIOCGMEDIASIZE _IOR('d', 129, off_t) /* Get media size in bytes */ ++#endif ++ ++#include <sys/disklabel.h> + #include <sys/disk.h> + + off_t diff --git a/sysutils/diskscrub/pkg-descr b/sysutils/diskscrub/pkg-descr new file mode 100644 index 000000000000..47ca8fd38fee --- /dev/null +++ b/sysutils/diskscrub/pkg-descr @@ -0,0 +1,17 @@ +Scrub iteratively writes patterns on files or disk devices to make retrieving +the data more difficult. Scrub operates in one of three modes: + +1. The special file corresponding to an entire disk is scrubbed and + all data on it is destroyed. This mode is selected if file is a + character or block special file. This is the most effective method. +2. A regular file is scrubbed and only the data in the file (and optionally + its name in the directory entry) is destroyed. The file size is rounded up + to fill out the last file system block. This mode is selected if file is a + regular file. +3. A file is created, expanded until the file system is full, then scrubbed as + in item 2. This mode is selected with the -X option. + +Scrub implements user-selectable pattern algorithms that are compliant with +DoD 5520.22-M or NNSA NAP-14.x. + +WWW: http://www.llnl.gov/linux/scrub/scrub.html |