Publish static landerctl binaries #24

Closed
opened 2023-11-16 18:40:26 +01:00 by Jef Roosens · 2 comments

We already publish static lander binaries for releases. I'd like to also extend this to landerctl, as this could make it easy to e.g. drop this binary on a server to upload files to the server.

One concern with this is how we would go about packaging libmagic statically, and more specifically the magic.mgc file, which it typically reads from disk.

In order to keep the binary size low, we should build our own version of libcurl that only contains the parts we really need (so just HTTP(S)).

We already publish static `lander` binaries for releases. I'd like to also extend this to `landerctl`, as this could make it easy to e.g. drop this binary on a server to upload files to the server. One concern with this is how we would go about packaging `libmagic` statically, and more specifically the `magic.mgc` file, which it typically reads from disk. In order to keep the binary size low, we should build our own version of libcurl that only contains the parts we really need (so just HTTP(S)).
Jef Roosens added the
Kind/Enhancement
label 2023-11-16 18:40:26 +01:00

Building a static package isn't too hard using Alpine Linux, but it seems a static libcurl binary does not necessarily work everywhere. When testing the static binary on the HPC (a Red Hat instance), I get the following error:

Libcurl encountered an error: error setting certificate file: /etc/ssl/certs/ca-certificates.crt

The mentioned file doesn't exist on that system.

Building a static package isn't too hard using Alpine Linux, but it seems a static libcurl binary does not necessarily work everywhere. When testing the static binary on the HPC (a Red Hat instance), I get the following error: ``` Libcurl encountered an error: error setting certificate file: /etc/ssl/certs/ca-certificates.crt ``` The mentioned file doesn't exist on that system.

The above problem was easily fixed by allowing the CA certificate file to be configured.

The above problem was easily fixed by allowing the CA certificate file to be configured.
Sign in to join this conversation.
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: Chewing_Bever/lander#24
There is no content yet.