Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Christian Stewart <christian@paral.in>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH v3 2/8] dumb-init: new package
Date: Fri, 06 Apr 2018 17:50:30 -0400	[thread overview]
Message-ID: <87o9iw57ix.fsf@paral.in> (raw)
In-Reply-To: <20180401144325.52bc543f@windsurf>

Hi Thomas,

Revisiting this now.

Thomas Petazzoni <thomas.petazzoni@bootlin.com> writes:
> On Sat,  3 Mar 2018 19:43:40 -0500, Christian Stewart wrote:
>> dumb-init is a minimal init process to act as PID 1 for containers.
>> 
>> Static compilation is used, as dumb-init will typically be executed inside a
>> container.

> So maybe what's happening is that dumb-init is *executed* inside the
> container but is actually provided by the host environment outside the
> container, and you want to be able to use the same dumb-init binary
> regardless of what the container contains. Is that the use case ?

The dumb-init process is executed inside the container and has no access
to the host environment. If it is compiled dynamically, the container
environment must match the target environment in terms of dynamically
linked parts.

> The next issue is that your package assumes that static linking is
> possible. But Buildroot defaults to BR2_SHARED_LIBS, which means that
> the toolchain may not necessarily provide libc.a and allow static
> linking.

I'm able to compile with BR2_SHARED_LIBS and still produce a static
output with -static. Why is this possible? I remember seeing an email
about this at some point, where it was stated that glibc.a or so was not
produced with BR2_SHARED_LIBS. Why can I then compile this package in
this way?

> Alternatively, you could decide to build dumb-init statically only
> if !BR2_SHARED_LIBS, but that means that in the default Buildroot
> configurations, dumb-init would be linked dynamically.

This wouldn't work unfortunately in 95% of the intended cases where
dumb-init would be used.

Best,
Christian Stewart

  reply	other threads:[~2018-04-06 21:50 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-04  0:43 [Buildroot] [PATCH v3 0/8] upgrade docker-engine and associated components Christian Stewart
2018-03-04  0:43 ` [Buildroot] [PATCH v3 1/8] tini: new package Christian Stewart
2018-03-04  0:43 ` [Buildroot] [PATCH v3 2/8] dumb-init: " Christian Stewart
2018-03-31 15:42   ` Romain Naour
2018-03-31 17:42     ` Christian Stewart
2018-04-01 12:43   ` Thomas Petazzoni
2018-04-06 21:50     ` Christian Stewart [this message]
2018-04-07  6:20       ` Thomas Petazzoni
2018-04-10 16:24         ` Christian Stewart
2018-03-04  0:43 ` [Buildroot] [PATCH v3 3/8] docker-engine: add support for init processes Christian Stewart
2018-03-04  0:43 ` [Buildroot] [PATCH v3 4/8] docker-proxy: new package Christian Stewart
2018-03-11 21:34   ` Peter Korsgaard
2018-03-04  0:43 ` [Buildroot] [PATCH v3 5/8] docker-engine: add dependency on docker-proxy Christian Stewart
2018-03-11 21:35   ` Peter Korsgaard
2018-03-04  0:43 ` [Buildroot] [PATCH v3 6/8] runc: bump to 9f9c96235cc Christian Stewart
2018-03-04  0:43 ` [Buildroot] [PATCH v3 7/8] docker-containerd: bump to v1.0.2 Christian Stewart
2018-03-04  0:43 ` [Buildroot] [PATCH v3 8/8] docker-engine: bump to v18.03.0-ce-rc1 Christian Stewart

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=87o9iw57ix.fsf@paral.in \
    --to=christian@paral.in \
    --cc=buildroot@busybox.net \
    /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