Gentoo Archives: gentoo-commits

From: Marc Schiffbauer <marc@×××××××××××.net>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] dev/mschiff:master commit in: app-misc/eatmydata/, app-misc/eatmydata/files/
Date: Wed, 29 Feb 2012 12:24:59
Message-Id: 1330518270.b5af286fbf9407d4af1723ab588db8b2b5e0fe1e.mschiff@gentoo
1 commit: b5af286fbf9407d4af1723ab588db8b2b5e0fe1e
2 Author: Marc Schiffbauer <mschiff <AT> gentoo <DOT> org>
3 AuthorDate: Wed Feb 29 12:24:30 2012 +0000
4 Commit: Marc Schiffbauer <marc <AT> schiffbauer <DOT> net>
5 CommitDate: Wed Feb 29 12:24:30 2012 +0000
6 URL: http://git.overlays.gentoo.org/gitweb/?p=dev/mschiff.git;a=commit;h=b5af286f
7
8 Add ebuild eatmydata
9
10 (Portage version: 2.2.0_alpha88/git/Linux x86_64, signed Manifest commit with key 0x35A64134)
11
12 ---
13 app-misc/eatmydata/Manifest | 15 +++++
14 app-misc/eatmydata/eatmydata-28.ebuild | 32 ++++++++++
15 app-misc/eatmydata/files/eatmydata | 98 +++++++++++++++++++++++++++++++
16 app-misc/eatmydata/files/eatmydata.1.gz | Bin 0 -> 1093 bytes
17 app-misc/eatmydata/metadata.xml | 8 +++
18 5 files changed, 153 insertions(+), 0 deletions(-)
19
20 diff --git a/app-misc/eatmydata/Manifest b/app-misc/eatmydata/Manifest
21 new file mode 100644
22 index 0000000..36e89e2
23 --- /dev/null
24 +++ b/app-misc/eatmydata/Manifest
25 @@ -0,0 +1,15 @@
26 +-----BEGIN PGP SIGNED MESSAGE-----
27 +Hash: SHA1
28 +
29 +AUX eatmydata 2511 RMD160 115382fc06a10b6b033035469b35e257eb3bf472 SHA1 24f05a08d75661b2d3ff83a09c8bb4ba5939ede9 SHA256 5df9a7145a22cfcfc0a11b04b93dac441bae1a2e6431d3bf11da7ae845969268
30 +AUX eatmydata.1.gz 1093 RMD160 40c0fb1b326e05b352f23033fa35640fb7db41b4 SHA1 2a2e0d2992ce49ba4f20d7a49e61f1f5e754ee89 SHA256 fdd8720f95266b73052779818145d2e6fbc504670d5c39a091a48754d497b9ba
31 +DIST libeatmydata-28.tar.gz 382069 RMD160 b8b8fc9a02413b8fd907569f93b0015ecc086a0c SHA1 bd8a26b5e8dc9647ddf70989652e2da55a18b752 SHA256 3b768351a1aff21a1201bcbd25635a0f4fbbfc2d4e7e55842403601fdb1859c3
32 +EBUILD eatmydata-28.ebuild 792 RMD160 7fc0de271d70341373a2fe90ac7df63a1fe09b1e SHA1 d2a93fd43032f417ad298cd1823b92d122897a2d SHA256 99fb883c6005421e1795844c57c3dcc133f532cac3850f9a8d265a8ad9398494
33 +MISC metadata.xml 236 RMD160 5c57b0291e26469fb522c377d9b6373830889ebb SHA1 4da113512bdf7f06bde8a17a9332c28da0ecf1b6 SHA256 f55443c9b3d97fcc9437b9aeba1b3beae39e38599620bd520d0693bb8948b531
34 +-----BEGIN PGP SIGNATURE-----
35 +Version: GnuPG v2.0.18 (GNU/Linux)
36 +
37 +iD8DBQFPThj+KWxsyjWmQTQRAgtcAKCejXQYDMh/o7SDr8y8xKjPdX0+lACcCtzh
38 +r7fiL17pplMofI6MbxX4fgs=
39 +=WN/u
40 +-----END PGP SIGNATURE-----
41
42 diff --git a/app-misc/eatmydata/eatmydata-28.ebuild b/app-misc/eatmydata/eatmydata-28.ebuild
43 new file mode 100644
44 index 0000000..7a0a4b7
45 --- /dev/null
46 +++ b/app-misc/eatmydata/eatmydata-28.ebuild
47 @@ -0,0 +1,32 @@
48 +# Copyright 1999-2011 Gentoo Foundation
49 +# Distributed under the terms of the GNU General Public License v2
50 +# $Header: $
51 +
52 +EAPI="4"
53 +
54 +DESCRIPTION="Tool with LD_PRELOAD library that disables all forms of writing data safely to disk"
55 +HOMEPAGE="https://launchpad.net/libeatmydata"
56 +SRC_URI="http://launchpad.net/lib${PN}/trunk/release-${PV}/+download/lib${P}.tar.gz"
57 +
58 +LICENSE="GPL-3"
59 +SLOT="0"
60 +KEYWORDS="~amd64 ~x86"
61 +IUSE=""
62 +
63 +DEPEND=""
64 +RDEPEND="${DEPEND}"
65 +
66 +MY_S="${WORKDIR}/lib${P}"
67 +S="${WORKDIR}/lib${P}"
68 +
69 +src_install () {
70 + default
71 + exeinto /usr/bin && doexe ${FILESDIR}/eatmydata
72 + doman ${FILESDIR}/eatmydata.1.gz
73 + find ${D} -name "*.la" -delete
74 +}
75 +
76 +pkg_postinst() {
77 + ewarn "This program is called *eatmydata* on purpose."
78 + ewarn "Use it on your own risk and only if you know what you are doing."
79 +}
80
81 diff --git a/app-misc/eatmydata/files/eatmydata b/app-misc/eatmydata/files/eatmydata
82 new file mode 100755
83 index 0000000..0a72fa7
84 --- /dev/null
85 +++ b/app-misc/eatmydata/files/eatmydata
86 @@ -0,0 +1,98 @@
87 +#!/bin/sh
88 +
89 +# Copyright ©: 2010, Modestas Vainius <modax@××××××.org>
90 +#
91 +# Copyright ©: 2011, Marc Schiffbauer <mschiff@g.o>
92 +# (merged shell lib into this file + some small mods for gentoo)
93 +#
94 +# This program is free software: you can redistribute it and/or modify
95 +# it under the terms of the GNU General Public License as published by
96 +# the Free Software Foundation, either version 3 of the License, or
97 +# (at your option) any later version.
98 +#
99 +# This program is distributed in the hope that it will be useful,
100 +# but WITHOUT ANY WARRANTY; without even the implied warranty of
101 +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
102 +# GNU General Public License for more details.
103 +#
104 +# You should have received a copy of the GNU General Public License
105 +# along with this program. If not, see <http://www.gnu.org/licenses/>.
106 +
107 +
108 +libeatmydata="/usr/lib/libeatmydata.so"
109 +name="eatmydata"
110 +
111 +eatmydata_error()
112 +{
113 + echo "$name error: $1" >&2
114 + exit 1
115 +}
116 +
117 +eatmydata_exec()
118 +{
119 + local cmd
120 + cmd="$1"
121 + if [ "${cmd#*/*}" = "${cmd}" ]; then
122 + # $cmd does not contain '/'. Look in $PATH avoiding loops with self.
123 + local self save_ifs path exe ok
124 +
125 + self="`readlink -f "$0"`"
126 + save_ifs="$IFS"
127 + IFS=":"
128 + ok=""
129 + for path in $PATH; do
130 + exe="${path}/$cmd"
131 + # Avoid loops with self
132 + if [ -x "$exe" ] && [ "`readlink -f "$exe"`" != "$self" ]; then
133 + ok="yes"
134 + break
135 + fi
136 + done
137 + IFS="$save_ifs"
138 + if [ -n "$ok" ]; then
139 + cmd="$exe"
140 + else
141 + eatmydata_error "unable to find '$cmd' in PATH"
142 + fi
143 + fi
144 +
145 + # Preload libeatmydata
146 + if [ -n "$LD_PRELOAD" ]; then
147 + export LD_PRELOAD="$libeatmydata $LD_PRELOAD"
148 + else
149 + export LD_PRELOAD="$libeatmydata"
150 + fi
151 + # Execute requested command
152 + shift
153 + exec "$cmd" "$@"
154 +}
155 +
156 +# Verify environment
157 +if [ ! -f "$libeatmydata" ]; then
158 + eatmydata_error "could not find $name library $libeatmydata"
159 +fi
160 +
161 +usage()
162 +{
163 + echo "usage: $0 [--] command [ command arguments ... ]" >&2
164 + exit 2
165 +}
166 +
167 +# Detect operation mode. If this script is run via symlink, look for basename
168 +# in the PATH and execute it.
169 +if [ -L "$0" ]; then
170 + # Symlink mode. Get command to execute from the basename of $0.
171 + cmd="`basename "$0"`"
172 + set -- "$cmd" "$@"
173 +else
174 + # Normal mode
175 + if [ "$1" = "--" ]; then
176 + shift
177 + fi
178 +
179 + if [ "$#" -eq 0 ]; then
180 + usage
181 + fi
182 +fi
183 +
184 +eatmydata_exec "$@"
185
186 diff --git a/app-misc/eatmydata/files/eatmydata.1.gz b/app-misc/eatmydata/files/eatmydata.1.gz
187 new file mode 100644
188 index 0000000..cbf6e9e
189 Binary files /dev/null and b/app-misc/eatmydata/files/eatmydata.1.gz differ
190
191 diff --git a/app-misc/eatmydata/metadata.xml b/app-misc/eatmydata/metadata.xml
192 new file mode 100644
193 index 0000000..ea7bd02
194 --- /dev/null
195 +++ b/app-misc/eatmydata/metadata.xml
196 @@ -0,0 +1,8 @@
197 +<?xml version="1.0" encoding="UTF-8"?>
198 +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
199 +<pkgmetadata>
200 + <maintainer>
201 + <email>mschiff@g.o</email>
202 + <name>Marc Schiffbauer</name>
203 + </maintainer>
204 +</pkgmetadata>