diff options
author | Rasmus Thomsen <oss@cogitri.dev> | 2020-04-25 12:10:50 +0200 |
---|---|---|
committer | Rasmus Thomsen <oss@cogitri.dev> | 2020-04-25 12:13:34 +0200 |
commit | 447861be25cc9b5135112a26f75e1c04bca4e116 (patch) | |
tree | f2edf8ad7684b6dd7ae80da4f6a6e726ba29a89e /testing/libeatmydata | |
parent | ebd5cbf762717a605f5264fc3ce99bade92cf254 (diff) | |
download | aports-447861be25cc9b5135112a26f75e1c04bca4e116.zip |
testing/libeatmydata: new aport
https://www.flamingspork.com/projects/libeatmydata/
An LD_PRELOAD library that disables all forms of writing data safely to disk
Diffstat (limited to 'testing/libeatmydata')
-rw-r--r-- | testing/libeatmydata/18.patch | 26 | ||||
-rw-r--r-- | testing/libeatmydata/APKBUILD | 42 |
2 files changed, 68 insertions, 0 deletions
diff --git a/testing/libeatmydata/18.patch b/testing/libeatmydata/18.patch new file mode 100644 index 00000000000..9858ac40ad9 --- /dev/null +++ b/testing/libeatmydata/18.patch @@ -0,0 +1,26 @@ +Upstream: https://github.com/stewartsmith/libeatmydata/pull/18 +Reason: Libeatmydata redefines open and open64 so it can make those a NO_OP +for tests. Musl also defines these in fnctl.h, so we have to undefine them +to not get conflicting definitions +diff --git a/libeatmydata/libeatmydata.c b/libeatmydata/libeatmydata.c +index 8fe1b6a..95d940b 100644 +--- a/libeatmydata/libeatmydata.c ++++ b/libeatmydata/libeatmydata.c +@@ -131,6 +131,8 @@ void LIBEATMYDATA_API sync(void) + (*libc_sync)(); + } + ++#undef open ++ + int LIBEATMYDATA_API open(const char* pathname, int flags, ...) + { + va_list ap; +@@ -157,6 +159,8 @@ int LIBEATMYDATA_API open(const char* pathname, int flags, ...) + return (*libc_open)(pathname,flags,mode); + } + ++#undef open64 ++ + #ifndef __USE_FILE_OFFSET64 + int LIBEATMYDATA_API open64(const char* pathname, int flags, ...) + { diff --git a/testing/libeatmydata/APKBUILD b/testing/libeatmydata/APKBUILD new file mode 100644 index 00000000000..a102fa72b3f --- /dev/null +++ b/testing/libeatmydata/APKBUILD @@ -0,0 +1,42 @@ +# Contributor: Rasmus Thomsen <oss@cogitri.dev> +# Maintainer: Rasmus Thomsen <oss@cogitri.dev> +pkgname=libeatmydata +pkgver=105 +pkgrel=0 +pkgdesc="An LD_PRELOAD library that disables all forms of writing data safely to disk" +url="https://www.flamingspork.com/projects/libeatmydata/" +arch="all" +license="GPL-3.0-or-later" +makedepends="autoconf automake libtool" +checkdepends="strace" +source="https://github.com/stewartsmith/libeatmydata/archive/libeatmydata-$pkgver/libeatmydata-$pkgver.tar.gz + 18.patch" +builddir="$srcdir/$pkgname-$pkgname-$pkgver" + +prepare() { + default_prepare + + autoreconf -fi +} + +build() { + ./configure \ + --build=$CBUILD \ + --host=$CHOST \ + --prefix=/usr \ + --sysconfdir=/etc \ + --mandir=/usr/share/man \ + --localstatedir=/var + make +} + +check() { + make check-debug +} + +package() { + make DESTDIR="$pkgdir" install +} + +sha512sums="225453a12913c08fd91371e3546a256e102438f9a88e7f51726dd5befbcf6c396850c039a38ca3d939558f0369df23d232e24b487564cdf86562645b8b5f92d6 libeatmydata-105.tar.gz +8fff381b392cf7ee3faf39c41e20d3f152529ec4b2d4ffb503695ff8dce49b86872cbcc56001b2160b617ceb76bb4d1d389939922b1d539413a00fea35904b2a 18.patch" |