Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 914076 - app-containers/docker: automagic sys-apps/systemd dependency
Summary: app-containers/docker: automagic sys-apps/systemd dependency
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal with 2 votes (vote)
Assignee: William Hubbs
URL: https://github.com/moby/moby/issues/4...
Whiteboard:
Keywords:
: 928055 (view as bug list)
Depends on:
Blocks:
 
Reported: 2023-09-13 04:19 UTC by Sam James
Modified: 2024-04-29 08:04 UTC (History)
6 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-09-13 04:19:46 UTC
Noticed with qa-vdb from iwdevtools:
```
VDB: detected possibly incorrect RDEPEND (app-containers/docker-24.0.5)
app-arch/xz-utils     <
dev-db/sqlite:3       <
dev-libs/libltdl      <
net-firewall/iptables <
sys-libs/libseccomp   <
sys-process/procps    <
                      > sys-apps/systemd:=
```

docker seem to have an automagic dependency on systemd [0][1].

It also looks like, tangentially, we should be doing `tc-export PKG_CONFIG` in the ebuild [2].

[0] https://github.com/moby/moby/blob/3b04fd10e8311098bd786fa9e86460d15358acca/Makefile#L146
[1] https://github.com/moby/moby/blob/master/hack/make.sh#L87
[2] https://github.com/moby/moby/blob/master/hack/make.sh#L29C8-L29C18
Comment 1 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2024-01-17 06:32:47 UTC
ping...
Comment 2 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2024-02-15 15:47:46 UTC
ping
Comment 3 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2024-03-28 18:07:55 UTC
*** Bug 928055 has been marked as a duplicate of this bug. ***
Comment 4 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2024-03-28 18:08:06 UTC
ping!
Comment 5 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2024-04-13 22:23:20 UTC
ping!
Comment 6 Piotrek 2024-04-21 11:42:44 UTC
In my case when I use openrc, the installed docker binary package depended on systemd.
It returned the error /usr/bin/dockerd: error while loading shared libraries: libsystemd.so.0: cannot open shared object file: No such file or directory

The solution is to compile from source. Therefore, it seems to me if there is no binary package for openrc it should be ignored by portage
Comment 7 melser_regs@gmxpro.net 2024-04-25 08:19:55 UTC
same here, running on openrc and docker binary package requires libsystemd. Now my docker crashes. Have to compile from source for the time beeing
Comment 8 Larry the Git Cow gentoo-dev 2024-04-26 05:08:45 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f90e8d6be0c091a76845e423f93d96ff7f68a8bb

commit f90e8d6be0c091a76845e423f93d96ff7f68a8bb
Author:     William Hubbs <williamh@gentoo.org>
AuthorDate: 2024-04-26 05:06:40 +0000
Commit:     William Hubbs <williamh@gentoo.org>
CommitDate: 2024-04-26 05:08:38 +0000

    app-containers/docker: add 26.1.0
    
    Bug: https://bugs.gentoo.org/914076
    Closes: https://bugs.gentoo.org/921624
    Signed-off-by: William Hubbs <williamh@gentoo.org>

 app-containers/docker/Manifest             |   1 +
 app-containers/docker/docker-26.1.0.ebuild | 319 +++++++++++++++++++++++++++++
 2 files changed, 320 insertions(+)
Comment 9 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2024-04-26 10:21:26 UTC
I don't see a build option being passed there which means USE=-systemd wont prevent libsystemd use.
Comment 10 Piotrek 2024-04-26 18:17:55 UTC
Sam You have absolutly rigth! I check
Comment 11 William Hubbs gentoo-dev 2024-04-28 02:01:06 UTC
I don't see a build option for this, but I will check again.
Comment 12 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2024-04-28 02:02:38 UTC
(In reply to William Hubbs from comment #11)
> I don't see a build option for this, but I will check again.

You'll need to patch one in then ;)
Comment 13 Eli Schwartz 2024-04-28 06:06:03 UTC
There is definitely a build option, of sorts, for it.

ebuild:

# build binaries
./hack/make.sh dynbinary || die 'dynbinary failed'


In hack/make.sh:

if ${PKG_CONFIG} 'libsystemd' 2> /dev/null; then
	DOCKER_BUILDTAGS+=" journald"
fi



Unfortunately in classic golang style that means implementing the build yourself or patching the script that calls the script. The options exported before running hack/make/dynbinary don't seem particularly complicated though.
Comment 14 Larry the Git Cow gentoo-dev 2024-04-28 06:58:17 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b1bd5d199e46738f80666d4171726fc0941566b7

commit b1bd5d199e46738f80666d4171726fc0941566b7
Author:     Andreas K. Hüttel <dilfridge@gentoo.org>
AuthorDate: 2024-04-28 06:57:14 +0000
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: 2024-04-28 06:58:00 +0000

    app-containers/docker: Fix automagic systemd dependency
    
    This broke the binary packages for half our users.
    
    Closes: https://bugs.gentoo.org/914076
    Signed-off-by: Andreas K. Hüttel <dilfridge@gentoo.org>

 .../{docker-24.0.5.ebuild => docker-24.0.5-r1.ebuild}       |  8 ++++++--
 .../{docker-24.0.7.ebuild => docker-24.0.7-r1.ebuild}       |  8 ++++++--
 .../{docker-26.1.0.ebuild => docker-26.1.0-r1.ebuild}       |  3 +++
 .../docker/files/docker-24.0.5-automagic-systemd.patch      | 13 +++++++++++++
 .../docker/files/docker-26.1.0-automagic-systemd.patch      | 13 +++++++++++++
 5 files changed, 41 insertions(+), 4 deletions(-)