summaryrefslogtreecommitdiff
path: root/security/srm/patches
diff options
context:
space:
mode:
authorkamil <kamil@pkgsrc.org>2016-10-27 19:49:44 +0000
committerkamil <kamil@pkgsrc.org>2016-10-27 19:49:44 +0000
commit5c153dd8f3d9b2bb50a0b074b46b7a29f8c662c1 (patch)
tree14b8c9c285713b9016324a820b41d7e427c4fcad /security/srm/patches
parentedb8d483bb37a16067ccdf0e98f3a35695a2debe (diff)
downloadpkgsrc-5c153dd8f3d9b2bb50a0b074b46b7a29f8c662c1.tar.gz
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
Diffstat (limited to 'security/srm/patches')
-rw-r--r--security/srm/patches/patch-aa16
-rw-r--r--security/srm/patches/patch-src_sunlink.c46
-rw-r--r--security/srm/patches/patch-test.sh15
3 files changed, 70 insertions, 7 deletions
diff --git a/security/srm/patches/patch-aa b/security/srm/patches/patch-aa
index ef12de0051b..f6874956cf3 100644
--- a/security/srm/patches/patch-aa
+++ b/security/srm/patches/patch-aa
@@ -1,14 +1,16 @@
-$NetBSD: patch-aa,v 1.1 2005/11/01 18:59:34 tv Exp $
+$NetBSD: patch-aa,v 1.2 2016/10/27 19:49:44 kamil Exp $
---- src/rename_unlink.c.orig 2003-04-08 12:16:56.000000000 -0400
+Disable sync() on INTERIX.
+
+--- src/rename_unlink.c.orig 2015-02-26 16:12:02.000000000 +0000
+++ src/rename_unlink.c
-@@ -45,7 +45,9 @@ int rename_unlink(const char *path) {
- if (rename(path, new_name) == -1)
+@@ -105,7 +105,9 @@ int rename_unlink(const char *path) {
+ if (rename(path, new_name) < 0)
return -1;
+#ifndef __INTERIX
sync();
+#endif
-
- if (lstat(new_name, &statbuf) == -1) {
- /* Bad mojo, we just renamed to new_name and now the path is invalid.
+
+ /* check the new name */
+ if (lstat(new_name, &statbuf) < 0) {
diff --git a/security/srm/patches/patch-src_sunlink.c b/security/srm/patches/patch-src_sunlink.c
new file mode 100644
index 00000000000..5be3d101c53
--- /dev/null
+++ b/security/srm/patches/patch-src_sunlink.c
@@ -0,0 +1,46 @@
+$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)
diff --git a/security/srm/patches/patch-test.sh b/security/srm/patches/patch-test.sh
new file mode 100644
index 00000000000..d431e4472dc
--- /dev/null
+++ b/security/srm/patches/patch-test.sh
@@ -0,0 +1,15 @@
+$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