git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "brian m. carlson" <sandals@crustytoothpaste.net>
To: Junio C Hamano <gitster@pobox.com>
Cc: Scott Moser <scott.moser@chainguard.dev>, git@vger.kernel.org
Subject: Re: Can dependency on /bin/sh be removed?
Date: Mon, 15 Jul 2024 21:46:01 +0000	[thread overview]
Message-ID: <ZpWYmZwcfZMeKpfe@tapette.crustytoothpaste.net> (raw)
In-Reply-To: <xmqq8qy21k9f.fsf@gitster.g>

[-- Attachment #1: Type: text/plain, Size: 1205 bytes --]

On 2024-07-15 at 20:18:52, Junio C Hamano wrote:
> Having said that, I do not think you can avoid /bin/sh if your goal
> is "minimal image *to run git*", as there are many things we run,
> starting from the editor and the pager and end-user hooks.  The
> credential helper is probably the least of your problems.  What's a
> minimum /bin/dash image cost these days?

Debian provides busybox-static, a statically linked, multi-call busybox
binary including sh, other POSIX utilities, and quite a lot of other
features, all in a 1.9 MiB binary.  If you don't need, say, httpd or
dpkg emulation, you can build a much more stripped down version for less
disk usage.  Alpine Linux is based off of busybox (dynamically linked at
808 KiB), so we can assume that that configuration works just fine.

We know that Git for Windows also ships a configuration using busybox
successfully (although with a much larger size).

I am very interested to know what kind of restricted environment needs
Git (especially with a credential helper) but doesn't ship with a POSIX
sh.  I suppose a restricted Windows environment could qualify.
-- 
brian m. carlson (they/them or he/him)
Toronto, Ontario, CA

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 262 bytes --]

  reply	other threads:[~2024-07-15 21:46 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-07-15 18:41 Can dependency on /bin/sh be removed? Scott Moser
2024-07-15 20:18 ` Junio C Hamano
2024-07-15 21:46   ` brian m. carlson [this message]
2024-07-15 23:52   ` Jeff King
2024-07-16 15:23     ` Scott Moser
2024-07-16 16:32       ` Junio C Hamano
2024-07-16 19:23     ` Jeff King
2024-07-16 20:02       ` Junio C Hamano
2024-07-17  5:52         ` Jeff King
2024-07-16 21:30       ` Andreas Schwab
2024-07-16 21:40         ` Paul Smith
2024-07-17  5:53         ` Jeff King

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

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

  git send-email \
    --in-reply-to=ZpWYmZwcfZMeKpfe@tapette.crustytoothpaste.net \
    --to=sandals@crustytoothpaste.net \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=scott.moser@chainguard.dev \
    /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 NNTP newsgroup(s).