summaryrefslogtreecommitdiff
path: root/user/dmraid
diff options
context:
space:
mode:
Diffstat (limited to 'user/dmraid')
-rw-r--r--user/dmraid/APKBUILD43
-rw-r--r--user/dmraid/off_t.patch77
-rw-r--r--user/dmraid/scan-under-musl.patch12
3 files changed, 132 insertions, 0 deletions
diff --git a/user/dmraid/APKBUILD b/user/dmraid/APKBUILD
new file mode 100644
index 000000000..373179ca8
--- /dev/null
+++ b/user/dmraid/APKBUILD
@@ -0,0 +1,43 @@
+# Contributor: A. Wilcox <awilfox@adelielinux.org>
+# Maintainer: A. Wilcox <awilfox@adelielinux.org>
+pkgname=dmraid
+pkgver=1.0.0_rc16
+_realver=${pkgver%_*}.${pkgver##*_}
+pkgrel=3
+pkgdesc="Tool for software RAID sets created with Device Mapper"
+url="https://people.redhat.com/heinzm/"
+arch="all"
+options="!check" # No test suite.
+license="GPL-2.0-only"
+depends=""
+makedepends=""
+subpackages="$pkgname-dev $pkgname-doc"
+source="https://people.redhat.com/~heinzm/sw/$pkgname/src/$pkgname-$_realver-$pkgrel.tar.bz2
+ scan-under-musl.patch
+ off_t.patch
+ "
+builddir="$srcdir/$pkgname/$_realver-$pkgrel/$pkgname"
+
+prepare() {
+ cd "$builddir"
+ default_prepare
+ update_config_sub
+}
+
+build() {
+ cd "$builddir"
+ ./configure \
+ --prefix=/usr \
+ --build=$CBUILD \
+ --host=$CHOST
+ make -j1
+}
+
+package() {
+ cd "$builddir"
+ make DESTDIR="$pkgdir" install
+}
+
+sha512sums="7c45e5117adc52fc2094b1b2bad4f4c518a46317a2196611966d72085ba3587c4ac8d1080f9d934888c01788f2b2d3d621c6f0d3e2a023c0fb1f9f3fa7fc127e dmraid-1.0.0.rc16-3.tar.bz2
+d56ef247bc98ed189ec0654319130855c35d090bb9b8c14d2d3102ed2eb131674a30112517eaabfbcc93b86a45bf3f462cabef63b003ba58ca2242623192a233 scan-under-musl.patch
+d4892243e8aeaa3df18e7477891ffd5c25bab7439fbda702e98c77d7432a9f04bbbf3b934696c4f67e0e77d0074c1ab2e930fb15e091f6c2db4361936b664aa3 off_t.patch"
diff --git a/user/dmraid/off_t.patch b/user/dmraid/off_t.patch
new file mode 100644
index 000000000..3a7263bc9
--- /dev/null
+++ b/user/dmraid/off_t.patch
@@ -0,0 +1,77 @@
+--- dmraid/include/dmraid/format.h.old 2010-03-18 16:53:16.000000000 +0000
++++ dmraid/include/dmraid/format.h 2018-07-15 01:14:39.710000000 +0000
+@@ -213,7 +213,7 @@
+ extern void *alloc_private(struct lib_context *lc, const char *who,
+ size_t size);
+ extern void *alloc_private_and_read(struct lib_context *lc, const char *who,
+- size_t size, char *path, loff_t offset);
++ size_t size, char *path, off_t offset);
+ extern struct raid_set *join_superset(struct lib_context *lc,
+ char *(*f_name) (struct lib_context * lc,
+ struct raid_dev * rd,
+--- dmraid/include/dmraid/misc.h.old 2010-10-27 11:31:46.000000000 +0000
++++ dmraid/include/dmraid/misc.h 2018-07-15 01:14:39.710000000 +0000
+@@ -33,9 +33,9 @@
+ extern int mk_dir(struct lib_context *lc, const char *dir);
+
+ extern int read_file(struct lib_context *lc, const char *who, char *path,
+- void *buffer, size_t size, loff_t offset);
++ void *buffer, size_t size, off_t offset);
+ extern int write_file(struct lib_context *lc, const char *who, char *path,
+- void *buffer, size_t size, loff_t offset);
++ void *buffer, size_t size, off_t offset);
+
+ extern int yes_no_prompt(struct lib_context *lc, const char *prompt, ...);
+
+--- dmraid/lib/misc/file.c.old 2010-01-11 16:19:29.000000000 +0000
++++ dmraid/lib/misc/file.c 2018-07-15 01:14:39.710000000 +0000
+@@ -53,10 +53,10 @@
+
+ static int
+ rw_file(struct lib_context *lc, const char *who, int flags,
+- char *path, void *buffer, size_t size, loff_t offset)
++ char *path, void *buffer, size_t size, off_t offset)
+ {
+ int fd, ret = 0;
+- loff_t o;
++ off_t o;
+ struct {
+ ssize_t(*func) ();
+ const char *what;
+@@ -73,7 +73,7 @@
+ #else
+ #define DMRAID_LSEEK lseek64
+ #endif
+- if (offset && (o = DMRAID_LSEEK(fd, offset, SEEK_SET)) == (loff_t) - 1)
++ if (offset && (o = DMRAID_LSEEK(fd, offset, SEEK_SET)) == (off_t) - 1)
+ log_err(lc, "%s: seeking device \"%s\" to %" PRIu64,
+ who, path, offset);
+ else if (rw->func(fd, buffer, size) != size)
+@@ -88,14 +88,14 @@
+
+ int
+ read_file(struct lib_context *lc, const char *who, char *path,
+- void *buffer, size_t size, loff_t offset)
++ void *buffer, size_t size, off_t offset)
+ {
+ return rw_file(lc, who, O_RDONLY, path, buffer, size, offset);
+ }
+
+ int
+ write_file(struct lib_context *lc, const char *who, char *path,
+- void *buffer, size_t size, loff_t offset)
++ void *buffer, size_t size, off_t offset)
+ {
+ /* O_CREAT|O_TRUNC are noops on a devnode. */
+ return rw_file(lc, who, O_WRONLY | O_CREAT | O_TRUNC, path,
+--- dmraid/lib/format/format.c.old 2009-09-16 11:45:14.000000000 +0000
++++ dmraid/lib/format/format.c 2018-07-15 01:14:39.720000000 +0000
+@@ -183,7 +183,7 @@
+ /* Allocate private space in format handlers and read data off device. */
+ void *
+ alloc_private_and_read(struct lib_context *lc, const char *who,
+- size_t size, char *path, loff_t offset)
++ size_t size, char *path, off_t offset)
+ {
+ void *ret;
+
diff --git a/user/dmraid/scan-under-musl.patch b/user/dmraid/scan-under-musl.patch
new file mode 100644
index 000000000..bbfe9b3d7
--- /dev/null
+++ b/user/dmraid/scan-under-musl.patch
@@ -0,0 +1,12 @@
+--- dmraid/lib/device/scan.c.old 2010-10-27 11:31:47.000000000 +0000
++++ dmraid/lib/device/scan.c 2018-07-15 01:03:10.160000000 +0000
+@@ -5,7 +5,8 @@
+ * See file LICENSE at the top of this source tree for license information.
+ */
+
+-#ifdef __KLIBC__
++#ifndef __GLIBC__
+ # define __KERNEL_STRICT_NAMES
+ # include <dirent.h>
++# include <mntent.h>
+ # include <paths.h>