Github messages for voidlinux
 help / color / mirror / Atom feed
* [PR PATCH] xrootd: update to 5.6.5
@ 2024-01-22 15:19 BenJarg
  2024-01-22 15:22 ` [PR PATCH] [Updated] " BenJarg
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: BenJarg @ 2024-01-22 15:19 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 556 bytes --]

There is a new pull request by BenJarg against master on the void-packages repository

https://github.com/BenJarg/void-packages xrootd-5.6.5
https://github.com/void-linux/void-packages/pull/48324

xrootd: update to 5.6.5

#### Testing the changes
- I tested the changes in this PR: **briefly**

#### Local build testing
- I built this PR locally for my native architecture, (x86_64-glibc)
- I built this PR locally for these architectures:
  - x86_64-musl


A patch file from https://github.com/void-linux/void-packages/pull/48324.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-xrootd-5.6.5-48324.patch --]
[-- Type: text/x-diff, Size: 16855 bytes --]

From cbac7dd44cb6cb7b3c9e2bf81f3b4bae9781c791 Mon Sep 17 00:00:00 2001
From: Ben Jargowsky <bjargowsky@proton.me>
Date: Mon, 22 Jan 2024 16:15:27 +0100
Subject: [PATCH] xrootd: update to 5.6.5

---
 srcpkgs/xrootd/patches/musl.patch | 460 ------------------------------
 srcpkgs/xrootd/template           |   4 +-
 2 files changed, 2 insertions(+), 462 deletions(-)
 delete mode 100644 srcpkgs/xrootd/patches/musl.patch

diff --git a/srcpkgs/xrootd/patches/musl.patch b/srcpkgs/xrootd/patches/musl.patch
deleted file mode 100644
index 901970620d8e6..0000000000000
--- a/srcpkgs/xrootd/patches/musl.patch
+++ /dev/null
@@ -1,460 +0,0 @@
-diff --git a/cmake/XRootDOSDefs.cmake b/cmake/XRootDOSDefs.cmake
-index 8b182e61e..9f7c9aa59 100644
---- a/cmake/XRootDOSDefs.cmake
-+++ b/cmake/XRootDOSDefs.cmake
-@@ -70,6 +70,21 @@ if( ${CMAKE_SYSTEM_NAME} STREQUAL "Linux" )
-   set( LINUX TRUE )
-   include( GNUInstallDirs )
-   set( EXTRA_LIBS rt )
-+
-+  # Check for musl libc with the compiler, since it provides way to detect it
-+  execute_process(COMMAND ${CMAKE_CXX_COMPILER} -dumpmachine
-+    OUTPUT_VARIABLE TARGET_TRIPLE ERROR_VARIABLE TARGET_ERROR)
-+
-+  if (NOT TARGET_ERROR)
-+    if ("${TARGET_TRIPLE}" MATCHES "musl")
-+      message(STATUS "Detected musl libc")
-+      add_definitions(-DMUSL=1)
-+    endif()
-+  else()
-+    message(WARNING "Could not detect system information!")
-+  endif()
-+
-+  unset(TARGET_ERROR)
- endif()
- 
- #-------------------------------------------------------------------------------
-diff --git a/src/Xrd/XrdConfig.hh b/src/Xrd/XrdConfig.hh
-index a06ad462f..2d1403a5e 100644
---- a/src/Xrd/XrdConfig.hh
-+++ b/src/Xrd/XrdConfig.hh
-@@ -34,6 +34,8 @@
- #include "Xrd/XrdProtLoad.hh"
- #include "Xrd/XrdProtocol.hh"
- 
-+#include <sys/types.h>
-+
- class XrdSysError;
- class XrdTcpMonInfo;
- class XrdNetSecurity;
-diff --git a/src/Xrd/XrdPoll.hh b/src/Xrd/XrdPoll.hh
-index 3790b03b0..d9bda5d62 100644
---- a/src/Xrd/XrdPoll.hh
-+++ b/src/Xrd/XrdPoll.hh
-@@ -29,7 +29,7 @@
- /* specific prior written permission of the institution or contributor.       */
- /******************************************************************************/
- 
--#include <sys/poll.h>
-+#include <poll.h>
- #include "XrdSys/XrdSysPthread.hh"
- 
- #define XRD_NUMPOLLERS 3
-diff --git a/src/XrdAcc/XrdAccGroups.cc b/src/XrdAcc/XrdAccGroups.cc
-index e663fdd35..94b8edbc7 100644
---- a/src/XrdAcc/XrdAccGroups.cc
-+++ b/src/XrdAcc/XrdAccGroups.cc
-@@ -46,6 +46,14 @@
- #include "XrdAcc/XrdAccGroups.hh"
- #include "XrdAcc/XrdAccPrivs.hh"
- 
-+#ifdef MUSL
-+int innetgr(const char *netgroup, const char *host, const char *user,
-+             const char *domain)
-+{
-+   return 0;
-+}
-+#endif
-+
- // Additionally, this routine does not support a user in more than
- // NGROUPS_MAX groups. This is a standard unix limit defined in limits.h.
-   
-diff --git a/src/XrdCl/XrdClFileStateHandler.hh b/src/XrdCl/XrdClFileStateHandler.hh
-index 197151321..f83538819 100644
---- a/src/XrdCl/XrdClFileStateHandler.hh
-+++ b/src/XrdCl/XrdClFileStateHandler.hh
-@@ -39,6 +39,7 @@
- #include <set>
- #include <vector>
- 
-+#include <sys/time.h>
- #include <sys/uio.h>
- #include <cstdint>
- 
-diff --git a/src/XrdCl/XrdClMonitor.hh b/src/XrdCl/XrdClMonitor.hh
-index 2fc753777..2b3a96c46 100644
---- a/src/XrdCl/XrdClMonitor.hh
-+++ b/src/XrdCl/XrdClMonitor.hh
-@@ -43,6 +43,8 @@
- 
- #include "XrdCl/XrdClFileSystem.hh"
- 
-+#include <sys/time.h>
-+
- namespace XrdCl
- {
-   class URL;
-diff --git a/src/XrdNet/XrdNetMsg.cc b/src/XrdNet/XrdNetMsg.cc
-index fa6c16f87..f97e1af09 100644
---- a/src/XrdNet/XrdNetMsg.cc
-+++ b/src/XrdNet/XrdNetMsg.cc
-@@ -29,7 +29,7 @@
- /******************************************************************************/
- 
- #include <cerrno>
--#include <sys/poll.h>
-+#include <poll.h>
- 
- #include "XrdNet/XrdNet.hh"
- #include "XrdNet/XrdNetMsg.hh"
-diff --git a/src/XrdNet/XrdNetSecurity.cc b/src/XrdNet/XrdNetSecurity.cc
-index 0f8451127..0faf563dd 100644
---- a/src/XrdNet/XrdNetSecurity.cc
-+++ b/src/XrdNet/XrdNetSecurity.cc
-@@ -40,11 +40,6 @@
- #include <sys/types.h>
- #include <Winsock2.h>
- #include <io.h>
--int innetgr(const char *netgroup, const char *host, const char *user,
--             const char *domain)
--{
--   return 0;
--}
- #include "XrdSys/XrdWin32.hh"
- #endif
- 
-@@ -53,6 +48,14 @@ int innetgr(const char *netgroup, const char *host, const char *user,
- #include "XrdNet/XrdNetUtils.hh"
- #include "XrdSys/XrdSysTrace.hh"
- 
-+#if defined(MUSL) || defined(WIN32)
-+int innetgr(const char *netgroup, const char *host, const char *user,
-+             const char *domain)
-+{
-+   return 0;
-+}
-+#endif
-+
- /******************************************************************************/
- /*                         L o c a l   C l a s s e s                          */
- /******************************************************************************/
-diff --git a/src/XrdOfs/XrdOfsHandle.cc b/src/XrdOfs/XrdOfsHandle.cc
-index 963f17a5a..26b40ce08 100644
---- a/src/XrdOfs/XrdOfsHandle.cc
-+++ b/src/XrdOfs/XrdOfsHandle.cc
-@@ -30,7 +30,7 @@
- 
- #include <cstdio>
- #include <ctime>
--#include <sys/errno.h>
-+#include <errno.h>
- #include <sys/types.h>
- 
- #include "XrdOfs/XrdOfsHandle.hh"
-diff --git a/src/XrdOssCsi/XrdOssCsiTagstoreFile.hh b/src/XrdOssCsi/XrdOssCsiTagstoreFile.hh
-index b1a94acd6..0202579cc 100644
---- a/src/XrdOssCsi/XrdOssCsiTagstoreFile.hh
-+++ b/src/XrdOssCsi/XrdOssCsiTagstoreFile.hh
-@@ -38,9 +38,7 @@
- #include <memory>
- #include <mutex>
- 
--#if defined(__GLIBC__) || defined(__BIONIC__) || defined(__CYGWIN__)
--#include <byteswap.h>
--#elif defined(__APPLE__)
-+#if defined(__APPLE__)
- // Make sure that byte swap functions are not already defined.
- #if !defined(bswap_16)
- // Mac OS X / Darwin features
-@@ -49,6 +47,8 @@
- #define bswap_32(x) OSSwapInt32(x)
- #define bswap_64(x) OSSwapInt64(x)
- #endif
-+#else
-+#include <byteswap.h>
- #endif
- 
- class XrdOssCsiTagstoreFile : public XrdOssCsiTagstore
-diff --git a/src/XrdOuc/XrdOucBackTrace.cc b/src/XrdOuc/XrdOucBackTrace.cc
-index 813183c32..c61a89b63 100644
---- a/src/XrdOuc/XrdOucBackTrace.cc
-+++ b/src/XrdOuc/XrdOucBackTrace.cc
-@@ -34,7 +34,7 @@
- #include <vector>
- #include <sys/syscall.h>
- 
--#ifdef __GNUC__
-+#ifndef MUSL /* glibc, uclibc, and macOS all have execinfo.h */
- #include <execinfo.h>
- #include <cxxabi.h>
- #endif
-@@ -176,13 +176,11 @@ XrdInfo *CvtRsp(const char *name, int snum)
- /*                              D e m a n g l e                               */
- /******************************************************************************/
-   
-+#ifndef MUSL
- namespace
- {
- int Demangle(char *cSym, char *buff, int blen)
- {
--#ifndef __GNUC__
--   return -1;
--#else
-    int   status;
-    char *plus = index(cSym, '+');
-    char *brak = (plus ? index(plus, '[') : 0);
-@@ -201,7 +199,6 @@ int Demangle(char *cSym, char *buff, int blen)
-    status = snprintf(buff, blen, "%s %s+%s\n", brak, realname, plus+1);
-    free(realname);
-    return status;
--#endif
- }
- }
- 
-@@ -221,6 +218,7 @@ int DumpDepth()
-    return (depth <= maxDepth ? depth : maxDepth);
- }
- }
-+#endif
- 
- /******************************************************************************/
- /*                             D u m p S t a c k                              */
-@@ -230,8 +228,8 @@ namespace
- {
- void DumpStack(char *bP, int bL, TidType tid)
- {
--#ifndef __GNUC__
--   snprintf(bP, bL, "TBT " TidFmt " No stack information available, not gnuc.", tid);
-+#ifdef MUSL
-+   snprintf(bP, bL, "TBT " TidFmt " No stack information available with musl libc.", tid);
-    return;
- #else
-    static int btDepth = DumpDepth(); // One time MT-safe call
-diff --git a/src/XrdPosix/XrdPosix.cc b/src/XrdPosix/XrdPosix.cc
-index 0f32dc2ee..e4f020c09 100644
---- a/src/XrdPosix/XrdPosix.cc
-+++ b/src/XrdPosix/XrdPosix.cc
-@@ -53,6 +53,58 @@
-   
- extern XrdPosixLinkage   Xunix;
- 
-+/******************************************************************************/
-+/*                      U t i l i t y  F u n c t i o n s                      */
-+/******************************************************************************/
-+
-+#ifdef MUSL
-+#include <stdio_ext.h>
-+#endif
-+
-+static inline void fseterr(FILE *fp)
-+{
-+  /* Most systems provide FILE as a struct and the necessary bitmask in
-+     <stdio.h>, because they need it for implementing getc() and putc() as
-+     fast macros. This function is based on gnulib's fseterr.c */
-+#if defined _IO_ERR_SEEN || defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1
-+  /* GNU libc, BeOS, Haiku, Linux libc5 */
-+  fp->_flags |= _IO_ERR_SEEN;
-+#elif defined __sferror || defined __APPLE__ || defined __DragonFly__ || defined __ANDROID__
-+  /* FreeBSD, NetBSD, OpenBSD, DragonFly, Mac OS X, Cygwin, Minix 3, Android */
-+  fp->_flags |= __SERR;
-+#elif defined _IOERR
-+  /* AIX, HP-UX, IRIX, OSF/1, Solaris, OpenServer, UnixWare, mingw, MSVC, NonStop Kernel, OpenVMS */
-+  fp->_flag |= _IOERR;
-+#elif defined __UCLIBC__            /* uClibc */
-+  fp->__modeflags |= __FLAG_ERROR;
-+#elif defined MUSL /* musl libc */
-+  __fseterr(fp);
-+#else
-+ #error "Unsupported platform! Please report it as a bug."
-+#endif
-+}
-+
-+static inline void fseteof(FILE *fp)
-+{
-+  /* Most systems provide FILE as a struct and the necessary bitmask in
-+     <stdio.h>, because they need it for implementing getc() and putc() as
-+     fast macros.  */
-+#if defined _IO_EOF_SEEN || defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1
-+  /* GNU libc, BeOS, Haiku, Linux libc5 */
-+  fp->_flags |= _IO_EOF_SEEN;
-+#elif defined __sferror || defined __APPLE__ || defined __DragonFly__ || defined __ANDROID__
-+  /* FreeBSD, NetBSD, OpenBSD, DragonFly, Mac OS X, Cygwin, Minix 3, Android */
-+  fp->_flags |= __SEOF;
-+#elif defined _IOEOF
-+  /* AIX, HP-UX, IRIX, OSF/1, Solaris, OpenServer, UnixWare, mingw, MSVC, NonStop Kernel, OpenVMS */
-+  fp->_flag |= _IOEOF;
-+#elif defined __UCLIBC__            /* uClibc */
-+  fp->__modeflags |= __FLAG_EOF;
-+#else
-+  (void) fseek(fp, 0L, SEEK_END);
-+#endif
-+}
-+
- /******************************************************************************/
- /*                       X r d P o s i x _ A c c e s s                        */
- /******************************************************************************/
-@@ -308,19 +360,9 @@ size_t XrdPosix_Fread(void *ptr, size_t size, size_t nitems, FILE *stream)
- 
- // Get the right return code. Note that we cannot emulate the flags in sunx86
- //
--        if (bytes > 0 && size) rc = bytes/size;
--#ifndef SUNX86
--#if defined(__linux__) || defined(__GNU__) || (defined(__FreeBSD_kernel__) && defined(__GLIBC__))
--   else if (bytes < 0) stream->_flags |= _IO_ERR_SEEN;
--   else                stream->_flags |= _IO_EOF_SEEN;
--#elif defined(__APPLE__) || defined(__FreeBSD__)
--   else if (bytes < 0) stream->_flags |= __SEOF;
--   else                stream->_flags |= __SERR;
--#else
--   else if (bytes < 0) stream->_flag  |= _IOERR;
--   else                stream->_flag  |= _IOEOF;
--#endif
--#endif
-+   if (bytes > 0 && size) rc = bytes/size;
-+   else if (bytes < 0) fseterr(stream);
-+   else                fseteof(stream);
- 
-    return rc;
- }
-@@ -477,18 +519,10 @@ size_t XrdPosix_Fwrite(const void *ptr, size_t size, size_t nitems, FILE *stream
- 
-    bytes = Xroot.Write(fd, ptr, size*nitems);
- 
--// Get the right return code. Note that we cannot emulate the flags in sunx86
-+// Get the right return code.
- //
-    if (bytes > 0 && size) rc = bytes/size;
--#ifndef SUNX86
--#if defined(__linux__) || defined(__GNU__) || (defined(__FreeBSD_kernel__) && defined(__GLIBC__))
--      else stream->_flags |= _IO_ERR_SEEN;
--#elif defined(__APPLE__) || defined(__FreeBSD__)
--      else stream->_flags |= __SERR;
--#else
--      else stream->_flag  |= _IOERR;
--#endif
--#endif
-+   else fseterr(stream);
- 
-    return rc;
- }
-diff --git a/src/XrdPosix/XrdPosixFile.hh b/src/XrdPosix/XrdPosixFile.hh
-index 4d77b88d3..6d99cf464 100644
---- a/src/XrdPosix/XrdPosixFile.hh
-+++ b/src/XrdPosix/XrdPosixFile.hh
-@@ -35,6 +35,7 @@
- #include <sys/time.h>
- #include <sys/param.h>
- #include <sys/resource.h>
-+#include <sys/types.h>
- #include <sys/uio.h>
- 
- #include "XrdCl/XrdClFileSystem.hh"
-diff --git a/src/XrdPosix/XrdPosixLinkage.hh b/src/XrdPosix/XrdPosixLinkage.hh
-index 903153252..b5cc6d4b4 100644
---- a/src/XrdPosix/XrdPosixLinkage.hh
-+++ b/src/XrdPosix/XrdPosixLinkage.hh
-@@ -40,6 +40,7 @@
- #include <unistd.h>
- 
- #include "XrdPosix/XrdPosixOsDep.hh"
-+#include "XrdPosix/XrdPosixXrootd.hh"
- #include "XrdSys/XrdSysPlatform.hh"
- 
- /******************************************************************************/
-diff --git a/src/XrdPosix/XrdPosixPreload.cc b/src/XrdPosix/XrdPosixPreload.cc
-index a62f0c658..8db1400d4 100644
---- a/src/XrdPosix/XrdPosixPreload.cc
-+++ b/src/XrdPosix/XrdPosixPreload.cc
-@@ -45,6 +45,22 @@
- /******************************************************************************/
- 
- #include "XrdPosix/XrdPosixExtern.hh"
-+
-+#ifdef MUSL
-+#undef creat64
-+#undef fseeko64
-+#undef ftello64
-+#undef ftruncate64
-+#undef lseek64
-+#undef open64
-+#undef pread64
-+#undef pwrite64
-+#undef readdir64
-+#undef readdir64_r
-+#undef statfs64
-+#undef statvfs64
-+#undef truncate64
-+#endif
-  
- /******************************************************************************/
- /*                   G l o b a l   D e c l a r a t i o n s                    */
-diff --git a/src/XrdSys/XrdSysPlatform.hh b/src/XrdSys/XrdSysPlatform.hh
-index a1ac544ad..eaeaeabac 100644
---- a/src/XrdSys/XrdSysPlatform.hh
-+++ b/src/XrdSys/XrdSysPlatform.hh
-@@ -241,16 +241,8 @@ extern "C"
- #if defined(_AIX) || \
-    (defined(XR__SUNGCC3) && !defined(__arch64__))
- #   define SOCKLEN_t size_t
--#elif defined(XR__GLIBC) || \
--   defined(__FreeBSD__) || \
--   (defined(__FreeBSD_kernel__) && defined(__GLIBC__)) || \
--   (defined(XR__SUNGCC3) && defined(__arch64__)) || defined(__APPLE__) || \
--   (defined(__sun) && defined(_SOCKLEN_T))
--#   ifndef SOCKLEN_t
--#      define SOCKLEN_t socklen_t
--#   endif
- #elif !defined(SOCKLEN_t)
--#   define SOCKLEN_t int
-+#   define SOCKLEN_t socklen_t
- #endif
- 
- #ifdef _LP64
-diff --git a/src/XrdSys/XrdSysPthread.hh b/src/XrdSys/XrdSysPthread.hh
-index 17f8fd0be..6d9802460 100644
---- a/src/XrdSys/XrdSysPthread.hh
-+++ b/src/XrdSys/XrdSysPthread.hh
-@@ -351,7 +351,7 @@ enum PrefType {prefWR=1};
- 
-         XrdSysRWLock(PrefType ptype)
-                     {
--#ifdef __linux__
-+#if defined(__linux__) && (defined(__GLIBC__) || defined(__UCLIBC__))
-                      pthread_rwlockattr_t attr;
-                      pthread_rwlockattr_setkind_np(&attr,
-                              PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP);
-@@ -367,7 +367,7 @@ enum PrefType {prefWR=1};
- inline void ReInitialize(PrefType ptype)
- {
-   pthread_rwlock_destroy(&lock);
--#ifdef __linux__
-+#if defined(__linux__) && (defined(__GLIBC__) || defined(__UCLIBC__))
-   pthread_rwlockattr_t attr;
-   pthread_rwlockattr_setkind_np(&attr,
-                      PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP);
-diff --git a/src/XrdTls/XrdTlsTempCA.cc b/src/XrdTls/XrdTlsTempCA.cc
-index faf69785f..37431dee9 100644
---- a/src/XrdTls/XrdTlsTempCA.cc
-+++ b/src/XrdTls/XrdTlsTempCA.cc
-@@ -30,7 +30,7 @@
- #include <cstdlib>
- #include <fcntl.h>
- #include <dirent.h>
--#include <sys/poll.h>
-+#include <poll.h>
- 
- #include <unordered_set>
- #include <memory>
-diff --git a/src/XrdVoms/XrdVomsMapfile.cc b/src/XrdVoms/XrdVomsMapfile.cc
-index 8ffbe9218..fddbfdc06 100644
---- a/src/XrdVoms/XrdVomsMapfile.cc
-+++ b/src/XrdVoms/XrdVomsMapfile.cc
-@@ -40,7 +40,7 @@
- #include <vector>
- #include <string>
- #include <fcntl.h>
--#include <sys/poll.h>
-+#include <poll.h>
- 
- bool XrdVomsMapfile::tried_configure = false;
- std::unique_ptr<XrdVomsMapfile> XrdVomsMapfile::mapper;
diff --git a/srcpkgs/xrootd/template b/srcpkgs/xrootd/template
index 5fb1164c2eda8..c6ce697310c98 100644
--- a/srcpkgs/xrootd/template
+++ b/srcpkgs/xrootd/template
@@ -1,6 +1,6 @@
 # Template file for 'xrootd'
 pkgname=xrootd
-version=5.5.5
+version=5.6.5
 revision=3
 build_style=cmake
 configure_args="-DENABLE_TESTS=ON -DCMAKE_BUILD_TYPE=Release"
@@ -13,7 +13,7 @@ maintainer="Ben Jargowsky <benjar63@gmail.com>"
 license="LGPL-3.0-or-later"
 homepage="https://xrootd.slac.stanford.edu"
 distfiles="http://xrootd.org/download/v${version}/xrootd-${version}.tar.gz"
-checksum=0710caae527082e73d3bf8f9d1dffe95808afd3fcaaaa15ab0b937b8b226bc1f
+checksum=600874e7c5cdb11d20d6bd6c549b04a3c5beb230d755829726cd15fab99073b1
 
 if [ "$XBPS_TARGET_LIBC" = musl ]; then
 	configure_args+=" -DCMAKE_CXX_STANDARD_LIBRARIES=-lexecinfo"

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PR PATCH] [Updated] xrootd: update to 5.6.5
  2024-01-22 15:19 [PR PATCH] xrootd: update to 5.6.5 BenJarg
@ 2024-01-22 15:22 ` BenJarg
  2024-01-28  4:33 ` BenJarg
  2024-02-03 20:21 ` [PR PATCH] [Merged]: xrootd: update to 5.6.6 cinerea0
  2 siblings, 0 replies; 4+ messages in thread
From: BenJarg @ 2024-01-22 15:22 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 561 bytes --]

There is an updated pull request by BenJarg against master on the void-packages repository

https://github.com/BenJarg/void-packages xrootd-5.6.5
https://github.com/void-linux/void-packages/pull/48324

xrootd: update to 5.6.5

#### Testing the changes
- I tested the changes in this PR: **briefly**

#### Local build testing
- I built this PR locally for my native architecture, (x86_64-glibc)
- I built this PR locally for these architectures:
  - x86_64-musl


A patch file from https://github.com/void-linux/void-packages/pull/48324.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-xrootd-5.6.5-48324.patch --]
[-- Type: text/x-diff, Size: 16894 bytes --]

From 0934e7aab93ada2cebf9eff63a15f1c434fda416 Mon Sep 17 00:00:00 2001
From: Ben Jargowsky <bjargowsky@proton.me>
Date: Mon, 22 Jan 2024 16:15:27 +0100
Subject: [PATCH] xrootd: update to 5.6.5

---
 srcpkgs/xrootd/patches/musl.patch | 460 ------------------------------
 srcpkgs/xrootd/template           |   6 +-
 2 files changed, 3 insertions(+), 463 deletions(-)
 delete mode 100644 srcpkgs/xrootd/patches/musl.patch

diff --git a/srcpkgs/xrootd/patches/musl.patch b/srcpkgs/xrootd/patches/musl.patch
deleted file mode 100644
index 901970620d8e6..0000000000000
--- a/srcpkgs/xrootd/patches/musl.patch
+++ /dev/null
@@ -1,460 +0,0 @@
-diff --git a/cmake/XRootDOSDefs.cmake b/cmake/XRootDOSDefs.cmake
-index 8b182e61e..9f7c9aa59 100644
---- a/cmake/XRootDOSDefs.cmake
-+++ b/cmake/XRootDOSDefs.cmake
-@@ -70,6 +70,21 @@ if( ${CMAKE_SYSTEM_NAME} STREQUAL "Linux" )
-   set( LINUX TRUE )
-   include( GNUInstallDirs )
-   set( EXTRA_LIBS rt )
-+
-+  # Check for musl libc with the compiler, since it provides way to detect it
-+  execute_process(COMMAND ${CMAKE_CXX_COMPILER} -dumpmachine
-+    OUTPUT_VARIABLE TARGET_TRIPLE ERROR_VARIABLE TARGET_ERROR)
-+
-+  if (NOT TARGET_ERROR)
-+    if ("${TARGET_TRIPLE}" MATCHES "musl")
-+      message(STATUS "Detected musl libc")
-+      add_definitions(-DMUSL=1)
-+    endif()
-+  else()
-+    message(WARNING "Could not detect system information!")
-+  endif()
-+
-+  unset(TARGET_ERROR)
- endif()
- 
- #-------------------------------------------------------------------------------
-diff --git a/src/Xrd/XrdConfig.hh b/src/Xrd/XrdConfig.hh
-index a06ad462f..2d1403a5e 100644
---- a/src/Xrd/XrdConfig.hh
-+++ b/src/Xrd/XrdConfig.hh
-@@ -34,6 +34,8 @@
- #include "Xrd/XrdProtLoad.hh"
- #include "Xrd/XrdProtocol.hh"
- 
-+#include <sys/types.h>
-+
- class XrdSysError;
- class XrdTcpMonInfo;
- class XrdNetSecurity;
-diff --git a/src/Xrd/XrdPoll.hh b/src/Xrd/XrdPoll.hh
-index 3790b03b0..d9bda5d62 100644
---- a/src/Xrd/XrdPoll.hh
-+++ b/src/Xrd/XrdPoll.hh
-@@ -29,7 +29,7 @@
- /* specific prior written permission of the institution or contributor.       */
- /******************************************************************************/
- 
--#include <sys/poll.h>
-+#include <poll.h>
- #include "XrdSys/XrdSysPthread.hh"
- 
- #define XRD_NUMPOLLERS 3
-diff --git a/src/XrdAcc/XrdAccGroups.cc b/src/XrdAcc/XrdAccGroups.cc
-index e663fdd35..94b8edbc7 100644
---- a/src/XrdAcc/XrdAccGroups.cc
-+++ b/src/XrdAcc/XrdAccGroups.cc
-@@ -46,6 +46,14 @@
- #include "XrdAcc/XrdAccGroups.hh"
- #include "XrdAcc/XrdAccPrivs.hh"
- 
-+#ifdef MUSL
-+int innetgr(const char *netgroup, const char *host, const char *user,
-+             const char *domain)
-+{
-+   return 0;
-+}
-+#endif
-+
- // Additionally, this routine does not support a user in more than
- // NGROUPS_MAX groups. This is a standard unix limit defined in limits.h.
-   
-diff --git a/src/XrdCl/XrdClFileStateHandler.hh b/src/XrdCl/XrdClFileStateHandler.hh
-index 197151321..f83538819 100644
---- a/src/XrdCl/XrdClFileStateHandler.hh
-+++ b/src/XrdCl/XrdClFileStateHandler.hh
-@@ -39,6 +39,7 @@
- #include <set>
- #include <vector>
- 
-+#include <sys/time.h>
- #include <sys/uio.h>
- #include <cstdint>
- 
-diff --git a/src/XrdCl/XrdClMonitor.hh b/src/XrdCl/XrdClMonitor.hh
-index 2fc753777..2b3a96c46 100644
---- a/src/XrdCl/XrdClMonitor.hh
-+++ b/src/XrdCl/XrdClMonitor.hh
-@@ -43,6 +43,8 @@
- 
- #include "XrdCl/XrdClFileSystem.hh"
- 
-+#include <sys/time.h>
-+
- namespace XrdCl
- {
-   class URL;
-diff --git a/src/XrdNet/XrdNetMsg.cc b/src/XrdNet/XrdNetMsg.cc
-index fa6c16f87..f97e1af09 100644
---- a/src/XrdNet/XrdNetMsg.cc
-+++ b/src/XrdNet/XrdNetMsg.cc
-@@ -29,7 +29,7 @@
- /******************************************************************************/
- 
- #include <cerrno>
--#include <sys/poll.h>
-+#include <poll.h>
- 
- #include "XrdNet/XrdNet.hh"
- #include "XrdNet/XrdNetMsg.hh"
-diff --git a/src/XrdNet/XrdNetSecurity.cc b/src/XrdNet/XrdNetSecurity.cc
-index 0f8451127..0faf563dd 100644
---- a/src/XrdNet/XrdNetSecurity.cc
-+++ b/src/XrdNet/XrdNetSecurity.cc
-@@ -40,11 +40,6 @@
- #include <sys/types.h>
- #include <Winsock2.h>
- #include <io.h>
--int innetgr(const char *netgroup, const char *host, const char *user,
--             const char *domain)
--{
--   return 0;
--}
- #include "XrdSys/XrdWin32.hh"
- #endif
- 
-@@ -53,6 +48,14 @@ int innetgr(const char *netgroup, const char *host, const char *user,
- #include "XrdNet/XrdNetUtils.hh"
- #include "XrdSys/XrdSysTrace.hh"
- 
-+#if defined(MUSL) || defined(WIN32)
-+int innetgr(const char *netgroup, const char *host, const char *user,
-+             const char *domain)
-+{
-+   return 0;
-+}
-+#endif
-+
- /******************************************************************************/
- /*                         L o c a l   C l a s s e s                          */
- /******************************************************************************/
-diff --git a/src/XrdOfs/XrdOfsHandle.cc b/src/XrdOfs/XrdOfsHandle.cc
-index 963f17a5a..26b40ce08 100644
---- a/src/XrdOfs/XrdOfsHandle.cc
-+++ b/src/XrdOfs/XrdOfsHandle.cc
-@@ -30,7 +30,7 @@
- 
- #include <cstdio>
- #include <ctime>
--#include <sys/errno.h>
-+#include <errno.h>
- #include <sys/types.h>
- 
- #include "XrdOfs/XrdOfsHandle.hh"
-diff --git a/src/XrdOssCsi/XrdOssCsiTagstoreFile.hh b/src/XrdOssCsi/XrdOssCsiTagstoreFile.hh
-index b1a94acd6..0202579cc 100644
---- a/src/XrdOssCsi/XrdOssCsiTagstoreFile.hh
-+++ b/src/XrdOssCsi/XrdOssCsiTagstoreFile.hh
-@@ -38,9 +38,7 @@
- #include <memory>
- #include <mutex>
- 
--#if defined(__GLIBC__) || defined(__BIONIC__) || defined(__CYGWIN__)
--#include <byteswap.h>
--#elif defined(__APPLE__)
-+#if defined(__APPLE__)
- // Make sure that byte swap functions are not already defined.
- #if !defined(bswap_16)
- // Mac OS X / Darwin features
-@@ -49,6 +47,8 @@
- #define bswap_32(x) OSSwapInt32(x)
- #define bswap_64(x) OSSwapInt64(x)
- #endif
-+#else
-+#include <byteswap.h>
- #endif
- 
- class XrdOssCsiTagstoreFile : public XrdOssCsiTagstore
-diff --git a/src/XrdOuc/XrdOucBackTrace.cc b/src/XrdOuc/XrdOucBackTrace.cc
-index 813183c32..c61a89b63 100644
---- a/src/XrdOuc/XrdOucBackTrace.cc
-+++ b/src/XrdOuc/XrdOucBackTrace.cc
-@@ -34,7 +34,7 @@
- #include <vector>
- #include <sys/syscall.h>
- 
--#ifdef __GNUC__
-+#ifndef MUSL /* glibc, uclibc, and macOS all have execinfo.h */
- #include <execinfo.h>
- #include <cxxabi.h>
- #endif
-@@ -176,13 +176,11 @@ XrdInfo *CvtRsp(const char *name, int snum)
- /*                              D e m a n g l e                               */
- /******************************************************************************/
-   
-+#ifndef MUSL
- namespace
- {
- int Demangle(char *cSym, char *buff, int blen)
- {
--#ifndef __GNUC__
--   return -1;
--#else
-    int   status;
-    char *plus = index(cSym, '+');
-    char *brak = (plus ? index(plus, '[') : 0);
-@@ -201,7 +199,6 @@ int Demangle(char *cSym, char *buff, int blen)
-    status = snprintf(buff, blen, "%s %s+%s\n", brak, realname, plus+1);
-    free(realname);
-    return status;
--#endif
- }
- }
- 
-@@ -221,6 +218,7 @@ int DumpDepth()
-    return (depth <= maxDepth ? depth : maxDepth);
- }
- }
-+#endif
- 
- /******************************************************************************/
- /*                             D u m p S t a c k                              */
-@@ -230,8 +228,8 @@ namespace
- {
- void DumpStack(char *bP, int bL, TidType tid)
- {
--#ifndef __GNUC__
--   snprintf(bP, bL, "TBT " TidFmt " No stack information available, not gnuc.", tid);
-+#ifdef MUSL
-+   snprintf(bP, bL, "TBT " TidFmt " No stack information available with musl libc.", tid);
-    return;
- #else
-    static int btDepth = DumpDepth(); // One time MT-safe call
-diff --git a/src/XrdPosix/XrdPosix.cc b/src/XrdPosix/XrdPosix.cc
-index 0f32dc2ee..e4f020c09 100644
---- a/src/XrdPosix/XrdPosix.cc
-+++ b/src/XrdPosix/XrdPosix.cc
-@@ -53,6 +53,58 @@
-   
- extern XrdPosixLinkage   Xunix;
- 
-+/******************************************************************************/
-+/*                      U t i l i t y  F u n c t i o n s                      */
-+/******************************************************************************/
-+
-+#ifdef MUSL
-+#include <stdio_ext.h>
-+#endif
-+
-+static inline void fseterr(FILE *fp)
-+{
-+  /* Most systems provide FILE as a struct and the necessary bitmask in
-+     <stdio.h>, because they need it for implementing getc() and putc() as
-+     fast macros. This function is based on gnulib's fseterr.c */
-+#if defined _IO_ERR_SEEN || defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1
-+  /* GNU libc, BeOS, Haiku, Linux libc5 */
-+  fp->_flags |= _IO_ERR_SEEN;
-+#elif defined __sferror || defined __APPLE__ || defined __DragonFly__ || defined __ANDROID__
-+  /* FreeBSD, NetBSD, OpenBSD, DragonFly, Mac OS X, Cygwin, Minix 3, Android */
-+  fp->_flags |= __SERR;
-+#elif defined _IOERR
-+  /* AIX, HP-UX, IRIX, OSF/1, Solaris, OpenServer, UnixWare, mingw, MSVC, NonStop Kernel, OpenVMS */
-+  fp->_flag |= _IOERR;
-+#elif defined __UCLIBC__            /* uClibc */
-+  fp->__modeflags |= __FLAG_ERROR;
-+#elif defined MUSL /* musl libc */
-+  __fseterr(fp);
-+#else
-+ #error "Unsupported platform! Please report it as a bug."
-+#endif
-+}
-+
-+static inline void fseteof(FILE *fp)
-+{
-+  /* Most systems provide FILE as a struct and the necessary bitmask in
-+     <stdio.h>, because they need it for implementing getc() and putc() as
-+     fast macros.  */
-+#if defined _IO_EOF_SEEN || defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1
-+  /* GNU libc, BeOS, Haiku, Linux libc5 */
-+  fp->_flags |= _IO_EOF_SEEN;
-+#elif defined __sferror || defined __APPLE__ || defined __DragonFly__ || defined __ANDROID__
-+  /* FreeBSD, NetBSD, OpenBSD, DragonFly, Mac OS X, Cygwin, Minix 3, Android */
-+  fp->_flags |= __SEOF;
-+#elif defined _IOEOF
-+  /* AIX, HP-UX, IRIX, OSF/1, Solaris, OpenServer, UnixWare, mingw, MSVC, NonStop Kernel, OpenVMS */
-+  fp->_flag |= _IOEOF;
-+#elif defined __UCLIBC__            /* uClibc */
-+  fp->__modeflags |= __FLAG_EOF;
-+#else
-+  (void) fseek(fp, 0L, SEEK_END);
-+#endif
-+}
-+
- /******************************************************************************/
- /*                       X r d P o s i x _ A c c e s s                        */
- /******************************************************************************/
-@@ -308,19 +360,9 @@ size_t XrdPosix_Fread(void *ptr, size_t size, size_t nitems, FILE *stream)
- 
- // Get the right return code. Note that we cannot emulate the flags in sunx86
- //
--        if (bytes > 0 && size) rc = bytes/size;
--#ifndef SUNX86
--#if defined(__linux__) || defined(__GNU__) || (defined(__FreeBSD_kernel__) && defined(__GLIBC__))
--   else if (bytes < 0) stream->_flags |= _IO_ERR_SEEN;
--   else                stream->_flags |= _IO_EOF_SEEN;
--#elif defined(__APPLE__) || defined(__FreeBSD__)
--   else if (bytes < 0) stream->_flags |= __SEOF;
--   else                stream->_flags |= __SERR;
--#else
--   else if (bytes < 0) stream->_flag  |= _IOERR;
--   else                stream->_flag  |= _IOEOF;
--#endif
--#endif
-+   if (bytes > 0 && size) rc = bytes/size;
-+   else if (bytes < 0) fseterr(stream);
-+   else                fseteof(stream);
- 
-    return rc;
- }
-@@ -477,18 +519,10 @@ size_t XrdPosix_Fwrite(const void *ptr, size_t size, size_t nitems, FILE *stream
- 
-    bytes = Xroot.Write(fd, ptr, size*nitems);
- 
--// Get the right return code. Note that we cannot emulate the flags in sunx86
-+// Get the right return code.
- //
-    if (bytes > 0 && size) rc = bytes/size;
--#ifndef SUNX86
--#if defined(__linux__) || defined(__GNU__) || (defined(__FreeBSD_kernel__) && defined(__GLIBC__))
--      else stream->_flags |= _IO_ERR_SEEN;
--#elif defined(__APPLE__) || defined(__FreeBSD__)
--      else stream->_flags |= __SERR;
--#else
--      else stream->_flag  |= _IOERR;
--#endif
--#endif
-+   else fseterr(stream);
- 
-    return rc;
- }
-diff --git a/src/XrdPosix/XrdPosixFile.hh b/src/XrdPosix/XrdPosixFile.hh
-index 4d77b88d3..6d99cf464 100644
---- a/src/XrdPosix/XrdPosixFile.hh
-+++ b/src/XrdPosix/XrdPosixFile.hh
-@@ -35,6 +35,7 @@
- #include <sys/time.h>
- #include <sys/param.h>
- #include <sys/resource.h>
-+#include <sys/types.h>
- #include <sys/uio.h>
- 
- #include "XrdCl/XrdClFileSystem.hh"
-diff --git a/src/XrdPosix/XrdPosixLinkage.hh b/src/XrdPosix/XrdPosixLinkage.hh
-index 903153252..b5cc6d4b4 100644
---- a/src/XrdPosix/XrdPosixLinkage.hh
-+++ b/src/XrdPosix/XrdPosixLinkage.hh
-@@ -40,6 +40,7 @@
- #include <unistd.h>
- 
- #include "XrdPosix/XrdPosixOsDep.hh"
-+#include "XrdPosix/XrdPosixXrootd.hh"
- #include "XrdSys/XrdSysPlatform.hh"
- 
- /******************************************************************************/
-diff --git a/src/XrdPosix/XrdPosixPreload.cc b/src/XrdPosix/XrdPosixPreload.cc
-index a62f0c658..8db1400d4 100644
---- a/src/XrdPosix/XrdPosixPreload.cc
-+++ b/src/XrdPosix/XrdPosixPreload.cc
-@@ -45,6 +45,22 @@
- /******************************************************************************/
- 
- #include "XrdPosix/XrdPosixExtern.hh"
-+
-+#ifdef MUSL
-+#undef creat64
-+#undef fseeko64
-+#undef ftello64
-+#undef ftruncate64
-+#undef lseek64
-+#undef open64
-+#undef pread64
-+#undef pwrite64
-+#undef readdir64
-+#undef readdir64_r
-+#undef statfs64
-+#undef statvfs64
-+#undef truncate64
-+#endif
-  
- /******************************************************************************/
- /*                   G l o b a l   D e c l a r a t i o n s                    */
-diff --git a/src/XrdSys/XrdSysPlatform.hh b/src/XrdSys/XrdSysPlatform.hh
-index a1ac544ad..eaeaeabac 100644
---- a/src/XrdSys/XrdSysPlatform.hh
-+++ b/src/XrdSys/XrdSysPlatform.hh
-@@ -241,16 +241,8 @@ extern "C"
- #if defined(_AIX) || \
-    (defined(XR__SUNGCC3) && !defined(__arch64__))
- #   define SOCKLEN_t size_t
--#elif defined(XR__GLIBC) || \
--   defined(__FreeBSD__) || \
--   (defined(__FreeBSD_kernel__) && defined(__GLIBC__)) || \
--   (defined(XR__SUNGCC3) && defined(__arch64__)) || defined(__APPLE__) || \
--   (defined(__sun) && defined(_SOCKLEN_T))
--#   ifndef SOCKLEN_t
--#      define SOCKLEN_t socklen_t
--#   endif
- #elif !defined(SOCKLEN_t)
--#   define SOCKLEN_t int
-+#   define SOCKLEN_t socklen_t
- #endif
- 
- #ifdef _LP64
-diff --git a/src/XrdSys/XrdSysPthread.hh b/src/XrdSys/XrdSysPthread.hh
-index 17f8fd0be..6d9802460 100644
---- a/src/XrdSys/XrdSysPthread.hh
-+++ b/src/XrdSys/XrdSysPthread.hh
-@@ -351,7 +351,7 @@ enum PrefType {prefWR=1};
- 
-         XrdSysRWLock(PrefType ptype)
-                     {
--#ifdef __linux__
-+#if defined(__linux__) && (defined(__GLIBC__) || defined(__UCLIBC__))
-                      pthread_rwlockattr_t attr;
-                      pthread_rwlockattr_setkind_np(&attr,
-                              PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP);
-@@ -367,7 +367,7 @@ enum PrefType {prefWR=1};
- inline void ReInitialize(PrefType ptype)
- {
-   pthread_rwlock_destroy(&lock);
--#ifdef __linux__
-+#if defined(__linux__) && (defined(__GLIBC__) || defined(__UCLIBC__))
-   pthread_rwlockattr_t attr;
-   pthread_rwlockattr_setkind_np(&attr,
-                      PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP);
-diff --git a/src/XrdTls/XrdTlsTempCA.cc b/src/XrdTls/XrdTlsTempCA.cc
-index faf69785f..37431dee9 100644
---- a/src/XrdTls/XrdTlsTempCA.cc
-+++ b/src/XrdTls/XrdTlsTempCA.cc
-@@ -30,7 +30,7 @@
- #include <cstdlib>
- #include <fcntl.h>
- #include <dirent.h>
--#include <sys/poll.h>
-+#include <poll.h>
- 
- #include <unordered_set>
- #include <memory>
-diff --git a/src/XrdVoms/XrdVomsMapfile.cc b/src/XrdVoms/XrdVomsMapfile.cc
-index 8ffbe9218..fddbfdc06 100644
---- a/src/XrdVoms/XrdVomsMapfile.cc
-+++ b/src/XrdVoms/XrdVomsMapfile.cc
-@@ -40,7 +40,7 @@
- #include <vector>
- #include <string>
- #include <fcntl.h>
--#include <sys/poll.h>
-+#include <poll.h>
- 
- bool XrdVomsMapfile::tried_configure = false;
- std::unique_ptr<XrdVomsMapfile> XrdVomsMapfile::mapper;
diff --git a/srcpkgs/xrootd/template b/srcpkgs/xrootd/template
index 5fb1164c2eda8..cfe7a2d587134 100644
--- a/srcpkgs/xrootd/template
+++ b/srcpkgs/xrootd/template
@@ -1,7 +1,7 @@
 # Template file for 'xrootd'
 pkgname=xrootd
-version=5.5.5
-revision=3
+version=5.6.5
+revision=1
 build_style=cmake
 configure_args="-DENABLE_TESTS=ON -DCMAKE_BUILD_TYPE=Release"
 hostmakedepends="pkgconf"
@@ -13,7 +13,7 @@ maintainer="Ben Jargowsky <benjar63@gmail.com>"
 license="LGPL-3.0-or-later"
 homepage="https://xrootd.slac.stanford.edu"
 distfiles="http://xrootd.org/download/v${version}/xrootd-${version}.tar.gz"
-checksum=0710caae527082e73d3bf8f9d1dffe95808afd3fcaaaa15ab0b937b8b226bc1f
+checksum=600874e7c5cdb11d20d6bd6c549b04a3c5beb230d755829726cd15fab99073b1
 
 if [ "$XBPS_TARGET_LIBC" = musl ]; then
 	configure_args+=" -DCMAKE_CXX_STANDARD_LIBRARIES=-lexecinfo"

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PR PATCH] [Updated] xrootd: update to 5.6.5
  2024-01-22 15:19 [PR PATCH] xrootd: update to 5.6.5 BenJarg
  2024-01-22 15:22 ` [PR PATCH] [Updated] " BenJarg
@ 2024-01-28  4:33 ` BenJarg
  2024-02-03 20:21 ` [PR PATCH] [Merged]: xrootd: update to 5.6.6 cinerea0
  2 siblings, 0 replies; 4+ messages in thread
From: BenJarg @ 2024-01-28  4:33 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 561 bytes --]

There is an updated pull request by BenJarg against master on the void-packages repository

https://github.com/BenJarg/void-packages xrootd-5.6.5
https://github.com/void-linux/void-packages/pull/48324

xrootd: update to 5.6.5

#### Testing the changes
- I tested the changes in this PR: **briefly**

#### Local build testing
- I built this PR locally for my native architecture, (x86_64-glibc)
- I built this PR locally for these architectures:
  - x86_64-musl


A patch file from https://github.com/void-linux/void-packages/pull/48324.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-xrootd-5.6.5-48324.patch --]
[-- Type: text/x-diff, Size: 16894 bytes --]

From 3a250c8dd0ad0c916e01b6faef15567239900320 Mon Sep 17 00:00:00 2001
From: Ben Jargowsky <bjargowsky@proton.me>
Date: Mon, 22 Jan 2024 16:15:27 +0100
Subject: [PATCH] xrootd: update to 5.6.6

---
 srcpkgs/xrootd/patches/musl.patch | 460 ------------------------------
 srcpkgs/xrootd/template           |   6 +-
 2 files changed, 3 insertions(+), 463 deletions(-)
 delete mode 100644 srcpkgs/xrootd/patches/musl.patch

diff --git a/srcpkgs/xrootd/patches/musl.patch b/srcpkgs/xrootd/patches/musl.patch
deleted file mode 100644
index 901970620d8e6..0000000000000
--- a/srcpkgs/xrootd/patches/musl.patch
+++ /dev/null
@@ -1,460 +0,0 @@
-diff --git a/cmake/XRootDOSDefs.cmake b/cmake/XRootDOSDefs.cmake
-index 8b182e61e..9f7c9aa59 100644
---- a/cmake/XRootDOSDefs.cmake
-+++ b/cmake/XRootDOSDefs.cmake
-@@ -70,6 +70,21 @@ if( ${CMAKE_SYSTEM_NAME} STREQUAL "Linux" )
-   set( LINUX TRUE )
-   include( GNUInstallDirs )
-   set( EXTRA_LIBS rt )
-+
-+  # Check for musl libc with the compiler, since it provides way to detect it
-+  execute_process(COMMAND ${CMAKE_CXX_COMPILER} -dumpmachine
-+    OUTPUT_VARIABLE TARGET_TRIPLE ERROR_VARIABLE TARGET_ERROR)
-+
-+  if (NOT TARGET_ERROR)
-+    if ("${TARGET_TRIPLE}" MATCHES "musl")
-+      message(STATUS "Detected musl libc")
-+      add_definitions(-DMUSL=1)
-+    endif()
-+  else()
-+    message(WARNING "Could not detect system information!")
-+  endif()
-+
-+  unset(TARGET_ERROR)
- endif()
- 
- #-------------------------------------------------------------------------------
-diff --git a/src/Xrd/XrdConfig.hh b/src/Xrd/XrdConfig.hh
-index a06ad462f..2d1403a5e 100644
---- a/src/Xrd/XrdConfig.hh
-+++ b/src/Xrd/XrdConfig.hh
-@@ -34,6 +34,8 @@
- #include "Xrd/XrdProtLoad.hh"
- #include "Xrd/XrdProtocol.hh"
- 
-+#include <sys/types.h>
-+
- class XrdSysError;
- class XrdTcpMonInfo;
- class XrdNetSecurity;
-diff --git a/src/Xrd/XrdPoll.hh b/src/Xrd/XrdPoll.hh
-index 3790b03b0..d9bda5d62 100644
---- a/src/Xrd/XrdPoll.hh
-+++ b/src/Xrd/XrdPoll.hh
-@@ -29,7 +29,7 @@
- /* specific prior written permission of the institution or contributor.       */
- /******************************************************************************/
- 
--#include <sys/poll.h>
-+#include <poll.h>
- #include "XrdSys/XrdSysPthread.hh"
- 
- #define XRD_NUMPOLLERS 3
-diff --git a/src/XrdAcc/XrdAccGroups.cc b/src/XrdAcc/XrdAccGroups.cc
-index e663fdd35..94b8edbc7 100644
---- a/src/XrdAcc/XrdAccGroups.cc
-+++ b/src/XrdAcc/XrdAccGroups.cc
-@@ -46,6 +46,14 @@
- #include "XrdAcc/XrdAccGroups.hh"
- #include "XrdAcc/XrdAccPrivs.hh"
- 
-+#ifdef MUSL
-+int innetgr(const char *netgroup, const char *host, const char *user,
-+             const char *domain)
-+{
-+   return 0;
-+}
-+#endif
-+
- // Additionally, this routine does not support a user in more than
- // NGROUPS_MAX groups. This is a standard unix limit defined in limits.h.
-   
-diff --git a/src/XrdCl/XrdClFileStateHandler.hh b/src/XrdCl/XrdClFileStateHandler.hh
-index 197151321..f83538819 100644
---- a/src/XrdCl/XrdClFileStateHandler.hh
-+++ b/src/XrdCl/XrdClFileStateHandler.hh
-@@ -39,6 +39,7 @@
- #include <set>
- #include <vector>
- 
-+#include <sys/time.h>
- #include <sys/uio.h>
- #include <cstdint>
- 
-diff --git a/src/XrdCl/XrdClMonitor.hh b/src/XrdCl/XrdClMonitor.hh
-index 2fc753777..2b3a96c46 100644
---- a/src/XrdCl/XrdClMonitor.hh
-+++ b/src/XrdCl/XrdClMonitor.hh
-@@ -43,6 +43,8 @@
- 
- #include "XrdCl/XrdClFileSystem.hh"
- 
-+#include <sys/time.h>
-+
- namespace XrdCl
- {
-   class URL;
-diff --git a/src/XrdNet/XrdNetMsg.cc b/src/XrdNet/XrdNetMsg.cc
-index fa6c16f87..f97e1af09 100644
---- a/src/XrdNet/XrdNetMsg.cc
-+++ b/src/XrdNet/XrdNetMsg.cc
-@@ -29,7 +29,7 @@
- /******************************************************************************/
- 
- #include <cerrno>
--#include <sys/poll.h>
-+#include <poll.h>
- 
- #include "XrdNet/XrdNet.hh"
- #include "XrdNet/XrdNetMsg.hh"
-diff --git a/src/XrdNet/XrdNetSecurity.cc b/src/XrdNet/XrdNetSecurity.cc
-index 0f8451127..0faf563dd 100644
---- a/src/XrdNet/XrdNetSecurity.cc
-+++ b/src/XrdNet/XrdNetSecurity.cc
-@@ -40,11 +40,6 @@
- #include <sys/types.h>
- #include <Winsock2.h>
- #include <io.h>
--int innetgr(const char *netgroup, const char *host, const char *user,
--             const char *domain)
--{
--   return 0;
--}
- #include "XrdSys/XrdWin32.hh"
- #endif
- 
-@@ -53,6 +48,14 @@ int innetgr(const char *netgroup, const char *host, const char *user,
- #include "XrdNet/XrdNetUtils.hh"
- #include "XrdSys/XrdSysTrace.hh"
- 
-+#if defined(MUSL) || defined(WIN32)
-+int innetgr(const char *netgroup, const char *host, const char *user,
-+             const char *domain)
-+{
-+   return 0;
-+}
-+#endif
-+
- /******************************************************************************/
- /*                         L o c a l   C l a s s e s                          */
- /******************************************************************************/
-diff --git a/src/XrdOfs/XrdOfsHandle.cc b/src/XrdOfs/XrdOfsHandle.cc
-index 963f17a5a..26b40ce08 100644
---- a/src/XrdOfs/XrdOfsHandle.cc
-+++ b/src/XrdOfs/XrdOfsHandle.cc
-@@ -30,7 +30,7 @@
- 
- #include <cstdio>
- #include <ctime>
--#include <sys/errno.h>
-+#include <errno.h>
- #include <sys/types.h>
- 
- #include "XrdOfs/XrdOfsHandle.hh"
-diff --git a/src/XrdOssCsi/XrdOssCsiTagstoreFile.hh b/src/XrdOssCsi/XrdOssCsiTagstoreFile.hh
-index b1a94acd6..0202579cc 100644
---- a/src/XrdOssCsi/XrdOssCsiTagstoreFile.hh
-+++ b/src/XrdOssCsi/XrdOssCsiTagstoreFile.hh
-@@ -38,9 +38,7 @@
- #include <memory>
- #include <mutex>
- 
--#if defined(__GLIBC__) || defined(__BIONIC__) || defined(__CYGWIN__)
--#include <byteswap.h>
--#elif defined(__APPLE__)
-+#if defined(__APPLE__)
- // Make sure that byte swap functions are not already defined.
- #if !defined(bswap_16)
- // Mac OS X / Darwin features
-@@ -49,6 +47,8 @@
- #define bswap_32(x) OSSwapInt32(x)
- #define bswap_64(x) OSSwapInt64(x)
- #endif
-+#else
-+#include <byteswap.h>
- #endif
- 
- class XrdOssCsiTagstoreFile : public XrdOssCsiTagstore
-diff --git a/src/XrdOuc/XrdOucBackTrace.cc b/src/XrdOuc/XrdOucBackTrace.cc
-index 813183c32..c61a89b63 100644
---- a/src/XrdOuc/XrdOucBackTrace.cc
-+++ b/src/XrdOuc/XrdOucBackTrace.cc
-@@ -34,7 +34,7 @@
- #include <vector>
- #include <sys/syscall.h>
- 
--#ifdef __GNUC__
-+#ifndef MUSL /* glibc, uclibc, and macOS all have execinfo.h */
- #include <execinfo.h>
- #include <cxxabi.h>
- #endif
-@@ -176,13 +176,11 @@ XrdInfo *CvtRsp(const char *name, int snum)
- /*                              D e m a n g l e                               */
- /******************************************************************************/
-   
-+#ifndef MUSL
- namespace
- {
- int Demangle(char *cSym, char *buff, int blen)
- {
--#ifndef __GNUC__
--   return -1;
--#else
-    int   status;
-    char *plus = index(cSym, '+');
-    char *brak = (plus ? index(plus, '[') : 0);
-@@ -201,7 +199,6 @@ int Demangle(char *cSym, char *buff, int blen)
-    status = snprintf(buff, blen, "%s %s+%s\n", brak, realname, plus+1);
-    free(realname);
-    return status;
--#endif
- }
- }
- 
-@@ -221,6 +218,7 @@ int DumpDepth()
-    return (depth <= maxDepth ? depth : maxDepth);
- }
- }
-+#endif
- 
- /******************************************************************************/
- /*                             D u m p S t a c k                              */
-@@ -230,8 +228,8 @@ namespace
- {
- void DumpStack(char *bP, int bL, TidType tid)
- {
--#ifndef __GNUC__
--   snprintf(bP, bL, "TBT " TidFmt " No stack information available, not gnuc.", tid);
-+#ifdef MUSL
-+   snprintf(bP, bL, "TBT " TidFmt " No stack information available with musl libc.", tid);
-    return;
- #else
-    static int btDepth = DumpDepth(); // One time MT-safe call
-diff --git a/src/XrdPosix/XrdPosix.cc b/src/XrdPosix/XrdPosix.cc
-index 0f32dc2ee..e4f020c09 100644
---- a/src/XrdPosix/XrdPosix.cc
-+++ b/src/XrdPosix/XrdPosix.cc
-@@ -53,6 +53,58 @@
-   
- extern XrdPosixLinkage   Xunix;
- 
-+/******************************************************************************/
-+/*                      U t i l i t y  F u n c t i o n s                      */
-+/******************************************************************************/
-+
-+#ifdef MUSL
-+#include <stdio_ext.h>
-+#endif
-+
-+static inline void fseterr(FILE *fp)
-+{
-+  /* Most systems provide FILE as a struct and the necessary bitmask in
-+     <stdio.h>, because they need it for implementing getc() and putc() as
-+     fast macros. This function is based on gnulib's fseterr.c */
-+#if defined _IO_ERR_SEEN || defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1
-+  /* GNU libc, BeOS, Haiku, Linux libc5 */
-+  fp->_flags |= _IO_ERR_SEEN;
-+#elif defined __sferror || defined __APPLE__ || defined __DragonFly__ || defined __ANDROID__
-+  /* FreeBSD, NetBSD, OpenBSD, DragonFly, Mac OS X, Cygwin, Minix 3, Android */
-+  fp->_flags |= __SERR;
-+#elif defined _IOERR
-+  /* AIX, HP-UX, IRIX, OSF/1, Solaris, OpenServer, UnixWare, mingw, MSVC, NonStop Kernel, OpenVMS */
-+  fp->_flag |= _IOERR;
-+#elif defined __UCLIBC__            /* uClibc */
-+  fp->__modeflags |= __FLAG_ERROR;
-+#elif defined MUSL /* musl libc */
-+  __fseterr(fp);
-+#else
-+ #error "Unsupported platform! Please report it as a bug."
-+#endif
-+}
-+
-+static inline void fseteof(FILE *fp)
-+{
-+  /* Most systems provide FILE as a struct and the necessary bitmask in
-+     <stdio.h>, because they need it for implementing getc() and putc() as
-+     fast macros.  */
-+#if defined _IO_EOF_SEEN || defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1
-+  /* GNU libc, BeOS, Haiku, Linux libc5 */
-+  fp->_flags |= _IO_EOF_SEEN;
-+#elif defined __sferror || defined __APPLE__ || defined __DragonFly__ || defined __ANDROID__
-+  /* FreeBSD, NetBSD, OpenBSD, DragonFly, Mac OS X, Cygwin, Minix 3, Android */
-+  fp->_flags |= __SEOF;
-+#elif defined _IOEOF
-+  /* AIX, HP-UX, IRIX, OSF/1, Solaris, OpenServer, UnixWare, mingw, MSVC, NonStop Kernel, OpenVMS */
-+  fp->_flag |= _IOEOF;
-+#elif defined __UCLIBC__            /* uClibc */
-+  fp->__modeflags |= __FLAG_EOF;
-+#else
-+  (void) fseek(fp, 0L, SEEK_END);
-+#endif
-+}
-+
- /******************************************************************************/
- /*                       X r d P o s i x _ A c c e s s                        */
- /******************************************************************************/
-@@ -308,19 +360,9 @@ size_t XrdPosix_Fread(void *ptr, size_t size, size_t nitems, FILE *stream)
- 
- // Get the right return code. Note that we cannot emulate the flags in sunx86
- //
--        if (bytes > 0 && size) rc = bytes/size;
--#ifndef SUNX86
--#if defined(__linux__) || defined(__GNU__) || (defined(__FreeBSD_kernel__) && defined(__GLIBC__))
--   else if (bytes < 0) stream->_flags |= _IO_ERR_SEEN;
--   else                stream->_flags |= _IO_EOF_SEEN;
--#elif defined(__APPLE__) || defined(__FreeBSD__)
--   else if (bytes < 0) stream->_flags |= __SEOF;
--   else                stream->_flags |= __SERR;
--#else
--   else if (bytes < 0) stream->_flag  |= _IOERR;
--   else                stream->_flag  |= _IOEOF;
--#endif
--#endif
-+   if (bytes > 0 && size) rc = bytes/size;
-+   else if (bytes < 0) fseterr(stream);
-+   else                fseteof(stream);
- 
-    return rc;
- }
-@@ -477,18 +519,10 @@ size_t XrdPosix_Fwrite(const void *ptr, size_t size, size_t nitems, FILE *stream
- 
-    bytes = Xroot.Write(fd, ptr, size*nitems);
- 
--// Get the right return code. Note that we cannot emulate the flags in sunx86
-+// Get the right return code.
- //
-    if (bytes > 0 && size) rc = bytes/size;
--#ifndef SUNX86
--#if defined(__linux__) || defined(__GNU__) || (defined(__FreeBSD_kernel__) && defined(__GLIBC__))
--      else stream->_flags |= _IO_ERR_SEEN;
--#elif defined(__APPLE__) || defined(__FreeBSD__)
--      else stream->_flags |= __SERR;
--#else
--      else stream->_flag  |= _IOERR;
--#endif
--#endif
-+   else fseterr(stream);
- 
-    return rc;
- }
-diff --git a/src/XrdPosix/XrdPosixFile.hh b/src/XrdPosix/XrdPosixFile.hh
-index 4d77b88d3..6d99cf464 100644
---- a/src/XrdPosix/XrdPosixFile.hh
-+++ b/src/XrdPosix/XrdPosixFile.hh
-@@ -35,6 +35,7 @@
- #include <sys/time.h>
- #include <sys/param.h>
- #include <sys/resource.h>
-+#include <sys/types.h>
- #include <sys/uio.h>
- 
- #include "XrdCl/XrdClFileSystem.hh"
-diff --git a/src/XrdPosix/XrdPosixLinkage.hh b/src/XrdPosix/XrdPosixLinkage.hh
-index 903153252..b5cc6d4b4 100644
---- a/src/XrdPosix/XrdPosixLinkage.hh
-+++ b/src/XrdPosix/XrdPosixLinkage.hh
-@@ -40,6 +40,7 @@
- #include <unistd.h>
- 
- #include "XrdPosix/XrdPosixOsDep.hh"
-+#include "XrdPosix/XrdPosixXrootd.hh"
- #include "XrdSys/XrdSysPlatform.hh"
- 
- /******************************************************************************/
-diff --git a/src/XrdPosix/XrdPosixPreload.cc b/src/XrdPosix/XrdPosixPreload.cc
-index a62f0c658..8db1400d4 100644
---- a/src/XrdPosix/XrdPosixPreload.cc
-+++ b/src/XrdPosix/XrdPosixPreload.cc
-@@ -45,6 +45,22 @@
- /******************************************************************************/
- 
- #include "XrdPosix/XrdPosixExtern.hh"
-+
-+#ifdef MUSL
-+#undef creat64
-+#undef fseeko64
-+#undef ftello64
-+#undef ftruncate64
-+#undef lseek64
-+#undef open64
-+#undef pread64
-+#undef pwrite64
-+#undef readdir64
-+#undef readdir64_r
-+#undef statfs64
-+#undef statvfs64
-+#undef truncate64
-+#endif
-  
- /******************************************************************************/
- /*                   G l o b a l   D e c l a r a t i o n s                    */
-diff --git a/src/XrdSys/XrdSysPlatform.hh b/src/XrdSys/XrdSysPlatform.hh
-index a1ac544ad..eaeaeabac 100644
---- a/src/XrdSys/XrdSysPlatform.hh
-+++ b/src/XrdSys/XrdSysPlatform.hh
-@@ -241,16 +241,8 @@ extern "C"
- #if defined(_AIX) || \
-    (defined(XR__SUNGCC3) && !defined(__arch64__))
- #   define SOCKLEN_t size_t
--#elif defined(XR__GLIBC) || \
--   defined(__FreeBSD__) || \
--   (defined(__FreeBSD_kernel__) && defined(__GLIBC__)) || \
--   (defined(XR__SUNGCC3) && defined(__arch64__)) || defined(__APPLE__) || \
--   (defined(__sun) && defined(_SOCKLEN_T))
--#   ifndef SOCKLEN_t
--#      define SOCKLEN_t socklen_t
--#   endif
- #elif !defined(SOCKLEN_t)
--#   define SOCKLEN_t int
-+#   define SOCKLEN_t socklen_t
- #endif
- 
- #ifdef _LP64
-diff --git a/src/XrdSys/XrdSysPthread.hh b/src/XrdSys/XrdSysPthread.hh
-index 17f8fd0be..6d9802460 100644
---- a/src/XrdSys/XrdSysPthread.hh
-+++ b/src/XrdSys/XrdSysPthread.hh
-@@ -351,7 +351,7 @@ enum PrefType {prefWR=1};
- 
-         XrdSysRWLock(PrefType ptype)
-                     {
--#ifdef __linux__
-+#if defined(__linux__) && (defined(__GLIBC__) || defined(__UCLIBC__))
-                      pthread_rwlockattr_t attr;
-                      pthread_rwlockattr_setkind_np(&attr,
-                              PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP);
-@@ -367,7 +367,7 @@ enum PrefType {prefWR=1};
- inline void ReInitialize(PrefType ptype)
- {
-   pthread_rwlock_destroy(&lock);
--#ifdef __linux__
-+#if defined(__linux__) && (defined(__GLIBC__) || defined(__UCLIBC__))
-   pthread_rwlockattr_t attr;
-   pthread_rwlockattr_setkind_np(&attr,
-                      PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP);
-diff --git a/src/XrdTls/XrdTlsTempCA.cc b/src/XrdTls/XrdTlsTempCA.cc
-index faf69785f..37431dee9 100644
---- a/src/XrdTls/XrdTlsTempCA.cc
-+++ b/src/XrdTls/XrdTlsTempCA.cc
-@@ -30,7 +30,7 @@
- #include <cstdlib>
- #include <fcntl.h>
- #include <dirent.h>
--#include <sys/poll.h>
-+#include <poll.h>
- 
- #include <unordered_set>
- #include <memory>
-diff --git a/src/XrdVoms/XrdVomsMapfile.cc b/src/XrdVoms/XrdVomsMapfile.cc
-index 8ffbe9218..fddbfdc06 100644
---- a/src/XrdVoms/XrdVomsMapfile.cc
-+++ b/src/XrdVoms/XrdVomsMapfile.cc
-@@ -40,7 +40,7 @@
- #include <vector>
- #include <string>
- #include <fcntl.h>
--#include <sys/poll.h>
-+#include <poll.h>
- 
- bool XrdVomsMapfile::tried_configure = false;
- std::unique_ptr<XrdVomsMapfile> XrdVomsMapfile::mapper;
diff --git a/srcpkgs/xrootd/template b/srcpkgs/xrootd/template
index 5fb1164c2eda8..f04d092f754e3 100644
--- a/srcpkgs/xrootd/template
+++ b/srcpkgs/xrootd/template
@@ -1,7 +1,7 @@
 # Template file for 'xrootd'
 pkgname=xrootd
-version=5.5.5
-revision=3
+version=5.6.6
+revision=1
 build_style=cmake
 configure_args="-DENABLE_TESTS=ON -DCMAKE_BUILD_TYPE=Release"
 hostmakedepends="pkgconf"
@@ -13,7 +13,7 @@ maintainer="Ben Jargowsky <benjar63@gmail.com>"
 license="LGPL-3.0-or-later"
 homepage="https://xrootd.slac.stanford.edu"
 distfiles="http://xrootd.org/download/v${version}/xrootd-${version}.tar.gz"
-checksum=0710caae527082e73d3bf8f9d1dffe95808afd3fcaaaa15ab0b937b8b226bc1f
+checksum=b265a75be750472561df9ff321dd0b2102bd64ca19451d312799f501edc597ba
 
 if [ "$XBPS_TARGET_LIBC" = musl ]; then
 	configure_args+=" -DCMAKE_CXX_STANDARD_LIBRARIES=-lexecinfo"

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PR PATCH] [Merged]: xrootd: update to 5.6.6
  2024-01-22 15:19 [PR PATCH] xrootd: update to 5.6.5 BenJarg
  2024-01-22 15:22 ` [PR PATCH] [Updated] " BenJarg
  2024-01-28  4:33 ` BenJarg
@ 2024-02-03 20:21 ` cinerea0
  2 siblings, 0 replies; 4+ messages in thread
From: cinerea0 @ 2024-02-03 20:21 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 400 bytes --]

There's a merged pull request on the void-packages repository

xrootd: update to 5.6.6
https://github.com/void-linux/void-packages/pull/48324

Description:

#### Testing the changes
- I tested the changes in this PR: **briefly**

#### Local build testing
- I built this PR locally for my native architecture, (x86_64-glibc)
- I built this PR locally for these architectures:
  - x86_64-musl


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2024-02-03 20:21 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-01-22 15:19 [PR PATCH] xrootd: update to 5.6.5 BenJarg
2024-01-22 15:22 ` [PR PATCH] [Updated] " BenJarg
2024-01-28  4:33 ` BenJarg
2024-02-03 20:21 ` [PR PATCH] [Merged]: xrootd: update to 5.6.6 cinerea0

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).