summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorToke Høiland-Jørgensen2017-05-05 11:56:06 +0200
committerToke Høiland-Jørgensen2017-05-05 15:54:42 +0200
commitbaa961032a0092d5ae195250dd6bfe2c711b104c (patch)
tree6b732c94c90f9a1e5c8f82e0073df394515f19fc
downloadaur-baa961032a0092d5ae195250dd6bfe2c711b104c.tar.gz
Initial import
-rw-r--r--.SRCINFO40
-rw-r--r--.gitignore4
-rw-r--r--PKGBUILD73
-rw-r--r--fix-openssl11.patch27
-rw-r--r--xtreemfs-dir.service14
-rw-r--r--xtreemfs-mrc.service14
-rw-r--r--xtreemfs-osd.service14
-rw-r--r--xtreemfs-server.install20
8 files changed, 206 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 00000000000..7dcac517238
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,40 @@
+# Generated by mksrcinfo v8
+# Fri May 5 13:51:54 UTC 2017
+pkgbase = xtreemfs
+ pkgdesc = A fault-tolerant distributed file system for all storage needs
+ pkgver = 1.5.1
+ pkgrel = 1
+ url = http://www.xtreemfs.org
+ arch = x86_64
+ license = BSD
+ makedepends = gcc
+ makedepends = cmake
+ makedepends = make
+ makedepends = apache-ant
+ makedepends = java-environment
+ makedepends = fuse
+ makedepends = boost-libs
+ source = http://www.xtreemfs.org/downloads/XtreemFS-1.5.1.tar.gz
+ source = fix-openssl11.patch
+ source = xtreemfs-server.install
+ source = xtreemfs-dir.service
+ source = xtreemfs-mrc.service
+ source = xtreemfs-osd.service
+ sha256sums = 278f8a6cb58233d42aeb80442a60475aab569c9736f35dc3325005d8f287928c
+ sha256sums = cc543215add8198ffbe363bddcf05182e3e44ecbe55920bbe706b16082dd750f
+ sha256sums = 8dec87857645817813b103c2332ab5b420021e58eb15fc5a2e0d16a1acef230d
+ sha256sums = 301a09fcfbdfd70050f14f2708e796b1ecea9d008cfb2d78ec9130c02722a797
+ sha256sums = 3515b39f91bda2696b924c6cb49d4c402ba8e3696039bf3a492009c574b34ab0
+ sha256sums = d6ff68574c613f636187815df2c6776f95ee7e5da25e35bc5908e091e68ac844
+
+pkgname = xtreemfs-server
+ install = xtreemfs-server.install
+ depends = java-environment
+ depends = util-linux
+
+pkgname = xtreemfs-client
+ depends = attr
+ depends = openssl
+ depends = fuse
+ depends = boost-libs
+
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 00000000000..854d20d8b01
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,4 @@
+*.pkg.tar.xz
+*.tar.gz
+pkg
+src
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..171abfd171c
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,73 @@
+# Maintainer: Toke Høiland-Jørgensen <toke@toke.dk>
+
+pkgbase=xtreemfs
+pkgname=(xtreemfs-server xtreemfs-client)
+_pkgname=XtreemFS
+pkgver=1.5.1
+pkgrel=1
+pkgdesc="A fault-tolerant distributed file system for all storage needs"
+arch=(x86_64)
+url="http://www.xtreemfs.org"
+license=('BSD')
+makedepends=('gcc' 'cmake' 'make' 'apache-ant' 'java-environment' 'fuse' 'boost-libs')
+source=("http://www.xtreemfs.org/downloads/$_pkgname-$pkgver.tar.gz"
+ "fix-openssl11.patch"
+ "xtreemfs-server.install"
+ "xtreemfs-dir.service"
+ "xtreemfs-mrc.service"
+ "xtreemfs-osd.service")
+sha256sums=('278f8a6cb58233d42aeb80442a60475aab569c9736f35dc3325005d8f287928c'
+ 'cc543215add8198ffbe363bddcf05182e3e44ecbe55920bbe706b16082dd750f'
+ '8dec87857645817813b103c2332ab5b420021e58eb15fc5a2e0d16a1acef230d'
+ '301a09fcfbdfd70050f14f2708e796b1ecea9d008cfb2d78ec9130c02722a797'
+ '3515b39f91bda2696b924c6cb49d4c402ba8e3696039bf3a492009c574b34ab0'
+ 'd6ff68574c613f636187815df2c6776f95ee7e5da25e35bc5908e091e68ac844')
+
+prepare() {
+ cd "$_pkgname-$pkgver"
+ patch -p1 < "$srcdir/fix-openssl11.patch"
+}
+
+build() {
+ cd "$_pkgname-$pkgver"
+ make
+}
+
+package_xtreemfs-server() {
+ depends=('java-environment' 'util-linux')
+ install=xtreemfs-server.install
+
+ cd "$_pkgname-$pkgver"
+ install -d -m 0750 "$pkgdir/etc/xos/xtreemfs"
+ install -d -m 0750 "$pkgdir/var/lib/xtreemfs"
+ install -d -m 0750 "$pkgdir/var/log/xtreemfs"
+ install -d -m 0750 "$pkgdir/etc/xos/xtreemfs/truststore"
+
+ make DESTDIR="$pkgdir/" install-server install-tools
+
+ rm -rf "$pkgdir/etc/init.d"
+ rm -f "$pkgdir/etc/xos/xtreemfs/"{generate_uuid,postinstall_setup.sh}
+
+ install -d -m 0755 "$pkgdir/usr/lib/systemd/system/"
+ install -m 0644 "$srcdir/xtreemfs-dir.service" "$pkgdir/usr/lib/systemd/system/"
+ install -m 0644 "$srcdir/xtreemfs-mrc.service" "$pkgdir/usr/lib/systemd/system/"
+ install -m 0644 "$srcdir/xtreemfs-osd.service" "$pkgdir/usr/lib/systemd/system/"
+
+ install -d "$pkgdir/usr/share/licenses/xtreemfs-server"
+ mv "$pkgdir/usr/share/doc/xtreemfs-server/LICENSE" "$pkgdir/usr/share/licenses/xtreemfs-server/"
+ rm -rf "$pkgdir/usr/share/doc"
+
+ chmod 640 "$pkgdir/etc/xos/xtreemfs/"*.properties
+}
+
+package_xtreemfs-client() {
+ depends=('attr' 'openssl' 'fuse' 'boost-libs')
+ cd "$_pkgname-$pkgver"
+ make DESTDIR="$pkgdir/" install-client
+
+ rm -rf "$pkgdir/sbin"
+
+ install -d "$pkgdir/usr/share/licenses/xtreemfs-client"
+ mv "$pkgdir/usr/share/doc/xtreemfs-client/LICENSE" "$pkgdir/usr/share/licenses/xtreemfs-client/"
+ rm -rf "$pkgdir/usr/share/doc"
+}
diff --git a/fix-openssl11.patch b/fix-openssl11.patch
new file mode 100644
index 00000000000..ac76677a5e1
--- /dev/null
+++ b/fix-openssl11.patch
@@ -0,0 +1,27 @@
+--- a/cpp/src/rpc/client.cpp 2015-03-12 13:43:08.000000000 +0100
++++ b/cpp/src/rpc/client.cpp 2017-05-05 11:51:09.300379804 +0200
+@@ -357,19 +357,20 @@
+ }
+
+ bool override = false;
+- if (sctx->error != 0) {
++ int err = X509_STORE_CTX_get_error(sctx);
++ if (err != 0) {
+ if (Logging::log->loggingActive(LEVEL_DEBUG)) {
+ Logging::log->getLog(LEVEL_DEBUG) << "OpenSSL verify error: "
+- << sctx->error << endl;
++ << err << endl;
+ }
+
+ // Ignore error if verification is turned off in general or the error has
+ // been disabled specifically.
+ if (!ssl_options->verify_certificates() ||
+- ssl_options->ignore_verify_error(sctx->error)) {
++ ssl_options->ignore_verify_error(err)) {
+ if (Logging::log->loggingActive(LEVEL_WARN)) {
+ Logging::log->getLog(LEVEL_WARN) << "Ignoring OpenSSL verify error: "
+- << sctx->error << " because of user settings." << endl;
++ << err << " because of user settings." << endl;
+ }
+ override = true;
+ }
diff --git a/xtreemfs-dir.service b/xtreemfs-dir.service
new file mode 100644
index 00000000000..9f9b8774381
--- /dev/null
+++ b/xtreemfs-dir.service
@@ -0,0 +1,14 @@
+[Unit]
+Description=XtreemFS Directory Service (DIR)
+Requires=network.target
+After=network.target local-fs.target
+
+[Service]
+Type=simple
+Environment=CLASSPATH=/usr/share/java/XtreemFS.jar:/usr/share/java/BabuDB.jar:/usr/share/java/Flease.jar:/usr/share/java/protobuf-java-2.5.0.jar:/usr/share/java/Foundation.jar:/usr/share/java/jdmkrt.jar:/usr/share/java/jdmktk.jar:/usr/share/java/commons-codec-1.3.jar
+ExecStart=/usr/bin/java -ea org.xtreemfs.dir.DIR /etc/xos/xtreemfs/dirconfig.properties
+User=xtreemfs
+Group=xtreemfs
+
+[Install]
+WantedBy=multi-user.target
diff --git a/xtreemfs-mrc.service b/xtreemfs-mrc.service
new file mode 100644
index 00000000000..da21b1aee1b
--- /dev/null
+++ b/xtreemfs-mrc.service
@@ -0,0 +1,14 @@
+[Unit]
+Description=XtreemFS Metadata and Replica Catalog (MRC) service
+Requires=network.target
+After=network.target local-fs.target
+
+[Service]
+Type=simple
+Environment=CLASSPATH=/usr/share/java/XtreemFS.jar:/usr/share/java/BabuDB.jar:/usr/share/java/Flease.jar:/usr/share/java/protobuf-java-2.5.0.jar:/usr/share/java/Foundation.jar:/usr/share/java/jdmkrt.jar:/usr/share/java/jdmktk.jar:/usr/share/java/commons-codec-1.3.jar
+ExecStart=/usr/bin/java -ea org.xtreemfs.mrc.MRC /etc/xos/xtreemfs/mrcconfig.properties
+User=xtreemfs
+Group=xtreemfs
+
+[Install]
+WantedBy=multi-user.target
diff --git a/xtreemfs-osd.service b/xtreemfs-osd.service
new file mode 100644
index 00000000000..23dcb3c649a
--- /dev/null
+++ b/xtreemfs-osd.service
@@ -0,0 +1,14 @@
+[Unit]
+Description=XtreemFS Object Storage Device (OSD) service
+Requires=network.target
+After=network.target local-fs.target
+
+[Service]
+Type=simple
+Environment=CLASSPATH=/usr/share/java/XtreemFS.jar:/usr/share/java/BabuDB.jar:/usr/share/java/Flease.jar:/usr/share/java/protobuf-java-2.5.0.jar:/usr/share/java/Foundation.jar:/usr/share/java/jdmkrt.jar:/usr/share/java/jdmktk.jar:/usr/share/java/commons-codec-1.3.jar
+ExecStart=/usr/bin/java -ea org.xtreemfs.osd.OSD /etc/xos/xtreemfs/osdconfig.properties
+User=xtreemfs
+Group=xtreemfs
+
+[Install]
+WantedBy=multi-user.target
diff --git a/xtreemfs-server.install b/xtreemfs-server.install
new file mode 100644
index 00000000000..f2a8243f2b7
--- /dev/null
+++ b/xtreemfs-server.install
@@ -0,0 +1,20 @@
+XTREEMFS_GENERATE_UUID_SCRIPT="/etc/xos/xtreemfs/generate_uuid"
+
+post_install() {
+ if ! getent passwd xtreemfs >/dev/null
+ then
+ useradd -r -U -d /var/lib/xtreemfs -s /sbin/nologin xtreemfs
+ fi
+
+ chown -R xtreemfs:xtreemfs /var/lib/xtreemfs
+ chown -R xtreemfs:xtreemfs /var/log/xtreemfs
+ chown -R :xtreemfs /etc/xos/xtreemfs
+
+ if [ -x "$XTREEMFS_GENERATE_UUID_SCRIPT" ]; then
+ for conf in /etc/xos/xtreemfs/*.properties; do
+ "$XTREEMFS_GENERATE_UUID_SCRIPT" "$conf"
+ done
+ else
+ echo "UUID can't be generated automatically. Please enter a correct UUID in each config file of an XtreemFS service."
+ fi
+}