pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/filesystems/fsx Import fsx-2009 as filesystems/fsx.
details: https://anonhg.NetBSD.org/pkgsrc/rev/624fbce0891b
branches: trunk
changeset: 354671:624fbce0891b
user: wiz <wiz%pkgsrc.org@localhost>
date: Sun Nov 06 16:12:08 2016 +0000
description:
Import fsx-2009 as filesystems/fsx.
File system exerciser.
diffstat:
filesystems/fsx/DESCR | 1 +
filesystems/fsx/Makefile | 25 ++++++
filesystems/fsx/PLIST | 3 +
filesystems/fsx/distinfo | 15 +++
filesystems/fsx/patches/patch-fsx.c | 137 ++++++++++++++++++++++++++++++++++++
5 files changed, 181 insertions(+), 0 deletions(-)
diffs (201 lines):
diff -r c5c06aa82ded -r 624fbce0891b filesystems/fsx/DESCR
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/filesystems/fsx/DESCR Sun Nov 06 16:12:08 2016 +0000
@@ -0,0 +1,1 @@
+File system exerciser.
diff -r c5c06aa82ded -r 624fbce0891b filesystems/fsx/Makefile
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/filesystems/fsx/Makefile Sun Nov 06 16:12:08 2016 +0000
@@ -0,0 +1,25 @@
+# $NetBSD: Makefile,v 1.1 2016/11/06 16:12:08 wiz Exp $
+
+DISTNAME= fsx-2009
+CATEGORIES= filesystems
+MASTER_SITES= http://codemonkey.org.uk/projects/fsx/fsx-macosforge/
+DISTFILES= fsx.c Makefile APPLE_LICENSE
+
+MAINTAINER= pkgsrc-users%NetBSD.org@localhost
+HOMEPAGE= http://codemonkey.org.uk/projects/fsx/
+COMMENT= File System Exerciser
+LICENSE= apple-public-source-license
+
+DIST_SUBDIR= ${DISTNAME}
+WRKSRC= ${WRKDIR}
+USE_TOOLS+= gmake
+BUILD_TARGET= fsx
+MAKE_FLAGS= CFLAGS=${CFLAGS}
+
+INSTALLATION_DIRS= bin share/doc/fsx
+
+do-install:
+ ${INSTALL_PROGRAM} ${WRKSRC}/fsx ${DESTDIR}${PREFIX}/bin
+ ${INSTALL_DATA} ${WRKSRC}/APPLE_LICENSE ${DESTDIR}${PREFIX}/share/doc/fsx
+
+.include "../../mk/bsd.pkg.mk"
diff -r c5c06aa82ded -r 624fbce0891b filesystems/fsx/PLIST
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/filesystems/fsx/PLIST Sun Nov 06 16:12:08 2016 +0000
@@ -0,0 +1,3 @@
+@comment $NetBSD: PLIST,v 1.1 2016/11/06 16:12:08 wiz Exp $
+bin/fsx
+share/doc/fsx/APPLE_LICENSE
diff -r c5c06aa82ded -r 624fbce0891b filesystems/fsx/distinfo
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/filesystems/fsx/distinfo Sun Nov 06 16:12:08 2016 +0000
@@ -0,0 +1,15 @@
+$NetBSD: distinfo,v 1.1 2016/11/06 16:12:08 wiz Exp $
+
+SHA1 (fsx-2009/APPLE_LICENSE) = f752e2ee8522bbdcd8945f73f6189958eb15a374
+RMD160 (fsx-2009/APPLE_LICENSE) = 61094dc893ea2f47435779485f64b50a519aadb0
+SHA512 (fsx-2009/APPLE_LICENSE) = ba9a08094d32f8416c71842d347c34070ec330ce83e90bcd7b2e9c3b1d2d7af452615582b76970dce860b0f7527721c7ea95e9c46e81cf44a6cc403f77f5d1de
+Size (fsx-2009/APPLE_LICENSE) = 19829 bytes
+SHA1 (fsx-2009/Makefile) = 108caf6f44add1276805693fb90c3e28acb5bdfa
+RMD160 (fsx-2009/Makefile) = 3b315d64e403a5eb1fa4d33e0d8cba7859a24bac
+SHA512 (fsx-2009/Makefile) = 7c01bb869b25423a4989c078014218061e9ae4e9e10c76378d0ada32fde7fa08a91aab50ea8e3f934322b5201cd95173c560c0151bac7f0eba26b15fe4c7c544
+Size (fsx-2009/Makefile) = 1327 bytes
+SHA1 (fsx-2009/fsx.c) = 96a4f28624cd5810851669d927a48177361341db
+RMD160 (fsx-2009/fsx.c) = 10ea68dbb1af824b0e00c39f14c1e08af3123e75
+SHA512 (fsx-2009/fsx.c) = f77d52e445c574c511652f96fea485496252d21c077631ca8a24aea52729553b4f5a43e88cbe0f2e262dc310d7100860253b5395a5183677e99b50ab5d550d4b
+Size (fsx-2009/fsx.c) = 42316 bytes
+SHA1 (patch-fsx.c) = d2f67e9098787bad80ee7465828bcca18cc023cd
diff -r c5c06aa82ded -r 624fbce0891b filesystems/fsx/patches/patch-fsx.c
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/filesystems/fsx/patches/patch-fsx.c Sun Nov 06 16:12:08 2016 +0000
@@ -0,0 +1,137 @@
+$NetBSD: patch-fsx.c,v 1.1 2016/11/06 16:12:08 wiz Exp $
+
+Portability fixes for NetBSD.
+
+--- fsx.c.orig 2016-11-06 16:10:25.886667703 +0000
++++ fsx.c
+@@ -53,7 +53,9 @@
+ #include <sys/types.h>
+ #include <sys/stat.h>
+ #include <time.h>
++#ifdef __APPLE__
+ #include <sys/paths.h>
++#endif
+ #include <sys/param.h>
+ #ifdef _UWIN
+ # include <limits.h>
+@@ -76,6 +78,9 @@
+ #ifdef XILOG
+ # include <XILog/XILog.h>
+ #endif
++#ifndef _PATH_FORKSPECIFIER
++#define _PATH_FORKSPECIFIER "/..namedfork/"
++#endif
+
+ /*
+ * A log entry is an operation and a bunch of arguments.
+@@ -754,19 +759,27 @@ doread(unsigned offset, unsigned size)
+ failure(140);
+ }
+
++#ifdef F_NOCACHE
+ if (cache_off && (fcntl(fd, F_NOCACHE, 1) != 0)) { // turn data caching off
+ logdump();
+ prterr("doread: fcntl(F_NOCACHE, 1)");
+ failure(201);
+ }
++#endif
+ iret = read(fd, temp_buf, size);
++#ifdef F_NOCACHE
+ if (cache_off && (fcntl(fd, F_NOCACHE, 0) != 0)) {
+ logdump();
+ prterr("doread: fcntl(F_NOCACHE, 0)");
+ failure(201);
+ }
++#endif
+ } else {
++#ifdef __APPLE__
+ iret = fgetxattr(fd, eaname, temp_buf, size, 0, 0);
++#else
++ iret = fgetxattr(fd, eaname, temp_buf, size);
++#endif
+ }
+
+ if (iret != size) {
+@@ -947,11 +960,13 @@ dowrite(unsigned offset, unsigned size)
+ prterr("dowrite: lseek");
+ failure(150);
+ }
++#ifdef F_NOCACHE
+ if (cache_off && (fcntl(fd, F_NOCACHE, 1) != 0)) { // turn data caching off
+ logdump();
+ prterr("dowrite: fcntl(F_NOCACHE, 1)");
+ failure(201);
+ }
++#endif
+ iret = write(fd, good_buf + file_size, offset - file_size);
+ if (iret != offset - file_size) {
+ logdump();
+@@ -964,11 +979,13 @@ dowrite(unsigned offset, unsigned size)
+ }
+ failure(151);
+ }
++#ifdef F_NOCACHE
+ if (cache_off && (fcntl(fd, F_NOCACHE, 0) != 0)) {
+ logdump();
+ prterr("dowrite: fcntl(F_NOCACHE, 0)");
+ failure(201);
+ }
++#endif
+ }
+ }
+ file_size = offset + size;
+@@ -994,11 +1011,13 @@ dowrite(unsigned offset, unsigned size)
+ prterr("dowrite: lseek");
+ failure(150);
+ }
++#ifdef F_NOCACHE
+ if (cache_off && (fcntl(fd, F_NOCACHE, 1) != 0)) { // turn data caching off
+ logdump();
+ prterr("dowrite: fcntl(F_NOCACHE, 1)");
+ failure(201);
+ }
++#endif
+ iret = write(fd, good_buf + offset, size);
+ if (iret != size) {
+ logdump();
+@@ -1011,21 +1030,31 @@ dowrite(unsigned offset, unsigned size)
+ }
+ failure(151);
+ }
++#ifdef F_NOCACHE
+ if (cache_off && (fcntl(fd, F_NOCACHE, 0) != 0)) {
+ logdump();
+ prterr("dowrite: fcntl(F_NOCACHE, 0)");
+ failure(201);
+ }
++#endif
+ } else {
+ if (random() % 2000 == 0) {
++#ifdef __APPLE__
+ iret = fremovexattr(fd, eaname, 0);
++#else
++ iret = fremovexattr(fd, eaname);
++#endif
+ if (iret != 0) {
+ logdump();
+ prterr("ea_dowrite: removexattr");
+ failure(151);
+ }
+ }
++#ifdef __APPLE__
+ iret = fsetxattr(fd, eaname, good_buf, size, 0, 0);
++#else
++ iret = fsetxattr(fd, eaname, good_buf, size, 0);
++#endif
+ ea_lastwrite = size;
+ if (iret != 0) {
+ logdump();
+@@ -1101,7 +1130,7 @@ domapwrite(unsigned offset, unsigned siz
+ failure(202);
+ }
+ memcpy(p + pg_offset, good_buf + offset, size);
+- if (msync(p, map_size, 0) != 0) {
++ if (msync(p, map_size, MS_SYNC) != 0) {
+ logdump();
+ prterr("domapwrite: msync");
+ failure(203);
Home |
Main Index |
Thread Index |
Old Index