debian/0000755000000000000000000000000011527733642007200 5ustar debian/compat0000644000000000000000000000000211510725303010361 0ustar 7 debian/install0000644000000000000000000000027711510725303010562 0ustar debian/lib/eatmydata.sh /usr/share/libeatmydata/ debian/bin/eatmydata /usr/bin/ debian/eatmydata.1 /usr/share/man/man1/ libeatmydata.so /usr/lib/libeatmydata/ debian/eatmydata.10000644000000000000000000000440411510725303011220 0ustar .TH eatmydata 1 "November 2010" .SH NAME eatmydata \- transparently disable fsync() and other data-to-disk synchronization calls .SH SYNOPSIS .B eatmydata [--] \fIcommand\fR [ \fIcommand arguments\fR ... ] .SH DESCRIPTION \fBeatmydata\fR runs a command in the environment where data-to-disk synchronization calls (like fsync(), fdatasync(), sync(), msync() and open() O_SYNC / O_DSYNC flags) have no effect. LD_PRELOAD library \fBlibeatmydata\fR overrides respective C library calls with custom functions that don't trigger synchronization but return success nevertheless. .P You may use \fBeatmydata\fR in two ways. In normal mode, just execute \fBeatmydata\fR directly and pass a command\-to\-be\-run and its arguments via command line. In order to use symlink mode, create a symlink to \fI/usr/bin/eatmydata\fR with the filename (a.k.a basename) of another program in the PATH and execute \fBeatmydata\fR via that symlink. Then \fBeatmydata\fR will find that program in the PATH and run it in the libeatmydata environment repassing all command line options. .SH OPTIONS .P Please note that \fBeatmydata\fR does not process any command line options in symlink mode. All command line options will be repassed to the underlying executable as-is. .TP .I command The command to execute. It may be either a full path or the name of the command in PATH. In case command cannot be found in PATH, \fBeatmydata\fR will fail. .TP .I command arguments Arbitrary number of arguments to pass to the command being executed. .TP -- Optional command separator for compatibility with similar utilities. Ignored at the moment. .SH EXAMPLES .P Given PATH is /usr/bin and both /usr/bin/aptitude and /usr/bin/eatmydata are installed, the following: .P .nf $ ln \-s /usr/bin/eatmydata ./aptitude $ ./aptitude moo .fi .P is equivalent to: .P .nf $ eatmydata \-\- aptitude moo .fi .P Therefore, you may use symlink mode to automatically run specific programs in the libeatmydata environment whenever you run them from PATH. For example, given standard PATH settings, just do: .P .nf # ln \-s /usr/bin/eatmydata /usr/local/bin/aptitude .fi .P and enjoy sync\-free aptitude system-wide. .SH AUTHOR The \fBeatmydata\fR wrapper around libeatmydata LD_PRELOAD library was written by Modestas Vainius debian/control0000644000000000000000000000272711527733505010611 0ustar Source: libeatmydata Section: utils Priority: optional Maintainer: Modestas Vainius Standards-Version: 3.9.1 Build-Depends: debhelper (>= 7.0.50~), dh-autoreconf Homepage: https://launchpad.net/libeatmydata Vcs-Git: git://git.debian.org/users/modax/libeatmydata.git Vcs-Browser: http://git.debian.org/?p=users/modax/libeatmydata.git Package: eatmydata Architecture: any Depends: ${shlibs:Depends}, ${misc:Depends} Provides: libeatmydata Description: library and utilities designed to disable fsync and friends This package contains a small LD_PRELOAD library (libeatmydata) and a couple of helper utilities 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. . You will find eatmydata useful if particular software calls fsync(), sync() etc. frequently but the data it stores is not that valuable to you and you may afford losing it in case of system crash. Data-to-disk synchronization calls are typically very slow on modern file systems and their extensive usage might slow down software significantly. It does not make sense to accept such a hit in performance if data being manipulated is not very important. . On the other hand, do not use eatmydata when you care about what software stores or it manipulates important components of your system. The library is called libEAT-MY-DATA for a reason. debian/bin/0000755000000000000000000000000011527733505007746 5ustar debian/bin/eatmydata0000755000000000000000000000253311527733505011650 0ustar #!/bin/sh # Copyright ©: 2010, Modestas Vainius # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see . shlib="/usr/share/libeatmydata/eatmydata.sh" if [ -f "$shlib" ]; then . "$shlib" else echo "Unable to locate eatmydata shell library, it was not enabled" >&2 exec "$@" fi usage() { echo "usage: $0 [--] command [ command arguments ... ]" >&2 exit 2 } # Detect operation mode. If this script is run via symlink, look for basename # in the PATH and execute it. if [ -L "$0" ]; then # Symlink mode. Get command to execute from the basename of $0. cmd="`basename "$0"`" set -- "$cmd" "$@" else # Normal mode if [ "$1" = "--" ]; then shift fi if [ "$#" -eq 0 ]; then usage fi fi eatmydata_exec "$@" debian/rules0000755000000000000000000000022311510725303010240 0ustar #!/usr/bin/make -f override_dh_makeshlibs: dh_makeshlibs -Xusr/lib/libeatmydata/* %: dh --with autoreconf $@ .PHONY: override_dh_auto_install debian/copyright0000644000000000000000000000245511510725303011124 0ustar Format-Specification: http://svn.debian.org/wsvn/dep/web/deps/dep5.mdwn?op=file&rev=135 Name: libeatmydata Maintainer: Stewart Smith Source: https://launchpad.net/libeatmydata http://www.flamingspork.com/projects/libeatmydata/ Copyright: 2007-2010, Stewart Smith 2010, Olly Betts 2009, Pavel Pushkarev 2009, Tamas TEVESZ 2010, Modestas Vainius License: GPL-3+ This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. . This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. . On Debian systems, the full text of the GNU General Public License version 3 can be found in file '/usr/share/common-licenses/GPL-3'. Files: debian/* Copyright: 2010, Modestas Vainius License: GPL-3+ On Debian systems, the full text of the GNU General Public License version 3 can be found in file '/usr/share/common-licenses/GPL-3'. debian/lib/0000755000000000000000000000000011510725303007731 5ustar debian/lib/eatmydata.sh0000644000000000000000000000355711510725303012250 0ustar # Copyright ©: 2010, Modestas Vainius # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see . libeatmydata="/usr/lib/libeatmydata/libeatmydata.so" name="eatmydata" eatmydata_error() { echo "$name error: $1" >&2 exit 1 } eatmydata_exec() { local cmd cmd="$1" if [ "${cmd#*/*}" = "${cmd}" ]; then # $cmd does not contain '/'. Look in $PATH avoiding loops with self. local self save_ifs path exe ok self="`readlink -f "$0"`" save_ifs="$IFS" IFS=":" ok="" for path in $PATH; do exe="${path}/$cmd" # Avoid loops with self if [ -x "$exe" ] && [ "`readlink -f "$exe"`" != "$self" ]; then ok="yes" break fi done IFS="$save_ifs" if [ -n "$ok" ]; then cmd="$exe" else eatmydata_error "unable to find '$cmd' in PATH" fi fi # Preload libeatmydata if [ -n "$LD_PRELOAD" ]; then export LD_PRELOAD="$libeatmydata $LD_PRELOAD" else export LD_PRELOAD="$libeatmydata" fi # Execute requested command shift exec "$cmd" "$@" } # Verify environment if [ ! -f "$libeatmydata" ]; then eatmydata_error "could not find $name library $libeatmydata" fi debian/source/0000755000000000000000000000000011510725303010463 5ustar debian/source/format0000644000000000000000000000001411510725303011671 0ustar 3.0 (quilt) debian/changelog0000644000000000000000000000561611527733522011057 0ustar libeatmydata (26-2) unstable; urgency=low * Switch homepage to launchpad.net/libeatmydata. * Fix a typo in the eatmydata wrapper. -- Modestas Vainius Sat, 19 Feb 2011 14:27:59 +0200 libeatmydata (26-1) unstable; urgency=low * New upstream release. * Drop all patches, merged upstream. * Add myself to the upstream part of debian/copyright. * Skip auto_install routine, we install libeatmydata.so manually. -- Modestas Vainius Tue, 04 Jan 2011 21:28:37 +0200 libeatmydata (15-6) unstable; urgency=low * Merge ubuntu_as_needed_fix.diff as is. My tweak was broken. -- Modestas Vainius Mon, 03 Jan 2011 17:03:31 +0200 libeatmydata (15-5) unstable; urgency=low * Get rid of the debian-changes-* patch introduced by mistake in the previous upload. * Forbid generation of the single debian patch by adding abort-on-upstream-changes to debian/source/local-options. * Add unapply-patches to debian/source/local-options. * Merge Ubuntu patches; - ubuntu_as_needed_fix.diff (with small tweak) to upstream_improve_Makefile.diff; - ubuntu_missing_open_arg.diff (with tweak) to upstream_portable_testsuite.diff. * Fix relative path recognition as per IEEE Std 1003.1 Shell Command Language Specification, chapter 2.9. (Closes: #606157) * Remove config.h in distclean target (upstream_basic_autoconf.diff modified). -- Modestas Vainius Sun, 02 Jan 2011 17:21:29 +0200 libeatmydata (15-4) unstable; urgency=low * Fix problem with execution of relative symlink from PATH. (Closes: #603423) * Add support for "symlink mode". Please read eatmydata(1) manual page for more information. -- Modestas Vainius Sun, 14 Nov 2010 20:38:20 +0200 libeatmydata (15-3) unstable; urgency=low * Fix a typo (made while refactoring) in the upstream_handle_va_arg_promotion.diff patch. This should really solve a FTBFS on kFreeBSD. (Closes: #600445) -- Modestas Vainius Thu, 21 Oct 2010 01:27:10 +0300 libeatmydata (15-2) unstable; urgency=low * Prepend upstream_ to all patch names. They all could be merged upstream. Also improve their DEP-3 headers a bit. * Add basic support for autoconf (via new patch upstream_basic_autoconf.diff). * Build-Depend on dh-autoreconf and use its dh addon in debian/rules. * Fix FTBFS on Debian GNU/kFreeBSD by passing int to va_arg() when needed (patch upstream_handle_va_arg_promotion.diff). (Closes: #600445) -- Modestas Vainius Thu, 21 Oct 2010 00:24:15 +0300 libeatmydata (15-1) unstable; urgency=low * Initial release. (Closes: #512588) * A couple of improvements to Makefile (*FLAGS, no versioned SONAME etc.) (patch improve_Makefile.diff). * Add portable testsuite (patch portable_testsuite.diff). -- Modestas Vainius Fri, 06 Aug 2010 20:10:11 +0300