[arch-commits] Commit in xrootd/repos (4 files)
Konstantin Gizdov
kgizdov at archlinux.org
Tue Sep 1 11:04:46 UTC 2020
Date: Tuesday, September 1, 2020 @ 11:04:46
Author: kgizdov
Revision: 695361
archrelease: copy trunk to community-testing-x86_64
Added:
xrootd/repos/community-testing-x86_64/
xrootd/repos/community-testing-x86_64/PKGBUILD
(from rev 695360, xrootd/trunk/PKGBUILD)
xrootd/repos/community-testing-x86_64/add_missing_header.patch
(from rev 695360, xrootd/trunk/add_missing_header.patch)
xrootd/repos/community-testing-x86_64/cxx17.patch
(from rev 695360, xrootd/trunk/cxx17.patch)
--------------------------+
PKGBUILD | 90 +++++++++++++++++++++++++++++++++++++++++++++
add_missing_header.patch | 27 +++++++++++++
cxx17.patch | 78 +++++++++++++++++++++++++++++++++++++++
3 files changed, 195 insertions(+)
Copied: xrootd/repos/community-testing-x86_64/PKGBUILD (from rev 695360, xrootd/trunk/PKGBUILD)
===================================================================
--- community-testing-x86_64/PKGBUILD (rev 0)
+++ community-testing-x86_64/PKGBUILD 2020-09-01 11:04:46 UTC (rev 695361)
@@ -0,0 +1,90 @@
+# 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
+pkgdesc="Software framework for fast, low latency, scalable and fault tolerant data access."
+pkgver=5.0.1
+pkgrel=2
+arch=('x86_64')
+url="https://xrootd.slac.stanford.edu/"
+license=('LGPL3')
+depends=('ceph' 'curl' 'json-c' 'libxml2' 'openssl' 'perl' 'python' 'systemd')
+makedepends=('cmake' 'git')
+checkdepends=('cppunit')
+source=(
+ "${pkgname}-${pkgver}::git+https://github.com/${pkgname}/${pkgname}.git#tag=v${pkgver}"
+ 'cxx17.patch'
+ 'add_missing_header.patch'
+)
+sha256sums=('SKIP'
+ '828de400b8fef40a80b9eadb8198fdfe7c991515a466045b699425df2f681817'
+ '68eac594d8d3b15c1e4d8522c4422a26c9a51c9206d3a88fedf00d4e9599d455')
+
+get_pyver () {
+ python -c 'import sys; print(str(sys.version_info[0]) + "." + str(sys.version_info[1]))'
+}
+
+prepare () {
+ cd "${srcdir}/${pkgbase}-${pkgver}"
+ # source tarballs don't seem to contain all submodules anymore
+ git submodule update --init --recursive
+ patch -Np1 -i "${srcdir}/cxx17.patch"
+ patch -Np1 -i "${srcdir}/add_missing_header.patch"
+}
+
+build() {
+ cd "${srcdir}/${pkgbase}-${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 \
+ -DCMAKE_CXX_STANDARD="17" \
+ -DENABLE_TESTS=1 \
+ -DXRD_PYTHON_REQ_VERSION=$(get_pyver) \
+ "${srcdir}/${pkgbase}-${pkgver}"
+
+ # build
+ make
+}
+
+check() {
+ cd "${srcdir}/build/tests"
+
+ # Check has significantly changed, to-be-updated
+ # ./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
+ # drop unneeded test bin & lib
+ rm "${pkgdir}/usr/bin/text-runner"
+ rm "${pkgdir}/usr/lib/libXrdClTests.so"
+ install -d "${pkgdir}/usr/lib/cmake/XRootD"
+ mv "${pkgdir}/usr/share/xrootd/cmake/XRootDConfig.cmake" "${pkgdir}/usr/lib/cmake/XRootD"/
+ rm -rf "${pkgdir}/usr/share/xrootd/cmake"
+ ln -s "/usr/lib/cmake" "${pkgdir}/usr/share/xrootd/cmake"
+}
Copied: xrootd/repos/community-testing-x86_64/add_missing_header.patch (from rev 695360, xrootd/trunk/add_missing_header.patch)
===================================================================
--- community-testing-x86_64/add_missing_header.patch (rev 0)
+++ community-testing-x86_64/add_missing_header.patch 2020-09-01 11:04:46 UTC (rev 695361)
@@ -0,0 +1,27 @@
+diff --git a/src/Xrd/XrdConfig.cc b/src/Xrd/XrdConfig.cc
+index 1be14323e..4b6d9caec 100644
+--- a/src/Xrd/XrdConfig.cc
++++ b/src/Xrd/XrdConfig.cc
+@@ -46,6 +46,7 @@
+ #include <sys/resource.h>
+ #include <sys/types.h>
+ #include <sys/stat.h>
++#include <sys/socket.h>
+ #include <sys/un.h>
+
+ #include "XrdVersion.hh"
+@@ -793,12 +794,12 @@ int XrdConfig::ConfigXeq(char *var, XrdOucStream &Config, XrdSysError *eDest)
+
+ int XrdConfig::ASocket(const char *path, const char *fname, mode_t mode)
+ {
+- struct sockaddr_un unix;
++ struct sockaddr_un my_local_unix;
+ int plen = strlen(path), flen = strlen(fname);
+
+ // Make sure we can fit everything in our buffer
+ //
+- if ((plen + flen + 3) > (int)sizeof(unix.sun_path))
++ if ((plen + flen + 3) > (int)sizeof(my_local_unix.sun_path))
+ {Log.Emsg("Config", "admin path", path, "too long");
+ return 1;
+ }
Copied: xrootd/repos/community-testing-x86_64/cxx17.patch (from rev 695360, xrootd/trunk/cxx17.patch)
===================================================================
--- community-testing-x86_64/cxx17.patch (rev 0)
+++ community-testing-x86_64/cxx17.patch 2020-09-01 11:04:46 UTC (rev 695361)
@@ -0,0 +1,78 @@
+diff --git a/bindings/python/setup.py.in b/bindings/python/setup.py.in
+index cea13f3a9..dcfc46b05 100644
+--- a/bindings/python/setup.py.in
++++ b/bindings/python/setup.py.in
+@@ -8,15 +8,15 @@ import subprocess
+ # Remove the "-Wstrict-prototypes" compiler option, which isn't valid for C++.
+ cfg_vars = sysconfig.get_config_vars()
+ opt = cfg_vars["OPT"]
+-cfg_vars["OPT"] = " ".join( flag for flag in opt.split() if flag not in ['-Wstrict-prototypes' ${CLANG_PROHIBITED} ] ) + " --std=c++0x"
++cfg_vars["OPT"] = " ".join( flag for flag in opt.split() if flag not in ['-Wstrict-prototypes' ${CLANG_PROHIBITED} ] ) + " --std=c++17"
+
+ cflags = cfg_vars["CFLAGS"]
+-cfg_vars["CFLAGS"] = " ".join( flag for flag in cflags.split() if flag not in ['-Wstrict-prototypes' ${CLANG_PROHIBITED} ] ) + " --std=c++0x"
++cfg_vars["CFLAGS"] = " ".join( flag for flag in cflags.split() if flag not in ['-Wstrict-prototypes' ${CLANG_PROHIBITED} ] ) + " --std=c++17"
+
+ # pypy doesn't define PY_CFLAGS so skip it if it's missing
+ if "PY_CFLAGS" in cfg_vars:
+ py_cflags = cfg_vars["PY_CFLAGS"]
+- cfg_vars["PY_CFLAGS"] = " ".join( flag for flag in py_cflags.split() if flag not in ['-Wstrict-prototypes' ${CLANG_PROHIBITED} ] ) + " --std=c++0x"
++ cfg_vars["PY_CFLAGS"] = " ".join( flag for flag in py_cflags.split() if flag not in ['-Wstrict-prototypes' ${CLANG_PROHIBITED} ] ) + " --std=c++17"
+
+ ccl=cfg_vars["CC"].split()
+ ccl[0]="${CMAKE_C_COMPILER}"
+diff --git a/cmake/XRootDOSDefs.cmake b/cmake/XRootDOSDefs.cmake
+index cf733e4fe..c749813c6 100644
+--- a/cmake/XRootDOSDefs.cmake
++++ b/cmake/XRootDOSDefs.cmake
+@@ -19,15 +19,15 @@ endif()
+ add_definitions( -DUSE_LIBC_SEMAPHORE=${USE_LIBC_SEMAPHORE} )
+
+ #-------------------------------------------------------------------------------
+-# Enable c++0x / c++11
++# Enable c++1y / c++17
+ #-------------------------------------------------------------------------------
+-set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x -DOPENSSL_NO_FILENAMES" )
++set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++17 -DOPENSSL_NO_FILENAMES" )
+
+ #-------------------------------------------------------------------------------
+ # GCC
+ #-------------------------------------------------------------------------------
+ if( CMAKE_COMPILER_IS_GNUCXX )
+- set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x" )
++ set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++17" )
+ set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra" )
+ #-----------------------------------------------------------------------------
+ # Set -Werror only for Debug (or undefined) build type or if we have been
+diff --git a/src/XrdSsi/XrdSsiAtomics.hh b/src/XrdSsi/XrdSsiAtomics.hh
+index 817cacf13..45889d2f8 100644
+--- a/src/XrdSsi/XrdSsiAtomics.hh
++++ b/src/XrdSsi/XrdSsiAtomics.hh
+@@ -34,12 +34,12 @@
+ #undef NEED_ATOMIC_MUTEX
+
+ //-----------------------------------------------------------------------------
+-//! Use native atomics at the c11 or higher level (-std=c++0x -lstdc++)
++//! Use native atomics at the c11 or higher level (-std=c++17 -lstdc++)
+ //-----------------------------------------------------------------------------
+ #if __cplusplus >= 201103L
+ #include <atomic>
+ #define Atomic(type) std::atomic<type>
+-#define Atomic_IMP "C++11"
++#define Atomic_IMP "C++17"
+ #define Atomic_BEG(x)
+ #define Atomic_DEC(x) x.fetch_sub(1,std::memory_order_relaxed)
+ #define Atomic_GET(x) x.load(std::memory_order_relaxed)
+diff --git a/tests/XrdClTests/tls/CMakeLists.txt b/tests/XrdClTests/tls/CMakeLists.txt
+index bf6ee2317..f9ce03ca0 100644
+--- a/tests/XrdClTests/tls/CMakeLists.txt
++++ b/tests/XrdClTests/tls/CMakeLists.txt
+@@ -1,7 +1,7 @@
+
+ include( XRootDCommon )
+
+-set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x" )
++set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++17" )
+
+ #-------------------------------------------------------------------------------
+ # xrdcopy
More information about the arch-commits
mailing list