diff --git a/master_changes.md b/master_changes.md index 20e3f877d44..df512ee3f72 100644 --- a/master_changes.md +++ b/master_changes.md @@ -71,6 +71,7 @@ users) ## Infrastructure ## Release scripts + * Workaround incorrect `NGROUPS_MAX` in `` in musl for release builds [#5383 @dra27] ## Admin diff --git a/release/Dockerfile.in b/release/Dockerfile.in index fd10c573325..cd5cb183751 100644 --- a/release/Dockerfile.in +++ b/release/Dockerfile.in @@ -14,6 +14,7 @@ RUN tar xzf %OCAMLV%.tar.gz WORKDIR ocaml-%OCAMLV% RUN sed -i 's/gnueabi/*eabi/' configure RUN sed -i 's/musl/musl*/' configure +RUN sed -i -e 's/NGROUPS_MAX/65536/' otherlibs/unix/getgroups.c RUN ./configure %CONF% -prefix /usr/local RUN make "-j$(nproc)" && make install && rm -rf /root/ocaml-%OCAMLV% /root/ocaml-%OCAMLV%.tar.gz diff --git a/release/Makefile b/release/Makefile index 1c5f1ec0bf6..394b19b757d 100644 --- a/release/Makefile +++ b/release/Makefile @@ -52,17 +52,19 @@ build/%.image: build/Dockerfile.% docker build -t opam-build-$* -f $^ build touch $@ +SHA_LINK = $(if $(shell tar xOf "$(OUTDIR)/opam-full-$(VERSION).tar.gz" opam-full-$(VERSION)/src_ext/Makefile.sources | grep -F URL_sha),-lsha_stubs) + # Actually, this is for alpine 3.13, and varies CLINKING_linux = \ -Wl,-Bstatic \ --lunix -lmccs_stubs -lmccs_glpk_stubs -lsha_stubs \ +-lunix -lmccs_stubs -lmccs_glpk_stubs $(SHA_LINK) \ -lstdc++ \ -static-libgcc \ -static # -Wl,-Bdynamic CLINKING_macos = \ --lunix -lmccs_stubs -lmccs_glpk_stubs -lsha_stubs \ +-lunix -lmccs_stubs -lmccs_glpk_stubs $(SHA_LINK) \ -lstdc++ CLINKING_openbsd = $(CLINKING_macos)