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

cvs diff -r1.6 -r1.7 pkgsrc/security/srm/Makefile (expand / switch to unified diff)

--- 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
4DISTNAME= srm-1.2.8 4DISTNAME= srm-1.2.15
5PKGREVISION= 1 5CATEGORIES= security
6CATEGORIES= security 6MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=srm/}
7MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=srm/} 
8 
9MAINTAINER= pkgsrc-users@NetBSD.org 
10HOMEPAGE= http://srm.sourceforge.net/ 
11COMMENT= Secure replacement for rm(1) 
12 7
13GNU_CONFIGURE= yes 8MAINTAINER= pkgsrc-users@NetBSD.org
 9HOMEPAGE= http://srm.sourceforge.net/
 10COMMENT= Secure replacement for rm(1)
 11LICENSE= x11
14 12
15CONFLICTS+= sr-[0-9]* # bin/srm 13GNU_CONFIGURE= yes
 14
 15CONFLICTS+= sr-[0-9]* # bin/srm
 16
 17do-test:
 18 ${RUN} cd ${WRKSRC} && ${SETENV} ${TEST_ENV} ./test.sh
16 19
17.include "../../mk/bsd.pkg.mk" 20.include "../../mk/bsd.pkg.mk"

cvs diff -r1.1.1.1 -r1.2 pkgsrc/security/srm/PLIST (expand / switch to unified diff)

--- 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 $
 2bin/fill_test
2bin/srm 3bin/srm
3man/man1/srm.1 4man/man1/srm.1

cvs diff -r1.4 -r1.5 pkgsrc/security/srm/distinfo (expand / switch to unified diff)

--- 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
3SHA1 (srm-1.2.8.tar.gz) = 8b7aafc95b3ef67e2c737030567222bf50082188 3SHA1 (srm-1.2.15.tar.gz) = 137bb9b94819de48b8061e4185552b6170bbf9c6
4RMD160 (srm-1.2.8.tar.gz) = d1ce5fe2ec13e45c5620e6a71c1f2dfcb49ab1bc 4RMD160 (srm-1.2.15.tar.gz) = 61b674b21acf48ec837fcaf59836abdda62bc496
5SHA512 (srm-1.2.8.tar.gz) = 2e67c3d69e6573ae1248c57d9e815a5d6c64c9e4c2ecc2189823d4a343de795057a4e6efa1d9195a1daa150a92624211b4ce7a091d48f430632030e7a0678ec7 5SHA512 (srm-1.2.15.tar.gz) = a8ec78473c55b70557fca88f525998ed51df3be58618b9da220e1bb73df013163f4e1563cbe2062b9cf1512152afeb9004b5be0be69cc1278c0d28597310dfd2
6Size (srm-1.2.8.tar.gz) = 88067 bytes 6Size (srm-1.2.15.tar.gz) = 132031 bytes
7SHA1 (patch-aa) = a94522473ee72315d3ab38bfa70f336290431b9b 7SHA1 (patch-aa) = e73c6bc1fb3fcbd019accf417aec530694386a97
 8SHA1 (patch-src_sunlink.c) = 3c6437534b62191a05a96761e54c1252bd43d0ed
 9SHA1 (patch-test.sh) = 8383932967730cb55c9b530d73c374122adea197

cvs diff -r1.1 -r1.2 pkgsrc/security/srm/patches/patch-aa (expand / switch to unified diff)

--- 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 3Disable 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) {

File Added: pkgsrc/security/srm/patches/patch-src_sunlink.c
$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)

File Added: pkgsrc/security/srm/patches/patch-test.sh
$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