Github messages for voidlinux
 help / color / mirror / Atom feed
* Re: [PR PATCH] [Updated] [Needs testers] glusterfs: fix musl build
       [not found] <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-17727@inbox.vuxu.org>
@ 2020-01-01  2:34 ` voidlinux-github
  0 siblings, 0 replies; only message in thread
From: voidlinux-github @ 2020-01-01  2:34 UTC (permalink / raw)
  To: ml

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

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

https://github.com/ndowens/void-packages glusterfs
https://github.com/void-linux/void-packages/pull/17727

[Needs testers] glusterfs: fix musl build
Need someone that has a musl system to test if this runs fine

Signed-off-by: Nathan Owens <ndowens04@gmail.com>

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

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

From a710597c94dcfd364f6110380195658f7085e039 Mon Sep 17 00:00:00 2001
From: Nathan Owens <ndowens04@gmail.com>
Date: Mon, 23 Dec 2019 00:00:30 -0600
Subject: [PATCH] glusterfs: fix musl build

Signed-off-by: Nathan Owens <ndowens04@gmail.com>
---
 srcpkgs/glusterfs/patches/Makefile.patch | 26 ++++++++
 srcpkgs/glusterfs/patches/cross.patch    | 31 ++++++++++
 srcpkgs/glusterfs/patches/musl.patch     | 76 ++++++++++++++++++++++++
 srcpkgs/glusterfs/template               | 10 +++-
 4 files changed, 140 insertions(+), 3 deletions(-)
 create mode 100644 srcpkgs/glusterfs/patches/Makefile.patch
 create mode 100644 srcpkgs/glusterfs/patches/cross.patch
 create mode 100644 srcpkgs/glusterfs/patches/musl.patch

diff --git a/srcpkgs/glusterfs/patches/Makefile.patch b/srcpkgs/glusterfs/patches/Makefile.patch
new file mode 100644
index 00000000000..5c9e9f8f236
--- /dev/null
+++ b/srcpkgs/glusterfs/patches/Makefile.patch
@@ -0,0 +1,26 @@
+diff --git Makefile.in Makefile.in
+index 6df54da..3cd52c6 100644
+--- Makefile.in
++++ Makefile.in
+@@ -268,7 +268,7 @@ GFAPI_EXTRA_LDFLAGS = @GFAPI_EXTRA_LDFLAGS@
+ GFAPI_LIBS = @GFAPI_LIBS@
+ GFAPI_LT_VERSION = @GFAPI_LT_VERSION@
+ GFAPI_VERSION = @GFAPI_VERSION@
+-GF_CFLAGS = @GF_CFLAGS@
++GF_CFLAGS = @CFLAGS@
+ GF_CPPFLAGS = @GF_CPPFLAGS@
+ GF_DISTRIBUTION = @GF_DISTRIBUTION@
+ GF_FUSE_CFLAGS = @GF_FUSE_CFLAGS@
+diff --git contrib/fuse-util/Makefile.in contrib/fuse-util/Makefile.in
+index 45000a9..c084ab3 100644
+--- contrib/fuse-util/Makefile.in
++++ contrib/fuse-util/Makefile.in
+@@ -207,7 +207,7 @@ GFAPI_EXTRA_LDFLAGS = @GFAPI_EXTRA_LDFLAGS@
+ GFAPI_LIBS = @GFAPI_LIBS@
+ GFAPI_LT_VERSION = @GFAPI_LT_VERSION@
+ GFAPI_VERSION = @GFAPI_VERSION@
+-GF_CFLAGS = @GF_CFLAGS@
++GF_CFLAGS = @CFLAGS@
+ GF_CPPFLAGS = @GF_CPPFLAGS@
+ GF_DISTRIBUTION = @GF_DISTRIBUTION@
+ GF_FUSE_CFLAGS = @GF_FUSE_CFLAGS@
diff --git a/srcpkgs/glusterfs/patches/cross.patch b/srcpkgs/glusterfs/patches/cross.patch
new file mode 100644
index 00000000000..5834f1c305a
--- /dev/null
+++ b/srcpkgs/glusterfs/patches/cross.patch
@@ -0,0 +1,31 @@
+diff --git configure configure
+index 174a95b..f54df6b 100755
+--- configure
++++ configure
+@@ -3987,7 +3987,7 @@ sed 's/^/| /' conftest.$ac_ext >&5
+ 
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+ $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+-as_fn_error 77 "C compiler cannot create executables
++$as_echo "C compiler cannot create executables
+ See \`config.log' for more details" "$LINENO" 5; }
+ else
+   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+@@ -4030,7 +4030,7 @@ done
+ else
+   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+ $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+-as_fn_error $? "cannot compute suffix of executables: cannot compile and link
++$as_echo "cannot compute suffix of executables: cannot compile and link
+ See \`config.log' for more details" "$LINENO" 5; }
+ fi
+ rm -f conftest conftest$ac_cv_exeext
+@@ -4141,7 +4141,7 @@ sed 's/^/| /' conftest.$ac_ext >&5
+ 
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+ $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+-as_fn_error $? "cannot compute suffix of object files: cannot compile
++$as_echo "cannot compute suffix of object files: cannot compile
+ See \`config.log' for more details" "$LINENO" 5; }
+ fi
+ rm -f conftest.$ac_cv_objext conftest.$ac_ext
diff --git a/srcpkgs/glusterfs/patches/musl.patch b/srcpkgs/glusterfs/patches/musl.patch
new file mode 100644
index 00000000000..ef5e40ac112
--- /dev/null
+++ b/srcpkgs/glusterfs/patches/musl.patch
@@ -0,0 +1,76 @@
+diff --git rpc/rpc-lib/src/rpcsvc.c rpc/rpc-lib/src/rpcsvc.c
+index 5639abb..88ffd25 100644
+--- rpc/rpc-lib/src/rpcsvc.c
++++ rpc/rpc-lib/src/rpcsvc.c
+@@ -2287,6 +2287,7 @@ rpcsvc_program_register(rpcsvc_t *svc, rpcsvc_program_t *program,
+     memcpy(newprog, program, sizeof(*program));
+ 
+     INIT_LIST_HEAD(&newprog->program);
++#ifdef __GLIBC__
+     pthread_mutexattr_init(&thr_attr);
+     pthread_mutexattr_settype(&thr_attr, PTHREAD_MUTEX_ADAPTIVE_NP);
+ 
+@@ -2301,7 +2302,7 @@ rpcsvc_program_register(rpcsvc_t *svc, rpcsvc_program_t *program,
+ 
+     pthread_mutex_init(&newprog->thr_lock, &thr_attr);
+     pthread_cond_init(&newprog->thr_cond, NULL);
+-
++#endif
+     newprog->alive = _gf_true;
+ 
+     if (gf_async_ctrl.enabled) {
+diff --git api/src/glfs.h api/src/glfs.h
+index 279d11d..054730a 100644
+--- api/src/glfs.h
++++ api/src/glfs.h
+@@ -67,7 +67,7 @@
+  * is false and __USE_FILE_OFFSET64 is true, then go on to define
+  * off64_t using __off64_t.
+  */
+-#ifndef GF_BSD_HOST_OS
++#ifdef GF_BSD_HOST_OS
+ #if defined(__USE_FILE_OFFSET64) && !defined(__off64_t_defined)
+ typedef __off64_t off64_t;
+ #endif /* defined(__USE_FILE_OFFSET64) && !defined(__off64_t_defined) */
+diff --git contrib/fuse-lib/mount-common.c contrib/fuse-lib/mount-common.c
+index cffd4c0..5300fc2 100644
+--- contrib/fuse-lib/mount-common.c
++++ contrib/fuse-lib/mount-common.c
+@@ -22,6 +22,9 @@
+  * For changes that were made later and syncs with upstream,
+  * see the commit log and per-function comments.
+  */
++#ifndef __GLIBC__
++#include <paths.h>
++#endif
+ 
+ #ifdef GF_LINUX_HOST_OS
+ /* FUSE: cherry-picked bd99f9cf */
+diff --git xlators/mgmt/glusterd/src/glusterd-utils.c xlators/mgmt/glusterd/src/glusterd-utils.c
+index 5b84a3e..34a11d5 100644
+--- xlators/mgmt/glusterd/src/glusterd-utils.c
++++ xlators/mgmt/glusterd/src/glusterd-utils.c
+@@ -90,6 +90,9 @@
+ #define NLM_PROGRAM 100021
+ #define NLMV4_VERSION 4
+ #define NLMV1_VERSION 1
++#ifndef __GLIBC__
++#include <paths.h>
++#endif
+ 
+ gf_boolean_t
+ is_brick_mx_enabled(void)
+diff --git contrib/fuse-util/fusermount.c contrib/fuse-util/fusermount.c
+index ff743f7..31afa8a 100644
+--- contrib/fuse-util/fusermount.c
++++ contrib/fuse-util/fusermount.c
+@@ -58,6 +58,9 @@
+ #ifndef MS_PRIVATE
+ #define MS_PRIVATE (1<<18)
+ #endif
++#ifndef __GLIBC__
++#include <paths.h>
++#endif
+ 
+ static const char *progname;
+ 
diff --git a/srcpkgs/glusterfs/template b/srcpkgs/glusterfs/template
index 574d580df6d..4146d8317eb 100644
--- a/srcpkgs/glusterfs/template
+++ b/srcpkgs/glusterfs/template
@@ -5,9 +5,11 @@ revision=1
 build_style=gnu-configure
 configure_args="--with-mountutildir=/usr/bin ac_cv_file__etc_debian_version=no
  ac_cv_file__etc_SuSE_release=no ac_cv_file__etc_redhat_release=no
- ac_cv_file__etc_centos_release=no"
+ ac_cv_file__etc_centos_release=no ac_cv_lib_crypto_MD5=yes
+ ac_cv_lib_pthread_pthread_mutex_init=yes ac_cv_lib_dl_dlopen=yes
+ ac_cv_lib_z_adler32=yes ac_cv_header_argp_h=yes"
 pycompile_dirs="/usr/libexec/glusterfs/python/syncdaemon"
-hostmakedepends="automake flex libtool pkg-config python3"
+hostmakedepends="automake flex libtool pkg-config python3 rpcsvc-proto"
 makedepends="acl-devel libaio-devel libtirpc-devel libressl-devel
  liburcu-devel libxml2-devel rdma-core-devel sqlite-devel"
 # python is required by gsyncd.
@@ -20,7 +22,9 @@ distfiles="https://download.gluster.org/pub/gluster/glusterfs/${version%.*}/${ve
 checksum=8a872518bf9bd4dc1568f45c716bcde09e3bf7abf5b156ea90405e0fc2e9f07b
 
 case "$XBPS_TARGET_MACHINE" in
-	*-musl) broken="not yet supported";;
+	*-musl)
+		makedepends+="  argp-standalone libucontext-devel"
+		LDFLAGS="-largp -lucontext";;
 esac
 
 post_install() {

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2020-01-01  2:34 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-17727@inbox.vuxu.org>
2020-01-01  2:34 ` [PR PATCH] [Updated] [Needs testers] glusterfs: fix musl build voidlinux-github

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).