diff options
author | Konstantin Gizdov | 2019-03-03 13:40:30 +0000 |
---|---|---|
committer | Konstantin Gizdov | 2019-03-03 13:40:30 +0000 |
commit | 67c61ec68d15f6b4cd2e7d14a1c204c23f7a1ca7 (patch) | |
tree | 093c69e0c1c5830c540cc144b274bcd89965ed5b | |
download | aur-67c61ec68d15f6b4cd2e7d14a1c204c23f7a1ca7.tar.gz |
publish python2 version as Arch is dropping Python 2
-rw-r--r-- | .SRCINFO | 23 | ||||
-rw-r--r-- | PKGBUILD | 76 | ||||
-rw-r--r-- | fix_signness.patch | 44 |
3 files changed, 143 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..417c09dba7dc --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,23 @@ +pkgbase = xrootd-py2 + pkgdesc = Software framework for fast, low latency, scalable and fault tolerant data access (Python2). + pkgver = 4.9.0 + pkgrel = 1 + url = http://xrootd.org + arch = x86_64 + license = LGPL3 + checkdepends = cppunit + makedepends = ceph + makedepends = cmake + depends = ceph + depends = cppunit + provides = xrootd + provides = python2-xrootd + provides = python2-pyxrootd + conflicts = xrootd + source = http://xrootd.org/download/v4.9.0/xrootd-4.9.0.tar.gz + source = fix_signness.patch + sha256sums = 49791648bdc99ad87545f60d1808dacf926de7b843415ebdd181ccf43b2af8be + sha256sums = f291968f0e17168330a422b43c92f1c2ec33f9c058f3310839ceeecff5e25f62 + +pkgname = xrootd-py2 + diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..65688f44271a --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,76 @@ +# Maintainer: Konstantin Gizdov < arch at kge dot pw > +# Contributor: Jan Kašpar < jan.kaspar at gmail dot com > +# Contributor: Alex Pearce < alex at alexpearce dot me > +pkgname=xrootd-py2 +_pkgname=xrootd +provides=('xrootd' 'python2-xrootd' 'python2-pyxrootd') +conflicts=('xrootd') +pkgdesc="Software framework for fast, low latency, scalable and fault tolerant data access (Python2)." +pkgver=4.9.0 +pkgrel=1 +arch=('x86_64') +url="http://xrootd.org" +license=('LGPL3') +depends=('ceph' 'cppunit') +makedepends=('ceph' 'cmake') +checkdepends=('cppunit') +source=("${url}/download/v${pkgver}/xrootd-${pkgver}.tar.gz" + fix_signness.patch) +sha256sums=('49791648bdc99ad87545f60d1808dacf926de7b843415ebdd181ccf43b2af8be' + 'f291968f0e17168330a422b43c92f1c2ec33f9c058f3310839ceeecff5e25f62') +get_py2ver () { + python2 -c 'import sys; print(str(sys.version_info[0]) + "." + str(sys.version_info[1]))' +} + +prepare() { + cd "${srcdir}/${_pkgname}-${pkgver}" + patch -Np1 -i "${srcdir}/fix_signness.patch" +} + +build() { + cd "${srcdir}/${_pkgname}-${pkgver}" + + # configure + mkdir -p "${srcdir}/build" + cd "${srcdir}/build" + + CFLAGS="${CFLAGS}" \ + CXXFLAGS="${CXXFLAGS}" \ + LDFLAGS="${LDFLAGS}" \ + cmake -DCMAKE_BUILD_TYPE:STRING=Release \ + -DCMAKE_INSTALL_LIBDIR:PATH=lib \ + -DCMAKE_INSTALL_PREFIX:PATH=/usr \ + -DENABLE_TESTS=1 \ + -DXRD_PYTHON_REQ_VERSION=$(get_pyver2) \ + "${srcdir}/${_pkgname}-${pkgver}" + + # build + make +} + +check() { + cd "${srcdir}/build/tests" + + ./common/text-runner ./XrdCephTests/libXrdCephTests.so "All Tests" + + ## + # This requires a running XRootD server with multiIP DNS forwarder and local disk servers + # only run this if you have configured the env correctly, + # examples in https://github.com/xrootd/xrootd-test-suite + # sample environment can be configured like so: + # export XRDTEST_MAINSERVERURL=metaman.xrd.test + # or export XRDTEST_MAINSERVERURL=http://xrootd.cern.ch/ + # export XRDTEST_DISKSERVERURL=srv1.xrd.test + # or export XRDTEST_DISKSERVERURL=http://xrootd.cern.ch/ + # export XRDTEST_DATAPATH=/tests/test-files/ + # export XRDTEST_LOCALFILE=/data/a048e67f-4397-4bb8-85eb-8d7e40d90763.dat + # or export XRDTEST_LOCALFILE=/tmp/accwe.root + # export XRDTEST_REMOTEFILE=${XRDTEST_MAINSERVERURL}${XRDTEST_DATAPATH}/a048e67f-4397-4bb8-85eb-8d7e40d90763.dat + # or export XRDTEST_MULTIIPSERVERURL=multiip.xrd.test + # ./common/text-runner ./XrdClTests/libXrdClTests.so "All Tests" +} + +package() { + cd "${srcdir}/build" + make DESTDIR="${pkgdir}" install +} diff --git a/fix_signness.patch b/fix_signness.patch new file mode 100644 index 000000000000..95fc3e96fd3f --- /dev/null +++ b/fix_signness.patch @@ -0,0 +1,44 @@ +From 8e5940a2ebeb74d186a848da3bc21f1fa77c8835 Mon Sep 17 00:00:00 2001 +From: Konstantin Gizdov <kgizdov@gmail.com> +Date: Sun, 3 Mar 2019 14:46:41 +0200 +Subject: [PATCH] fix signness and tests + +--- + src/XrdCl/XrdClParallelOperation.hh | 4 ++-- + tests/XrdClTests/OperationsWorkflowTest.cc | 6 ------ + 2 files changed, 2 insertions(+), 8 deletions(-) + +diff --git a/src/XrdCl/XrdClParallelOperation.hh b/src/XrdCl/XrdClParallelOperation.hh +index 2bd13b63e43..897fae78a86 100644 +--- a/src/XrdCl/XrdClParallelOperation.hh ++++ b/src/XrdCl/XrdClParallelOperation.hh +@@ -89,10 +89,10 @@ namespace XrdCl + { + std::ostringstream oss; + oss << "Parallel("; +- for( int i = 0; i < pipelines.size(); i++ ) ++ for( size_t i = 0; i < pipelines.size(); i++ ) + { + oss << pipelines[i]->ToString(); +- if( i != pipelines.size() - 1 ) ++ if( i + 1 != pipelines.size() ) + { + oss << " && "; + } +diff --git a/tests/XrdClTests/OperationsWorkflowTest.cc b/tests/XrdClTests/OperationsWorkflowTest.cc +index 26b1b517519..5e09b6689d1 100644 +--- a/tests/XrdClTests/OperationsWorkflowTest.cc ++++ b/tests/XrdClTests/OperationsWorkflowTest.cc +@@ -157,12 +157,6 @@ namespace { + bool executed; + }; + +- char* createBuf(const char* content, uint32_t length){ +- char* buf = new char[length + 1](); +- strncpy(buf, content, length); +- return buf; +- } +- + + + } |