Re: Generic binaries depending on libcurl3

Thomas Leonard <[email protected]> Sat, 23 Nov 2019 14:03:39 +0000
Newsgroups gmane.comp.file-systems.zero-install.devel
Message-ID <CAG4opy8N-hKRx1PNn+XTJt7hY5AgFkhbO=eQT1ft1mMVzFiLZg@mail.gmail.com>
On Sun, 17 Nov 2019 at 18:37, Bastian Eicher <[email protected]> wrote:
>
> The generic Linux binaries for 0install
> (https://0install.net/injector.html#linux-generic) depend on libcurl3.
> However, this library is no longer available in Debian starting with Buster
> or Ubuntu starting with 18.10.
>
> Installing the suggested replacement library libcurl4 results in:
> 0install: /usr/lib/x86_64-linux-gnu/libcurl.so.4: version `CURL_OPENSSL_3'
> not found (required by 0install)
>
> Maybe we should look back into possibilities for statically linking
> 0install's dependencies?

This Dockerfile seems to work now (using the latest Alpine edge,
building from a 0install Git clone):

FROM ocurrent/opam:alpine-3.10-ocaml-4.08 AS build
RUN opam depext -i cppo yojson xmlm ounit lwt_react ocurl obus lablgtk
lwt_glib sha dune
RUN sudo sudo sed -i -e 's/v[[:digit:]]\..*\//edge\//g' /etc/apk/repositories
RUN sudo apk add --no-cache curl-static openssl-libs-static
zlib-static nghttp2-static
COPY 0install.opam /src/
WORKDIR /src
RUN opam install --deps-only .
COPY --chown=opam:opam . /src/
RUN sudo chown opam /src
RUN echo "(lang dune 1.11)" > dune-workspace
RUN echo "(env (_ (flags -cclib -static -cclib -lssl -cclib -lcrypto
-cclib -lz -cclib -lnghttp2)))" >> dune-workspace
RUN opam exec -- make all
RUN strip /src/dist/files/0install
#RUN opam exec -- make test

FROM alpine:3.10
RUN apk add --no-cache unzip gnupg ca-certificates
COPY --from=build /src/dist/files/0install /usr/bin/0install

You don't get the GTK plugin though, because it uses dynamic linking to load it.


-- 
talex5 (GitHub/Twitter)        http://roscidus.com/blog/
GPG: 5DD5 8D70 899C 454A 966D  6A51 7513 3C8F 94F6 E0CC