aboutsummaryrefslogtreecommitdiffstats
path: root/misc/libeatmydata
diff options
context:
space:
mode:
authorpgollucci <pgollucci@FreeBSD.org>2010-02-12 04:59:20 +0800
committerpgollucci <pgollucci@FreeBSD.org>2010-02-12 04:59:20 +0800
commitc50311a22641b7bb38336e2aa51a3b73c449fbe7 (patch)
treee2902ed8386278a28b5422d874030a34709b203e /misc/libeatmydata
parentcfeeda9edc05d0eb4b77ff05c15e7fa74434c183 (diff)
downloadfreebsd-ports-gnome-c50311a22641b7bb38336e2aa51a3b73c449fbe7.tar.gz
freebsd-ports-gnome-c50311a22641b7bb38336e2aa51a3b73c449fbe7.tar.zst
freebsd-ports-gnome-c50311a22641b7bb38336e2aa51a3b73c449fbe7.zip
libeatmydata is a small LD_PRELOAD library designed to (transparently) disable
fsync (and friends, like open(O_SYNC)). This has two side-effects: making software that writes data safely to disk a lot quicker and making this software no longer crash safe. DO NOT use libeatmydata on software where you care about what it stores. It's called libEAT-MY-DATA for a reason. PR: ports/142892 Submitted by: Attila Nagy <bra at fsn.hu>
Diffstat (limited to 'misc/libeatmydata')
-rw-r--r--misc/libeatmydata/Makefile31
-rw-r--r--misc/libeatmydata/distinfo3
-rw-r--r--misc/libeatmydata/files/patch-Makefile15
-rw-r--r--misc/libeatmydata/files/patch-eatmydata.c19
-rw-r--r--misc/libeatmydata/pkg-descr7
5 files changed, 75 insertions, 0 deletions
diff --git a/misc/libeatmydata/Makefile b/misc/libeatmydata/Makefile
new file mode 100644
index 000000000000..ac99dfb57cc3
--- /dev/null
+++ b/misc/libeatmydata/Makefile
@@ -0,0 +1,31 @@
+# New ports collection makefile for: libeatmydata
+# Date created: Sat Jan 16 20:41:35 CET 2010
+# Whom: Attila Nagy <bra@fsn.hu>
+#
+# $FreeBSD$
+#
+
+PORTNAME= libeatmydata
+PORTVERSION= 9
+CATEGORIES= misc
+MASTER_SITES= http://www.flamingspork.com/projects/libeatmydata/
+
+MAINTAINER= bra@fsn.hu
+COMMENT= a small LD_PRELOAD library designed to (transparently) disable fsync
+
+USE_BZIP2= yes
+NO_MTREE= yes
+USE_LDCONFIG= yes
+
+PLIST_FILES= lib/libeatmydata.so \
+ lib/libeatmydata.so.1 \
+ lib/libeatmydata.so.1.0
+
+do-install:
+ ${INSTALL_DATA} ${WRKSRC}/libeatmydata.so.1.0 ${PREFIX}/lib
+
+post-install:
+ ${LN} ${PREFIX}/lib/libeatmydata.so.1.0 ${PREFIX}/lib/libeatmydata.so.1
+ ${LN} ${PREFIX}/lib/libeatmydata.so.1.0 ${PREFIX}/lib/libeatmydata.so
+
+.include <bsd.port.mk>
diff --git a/misc/libeatmydata/distinfo b/misc/libeatmydata/distinfo
new file mode 100644
index 000000000000..1b1d434c6f74
--- /dev/null
+++ b/misc/libeatmydata/distinfo
@@ -0,0 +1,3 @@
+MD5 (libeatmydata-9.tar.bz2) = 61456c6939acd227deeee9ec471514ef
+SHA256 (libeatmydata-9.tar.bz2) = 9dc1fcc14e77fe354e9561c9b19a6c2eb9ba0b305c63651b1a35d004f797cf08
+SIZE (libeatmydata-9.tar.bz2) = 12130
diff --git a/misc/libeatmydata/files/patch-Makefile b/misc/libeatmydata/files/patch-Makefile
new file mode 100644
index 000000000000..3c15aad85bd1
--- /dev/null
+++ b/misc/libeatmydata/files/patch-Makefile
@@ -0,0 +1,15 @@
+--- Makefile.orig 2010-01-16 20:34:10.000000000 +0100
++++ Makefile 2010-01-16 20:38:43.000000000 +0100
+@@ -1,10 +1,10 @@
+-all: libs fsynctest
++all: libs
+
+ clean:
+ rm -f libeatmydata.so* fsynctest
+
+ libs: eatmydata.c
+- gcc -shared -Wl,-soname,libeatmydata.so.1 -ldl -o libeatmydata.so.1.0 eatmydata.c -fPIC
++ gcc -shared -Wl,-soname,libeatmydata.so.1 -o libeatmydata.so.1.0 eatmydata.c -fPIC
+ @rm -f libeatmydata.so.1 libeatmydata.so
+ ln -s libeatmydata.so.1.0 libeatmydata.so.1
+ ln -s libeatmydata.so.1 libeatmydata.so
diff --git a/misc/libeatmydata/files/patch-eatmydata.c b/misc/libeatmydata/files/patch-eatmydata.c
new file mode 100644
index 000000000000..afc494094657
--- /dev/null
+++ b/misc/libeatmydata/files/patch-eatmydata.c
@@ -0,0 +1,19 @@
+--- eatmydata.c.orig 2009-05-12 03:11:01.000000000 +0200
++++ eatmydata.c 2010-01-16 20:33:45.000000000 +0100
+@@ -53,10 +53,15 @@
+ mode_t mode;
+
+ va_start(ap, flags);
+- mode= va_arg(ap, mode_t);
++ mode= va_arg(ap, int);
+ va_end(ap);
+
++#if defined(O_DSYNC)
+ flags &= ~(O_SYNC|O_DSYNC);
++#else
++ flags &= ~(O_SYNC);
++#endif
++
+
+ if(!libc_open)
+ eatmydata_init();
diff --git a/misc/libeatmydata/pkg-descr b/misc/libeatmydata/pkg-descr
new file mode 100644
index 000000000000..778f90ead6cb
--- /dev/null
+++ b/misc/libeatmydata/pkg-descr
@@ -0,0 +1,7 @@
+libeatmydata is a small LD_PRELOAD library designed to (transparently) disable
+fsync (and friends, like open(O_SYNC)). This has two side-effects: making
+software that writes data safely to disk a lot quicker and making this
+software no longer crash safe.
+
+DO NOT use libeatmydata on software where you care about what it
+stores. It's called libEAT-MY-DATA for a reason.