void-packages/srcpkgs/slurm-wlm/patches/musl-getgrent.patch
Đoàn Trần Công Danh 4b97cd2fb4 srcpkgs/s*: convert patches to -Np1
```sh
git grep -l '^patch_args=-Np0' "srcpkgs/$1*/template" |
while read template; do
	for p in ${template%/template}/patches/*; do
		sed -i '
			\,^[+-][+-][+-] /dev/null,b
			/^[*-]\+ [0-9]\+\(,[0-9]\+\)\? [*-]\+$/b
			s,^[*][*][*] ,&a/,
			/^--- /{
				s,\(^--- \)\(./\)*,\1a/,
				s,[.-][Oo][Rr][Ii][Gg]\([	/]\),\1,
				s/[.-][Oo][Rr][Ii][Gg]$//
				s/[.]patched[.]\([^.]\)/.\1/
				h
			}
			/^+++ -/{
				g
				s/^--- a/+++ b/
				b
			}
			s,\(^+++ \)\(./\)*,\1b/,
		' "$p"
	done
	sed -i '/^patch_args=/d' $template
done
```
2021-06-20 13:17:29 +07:00

15 lines
451 B
Diff

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)