diff -Nru libeatmydata-82/debian/changelog libeatmydata-82/debian/changelog --- libeatmydata-82/debian/changelog 2014-11-19 22:48:02.000000000 +0100 +++ libeatmydata-82/debian/changelog 2014-11-22 18:46:10.000000000 +0100 @@ -1,3 +1,17 @@ +libeatmydata (82-5) experimental; urgency=low + + * [e9ae45a] Replace eatmydata executable with one both Multi-Arch safe and + compatible with older eatmydata versions in chroots. Thanks to Thorsten + Glaser for the patch! (Closes: #765810). + * [3638933] debian/control: drop now useless depends on dpkg-dev + (Closes: #770109). + * [0ea9512] debian/eatmydata.1: update manpage with information about + multiarch. Thanks to Osamu Aoki for reporting (Closes: #766212). + + * Upload sponsored by Petter Reinholdtsen. + + -- Mattia Rizzolo Sat, 22 Nov 2014 17:59:01 +0100 + libeatmydata (82-4) unstable; urgency=low [ Mattia Rizzolo ] diff -Nru libeatmydata-82/debian/control libeatmydata-82/debian/control --- libeatmydata-82/debian/control 2014-11-19 22:48:02.000000000 +0100 +++ libeatmydata-82/debian/control 2014-11-22 18:42:11.000000000 +0100 @@ -13,8 +13,7 @@ Package: eatmydata Architecture: all -Depends: dpkg-dev, - libeatmydata1 (>=${source:Version}), +Depends: libeatmydata1 (>=${source:Version}), ${misc:Depends}, ${shlibs:Depends} Description: Library and utilities designed to disable fsync and friends diff -Nru libeatmydata-82/debian/eatmydata.1 libeatmydata-82/debian/eatmydata.1 --- libeatmydata-82/debian/eatmydata.1 2014-10-03 20:45:30.000000000 +0200 +++ libeatmydata-82/debian/eatmydata.1 2014-11-22 18:42:11.000000000 +0100 @@ -1,4 +1,4 @@ -.TH eatmydata 1 "November 2010" +.TH eatmydata 1 "November 2014" .SH NAME eatmydata \- transparently disable fsync() and other data-to-disk synchronization calls .SH SYNOPSIS @@ -59,6 +59,9 @@ .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 +.SH CAVEAT +.P +When using \fBeatmydata\fR with \fBsetarch\fR (including alias such as +\fBlinux32\fR), or anyway with chroots with a different architectures than the +host's, make sure to install the matching architecture of +\fBlibeatmydata1\fR both in the \fBsetarch\fR environment and host's. diff -Nru libeatmydata-82/debian/eatmydata.install libeatmydata-82/debian/eatmydata.install --- libeatmydata-82/debian/eatmydata.install 2014-10-03 20:45:30.000000000 +0200 +++ libeatmydata-82/debian/eatmydata.install 1970-01-01 01:00:00.000000000 +0100 @@ -1 +0,0 @@ -usr/bin/eatmydata diff -Nru libeatmydata-82/debian/eatmydata.sh libeatmydata-82/debian/eatmydata.sh --- libeatmydata-82/debian/eatmydata.sh 1970-01-01 01:00:00.000000000 +0100 +++ libeatmydata-82/debian/eatmydata.sh 2014-11-22 18:42:11.000000000 +0100 @@ -0,0 +1,84 @@ +#!/bin/sh +#- +# Copyright © 2014 +# Thorsten “mirabilos” Glaser +# +# Provided that these terms and disclaimer and all copyright notices +# are retained or reproduced in an accompanying document, permission +# is granted to deal in this work without restriction, including un‐ +# limited rights to use, publicly perform, distribute, sell, modify, +# merge, give away, or sublicence. +# +# This work is provided “AS IS” and WITHOUT WARRANTY of any kind, to +# the utmost extent permitted by applicable law, neither express nor +# implied; without malicious intent or gross negligence. In no event +# may a licensor, author or contributor be held liable for indirect, +# direct, other damage, loss, or other issues arising in any way out +# of dealing in the work, even if advised of the possibility of such +# damage or existence of a defect, except proven that it results out +# of said person’s immediate fault when using the work as intended. +#- +# eatmydata utility / wrapper compatible with both 26 and 82 series, +# but only on Debian systems. + +usage() { + echo >&2 "usage: $0 [--] command [arg ...]" + exit 2 +} + +# everything in a function to avoid environment pollution +runprog() { + local cmd me spath saveIFS pathelem tgt + + # Detect operation mode. If this script is run via a symbolic link, + # look for the basename in the PATH and execute that. + if test -L "$0"; then + # symlink mode + cmd=$(basename "$0") + else + # regular mode + test x"$1" = x"--" && shift + test -n "$1" || usage + cmd=$1 + shift + fi + + # detect command to run, if necessary + case $cmd in + (*/*) ;; + (*) + # $cmd does not contain a '/' + # look in the PATH but avoid loops with myself + me=$(readlink -f "$0") + # append :/dev/null both to catch a trailing colon + # and for an easy abort condition + spath=$PATH:/dev/null + saveIFS=$IFS + IFS=: + for pathelem in $PATH; do + if test x"$pathelem" = x"/dev/null"; then + echo >&2 E: eatmydata: \ + "unable to find '$cmd' in PATH" + exit 1 + fi + tgt=${pathelem:-.}/$cmd + if test -x "$tgt"; then + tgt=$(readlink -f "$tgt") + test x"$tgt" = x"$me" || break + fi + done + IFS=$saveIFS + cmd=$tgt + ;; + esac + + # set up environment + LD_LIBRARY_PATH=${LD_LIBRARY_PATH:+"$LD_LIBRARY_PATH:"}/usr/lib/libeatmydata + LD_PRELOAD=${LD_PRELOAD:+"$LD_PRELOAD "}libeatmydata.so + export LD_LIBRARY_PATH LD_PRELOAD + + # execute the command + exec "$cmd" "$@" +} + +runprog "$@" diff -Nru libeatmydata-82/debian/rules libeatmydata-82/debian/rules --- libeatmydata-82/debian/rules 2014-11-19 22:48:02.000000000 +0100 +++ libeatmydata-82/debian/rules 2014-11-22 18:42:11.000000000 +0100 @@ -7,6 +7,9 @@ override_dh_install: find $(CURDIR)/debian/tmp -name *.la -delete + rm $(CURDIR)/debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)/eatmydata.sh + install -D $(CURDIR)/debian/eatmydata.sh \ + $(CURDIR)/debian/eatmydata/usr/bin/eatmydata dh_install --list-missing %: