Thu Oct 27 19:49:44 2016 UTC ()
Update srm from 1.2.8 to 1.2.15
pkgsrc changes:
- set LICENSE (x11)
- add test target
- add new NetBSD patches
- keep INTERIX patch, not tested
Upstream changelog
==================
release 1.2.15
fix handling of files > 2GB on Windows.
fix handling of symlinks to files owned by root.
release 1.2.14
fix fill() function, this fixes DoE and Gutmann modes.
new --rcmp mode.
use simple mode by default and not Gutmann 35 pass.
release 1.2.13
fix handling of OsX resource forks.
release-1_2_12
now using SVN on SourceForge.
small updates to autotools build files.
support Haiku operating system.
overwrite POSIX extended attributes.
srm has exit code != 0 if removing any file or directory failed.
handle alternate data streams on Windows and NTFS.
handle hard links on Windows and NTFS.
release-1_2_11
Win32 command line wildcard expansion
-v -v displays current write position
SIGINFO, SIGUSR2 display current write position
-x does not cross file system boundaries
overwrite block devices
release-1_2_10
Mac OsX compiles and works again
add DoE wipe mode
fix deletion of named pipes/fifos
Debian fixes
Win32 fixes
release-1_2_9
fix deletion of 0 byte files
fix handling of files <4096 bytes
fix handling of files >2GiB on 32bit
OpenBSD compat switch
handle OsX ressource fork
added some code from OsX port
Win32 version
(kamil)
diff -r1.6 -r1.7 pkgsrc/security/srm/Makefile
diff -r1.1.1.1 -r1.2 pkgsrc/security/srm/PLIST
diff -r1.4 -r1.5 pkgsrc/security/srm/distinfo
diff -r1.1 -r1.2 pkgsrc/security/srm/patches/patch-aa
diff -r0 -r1.1 pkgsrc/security/srm/patches/patch-src_sunlink.c
diff -r0 -r1.1 pkgsrc/security/srm/patches/patch-test.sh
--- pkgsrc/security/srm/Makefile 2012/10/23 18:16:59 1.6
+++ pkgsrc/security/srm/Makefile 2016/10/27 19:49:44 1.7
| @@ -1,17 +1,20 @@ | | | @@ -1,17 +1,20 @@ |
1 | # $NetBSD: Makefile,v 1.6 2012/10/23 18:16:59 asau Exp $ | | 1 | # $NetBSD: Makefile,v 1.7 2016/10/27 19:49:44 kamil Exp $ |
2 | # | | 2 | # |
3 | | | 3 | |
4 | DISTNAME= srm-1.2.8 | | 4 | DISTNAME= srm-1.2.15 |
5 | PKGREVISION= 1 | | 5 | CATEGORIES= security |
6 | CATEGORIES= security | | 6 | MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=srm/} |
7 | MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=srm/} | | | |
8 | | | | |
9 | MAINTAINER= pkgsrc-users@NetBSD.org | | | |
10 | HOMEPAGE= http://srm.sourceforge.net/ | | | |
11 | COMMENT= Secure replacement for rm(1) | | | |
12 | | | 7 | |
13 | GNU_CONFIGURE= yes | | 8 | MAINTAINER= pkgsrc-users@NetBSD.org |
| | | 9 | HOMEPAGE= http://srm.sourceforge.net/ |
| | | 10 | COMMENT= Secure replacement for rm(1) |
| | | 11 | LICENSE= x11 |
14 | | | 12 | |
15 | CONFLICTS+= sr-[0-9]* # bin/srm | | 13 | GNU_CONFIGURE= yes |
| | | 14 | |
| | | 15 | CONFLICTS+= sr-[0-9]* # bin/srm |
| | | 16 | |
| | | 17 | do-test: |
| | | 18 | ${RUN} cd ${WRKSRC} && ${SETENV} ${TEST_ENV} ./test.sh |
16 | | | 19 | |
17 | .include "../../mk/bsd.pkg.mk" | | 20 | .include "../../mk/bsd.pkg.mk" |
--- pkgsrc/security/srm/PLIST 2004/03/01 09:43:06 1.1.1.1
+++ pkgsrc/security/srm/PLIST 2016/10/27 19:49:44 1.2
| @@ -1,3 +1,4 @@ | | | @@ -1,3 +1,4 @@ |
1 | @comment $NetBSD: PLIST,v 1.1.1.1 2004/03/01 09:43:06 cube Exp $ | | 1 | @comment $NetBSD: PLIST,v 1.2 2016/10/27 19:49:44 kamil Exp $ |
| | | 2 | bin/fill_test |
2 | bin/srm | | 3 | bin/srm |
3 | man/man1/srm.1 | | 4 | man/man1/srm.1 |
--- pkgsrc/security/srm/distinfo 2015/11/04 01:18:10 1.4
+++ pkgsrc/security/srm/distinfo 2016/10/27 19:49:44 1.5
| @@ -1,7 +1,9 @@ | | | @@ -1,7 +1,9 @@ |
1 | $NetBSD: distinfo,v 1.4 2015/11/04 01:18:10 agc Exp $ | | 1 | $NetBSD: distinfo,v 1.5 2016/10/27 19:49:44 kamil Exp $ |
2 | | | 2 | |
3 | SHA1 (srm-1.2.8.tar.gz) = 8b7aafc95b3ef67e2c737030567222bf50082188 | | 3 | SHA1 (srm-1.2.15.tar.gz) = 137bb9b94819de48b8061e4185552b6170bbf9c6 |
4 | RMD160 (srm-1.2.8.tar.gz) = d1ce5fe2ec13e45c5620e6a71c1f2dfcb49ab1bc | | 4 | RMD160 (srm-1.2.15.tar.gz) = 61b674b21acf48ec837fcaf59836abdda62bc496 |
5 | SHA512 (srm-1.2.8.tar.gz) = 2e67c3d69e6573ae1248c57d9e815a5d6c64c9e4c2ecc2189823d4a343de795057a4e6efa1d9195a1daa150a92624211b4ce7a091d48f430632030e7a0678ec7 | | 5 | SHA512 (srm-1.2.15.tar.gz) = a8ec78473c55b70557fca88f525998ed51df3be58618b9da220e1bb73df013163f4e1563cbe2062b9cf1512152afeb9004b5be0be69cc1278c0d28597310dfd2 |
6 | Size (srm-1.2.8.tar.gz) = 88067 bytes | | 6 | Size (srm-1.2.15.tar.gz) = 132031 bytes |
7 | SHA1 (patch-aa) = a94522473ee72315d3ab38bfa70f336290431b9b | | 7 | SHA1 (patch-aa) = e73c6bc1fb3fcbd019accf417aec530694386a97 |
| | | 8 | SHA1 (patch-src_sunlink.c) = 3c6437534b62191a05a96761e54c1252bd43d0ed |
| | | 9 | SHA1 (patch-test.sh) = 8383932967730cb55c9b530d73c374122adea197 |
--- pkgsrc/security/srm/patches/patch-aa 2005/11/01 18:59:34 1.1
+++ pkgsrc/security/srm/patches/patch-aa 2016/10/27 19:49:44 1.2
| @@ -1,14 +1,16 @@ | | | @@ -1,14 +1,16 @@ |
1 | $NetBSD: patch-aa,v 1.1 2005/11/01 18:59:34 tv Exp $ | | 1 | $NetBSD: patch-aa,v 1.2 2016/10/27 19:49:44 kamil Exp $ |
2 | | | 2 | |
3 | --- src/rename_unlink.c.orig 2003-04-08 12:16:56.000000000 -0400 | | 3 | Disable sync() on INTERIX. |
| | | 4 | |
| | | 5 | --- src/rename_unlink.c.orig 2015-02-26 16:12:02.000000000 +0000 |
4 | +++ src/rename_unlink.c | | 6 | +++ src/rename_unlink.c |
5 | @@ -45,7 +45,9 @@ int rename_unlink(const char *path) { | | 7 | @@ -105,7 +105,9 @@ int rename_unlink(const char *path) { |
6 | if (rename(path, new_name) == -1) | | 8 | if (rename(path, new_name) < 0) |
7 | return -1; | | 9 | return -1; |
8 | | | 10 | |
9 | +#ifndef __INTERIX | | 11 | +#ifndef __INTERIX |
10 | sync(); | | 12 | sync(); |
11 | +#endif | | 13 | +#endif |
12 | | | 14 | |
13 | if (lstat(new_name, &statbuf) == -1) { | | 15 | /* check the new name */ |
14 | /* Bad mojo, we just renamed to new_name and now the path is invalid. | | 16 | if (lstat(new_name, &statbuf) < 0) { |
$NetBSD: patch-src_sunlink.c,v 1.1 2016/10/27 19:49:44 kamil Exp $
Add NetBSD support.
--- src/sunlink.c.orig 2015-02-26 16:12:02.000000000 +0000
+++ src/sunlink.c
@@ -105,7 +105,7 @@ static volatile int SIGINT_received = 0;
#if defined(__linux__) && !defined(__USE_GNU)
typedef __sighandler_t sighandler_t;
#endif
-#if defined(__FreeBSD__) || defined(__OpenBSD__)
+#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__)
typedef sig_t sighandler_t;
#endif
@@ -837,8 +837,13 @@ next_ads:
#if defined(HAVE_SYS_VFS_H) || (defined(HAVE_SYS_PARAM_H) && defined(HAVE_SYS_MOUNT_H))
{
+#if defined(__NetBSD__)
+ struct statvfs fs_stats;
+ if (fstatvfs(srm.fd, &fs_stats) < 0 && errno != ENOSYS)
+#else
struct statfs fs_stats;
if (fstatfs(srm.fd, &fs_stats) < 0 && errno != ENOSYS)
+#endif
{
int e=errno;
close(srm.fd);
@@ -848,7 +853,7 @@ next_ads:
#if defined(__linux__)
srm.buffer_size = fs_stats.f_bsize;
-#elif defined(__FreeBSD__) || defined(__APPLE__)
+#elif defined(__FreeBSD__) || defined(__NetBSD__) || defined(__APPLE__)
srm.buffer_size = fs_stats.f_iosize;
#else
#error Please define your platform.
@@ -907,6 +912,7 @@ next_ads:
and catch only platforms supporting NOUNLINK here.
OpenBSD - doesn't support nounlink (As of 3.1)
+ NetBSD - doesn't support nounlink (as of 7.99.41)
FreeBSD - supports nounlink (from 4.4 on?)
Tru64 - unknown
MacOS X - doesn't support NOUNLINK (as of 10.3.5)
$NetBSD: patch-test.sh,v 1.1 2016/10/27 19:49:44 kamil Exp $
Add NetBSD support
--- test.sh.orig 2015-02-26 16:12:02.000000000 +0000
+++ test.sh
@@ -187,7 +187,7 @@ OS=$(uname -s)
if [ "$OS" = Linux ] ; then
setfattr -n user.a1 -v "The value of extended attribute number 1" $FN
setfattr -n user.num2 -v "A second attribute." $FN
-elif [ "$OS" = FreeBSD ] ; then
+elif [ "x$OS" = xFreeBSD -o "x$OS" = xNetBSD ] ; then
setextattr user a1 "The value of extended attribute number 1" $FN
setextattr user num2 "A second attribute." $FN
elif [ "$OS" = Darwin ] ; then