general catch-all list for patches, questions, and discussions
 help / color / mirror / Atom feed
From: Kyle Meyer <kyle@kyleam.com>
To: misc@inbox.kyleam.com
Subject: [static-annex] Statically linked git-annex builds
Date: Sun, 03 Nov 2024 23:39:03 -0500	[thread overview]
Message-ID: <87o72v4nq0.fsf@kyleam.com> (raw)

On some machines, I want to install git-annex under a user's home
directory without touching the wider system.  These machines don't have
the tools for building git-annex from source (and, even if they did, I'd
rather not wait for the build).

Two possible solutions would be to

 1) install it from conda-forge

    https://git-annex.branchable.com/install/conda/

 2) download the git-annex's standalone build

    https://git-annex.branchable.com/install/Linux_standalone/
    https://joeyh.name/blog/entry/completely_linux_distribution-independent_packaging/

Both of these are nice options to have.  I'm unlikely to jump at *1*
given I'm not a Conda user.  That leaves *2*.

The standalone build has been around for a long time and has surely seen
a good amount of use (including via NeuroDebian's backports).  If I
recall correctly, there's some noticeable overhead.  And, for my use
case, I don't need external programs like Git and Rsync to be bundled.
But it would very likely do.

Still, I wondered how much effort it'd be to create a statically linked
build.  Searching around, I found that Pandoc uses the benz0li/ghc-musl
image for this purpose.

  https://github.com/jgm/pandoc/blob/4c66bf27903ca50fccfb0b025a9d5cde217a6cec/Makefile#L164-L176
  https://gitlab.com/benz0li/ghc-musl

With that very helpful starting point, I've put together the scripts at
<https://git.kyleam.com/static-annex/> to create statically linked
git-annex builds.  (For my current use cases, I'm concerned with only
x86_64 GNU/Linux machines, and I've disabled the webapp and assistant
features, as I don't use them.)

Everything seems to be working as expected.  For now, I'll continue to
use the latest version of these builds as my primary git-annex binary to
hopefully catch any issues.

I've uploaded the three most recent git-annex releases to
<https://dl.kyleam.com/git-annex/>.

                 reply	other threads:[~2024-11-04  4:39 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://git.kyleam.com/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87o72v4nq0.fsf@kyleam.com \
    --to=kyle@kyleam.com \
    --cc=misc@inbox.kyleam.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).