diff options
author | V3n3RiX <venerix@koprulu.sector> | 2022-09-07 16:36:21 +0100 |
---|---|---|
committer | V3n3RiX <venerix@koprulu.sector> | 2022-09-07 16:36:21 +0100 |
commit | 4f49fc7caa0253a7ab164331f55bd4c70bba1bf7 (patch) | |
tree | a54fc9fe9ce5d43bee554b0c4ef7c26fb45e72d6 /net-libs/xrootd | |
parent | a0e773d57146b0a0ec25567af504a10e6f187811 (diff) |
gentoo auto-resync : 07:09:2022 - 16:36:21
Diffstat (limited to 'net-libs/xrootd')
-rw-r--r-- | net-libs/xrootd/Manifest | 3 | ||||
-rw-r--r-- | net-libs/xrootd/files/xrootd-5.4.3-cmake_no_python.patch | 15 | ||||
-rw-r--r-- | net-libs/xrootd/files/xrootd-5.4.3-python_tests_py3.patch | 169 | ||||
-rw-r--r-- | net-libs/xrootd/xrootd-5.4.3-r2.ebuild | 187 |
4 files changed, 374 insertions, 0 deletions
diff --git a/net-libs/xrootd/Manifest b/net-libs/xrootd/Manifest index 6026ad32b824..ee4733a4f3ba 100644 --- a/net-libs/xrootd/Manifest +++ b/net-libs/xrootd/Manifest @@ -2,10 +2,13 @@ AUX cmsd.initd 885 BLAKE2B 9198afa01850da74519a6869894ebd86313f87781e3e2401d429e AUX frm_purged.initd 895 BLAKE2B c192a3c69d3161a8342242789cfc1559f189c0748cd0bdd1ee6baf9b5ba98c80d8103fa55344e1c9b040a513045c7a473272da46c800ff2afa45a0665a93c3b2 SHA512 f9c09f8baae7ed391d5248f5dfb7a1d4d60f23605b2646e6f3c2ec33b05838918a4ba4874424e9b4e674f1ca127d57760364552f6f948dcd3ef84245730efc30 AUX frm_xfrd.initd 899 BLAKE2B bdfc83f7bbad7e0d7aea91720798c10367c7ac27851414b99013c01d4f9681e010082bfef332ba2cc520afdbef67051ea80ee6922e515a30de32e735f0a6c6a7 SHA512 1c38b20c9b54cab17706c040a90b00df61c9b2f5e4e7a9cc26fa3b125e1d132097222921b5627a33f69b80c8ae5a64cfbaea0a4880588de9fa9d18f6aaa04768 AUX xrootd-4.8.3-crc32.patch 1987 BLAKE2B be57f7be2a897a2399f923e4670d219be79053221cc62ca0f6cf9b7abe6fae4f99dde0ccc72f6617bb07a871a396072db59aa57265382dab7928cbffdac1706e SHA512 4c390ed4329f21839ca2b481408c0114e5d4839cf0b04e673677e175c2e7e92573c9f56ec69660d4f5256c824676f65f9fb6c683d0e77d3b1f97bee7e5f65bc9 +AUX xrootd-5.4.3-cmake_no_python.patch 403 BLAKE2B 8e13c64de9bb8504dae8c309fccfb52a13bf5c86be40493272002437c8b5838c75badbdfc8eef3d04e7f62d15509dda138fcecfd4299794c73bbb92f4665182c SHA512 0d082f52a4c6fd0e569d6df9653065d1438a55c047edefbdb882465a6c83d66bca1c358e64e724a656595a2d1e453adaaa662915d74382508338f3d98e98e44e AUX xrootd-5.4.3-no_automagic.patch 454 BLAKE2B 78fdb01301a342db1ea3685f5513f56449ed69af0e5ecf48545af7c8e2cb00f58b68660b812f64dcdc15df4d1bc303ef127fe85c0b9ea7ebc4a9518ab0d30c11 SHA512 7aa1e7d2f2a86e2222a4bf95ca344994d67bc25dbb3ffce27c36634dcecf8dd828a3072f04dd266014e7fd8cab8a06135959a8ee10f3003dcbaf43ac5658d3e5 +AUX xrootd-5.4.3-python_tests_py3.patch 4491 BLAKE2B 61e3eb0e10de6e746b1447c7a1df8d6345c9533e6285e21263f5e65f8d7c4a6e7d50eef56be48fb9ac88c4efaee488e6f90fe046cbd9b24ace322a8781a5ea5a SHA512 6b854907e1fa45b44492c5224eb977ac7b4682ad1a74319efdf3a9907b252a2bdfd9510fa942f253319b80fa25947b05e3ab2f92b23d7fc1be0282c248741c9d AUX xrootd.confd 651 BLAKE2B a35bf51b82334757dbd27bd48923e59f955361ab009c4b92eef83050d5d4e23904abc2b0b9577f8a5888c875c34bf736cf4072b6684a91ca6ad8cd90fe9a2ba9 SHA512 60ab5b6d77cf79437960044bf201127c8adf5134e7f61a18dcccd2e474a4e41eda971e3ada71dea987716080fb308af98a5237bab2a0b82f50f932ff59e3fdea AUX xrootd.initd 858 BLAKE2B 306970196c9f69db3f94c095c8518b837f5f4723a1cbae273273821e4d77d30a7fe65ac4fccbb640ad5e0b6f879e549dbbc4e799f87b5b5c813d66f2d270af2b SHA512 dcdb75341d904c9850c2bf97393ccbb68ad37b095e0a20ca4dab27b10dd7525874c8ad6e07e5b9c1f3c3566391a50c06dee70622d865fa51a7e73aa4096da955 DIST xrootd-5.4.3.tar.gz 3182127 BLAKE2B ed3f6a943167eafb5f6d7f78ca34f44c9a18b5ed672a4e622acb1e6e6997bd21756a30bf24f0b799ab4f16e7e1fb3f61a042f4e5e00f965b898fc5a287bf995a SHA512 189ec8e20901fd07093494187502e031a60d4ade22af33067313fad7a1bf6a6feb5c5d9d59d3a86d13a6a767e5a93cf4836da02e9cae11c81ccac07199898d72 EBUILD xrootd-5.4.3-r1.ebuild 3236 BLAKE2B 9e1aa0733247cbfde76a1a53b87e9c7e44f58a5465cdc6b5e741757ad8a1a6e8515879d27324f8ee994ccc5fea1433804f27ce7113126b8b0b34f605e54c5787 SHA512 60d917d1737b2053bf23150464590b97c231010d16bd535df2147a3b89b73c261750342f9c1133d7eff5abbd84b0b41232f360eb9928862518937fbb74200274 +EBUILD xrootd-5.4.3-r2.ebuild 4627 BLAKE2B ee921f4275109a9beebf596d13da360e9d9ea7302a3c30b3c585b32fd999c827ac43cf9cdc70d57ec967c47546032990d1bf490fdda9bfcf547ac704a36164ee SHA512 3e89e0f3d32bba82f96a590f32b2bdb65bf3d01acbdab2090b9dace9352fa5538eb77b2bbd2287803f34c8c6469ce7be131e02da23074723e2b44b0e5800a62e EBUILD xrootd-5.4.3.ebuild 3186 BLAKE2B de3810bbf345c8576b7bbc1835905e600d58edfe694eb631214d0c075f0acf11d8ae95e24252f65ede89b8f48d80bce740992fa65dc0fcc892c8c51b362fe91e SHA512 4c89f8a9d3a1dd61130fb63b5b1d8548d1f555e76ffe8dfe1ee9cac112c0a18a8fa07a61bbd758fc1743771f7b92c775d1f5bd73e1ff185eb0dbc0be0a82918a MISC metadata.xml 1124 BLAKE2B 28d63d184e1d3c53c1cc1ec05f9508e0cc99a0a6a14e405aa8cdeddcf20cff0e825d814531826544b58e51b4996948718407ba1269966037ad7f00ab8807b2c7 SHA512 3aac33a0c6eea3f0ea2e105a0c5b000a0d9d423ed1d2cfc10619142aa5de35fa4b27fba6aa224bd95020c5d9ec278a89bbd0468c38d674fb53e989bc738f001e diff --git a/net-libs/xrootd/files/xrootd-5.4.3-cmake_no_python.patch b/net-libs/xrootd/files/xrootd-5.4.3-cmake_no_python.patch new file mode 100644 index 000000000000..04607cdd7b04 --- /dev/null +++ b/net-libs/xrootd/files/xrootd-5.4.3-cmake_no_python.patch @@ -0,0 +1,15 @@ +--- a/bindings/python/CMakeLists.txt ++++ b/bindings/python/CMakeLists.txt +@@ -32,6 +32,7 @@ + + configure_file(${SETUP_PY_IN} ${SETUP_PY}) + ++if (0) + string(FIND "${PIP_OPTIONS}" "--prefix" PIP_OPTIONS_PREFIX_POSITION) + if( "${PIP_OPTIONS_PREFIX_POSITION}" EQUAL "-1" ) + string(APPEND PIP_OPTIONS " --prefix \$ENV{DESTDIR}/${CMAKE_INSTALL_PREFIX}") +@@ -100,3 +101,4 @@ + )" + ) + endif() ++endif() diff --git a/net-libs/xrootd/files/xrootd-5.4.3-python_tests_py3.patch b/net-libs/xrootd/files/xrootd-5.4.3-python_tests_py3.patch new file mode 100644 index 000000000000..e20e45309e39 --- /dev/null +++ b/net-libs/xrootd/files/xrootd-5.4.3-python_tests_py3.patch @@ -0,0 +1,169 @@ +--- a/bindings/python/tests/test_copy.py ++++ b/bindings/python/tests/test_copy.py +@@ -61,15 +61,15 @@ + + class TestProgressHandler(object): + def begin(self, id, total, source, target): +- print '+++ begin(): %d, total: %d' % (id, total) +- print '+++ source: %s' % source +- print '+++ target: %s' % target ++ print('+++ begin(): %d, total: %d' % (id, total)) ++ print('+++ source: %s' % source) ++ print('+++ target: %s' % target) + + def end(self, jobId, status): +- print '+++ end(): jobId: %s, status: %s' % (jobId, status) ++ print('+++ end(): jobId: %s, status: %s' % (jobId, status)) + + def update(self, jobId, processed, total): +- print '+++ update(): jobid: %s, processed: %d, total: %d' % (jobId, processed, total) ++ print('+++ update(): jobid: %s, processed: %d, total: %d' % (jobId, processed, total)) + + def test_copy_progress_handler(): + c = client.CopyProcess() +--- a/bindings/python/tests/test_file.py ++++ b/bindings/python/tests/test_file.py +@@ -289,9 +289,9 @@ + for i, l in enumerate(lines): + total += len(l) + if l != pylines[i]: +- print '!!!!!', total, i +- print '+++++ py: %r' % pylines[i] +- print '+++++ me: %r' % l ++ print('!!!!!', total, i) ++ print('+++++ py: %r' % pylines[i]) ++ print('+++++ me: %r' % l) + break + if pylines[i].endswith('\n'): + assert l.endswith('\n') +--- a/bindings/python/tests/test_filesystem.py ++++ b/bindings/python/tests/test_filesystem.py +@@ -37,20 +37,20 @@ + status, response = f.open(smallfile, OpenFlags.NEW) + + for func, args, hasReturnObject in funcspecs: +- async(func, args, hasReturnObject) ++ run_async(func, args, hasReturnObject) + + def sync(func, args, hasReturnObject): + status, response = func(*args) +- print status ++ print(status) + assert status.ok + if hasReturnObject: +- print response ++ print(response) + assert response + +-def async(func, args, hasReturnObject): ++def run_async(func, args, hasReturnObject): + handler = AsyncResponseHandler() + status = func(callback=handler, *args) +- print status ++ print(status) + assert status.ok + status, response, hostlist = handler.wait() + +@@ -60,7 +60,7 @@ + + for host in hostlist: + assert host.url +- print host.url ++ print(host.url) + + if hasReturnObject: + assert response +@@ -79,7 +79,7 @@ + + try: + os.remove('/tmp/eggs') +- except OSError, __: ++ except OSError as __: + pass + + def test_locate_sync(): +@@ -127,7 +127,7 @@ + + for item in response: + assert item.name +- print item.statinfo ++ print(item.statinfo) + assert item.statinfo + assert item.hostaddr + +@@ -143,11 +143,11 @@ + assert status.ok + + for h in hostlist: +- print h.url ++ print(h.url) + + for item in response: + assert item.name +- print item.statinfo ++ print(item.statinfo) + assert item.statinfo + assert item.hostaddr + +@@ -158,7 +158,7 @@ + status, response = c.query(QueryCode.STATS, 'a') + assert status.ok + assert response +- print response ++ print(response) + + def test_query_async(): + c = client.FileSystem(SERVER_URL) +@@ -169,7 +169,7 @@ + status, response, hostlist = handler.wait() + assert status.ok + assert response +- print response ++ print(response) + + def test_mkdir_flags(): + c = client.FileSystem(SERVER_URL) +--- a/bindings/python/tests/test_glob.py ++++ b/bindings/python/tests/test_glob.py +@@ -2,7 +2,7 @@ + import os + import glob as norm_glob + import XRootD.client.glob_funcs as glob +-from pathlib2 import Path ++from pathlib import Path + + + @pytest.fixture +@@ -13,7 +13,7 @@ + subdir2.mkdir() + for i in range(3): + dummy = subdir1 / ("a_file_%d.txt" % i) +- dummy.write_text(u"This is file %d\n" % i, encoding="utf-8") ++ dummy.write_text("This is file %d\n" % i, encoding="utf-8") + return tmpdir + + +--- a/bindings/python/tests/test_threads.py ++++ b/bindings/python/tests/test_threads.py +@@ -15,10 +15,10 @@ + s, _ = self.file.write(smallbuffer) + assert s.ok + +- print '+++ thread %d says: %s' % (self.id, self.file.read()) ++ print('+++ thread %d says: %s' % (self.id, self.file.read())) + + for line in self.file: +- print '+++ thread %d says: %s' % (self.id, line) ++ print('+++ thread %d says: %s' % (self.id, line)) + + self.file.close() + +@@ -28,7 +28,7 @@ + # assert f.is_open() + # f.write(smallbuffer) + +- for i in xrange(3): ++ for i in range(3): + tt = TestThread(f, i) + tt.start() + tt.join() diff --git a/net-libs/xrootd/xrootd-5.4.3-r2.ebuild b/net-libs/xrootd/xrootd-5.4.3-r2.ebuild new file mode 100644 index 000000000000..835ba9ab3318 --- /dev/null +++ b/net-libs/xrootd/xrootd-5.4.3-r2.ebuild @@ -0,0 +1,187 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +PYTHON_COMPAT=( python3_{8..11} ) +DISTUTILS_OPTIONAL=1 +DISTUTILS_USE_PEP571="setuptools" + +inherit cmake distutils-r1 + +DESCRIPTION="Extended ROOT remote file server" +HOMEPAGE="https://xrootd.slac.stanford.edu/" +SRC_URI="https://xrootd.slac.stanford.edu/download/v${PV}/${P}.tar.gz" + +LICENSE="LGPL-3" +SLOT="0" +KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux" +IUSE="doc examples fuse http kerberos +libxml2 python readline +server systemd test" + +RESTRICT="!test? ( test )" + +CDEPEND="acct-group/xrootd + acct-user/xrootd + dev-libs/openssl:0= + sys-libs/zlib + virtual/libcrypt:= + fuse? ( sys-fs/fuse:0= ) + http? ( net-misc/curl:= ) + kerberos? ( virtual/krb5 ) + libxml2? ( dev-libs/libxml2:2= ) + python? ( ${PYTHON_DEPS} ) + readline? ( sys-libs/readline:0= ) + systemd? ( sys-apps/systemd:= ) +" +DEPEND="${CDEPEND}" +BDEPEND=" + doc? ( + app-doc/doxygen[dot] + virtual/latex-base + python? ( dev-python/sphinx ) + ) + python? ( + ${PYTHON_DEPS} + ${DISTUTILS_DEPS} + test? ( >=dev-python/pytest-7.1.2[${PYTHON_USEDEP}] ) + ) + test? ( dev-util/cppunit ) +" +RDEPEND="${CDEPEND} + dev-lang/perl +" +REQUIRED_USE=" + http? ( kerberos ) + python? ( ${PYTHON_REQUIRED_USE} ) + test? ( server ) +" + +PATCHES=( + "${FILESDIR}"/${PN}-4.8.3-crc32.patch + "${FILESDIR}"/${PN}-5.4.3-no_automagic.patch + "${FILESDIR}"/${PN}-5.4.3-cmake_no_python.patch + "${FILESDIR}"/${PN}-5.4.3-python_tests_py3.patch +) + +# xrootd plugins are not intended to be linked with, +# they are to be loaded at runtime by xrootd, +# see https://github.com/xrootd/xrootd/issues/447 +QA_SONAME="/usr/lib.*/libXrd.*-$(ver_cut 1)\.so + /usr/lib.*/libXrdClTests\.so" + +pkg_setup() { + use python && python_setup +} + +src_prepare() { + cmake_src_prepare + + if use python; then + pushd "${S}"/bindings/python > /dev/null || die + distutils-r1_src_prepare + popd > /dev/null || die + fi +} + +# FIXME: support xrdec - currently only builds against bundled isa-l +src_configure() { + local mycmakeargs=( + -DENABLE_FUSE=$(usex fuse) + -DENABLE_HTTP=$(usex http) + -DENABLE_KRB5=$(usex kerberos) + -DENABLE_LIBXML2=$(usex libxml2) + -DENABLE_PYTHON=$(usex python) + -DENABLE_READLINE=$(usex readline) + -DENABLE_TESTS=$(usex test) + -DENABLE_VOMS=no + -DFORCE_ENABLED=yes + -DXRDCL_ONLY=$(usex server "no" "yes") + ) + cmake_src_configure + + if use python; then + pushd "${BUILD_DIR}"/bindings/python > /dev/null || die + distutils-r1_src_configure + popd > /dev/null || die + fi +} + +src_compile() { + cmake_src_compile + if use doc; then + doxygen Doxyfile || die + if use python; then + emake -C bindings/python/docs html + fi + fi + if use python; then + pushd "${BUILD_DIR}"/bindings/python > /dev/null || die + distutils-r1_src_compile + popd > /dev/null || die + fi +} + +python_test() { + epytest +} + +src_test() { + pushd "${BUILD_DIR}/tests" > /dev/null || die + # There are more tests but since these are ones currently run by upstream in their CI, + # let's follow their example. + ./common/test-runner ./XrdClTests/libXrdClTests.so "All Tests/UtilsTest/" || die + ./common/test-runner ./XrdClTests/libXrdClTests.so "All Tests/SocketTest/" || die + ./common/test-runner ./XrdClTests/libXrdClTests.so "All Tests/PollerTest/" || die + popd > /dev/null || die + + # Python tests currently require manual configuration and start-up of an xrootd server. + # TODO: get this to run properly. + #use python && distutils-r1_src_test +} + +src_install() { + use doc && HTML_DOCS=( doxydoc/html/. ) + dodoc docs/ReleaseNotes.txt + cmake_src_install + find "${D}" \( -iname '*.md5' -o -iname '*.map' \) -delete || die + + # base configs + insinto /etc/xrootd + doins packaging/common/*.cfg + + fowners root:xrootd /etc/xrootd + keepdir /var/log/xrootd + fowners xrootd:xrootd /var/log/xrootd + + if use server; then + local i + for i in cmsd frm_purged frm_xfrd xrootd; do + newinitd "${FILESDIR}"/${i}.initd ${i} + done + # all daemons MUST use single master config file + newconfd "${FILESDIR}"/xrootd.confd xrootd + fi + + if use python; then + pushd "${BUILD_DIR}"/bindings/python > /dev/null || die + distutils-r1_src_install + popd > /dev/null || die + + if use doc; then + docinto python + docompress -x "/usr/share/doc/${PF}/python/html" + dodoc -r bindings/python/docs/build/html + fi + if use examples; then + docinto python + dodoc -r bindings/python/examples + fi + fi + + if use test; then + for f in test-runner xrdshmap; do + rm "${ED}"/usr/bin/${f} || die "Failed to remove test helper ${f} from installed tree" + done + rm "${ED}"/usr/$(get_libdir)/libXrdClTest*.so || die "Failed to remove test libraries from installed tree" + fi +} |