Accepting request 421307 from Virtualization:containers:1.12-RC

- use gcc6-go instead of gcc5-go (bsc#988408) 
- build ppc64le with gc-go because this version builds with gc-go 1.6
- remove bnc964673-boltdb-metadata-recovery.patch because it has already
  been merged

- update to v1.12.0 (bsc#995058)
  see detailed changelog at
    https://github.com/docker/docker/releases/tag/v1.12.0
- disable test that fail in obs build context
- only run unit tests on architectures that provide the go list and go test
  tools
- disable dockerd, parser, integration test, and devicemapper related tests
  on versions below SLE12 and openSUSE_13.2
- bump test timeout to 10m (for aarch64)
- run unit tests during the build
- Adapt docker.service file.
- adapt install sections for gccgo builds: gccgo build are not built in separate
  folders for client and daemon. They both reside in dyngccgo.
- gcc-go-patch: link against systemd when compiling the daemon.
- Add disable-pprof-trace.patch
  pprof.Trace() is not available in go version <= 1.4 which we use to build SLES
  packages. This patch comments out the pprof.Trace() section.
- update gcc-go-patch and docker-mount-secrets.patch

- Fixed binary split, install both required binaries correctly

OBS-URL: https://build.opensuse.org/request/show/421307
OBS-URL: https://build.opensuse.org/package/show/Virtualization:containers/docker?expand=0&rev=127
This commit is contained in:
Christian Brauner 2016-08-23 14:44:42 +00:00 committed by Git OBS Bridge
parent 031a7bc93c
commit d470da093f
11 changed files with 202 additions and 181 deletions

View File

@ -3,8 +3,8 @@
<param name="url">https://github.com/docker/docker.git</param>
<param name="scm">git</param>
<param name="exclude">.git</param>
<param name="versionformat">1.11.2</param>
<param name="revision">v1.11.2</param>
<param name="versionformat">1.12.0</param>
<param name="revision">v1.12.0</param>
</service>
<service name="recompress" mode="disabled">
<param name="file">docker-*.tar</param>

View File

@ -1,95 +0,0 @@
From 8f0e47cee034cdc08ca515d98a6733130908fc26 Mon Sep 17 00:00:00 2001
From: Aleksa Sarai <asarai@suse.de>
Date: Mon, 16 May 2016 23:53:46 +1000
Subject: [PATCH] db: fix recovery from unsynced metadata
Bolt stores the two latest transactions' metadata, but previously did
not recover from validation failures in the latest by using the second
latest. Fix this by correctly handling validation failures in db.go, as
well as returning the metadata with highest txid which is also valid in
DB.meta().
Signed-off-by: Aleksa Sarai <asarai@suse.de>
---
vendor/src/github.com/boltdb/bolt/db.go | 49 +++++++++++++++++++++++++--------
1 file changed, 38 insertions(+), 11 deletions(-)
diff --git a/vendor/src/github.com/boltdb/bolt/db.go b/vendor/src/github.com/boltdb/bolt/db.go
index 501d36aac24a..f713485ffab6 100644
--- a/vendor/src/github.com/boltdb/bolt/db.go
+++ b/vendor/src/github.com/boltdb/bolt/db.go
@@ -200,9 +200,15 @@ func Open(path string, mode os.FileMode, options *Options) (*DB, error) {
if _, err := db.file.ReadAt(buf[:], 0); err == nil {
m := db.pageInBuffer(buf[:], 0).meta()
if err := m.validate(); err != nil {
- return nil, err
+ // If we can't read the page size, we can assume it's the same
+ // as the OS -- since that's how the page size was chosen in the
+ // first place.
+ // XXX: Does this cause issues with opening a database on a
+ // different OS than the one it was created on?
+ db.pageSize = os.Getpagesize()
+ } else {
+ db.pageSize = int(m.pageSize)
}
- db.pageSize = int(m.pageSize)
}
}
@@ -262,12 +268,13 @@ func (db *DB) mmap(minsz int) error {
db.meta0 = db.page(0).meta()
db.meta1 = db.page(1).meta()
- // Validate the meta pages.
- if err := db.meta0.validate(); err != nil {
- return err
- }
- if err := db.meta1.validate(); err != nil {
- return err
+ // Validate the meta pages. We only return an error if both meta pages fail
+ // validation, since meta0 failing validation means that it wasn't saved
+ // properly -- but we can recover using meta1. And vice-versa.
+ err0 := db.meta0.validate()
+ err1 := db.meta1.validate()
+ if err0 != nil && err1 != nil {
+ return fmt.Errorf("meta0(%v) meta1(%v)", err0, err1)
}
return nil
@@ -778,10 +785,30 @@ func (db *DB) pageInBuffer(b []byte, id pgid) *page {
// meta retrieves the current meta page reference.
func (db *DB) meta() *meta {
- if db.meta0.txid > db.meta1.txid {
- return db.meta0
+ // We have to return the meta with the highest txid which doesn't fail
+ // validation. Otherwise, we can cause errors when in fact the database is
+ // in a consistent state. metaA is the one with the higher txid.
+ metaA := db.meta0
+ metaB := db.meta1
+ if db.meta1.txid > db.meta0.txid {
+ metaA = db.meta1
+ metaB = db.meta0
}
- return db.meta1
+
+ errA := metaA.validate()
+ errB := metaB.validate()
+
+ if errA == nil {
+ return metaA
+ }
+
+ if errB == nil {
+ return metaB
+ }
+
+ // This should never be reached, because both meta1 and meta0 were validated
+ // on mmap() and we do fsync() on every write.
+ panic("both meta0 and meta1 could not be validated in DB.meta()!")
}
// allocate returns a contiguous block of memory starting at a given page.
--
2.8.2

14
disable-pprof-trace.patch Normal file
View File

@ -0,0 +1,14 @@
diff --git a/api/server/profiler.go b/api/server/profiler.go
index 8bf8384..c062f2d 100644
--- a/api/server/profiler.go
+++ b/api/server/profiler.go
@@ -18,7 +18,8 @@ func profilerSetup(mainRouter *mux.Router) {
r.HandleFunc("/pprof/cmdline", pprof.Cmdline)
r.HandleFunc("/pprof/profile", pprof.Profile)
r.HandleFunc("/pprof/symbol", pprof.Symbol)
- r.HandleFunc("/pprof/trace", pprof.Trace)
+ // pprof.Trace is not available in go <= 1.4
+ // r.HandleFunc("/pprof/trace", pprof.Trace)
r.HandleFunc("/pprof/block", pprof.Handler("block").ServeHTTP)
r.HandleFunc("/pprof/heap", pprof.Handler("heap").ServeHTTP)
r.HandleFunc("/pprof/goroutine", pprof.Handler("goroutine").ServeHTTP)

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:279ade8e90c40e4a9b10fe570313aef0672b9ee3858d6ce78295ee448775db34
size 8797368

3
docker-1.12.0.tar.xz Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:ce78b3e58c579151d52f60d49ab42509210649a6fe2ad3d1d12befe7921d38c6
size 10734304

View File

@ -21,10 +21,10 @@ Signed-off-by: Aleksa Sarai <asarai@suse.de>
6 files changed, 314 insertions(+), 2 deletions(-)
create mode 100644 daemon/suse_secrets.go
Index: docker-1.11.0/container/container_unix.go
===================================================================
--- docker-1.11.0.orig/container/container_unix.go
+++ docker-1.11.0/container/container_unix.go
diff --git a/container/container_unix.go b/container/container_unix.go
index 8273bdb..d86d783 100644
--- a/container/container_unix.go
+++ b/container/container_unix.go
@@ -34,6 +34,8 @@ type Container struct {
HostsPath string
ShmPath string
@ -34,7 +34,7 @@ Index: docker-1.11.0/container/container_unix.go
SeccompProfile string
NoNewPrivileges bool
}
@@ -243,6 +245,67 @@ func (container *Container) IpcMounts()
@@ -243,6 +245,67 @@ func (container *Container) IpcMounts() []Mount {
return mounts
}
@ -102,11 +102,11 @@ Index: docker-1.11.0/container/container_unix.go
// UpdateContainer updates configuration of a container.
func (container *Container) UpdateContainer(hostConfig *containertypes.HostConfig) error {
container.Lock()
Index: docker-1.11.0/daemon/container_operations_unix.go
===================================================================
--- docker-1.11.0.orig/daemon/container_operations_unix.go
+++ docker-1.11.0/daemon/container_operations_unix.go
@@ -182,6 +182,56 @@ func (daemon *Daemon) getIpcContainer(co
diff --git a/daemon/container_operations_unix.go b/daemon/container_operations_unix.go
index c8a0b93..036c65a 100644
--- a/daemon/container_operations_unix.go
+++ b/daemon/container_operations_unix.go
@@ -168,6 +168,56 @@ func (daemon *Daemon) getIpcContainer(container *container.Container) (*containe
return c, nil
}
@ -163,11 +163,11 @@ Index: docker-1.11.0/daemon/container_operations_unix.go
func (daemon *Daemon) setupIpcDirs(c *container.Container) error {
var err error
Index: docker-1.11.0/daemon/daemon_unix.go
===================================================================
--- docker-1.11.0.orig/daemon/daemon_unix.go
+++ docker-1.11.0/daemon/daemon_unix.go
@@ -786,8 +786,10 @@ func initBridgeDriver(controller libnetw
diff --git a/daemon/daemon_unix.go b/daemon/daemon_unix.go
index 9e231c5..1138c9a 100644
--- a/daemon/daemon_unix.go
+++ b/daemon/daemon_unix.go
@@ -795,8 +795,10 @@ func initBridgeDriver(controller libnetwork.NetworkController, config *Config) e
// the container from unwanted side-effects on the rw layer.
func setupInitLayer(initLayer string, rootUID, rootGID int) error {
for pth, typ := range map[string]string{
@ -180,35 +180,35 @@ Index: docker-1.11.0/daemon/daemon_unix.go
"/proc": "dir",
"/sys": "dir",
"/.dockerenv": "file",
Index: docker-1.11.0/daemon/oci_linux.go
===================================================================
--- docker-1.11.0.orig/daemon/oci_linux.go
+++ docker-1.11.0/daemon/oci_linux.go
@@ -634,12 +634,19 @@ func (daemon *Daemon) createSpec(c *cont
diff --git a/daemon/oci_linux.go b/daemon/oci_linux.go
index e238640..0d8bb47 100644
--- a/daemon/oci_linux.go
+++ b/daemon/oci_linux.go
@@ -655,6 +655,10 @@ func (daemon *Daemon) createSpec(c *container.Container) (*libcontainerd.Spec, e
if err := daemon.setupIpcDirs(c); err != nil {
return nil, err
}
+ // SUSE:secrets :: We need to set up the container-specific secrets tmpfs here.
+ if err := daemon.setupSuseSecrets(c); err != nil {
+ return nil, err
+ }
+
mounts, err := daemon.setupMounts(c)
ms, err := daemon.setupMounts(c)
if err != nil {
return nil, err
@@ -662,6 +666,8 @@ func (daemon *Daemon) createSpec(c *container.Container) (*libcontainerd.Spec, e
}
mounts = append(mounts, c.IpcMounts()...)
mounts = append(mounts, c.TmpfsMounts()...)
ms = append(ms, c.IpcMounts()...)
ms = append(ms, c.TmpfsMounts()...)
+ // SUSE:secrets :: We add the mounts to the OCI config which containerd then uses.
+ mounts = append(mounts, c.SuseSecretMounts()...)
if err := setMounts(daemon, &s, c, mounts); err != nil {
+ ms = append(ms, c.SuseSecretMounts()...)
sort.Sort(mounts(ms))
if err := setMounts(daemon, &s, c, ms); err != nil {
return nil, fmt.Errorf("linux mounts: %v", err)
}
Index: docker-1.11.0/daemon/start.go
===================================================================
--- docker-1.11.0.orig/daemon/start.go
+++ docker-1.11.0/daemon/start.go
@@ -164,6 +164,12 @@ func (daemon *Daemon) Cleanup(container
diff --git a/daemon/start.go b/daemon/start.go
index 4862969..6d3b56e 100644
--- a/daemon/start.go
+++ b/daemon/start.go
@@ -164,6 +164,12 @@ func (daemon *Daemon) Cleanup(container *container.Container) {
container.UnmountIpcMounts(detachMounted)
@ -221,10 +221,11 @@ Index: docker-1.11.0/daemon/start.go
if err := daemon.conditionalUnmountOnCleanup(container); err != nil {
// FIXME: remove once reference counting for graphdrivers has been refactored
// Ensure that all the mounts are gone
Index: docker-1.11.0/daemon/suse_secrets.go
===================================================================
diff --git a/daemon/suse_secrets.go b/daemon/suse_secrets.go
new file mode 100644
index 0000000..417a1a9
--- /dev/null
+++ docker-1.11.0/daemon/suse_secrets.go
+++ b/daemon/suse_secrets.go
@@ -0,0 +1,184 @@
+package daemon
+
@ -410,3 +411,6 @@ Index: docker-1.11.0/daemon/suse_secrets.go
+
+ return secrets, nil
+}
--
2.8.1

View File

@ -1,3 +1,38 @@
-------------------------------------------------------------------
Tue Aug 23 11:35:09 UTC 2016 - jmassaguerpla@suse.com
- use gcc6-go instead of gcc5-go (bsc#988408)
- build ppc64le with gc-go because this version builds with gc-go 1.6
- remove bnc964673-boltdb-metadata-recovery.patch because it has already
been merged
-------------------------------------------------------------------
Tue Aug 23 11:34:09 UTC 2016 - cbrauner@suse.com
- update to v1.12.0 (bsc#995058)
see detailed changelog at
https://github.com/docker/docker/releases/tag/v1.12.0
- disable test that fail in obs build context
- only run unit tests on architectures that provide the go list and go test
tools
- disable dockerd, parser, integration test, and devicemapper related tests
on versions below SLE12 and openSUSE_13.2
- bump test timeout to 10m (for aarch64)
- run unit tests during the build
- Adapt docker.service file.
- adapt install sections for gccgo builds: gccgo build are not built in separate
folders for client and daemon. They both reside in dyngccgo.
- gcc-go-patch: link against systemd when compiling the daemon.
- Add disable-pprof-trace.patch
pprof.Trace() is not available in go version <= 1.4 which we use to build SLES
packages. This patch comments out the pprof.Trace() section.
- update gcc-go-patch and docker-mount-secrets.patch
-------------------------------------------------------------------
Tue Aug 23 11:34:09 UTC 2016 - tboerger@suse.com
- Fixed binary split, install both required binaries correctly
-------------------------------------------------------------------
Tue Aug 16 09:39:11 UTC 2016 - asarai@suse.com

View File

@ -6,20 +6,11 @@ Requires=docker.socket containerd.socket
[Service]
EnvironmentFile=/etc/sysconfig/docker
ExecStart=/usr/bin/docker daemon -H fd:// --containerd /run/containerd/containerd.sock $DOCKER_NETWORK_OPTIONS $DOCKER_OPTS
ExecReload=/bin/kill -s HUP $MAINPID
# Having non-zero Limit*s causes performance problems due to accounting overhead
# in the kernel. We recommend using cgroups to do container-local accounting.
LimitNOFILE=infinity
LimitNPROC=infinity
ExecStart=/usr/bin/dockerd -H fd:// --containerd /run/containerd/containerd.sock $DOCKER_NETWORK_OPTIONS $DOCKER_OPTS
LimitNOFILE=1048576
LimitNPROC=1048576
LimitCORE=infinity
# Uncomment TasksMax if your systemd version supports it.
# Only systemd 226 and above support this property.
#TasksMax=infinity
# Set delegate yes so that systemd does not reset the cgroups of docker containers
# Only systemd 218 and above support this property.
#Delegate=yes
# KillMode=process is not necessary because of how we set up containerd.
[Install]
WantedBy=multi-user.target

View File

@ -21,9 +21,9 @@
%global docker_migration_testfile %{docker_store}/.suse-image-migration-v1to2-complete
%global docker_migration_warnfile %{docker_store}/docker-update-message.txt
%define docker_graph %{docker_store}/graph
%define git_version 9e83765
%define go_arches %ix86 x86_64 aarch64
%define version_unconverted 1.11.2
%define git_version 8eab29e
%define go_arches %ix86 x86_64 aarch64 ppc64le
%define docker_version 1.12.0
%define __arch_install_post export NO_BRP_STRIP_DEBUG=true
# When upgrading to a new version requires the service not to be restarted
# Due to a long migration process update last_migration_version to the new version
@ -31,7 +31,7 @@
# 1.10.1
%global last_migration_version 1.10.1
Name: docker
Version: 1.11.2
Version: 1.12.0
Release: 0
Summary: The Linux container runtime
License: Apache-2.0
@ -45,15 +45,12 @@ Source6: docker-rpmlintrc
Source7: README_SUSE.md
Source8: docker-audit.rules
Source9: docker-update-message.txt
# Required to overcome some limitations of gcc-go: https://groups.google.com/forum/#!msg/golang-nuts/SlGCPYkjxo4/4DjcjXRCqAkJ
Patch101: gcc-go-patches.patch
Patch102: netlink_gcc_go.patch
Patch103: netlink_netns_powerpc.patch
# Fixes for architecture-specific issues (gcc-go).
Patch100: gcc-go-patches.patch
Patch101: netlink_gcc_go.patch
Patch102: netlink_netns_powerpc.patch
Patch103: disable-pprof-trace.patch
Patch200: docker-mount-secrets.patch
# This fixes bnc#964673. This fix is in boltdb upstream, but has yet to be
# merged into Docker (in a vendor commit). This patch was cherry-picked from
# bolt#555.
Patch302: bnc964673-boltdb-metadata-recovery.patch
BuildRequires: audit
BuildRequires: bash-completion
BuildRequires: device-mapper-devel >= 1.2.68
@ -71,8 +68,8 @@ Requires: ca-certificates-mozilla
# execdrivers of Docker. NOTE: The version pinning here matches upstream's
# Dockerfile to ensure that we don't use a slightly incompatible version of
# runC or containerd (which would be bad).
Requires: containerd = 0.2.2
Requires: runc = 0.1.1
Requires: containerd = 0.2.3
Requires: runc = 0.1.1+gitcc29e3d
# Provides mkfs.ext4 - used by Docker when devicemapper storage driver is used
Requires: e2fsprogs
Requires: git-core >= 1.7
@ -98,7 +95,7 @@ Source5: docker_systemd_lt_214.socket
BuildRequires: go >= 1.5
BuildRequires: go-go-md2man
%else
BuildRequires: gcc5-go >= 5.0
BuildRequires: gcc6-go >= 6.1
%endif
%if 0%{?is_opensuse}
ExcludeArch: s390x
@ -150,7 +147,7 @@ BuildArch: noarch
%ifarch %{go_arches}
Requires: go >= 1.4
%else
Requires: gcc5-go >= 5.0
Requires: gcc6-go >= 6.1
%endif
%description test
@ -164,12 +161,11 @@ Test package for docker. It contains the source code and the tests.
%patch200 -p1
%endif
%ifnarch %{go_arches}
%patch100 -p1
%patch101 -p1
%patch102 -p1
%patch103 -p1
%endif
# bnc#964673
%patch302 -p1
cp %{SOURCE7} .
%build
@ -177,7 +173,7 @@ cp %{SOURCE7} .
tmphack=/tmp/dirty-hack
[ -e $tmphack ] && rm -rf $tmphack
mkdir $tmphack
ln -s %{_bindir}/go-5 $tmphack/go
ln -s %{_bindir}/go-6 $tmphack/go
export PATH=$tmphack:$PATH
%endif
@ -200,16 +196,84 @@ man/md2man-all.sh
# otherwise the resulting package will have extra requires
rm -rf hack/make/.build-deb
%ifarch %go_arches
%check
. ./docker_build_env
# go test will look in github.com/docker/docker/vendor for vendored packages but
# Docker keeps them in github.com/docker/docker/vendor/src. Let's do it like
# Docker does it and append github.com/docker/docker/vendor to the GOPATH so the
# packages are found by go test.
export GOPATH=$HOME/go/src/github.com/docker/docker/vendor:$GOPATH
# Create or dir if it doesn't exist already
mkdir -p $HOME/go/src/github.com/docker
# Remove any existing symlinks.
rm -rf $HOME/go/src/github.com/docker/*
# go list -e ... doesn't seem to work with symlinks so do a full copy instead.
cp -avr %{buildroot}/usr/src/%{name} $HOME/go/src/github.com/docker/docker
cd $HOME/go/src/github.com/docker/docker
# Note that these commands do not allow %%elseif.
# For versions equal to or below SLE12 && openSUSE_13.2 libdevmapper.h is not
# recent enough to define dm_task_deferred_remove(). (This is not true of
# SLE12_SP1 but we cannot distinguish it with this macro.)
EXCLUDE_TAGS=
%if 0%{?suse_version} <= 1320
EXCLUDE_TAGS="libdm_no_deferred_remove $EXCLUDE_TAGS"
%endif
# The command is taken from hack/make/test-unit and various test runs.
# Everything that follows github.com/docker/pkg/integration-cli are packages
# containing tests that cannot run in an obs build context.
PKG_LIST=$(go list -e \
-f '{{if ne .Name "github.com/docker/docker"}} {{.ImportPath}}
{{end}}' \
-tags $EXCLUDE_TAGS \
-a "${BUILDFLAGS[@]}" ... \
| grep 'github.com/docker/docker' \
| grep -v 'github.com/docker/docker/vendor' \
| grep -v 'github.com/docker/docker/integration-cli' \
| grep -v 'github.com/docker/docker/pkg/archive$' \
| grep -v 'github.com/docker/docker/pkg/chrootarchive$' \
| grep -v 'github.com/docker/docker/pkg/gitutils$' \
| grep -v 'github.com/docker/docker/pkg/idtools$' \
| grep -v 'github.com/docker/docker/pkg/jsonlog$' \
| grep -v 'github.com/docker/docker/pkg/mount$' \
| grep -v 'github.com/docker/docker/pkg/sysinfo$' \
| grep -v 'github.com/docker/docker/registry$' \
| grep -v 'github.com/docker/docker/volume/local$' \
| grep -v 'github.com/docker/docker/builder$' \
| grep -v 'github.com/docker/docker/daemon$' \
| grep -v 'github.com/docker/docker/daemon/graphdriver/btrfs$' \
| grep -v 'github.com/docker/docker/daemon/graphdriver/devmapper$' \
| grep -v 'github.com/docker/docker/daemon/graphdriver/vfs$' \
| grep -v 'github.com/docker/docker/builder/dockerfile$' \
| grep -v 'github.com/docker/docker/cmd/dockerd$' \
| grep -v 'github.com/docker/docker/builder/dockerfile/parser$' \
| grep -v 'github.com/docker/docker/man$' \
| grep -v 'github.com/docker/docker/pkg/integration$')
go test -cover -ldflags -w -tags $EXCLUDE_TAGS -a -test.timeout=10m $PKG_LIST
%endif
%install
install -d %{buildroot}%{go_contribdir}
install -d %{buildroot}%{_bindir}
%ifarch %{go_arches}
install -D -m755 bundles/%{version}/dynbinary/%{name}-%{version} %{buildroot}/%{_bindir}/%{name}
install -D -m755 bundles/latest/dynbinary-client/%{name} %{buildroot}/%{_bindir}/%{name}
install -D -m755 bundles/latest/dynbinary-daemon/%{name}d %{buildroot}/%{_bindir}/%{name}d
%else
install -D -m755 bundles/%{version}/dyngccgo/%{name}-%{version} %{buildroot}/%{_bindir}/%{name}
install -D -m755 bundles/latest/dyngccgo/%{name} %{buildroot}/%{_bindir}/%{name}
install -D -m755 bundles/latest/dyngccgo/%{name}d %{buildroot}/%{_bindir}/%{name}d
%endif
install -d %{buildroot}/%{_prefix}/lib/docker
install -Dd -m 0755 %{buildroot}%{_sbindir}
install -Dd -m 0755 \
%{buildroot}%{_sysconfdir}/init.d \
%{buildroot}%{_sbindir}
install -D -m0644 contrib/completion/bash/docker "%{buildroot}%{_sysconfdir}/bash_completion.d/%{name}"
install -D -m0644 contrib/completion/zsh/_docker "%{buildroot}%{_sysconfdir}/zsh_completion.d/%{name}"
@ -297,6 +361,7 @@ fi
%defattr(-,root,root)
%doc README.md LICENSE README_SUSE.md
%{_bindir}/docker
%{_bindir}/dockerd
%{_sbindir}/rcdocker
%{_libexecdir}/docker/
%{_unitdir}/%{name}.service

View File

@ -1,24 +1,33 @@
diff --git a/hack/make/gccgo b/hack/make/gccgo
index 878c814..84b7f69 100644
index 93e064a..20eb8dc 100644
--- a/hack/make/gccgo
+++ b/hack/make/gccgo
@@ -1,5 +1,5 @@
#!/bin/bash
-set -e
+set -ex
BINARY_NAME="docker-$VERSION"
BINARY_NAME="dockerd-$VERSION"
BINARY_EXTENSION="$(binary_extension)"
@@ -16,9 +16,11 @@ go build -compiler=gccgo \
@@ -21,7 +21,7 @@ go build -compiler=gccgo \
-g
$EXTLDFLAGS_STATIC
-Wl,--no-export-dynamic
- -ldl
+ -ldl -lsystemd
-pthread
" \
./cmd/dockerd
@@ -37,9 +37,11 @@ go build -compiler=gccgo \
"${BUILDFLAGS[@]}" \
-gccgoflags "
-g
+ -Wl,--add-needed -Wl,--no-as-needed
+ -Wl,--add-needed -Wl,--no-as-needed
$EXTLDFLAGS_STATIC
+ -static-libgo
+ -static-libgo
-Wl,--no-export-dynamic
- -ldl
+ -ldl -lselinux -lsystemd
-pthread
" \
./docker
./cmd/docker

View File

@ -6,5 +6,3 @@
## ServiceRestart : docker
#
DOCKER_OPTS=""
DOCKER_NETWORK_OPTIONS=""