aboutsummaryrefslogtreecommitdiffstats
path: root/unmaintained
diff options
context:
space:
mode:
authorLeo <thinkabit.ukim@gmail.com>2019-10-23 02:38:13 -0300
committerLeo <thinkabit.ukim@gmail.com>2019-10-23 02:38:25 -0300
commitfd4eec108c9677df158e0ff09e683728b5b457d0 (patch)
treeb4088d40b6e8fe7a45c9edc526a4b3c8ea53c6bc /unmaintained
parent17ab0a9276a295858bdfb59ba35431660de0ff05 (diff)
downloadaports-fd4eec108c9677df158e0ff09e683728b5b457d0.tar.bz2
aports-fd4eec108c9677df158e0ff09e683728b5b457d0.tar.xz
unmaintained/lizardfs: move from testing
Diffstat (limited to 'unmaintained')
-rw-r--r--unmaintained/lizardfs/0001-common-Add-multi-platform-endian-conversion-function.patch152
-rw-r--r--unmaintained/lizardfs/APKBUILD203
-rw-r--r--unmaintained/lizardfs/fix-headers.patch12
-rw-r--r--unmaintained/lizardfs/lizardfs-cgiserv.initd10
-rw-r--r--unmaintained/lizardfs/lizardfs-chunkserver.initd10
-rw-r--r--unmaintained/lizardfs/lizardfs-master.initd9
-rw-r--r--unmaintained/lizardfs/lizardfs-metalogger.initd9
-rw-r--r--unmaintained/lizardfs/lizardfs.pre-install7
8 files changed, 412 insertions, 0 deletions
diff --git a/unmaintained/lizardfs/0001-common-Add-multi-platform-endian-conversion-function.patch b/unmaintained/lizardfs/0001-common-Add-multi-platform-endian-conversion-function.patch
new file mode 100644
index 0000000000..0c805d9b56
--- /dev/null
+++ b/unmaintained/lizardfs/0001-common-Add-multi-platform-endian-conversion-function.patch
@@ -0,0 +1,152 @@
+From 9b03a1b4481ed48f8950c2cffd36112f67d6e183 Mon Sep 17 00:00:00 2001
+From: Frank Denis <github@pureftpd.org>
+Date: Thu, 19 Mar 2015 11:52:40 +0100
+Subject: [PATCH] common: Add multi-platform endian conversion functions
+
+This commit adds portable_endian.h file with set of endian conversion
+functions.
+
+Change-Id: I145cdc7c79eb9a16bd5199247af1976e18c59814
+---
+ src/common/portable_endian.h | 116 +++++++++++++++++++++++++++++++++++++++++++
+ src/common/posix_acl_xattr.h | 1 +
+ 2 files changed, 117 insertions(+)
+ create mode 100644 src/common/portable_endian.h
+
+diff --git a/src/common/portable_endian.h b/src/common/portable_endian.h
+new file mode 100644
+index 0000000..e1d1d59
+--- /dev/null
++++ b/src/common/portable_endian.h
+@@ -0,0 +1,116 @@
++// "License": Public Domain
++// I, Mathias Panzenböck, place this file hereby into the public domain. Use it at your own risk for whatever you like.
++// In case there are jurisdictions that don't support putting things in the public domain you can also consider it to
++// be "dual licensed" under the BSD, MIT and Apache licenses, if you want to. This code is trivial anyway. Consider it
++// an example on how to get the endian conversion functions on different platforms.
++
++#pragma once
++
++#include "common/platform.h"
++
++#if (defined(_WIN16) || defined(_WIN32) || defined(_WIN64)) && !defined(__WINDOWS__)
++
++#define __WINDOWS__
++
++#endif
++
++#if defined(__linux__) || defined(__CYGWIN__)
++
++#include <endian.h>
++
++#elif defined(__APPLE__)
++
++#include <libkern/OSByteOrder.h>
++
++#define htobe16(x) OSSwapHostToBigInt16(x)
++#define htole16(x) OSSwapHostToLittleInt16(x)
++#define be16toh(x) OSSwapBigToHostInt16(x)
++#define le16toh(x) OSSwapLittleToHostInt16(x)
++
++#define htobe32(x) OSSwapHostToBigInt32(x)
++#define htole32(x) OSSwapHostToLittleInt32(x)
++#define be32toh(x) OSSwapBigToHostInt32(x)
++#define le32toh(x) OSSwapLittleToHostInt32(x)
++
++#define htobe64(x) OSSwapHostToBigInt64(x)
++#define htole64(x) OSSwapHostToLittleInt64(x)
++#define be64toh(x) OSSwapBigToHostInt64(x)
++#define le64toh(x) OSSwapLittleToHostInt64(x)
++
++#define __BYTE_ORDER BYTE_ORDER
++#define __BIG_ENDIAN BIG_ENDIAN
++#define __LITTLE_ENDIAN LITTLE_ENDIAN
++#define __PDP_ENDIAN PDP_ENDIAN
++
++#elif defined(__OpenBSD__)
++
++#include <sys/endian.h>
++
++#elif defined(__NetBSD__) || defined(__FreeBSD__) || defined(__DragonFly__)
++
++#include <sys/endian.h>
++
++#define be16toh(x) betoh16(x)
++#define le16toh(x) letoh16(x)
++
++#define be32toh(x) betoh32(x)
++#define le32toh(x) letoh32(x)
++
++#define be64toh(x) betoh64(x)
++#define le64toh(x) letoh64(x)
++
++#elif defined(__WINDOWS__)
++
++#include <winsock2.h>
++#include <sys/param.h>
++
++#if BYTE_ORDER == LITTLE_ENDIAN
++
++#define htobe16(x) htons(x)
++#define htole16(x) (x)
++#define be16toh(x) ntohs(x)
++#define le16toh(x) (x)
++
++#define htobe32(x) htonl(x)
++#define htole32(x) (x)
++#define be32toh(x) ntohl(x)
++#define le32toh(x) (x)
++
++#define htobe64(x) htonll(x)
++#define htole64(x) (x)
++#define be64toh(x) ntohll(x)
++#define le64toh(x) (x)
++
++#elif BYTE_ORDER == BIG_ENDIAN
++
++#define htobe16(x) (x)
++#define htole16(x) __builtin_bswap16(x)
++#define be16toh(x) (x)
++#define le16toh(x) __builtin_bswap16(x)
++
++#define htobe32(x) (x)
++#define htole32(x) __builtin_bswap32(x)
++#define be32toh(x) (x)
++#define le32toh(x) __builtin_bswap32(x)
++
++#define htobe64(x) (x)
++#define htole64(x) __builtin_bswap64(x)
++#define be64toh(x) (x)
++#define le64toh(x) __builtin_bswap64(x)
++
++#else
++
++#error byte order not supported
++
++#endif
++
++#define __BYTE_ORDER BYTE_ORDER
++#define __BIG_ENDIAN BIG_ENDIAN
++#define __LITTLE_ENDIAN LITTLE_ENDIAN
++#define __PDP_ENDIAN PDP_ENDIAN
++
++#else
++
++#error platform not supported
++
++#endif
+diff --git a/src/common/posix_acl_xattr.h b/src/common/posix_acl_xattr.h
+index 29c3543..c293dc9 100644
+--- a/src/common/posix_acl_xattr.h
++++ b/src/common/posix_acl_xattr.h
+@@ -8,6 +8,7 @@
+
+ #include "common/exception.h"
+ #include "common/massert.h"
++#include "common/portable_endian.h"
+
+ // These #defines and structs were extracted from kernel sources
+
+--
+2.4.5
+
diff --git a/unmaintained/lizardfs/APKBUILD b/unmaintained/lizardfs/APKBUILD
new file mode 100644
index 0000000000..2508211207
--- /dev/null
+++ b/unmaintained/lizardfs/APKBUILD
@@ -0,0 +1,203 @@
+# Contributor:
+# Maintainer:
+pkgname=lizardfs
+pkgver=2.6.0
+pkgrel=2
+pkgdesc="a highly reliable, scalable and efficient distributed file system"
+url="https://github.com/lizardfs/lizardfs/"
+arch=""
+license="GPL-3.0"
+depends=""
+depends_dev=""
+makedepends="$depends_dev boost-dev cmake fuse-dev zlib-dev asciidoc python2"
+pkgusers="mfs"
+pkggroups="mfs"
+install="$pkgname.pre-install"
+subpackages="$pkgname-doc $pkgname-master $pkgname-metalogger
+ $pkgname-chunkserver $pkgname-client $pkgname-cgi $pkgname-cgiserv
+ $pkgname-adm"
+source="lizardfs-$pkgver.tar.gz::https://github.com/lizardfs/lizardfs/archive/v$pkgver.tar.gz
+ fix-headers.patch
+ 0001-common-Add-multi-platform-endian-conversion-function.patch
+
+ lizardfs-cgiserv.initd
+ lizardfs-chunkserver.initd
+ lizardfs-master.initd
+ lizardfs-metalogger.initd
+ "
+
+_builddir="$srcdir"/lizardfs-$pkgver
+prepare() {
+ local i
+ cd "$_builddir"
+ for i in $source; do
+ case $i in
+ *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
+ esac
+ done
+ mkdir -p build
+}
+
+build() {
+ cd "$_builddir"/build
+ cmake .. \
+ -DCMAKE_BUILD_TYPE=Release \
+ -DCMAKE_INSTALL_PREFIX="/" \
+ -DENABLE_TESTS=NO \
+ -DENABLE_DEBIAN_PATHS=YES \
+ || return 1
+ make || return 1
+}
+
+package() {
+ cd "$_builddir"/build
+ make DESTDIR="$pkgdir" install || return 1
+ chown -R mfs:mfs "$pkgdir"/var/lib/mfs
+ for i in $source; do
+ case $i in
+ *.initd)
+ install -Dm755 "$srcdir"/$i \
+ "$pkgdir"/etc/init.d/${i%.*} || return 1
+ ;;
+ esac
+ done
+}
+
+_mv_files() {
+ local i
+ for i in "$@"; do
+ case $i in
+ */*) mkdir -p "$subpkgdir"/${i%/*};;
+ *) mkdir -p "$subpkgdir";;
+ esac
+ mv "$pkgdir"/$i "$subpkgdir"/$i || return 1
+ done
+}
+
+master() {
+ pkgdesc="LizardFS master server"
+ depends="lizardfs=$pkgver-r$pkgrel"
+ cd "$pkgdir"
+ _mv_files \
+ usr/sbin/mfsmaster \
+ usr/sbin/mfsrestoremaster \
+ usr/sbin/mfsmetadump \
+ usr/sbin/mfsmetarestore \
+ etc/mfs/mfsexports.cfg.dist \
+ etc/mfs/mfstopology.cfg.dist \
+ etc/mfs/mfsgoals.cfg.dist \
+ etc/mfs/mfsmaster.cfg.dist \
+ etc/mfs/globaliolimits.cfg.dist \
+ var/lib/mfs/metadata.mfs.empty \
+ etc/init.d/lizardfs-master \
+ || return 1
+ chown -R mfs:mfs "$subpkgdir"/var/lib/mfs
+}
+
+metalogger() {
+ pkgdesc="LizardFS metadata replication server"
+ depends="lizardfs=$pkgver-r$pkgrel"
+ cd "$pkgdir"
+ _mv_files \
+ usr/sbin/mfsmetalogger \
+ etc/mfs/mfsmetalogger.cfg.dist \
+ etc/init.d/lizardfs-metalogger \
+ || return 1
+}
+
+chunkserver() {
+ pkgdesc="LizardFS data server"
+ depends="lizardfs=$pkgver-r$pkgrel"
+ cd "$pkgdir"
+ _mv_files \
+ usr/sbin/mfschunkserver \
+ etc/mfs/mfschunkserver.cfg.dist \
+ etc/mfs/mfshdd.cfg.dist \
+ etc/init.d/lizardfs-chunkserver \
+ || return 1
+}
+
+client() {
+ pkgdesc="LizardFS client"
+ depends="fuse"
+ cd "$pkgdir"
+ _mv_files \
+ usr/bin/mfstools \
+ usr/bin/mfsmount \
+ usr/bin/mfssnapshot \
+ usr/bin/mfsappendchunks \
+ usr/bin/mfscheckfile \
+ usr/bin/mfsdeleattr \
+ usr/bin/mfsdirinfo \
+ usr/bin/mfsfileinfo \
+ usr/bin/mfsfilerepair \
+ usr/bin/mfsgeteattr \
+ usr/bin/mfsgetgoal \
+ usr/bin/mfsgettrashtime \
+ usr/bin/mfsmakesnapshot \
+ usr/bin/mfsrepquota \
+ usr/bin/mfsrgetgoal \
+ usr/bin/mfsrgettrashtime \
+ usr/bin/mfsrsetgoal \
+ usr/bin/mfsrsettrashtime \
+ usr/bin/mfsseteattr \
+ usr/bin/mfssetgoal \
+ usr/bin/mfssetquota \
+ usr/bin/mfssettrashtime \
+ etc/mfs/mfsmount.cfg.dist \
+ etc/mfs/iolimits.cfg.dist \
+ || return 1
+
+}
+
+cgi() {
+ pkgdesc="LizardFS CGI Monitor"
+ depends="python2"
+ cd "$pkgdir"
+ _mv_files \
+ usr/share/mfscgi \
+ || return 1
+}
+
+cgiserv() {
+ pkgdesc="Simple CGI-capable HTTP server to run LizardFS CGI Monitor"
+ depends="$pkgname-cgi=$pkgver-r$pkgrel"
+ cd "$pkgdir"
+ _mv_files \
+ usr/sbin/lizardfs-cgiserver \
+ usr/sbin/mfscgiserv \
+ etc/init.d/lizardfs-cgiserv \
+ || return 1
+}
+
+adm() {
+ pkgdesc="LizardFS administration utility"
+ depends=""
+ cd "$pkgdir"
+ _mv_files \
+ usr/bin/lizardfs-admin \
+ usr/bin/lizardfs-probe \
+ || return 1
+}
+
+md5sums="9765bca6f8812a6fbca58a04e2f33c6e lizardfs-2.6.0.tar.gz
+a04e01504edff691389236697d9e9f72 fix-headers.patch
+8beae2dc879a6e3bc778fa63409dd5be 0001-common-Add-multi-platform-endian-conversion-function.patch
+fcd290b193fbedc9035cbd4be46463b7 lizardfs-cgiserv.initd
+deffb670f92d3675b8716c79d8ba954f lizardfs-chunkserver.initd
+3185ec14fe09cc7c74dc8c9b00b289e8 lizardfs-master.initd
+17022128ce9dce94e632a59fbd2c5f05 lizardfs-metalogger.initd"
+sha256sums="f7f7e3c64d4907db318113d224b9296ebcd629028ad3e13894eb592dac8d9161 lizardfs-2.6.0.tar.gz
+2db07acf838c6b468d4ea3a5ad831e7cacf95a0067140d03640f9f01fde15175 fix-headers.patch
+24a2b699fdf96c8ead795b5ad962502421bbac64a4bc4d7cf68dfaee16cc6b19 0001-common-Add-multi-platform-endian-conversion-function.patch
+e080c484e67f6ec25816a5c90b12a3c867a5b123fa73aa9442f76bc5a8e90264 lizardfs-cgiserv.initd
+b0157cf08cb22bdee27f9f88a11806341868102177021535e3ee66be5afd311b lizardfs-chunkserver.initd
+1ef583e31532a9012406be0643f432bc059dc22eacc71c9aca1d2cef722e67c7 lizardfs-master.initd
+05b091d78fe3f4efab6ba916e0e91b0c628a9eb45244ee793bf473ccac825d6e lizardfs-metalogger.initd"
+sha512sums="a80277cf625e175728147f1850cc6ad234d490589a825bfede23e53720ffef7d8c5d21ed8ce6a31217c8901e04cb5c91ac581da3795a592756c5f8f3257537ff lizardfs-2.6.0.tar.gz
+eaeff3c67951bccb7e3963981c5bae2f582c6cddfadbd604f0151ace49ade0524d51665c7a7821b59c80d61aade05900368c9f7022793131f03e44df6c96c3f8 fix-headers.patch
+f5c391717b36315ec62ee71a24d41409a5138d2ba3579e392e9b29c08bb4c8711c4f71440518cc6ee03f13cdb265515cc544f99b5c368717aae1da1a9ca9ca9f 0001-common-Add-multi-platform-endian-conversion-function.patch
+2c78af05c2eeba866c25c58d996c64d16a590248660a362e29a52065af93c126c6eb3232c8cdbb797e60cca406608b77f29ce62717446b7c3d1a8d35e0a722d8 lizardfs-cgiserv.initd
+f5de527f2c6f729d49c365cbac64d938d8f90de2c78ac2f4fdbb445532fbc6438ed7380b7963f70cfbf99d48282d7da6a8dbb3df9ae84ac7d2fcebda2ce308c8 lizardfs-chunkserver.initd
+6234131965bf52ef0bb859a50010b649b10b81786ff302f6ff65429d03026b32d0e1ad2daeab99dea4bd8cc94ac5aed75707d640adf33b4fb79e22185e77ac01 lizardfs-master.initd
+76951ecdbaa69cef0fc383bbc3d36b1eb00aced3c98750676ab159a44a9e50d29ebe188080a08a2a09df6c62f6899bb093cf94e9e3e1688826f5ff8dfdc0fa68 lizardfs-metalogger.initd"
diff --git a/unmaintained/lizardfs/fix-headers.patch b/unmaintained/lizardfs/fix-headers.patch
new file mode 100644
index 0000000000..3b8746aa8d
--- /dev/null
+++ b/unmaintained/lizardfs/fix-headers.patch
@@ -0,0 +1,12 @@
+diff --git a/src/common/lockfile.cc b/src/common/lockfile.cc
+index 209beab..d6ca234 100644
+--- a/src/common/lockfile.cc
++++ b/src/common/lockfile.cc
+@@ -1,6 +1,7 @@
+ #include "common/platform.h"
+ #include "common/lockfile.h"
+
++#include <fcntl.h>
+ #include <unistd.h>
+ #include <sys/file.h>
+ #include <sys/types.h>
diff --git a/unmaintained/lizardfs/lizardfs-cgiserv.initd b/unmaintained/lizardfs/lizardfs-cgiserv.initd
new file mode 100644
index 0000000000..8ee89ab728
--- /dev/null
+++ b/unmaintained/lizardfs/lizardfs-cgiserv.initd
@@ -0,0 +1,10 @@
+#!/sbin/openrc-run
+
+pidfile=/var/run/lizardfs-cgiserv.pid
+command=/usr/sbin/lizardfs-cgiserver
+
+
+depend() {
+ after net
+}
+
diff --git a/unmaintained/lizardfs/lizardfs-chunkserver.initd b/unmaintained/lizardfs/lizardfs-chunkserver.initd
new file mode 100644
index 0000000000..abf97b77fe
--- /dev/null
+++ b/unmaintained/lizardfs/lizardfs-chunkserver.initd
@@ -0,0 +1,10 @@
+#!/sbin/openrc-run
+
+command=/usr/sbin/mfschunkserver
+
+depend() {
+ need syslog
+ after net
+}
+
+ need syslog
diff --git a/unmaintained/lizardfs/lizardfs-master.initd b/unmaintained/lizardfs/lizardfs-master.initd
new file mode 100644
index 0000000000..9e2e29f4a0
--- /dev/null
+++ b/unmaintained/lizardfs/lizardfs-master.initd
@@ -0,0 +1,9 @@
+#!/sbin/openrc-run
+
+command=/usr/sbin/mfsmaster
+
+depend() {
+ need syslog
+ after net
+}
+
diff --git a/unmaintained/lizardfs/lizardfs-metalogger.initd b/unmaintained/lizardfs/lizardfs-metalogger.initd
new file mode 100644
index 0000000000..012d8836c9
--- /dev/null
+++ b/unmaintained/lizardfs/lizardfs-metalogger.initd
@@ -0,0 +1,9 @@
+#!/sbin/openrc-run
+
+command=/usr/sbin/mfsmetalogger
+
+depend() {
+ need syslog
+ after net
+}
+
diff --git a/unmaintained/lizardfs/lizardfs.pre-install b/unmaintained/lizardfs/lizardfs.pre-install
new file mode 100644
index 0000000000..83ce544575
--- /dev/null
+++ b/unmaintained/lizardfs/lizardfs.pre-install
@@ -0,0 +1,7 @@
+#!/bin/sh
+
+addgroup -S mfs 2>/dev/null
+adduser -S -D -H -h /var/lib/mfs -s /sbin/nologin -G mfs -g mfs mfs \
+ 2>/dev/null
+
+exit 0