Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for Alpine Linux 3.21 / linux-musl #4450

Open
wants to merge 1 commit into
base: devel
Choose a base branch
from

Conversation

kohlschuetter
Copy link

Prerequisites:

sudo apk add alpine-sdk autoconf automake libtool rpcgen tcmalloc
tcmalloc-minimal flex bison openssl-dev util-linux-dev acl-dev
zlib-dev libxml2-dev argp-standalone liburing-dev linux-headers
userspace-rcu-dev libucontext-dev
sudo ln -s /usr/lib/libtcmalloc.so.4
/usr/lib/libtcmalloc.so
sudo ln -s /usr/lib/libtcmalloc_minimal.so.4
/usr/lib/libtcmalloc_minimal.so

Fixes: #268

@gluster-ant
Copy link
Collaborator

Can one of the admins verify this patch?

2 similar comments
@gluster-ant
Copy link
Collaborator

Can one of the admins verify this patch?

@gluster-ant
Copy link
Collaborator

Can one of the admins verify this patch?

@gluster-ant
Copy link
Collaborator

CLANG-FORMAT FAILURE:
Before merging the patch, this diff needs to be considered for passing clang-format

index 229a2bb5c..bd613a5e1 100644
--- a/libglusterfs/src/glusterfs/compat.h
+++ b/libglusterfs/src/glusterfs/compat.h
@@ -22,16 +22,17 @@
 
 #ifdef GF_LINUX_HOST_OS
 
-#ifndef HAVE_OFF64_T                                             
-typedef int64_t off64_t;                                           
-#endif                                                           
-#ifndef HAVE_INET_NET_PTON                                          
-#  include <stddef.h>                                            
-int inet_net_pton(int af, const char *src, void *dst, size_t size);
-#endif                             
-#ifndef _PATH_MOUNTED              
-#  define _PATH_MOUNTED "/etc/mtab"
-#endif                  
+#ifndef HAVE_OFF64_T
+typedef int64_t off64_t;
+#endif
+#ifndef HAVE_INET_NET_PTON
+#include <stddef.h>
+int
+inet_net_pton(int af, const char *src, void *dst, size_t size);
+#endif
+#ifndef _PATH_MOUNTED
+#define _PATH_MOUNTED "/etc/mtab"
+#endif
 
 #define UNIX_PATH_MAX 108
 
diff --git a/libglusterfs/src/syncop.c b/libglusterfs/src/syncop.c
index 9090e4376..153566073 100644
--- a/libglusterfs/src/syncop.c
+++ b/libglusterfs/src/syncop.c
@@ -29,9 +29,10 @@
 typedef greg_t libucontext_greg_t;
 typedef ucontext_t libucontext_ucontext_t;
 extern int  libucontext_getcontext(libucontext_ucontext_t *);
-extern void libucontext_makecontext(libucontext_ucontext_t *, void (*)(), int, ...);
-extern int  libucontext_setcontext(const libucontext_ucontext_t *);
-extern int  libucontext_swapcontext(libucontext_ucontext_t *, const libucontext_ucontext_t *);
+extern void libucontext_makecontext(libucontext_ucontext_t *, void (*)(), int,
+...); extern int  libucontext_setcontext(const libucontext_ucontext_t *); extern
+int  libucontext_swapcontext(libucontext_ucontext_t *, const
+libucontext_ucontext_t *);
 */
 #define getcontext libucontext_getcontext
 #define makecontext libucontext_makecontext

@pranithk
Copy link
Member

/run regression

@gluster-ant
Copy link
Collaborator

CLANG-FORMAT FAILURE:
Before merging the patch, this diff needs to be considered for passing clang-format

index 069b4ef3f..bd613a5e1 100644
--- a/libglusterfs/src/glusterfs/compat.h
+++ b/libglusterfs/src/glusterfs/compat.h
@@ -22,16 +22,17 @@
 
 #ifdef GF_LINUX_HOST_OS
 
-#ifndef HAVE_OFF64_T                                             
-typedef int64_t off64_t;                                           
-#endif                                                           
-#ifndef HAVE_INET_NET_PTON                                          
-#include <stddef.h>                                            
-int inet_net_pton(int af, const char *src, void *dst, size_t size);
-#endif                             
-#ifndef _PATH_MOUNTED              
+#ifndef HAVE_OFF64_T
+typedef int64_t off64_t;
+#endif
+#ifndef HAVE_INET_NET_PTON
+#include <stddef.h>
+int
+inet_net_pton(int af, const char *src, void *dst, size_t size);
+#endif
+#ifndef _PATH_MOUNTED
 #define _PATH_MOUNTED "/etc/mtab"
-#endif                  
+#endif
 
 #define UNIX_PATH_MAX 108
 

@kohlschuetter kohlschuetter force-pushed the ck/issue/268 branch 2 times, most recently from 939fff1 to 9905aa4 Compare January 15, 2025 14:41
@gluster-ant
Copy link
Collaborator

CLANG-FORMAT FAILURE:
Before merging the patch, this diff needs to be considered for passing clang-format

index a59a0c7d3..bd613a5e1 100644
--- a/libglusterfs/src/glusterfs/compat.h
+++ b/libglusterfs/src/glusterfs/compat.h
@@ -27,7 +27,8 @@ typedef int64_t off64_t;
 #endif
 #ifndef HAVE_INET_NET_PTON
 #include <stddef.h>
-int inet_net_pton(int af, const char *src, void *dst, size_t size);
+int
+inet_net_pton(int af, const char *src, void *dst, size_t size);
 #endif
 #ifndef _PATH_MOUNTED
 #define _PATH_MOUNTED "/etc/mtab"

@kohlschuetter
Copy link
Author

kohlschuetter commented Jan 15, 2025

Test failures in 32-bit-build and strfmt errors in a 32 build are related to infra, not this change:

Error: Failed to download metadata for repo 'local': Cannot download repomd.xml: Cannot download repodata/repomd.xml: All mirrors were tried

Prerequisites:

sudo apk add alpine-sdk autoconf automake libtool rpcgen flex bison \
  gperftools-dev tcmalloc-minimal openssl-dev util-linux-dev acl-dev \
  zlib-dev libxml2-dev argp-standalone liburing-dev linux-headers \
  userspace-rcu-dev libucontext-dev libtirpc-dev

Fixes: gluster#268
@pranithk
Copy link
Member

@kohlschuetter There is some issue with build pipelines that @mscherer is working on at #4451, review/merge will be delayed.

@mscherer
Copy link
Contributor

Yeah, the 32 part should be dropped until someone can explain why that's needed anymore and provide a way to have it tested (ideally with a patch). Smoke on centos7 should be dropped as well, freebsd will be removed for now (as I need to fix some stuff before getting a new BSD builder), and the last one for python is likely good to keep but need to be fixed to run somewhere.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Compatibility with Alpine Linux
4 participants