diff options
author | Zach van Rijn <me@zv.io> | 2024-12-26 14:21:02 -0600 |
---|---|---|
committer | Zach van Rijn <me@zv.io> | 2024-12-26 14:21:02 -0600 |
commit | 0aec696500f51285db1a2218283d6a06f0f47ee6 (patch) | |
tree | a3a7bfa51e65d5fddae5251d2811cc9f241bd46c | |
parent | eb7899c3ad60ae9f12a8e201bafe3fef1597741f (diff) | |
download | packages-zv/slurm.tar.gz packages-zv/slurm.tar.bz2 packages-zv/slurm.tar.xz packages-zv/slurm.zip |
experimental/slurm: new package.zv/slurm
-rw-r--r-- | experimental/slurm/APKBUILD | 47 | ||||
-rw-r--r-- | experimental/slurm/musl-getgrent.patch | 15 | ||||
-rw-r--r-- | experimental/slurm/musl-getpwent.patch | 15 | ||||
-rw-r--r-- | experimental/slurm/musl-nsap_addr.patch | 75 | ||||
-rw-r--r-- | experimental/slurm/musl-res_n.patch | 22 | ||||
-rw-r--r-- | experimental/slurm/musl-w_exitcode.patch | 15 |
6 files changed, 189 insertions, 0 deletions
diff --git a/experimental/slurm/APKBUILD b/experimental/slurm/APKBUILD new file mode 100644 index 000000000..f0233d94f --- /dev/null +++ b/experimental/slurm/APKBUILD @@ -0,0 +1,47 @@ +# Contributor: Zach van Rijn <me@zv.io> +# Maintainer: Zach van Rijn <me@zv.io> +pkgname=slurm +pkgver=24.11.0 +pkgrel=0 +pkgdesc="A Highly Scalable Workload Manager" +url="https://slurm.schedmd.com/" +arch="all" +license="GPL-2.0-only" +depends="" +makedepends="munge-dev" +subpackages="$pkgname-dev $pkgname-doc" +source="https://download.schedmd.com/slurm/slurm-$pkgver.tar.bz2 + musl-getgrent.patch + musl-getpwent.patch + musl-nsap_addr.patch + musl-res_n.patch + musl-w_exitcode.patch + " + +build() { + export CFLAGS="${CFLAGS} -D_GNU_SOURCE"; # FIXME + + ./configure \ + --build=$CBUILD \ + --host=$CHOST \ + --prefix=/usr \ + --sysconfdir=/etc \ + --mandir=/usr/share/man \ + --localstatedir=/var + make +} + +check() { + make check +} + +package() { + make DESTDIR="$pkgdir" install +} + +sha512sums="bce4872c7b2896fb15157768c8517a647500360d742ee974c5f69f3f3e179df382177a99eb1fc4c5bff0dbe55fbe55b8187f900aba2abdeafb1cc85ee156edf7 slurm-24.11.0.tar.bz2 +3fd767a9cd622d39da27a6b5a1e0f8f5e0020e1b3dd4e876aa664feba7b4a1b5394a9059383f10063a1926b0cdfebb9fb5a232ce4718cc38ccffe9e57be719f3 musl-getgrent.patch +7cca93f21acbfe1aec8bb65d74e1a1b7937092cb23c0000e032608d6e9ddd6ee15bb6fef6732fac95fcca7a61264f0f1b1df46b4c53db346970212515a066203 musl-getpwent.patch +198dc8424c51785b7b8b9e805205fae8b827559fd47c53bcbcd92922989f4e1b8c306345a28970a77436015266159bf30fd4f9f391804bfd2b07cd34a38a7c33 musl-nsap_addr.patch +f57d148d41ecba8a6011e4ecf68029e8df8f67419430cd61b5b4fe3a859c428bf340a10689bcbca72eb5732f01c3249f00928b38f393dd66f02468e33ee9c3f1 musl-res_n.patch +e53ebd825fcb0a3bcbd5b07d0dba058ac4158d6576aaa04be836dcbdb95a2ee7931275702838586cb4935eb56b66e57213581df2df2a8e5614a23cb35bf0560c musl-w_exitcode.patch" diff --git a/experimental/slurm/musl-getgrent.patch b/experimental/slurm/musl-getgrent.patch new file mode 100644 index 000000000..b1c538758 --- /dev/null +++ b/experimental/slurm/musl-getgrent.patch @@ -0,0 +1,15 @@ +Source: @pullmoll +Upstream: no +Reason: Musl libc does not have getgrent_r(3) + +--- a/src/slurmctld/groups.c 2019-12-20 21:43:45.000000000 +0100 ++++ b/src/slurmctld/groups.c 2020-02-23 12:23:19.570618716 +0100 +@@ -155,7 +155,7 @@ + * databases), the rest of this function essentially does + * nothing. */ + +-#if defined (__APPLE__) ++#if defined (__APPLE__) || !defined(__GLIBC__) + setgrent(); + while (1) { + if ((grp_result = getgrent()) == NULL) diff --git a/experimental/slurm/musl-getpwent.patch b/experimental/slurm/musl-getpwent.patch new file mode 100644 index 000000000..32b12db1d --- /dev/null +++ b/experimental/slurm/musl-getpwent.patch @@ -0,0 +1,15 @@ +Source: @pullmoll +Upstream: no +Reason: Musl libc does not have getpwent_r(3) + +--- a/src/slurmctld/groups.c 2020-02-23 12:46:32.011563195 +0100 ++++ b/src/slurmctld/groups.c 2020-02-23 12:48:19.259558919 +0100 +@@ -206,7 +206,7 @@ + } + endgrent(); + setpwent(); +-#if defined (__APPLE__) ++#if defined (__APPLE__) || !defined(__GLIBC__) + while ((pwd_result = getpwent()) != NULL) { + #else + while (!getpwent_r(&pw, pw_buffer, PW_BUF_SIZE, &pwd_result)) { diff --git a/experimental/slurm/musl-nsap_addr.patch b/experimental/slurm/musl-nsap_addr.patch new file mode 100644 index 000000000..96598d094 --- /dev/null +++ b/experimental/slurm/musl-nsap_addr.patch @@ -0,0 +1,75 @@ +Source: @pullmoll +Upstream: no +Reason: Musl libc does not have inet_nsap_addr(3) [undocumented] + +--- a/src/common/callerid.c 2019-12-20 21:43:45.000000000 +0100 ++++ b/src/common/callerid.c 2020-02-23 12:45:25.878565832 +0100 +@@ -81,6 +81,68 @@ + #define PATH_PROCNET_TCP6 "/proc/net/tcp6" + #endif + ++#if !defined(__GLIBC__) ++/* ++ * Copyright (c) 1996-1999 by Internet Software Consortium. ++ * ++ * Permission to use, copy, modify, and distribute this software for any ++ * purpose with or without fee is hereby granted, provided that the above ++ * copyright notice and this permission notice appear in all copies. ++ * ++ * THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS ++ * ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES ++ * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE ++ * CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL ++ * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ++ * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ++ * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS ++ * SOFTWARE. ++ */ ++#include <sys/types.h> ++#include <sys/param.h> ++#include <sys/socket.h> ++#include <netinet/in.h> ++#include <arpa/inet.h> ++#include <arpa/nameser.h> ++#include <ctype.h> ++#include <resolv.h> ++static char ++xtob(int c) { ++ return (c - (((c >= '0') && (c <= '9')) ? '0' : '7')); ++} ++ ++unsigned int inet_nsap_addr(const char *ascii, unsigned char *binary, int maxlen) ++{ ++ unsigned char c, nib; ++ unsigned int len = 0; ++ while ((c = *ascii++) != '\0' && len < (unsigned int)maxlen) { ++ if (c == '.' || c == '+' || c == '/') ++ continue; ++ if (!isascii(c)) ++ return (0); ++ c = toupper(c); ++ if (isxdigit(c)) { ++ nib = xtob(c); ++ c = *ascii++; ++ if (c != '\0') { ++ c = toupper(c); ++ if (isxdigit(c)) { ++ *binary++ = (nib << 4) | xtob(c); ++ len++; ++ } else { ++ return 0; ++ } ++ } else { ++ return 0; ++ } ++ } else { ++ return 0; ++ } ++ } ++ return len; ++} ++#endif /* !defined(__GLIBC__) */ ++ + strong_alias(callerid_get_own_netinfo, slurm_callerid_get_own_netinfo); + + static int _match_inode(callerid_conn_t *conn_result, ino_t *inode_search, diff --git a/experimental/slurm/musl-res_n.patch b/experimental/slurm/musl-res_n.patch new file mode 100644 index 000000000..4eb99a60e --- /dev/null +++ b/experimental/slurm/musl-res_n.patch @@ -0,0 +1,22 @@ +diff -ur a/src/common/slurm_resolv.c b/src/common/slurm_resolv.c +--- a/src/common/slurm_resolv.c 2024-12-26 19:55:15.785564425 +0000 ++++ b/src/common/slurm_resolv.c 2024-12-26 19:57:09.764381591 +0000 +@@ -56,6 +56,18 @@ + return slurm_sort_uint16_list_asc(&ctl1->priority, &ctl2->priority); + } + ++#ifndef res_ninit ++#define res_ninit(X) (X) ++#endif ++ ++#ifndef res_nsearch ++#define res_nsearch(X,D,I,S,B,L) res_search(D,I,S,B,L) ++#endif ++ ++#ifndef res_nclose ++#define res_nclose(X) (X) ++#endif ++ + extern list_t *resolve_ctls_from_dns_srv(void) + { + struct __res_state res; diff --git a/experimental/slurm/musl-w_exitcode.patch b/experimental/slurm/musl-w_exitcode.patch new file mode 100644 index 000000000..aed0b08c2 --- /dev/null +++ b/experimental/slurm/musl-w_exitcode.patch @@ -0,0 +1,15 @@ +diff -ur a/src/slurmd/slurmstepd/mgr.c b/src/slurmd/slurmstepd/mgr.c +--- a/src/slurmd/slurmstepd/mgr.c 2024-12-26 20:13:31.150372710 +0000 ++++ b/src/slurmd/slurmstepd/mgr.c 2024-12-26 20:14:46.092417904 +0000 +@@ -1340,6 +1340,11 @@ + return SLURM_ERROR; + } + ++ ++#ifndef W_EXITCODE ++#define W_EXITCODE(ret, sig) ((ret) << 8 | (sig)) ++#endif ++ + static int _spawn_job_container(stepd_step_rec_t *step) + { + jobacctinfo_t *jobacct = NULL; |