You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add dynbinary and dyntest scripts for building/testing a separate static dockerinit binary
After a nice long brainstorming session with @shykes on IRC, we decided on using a SHA1 hash of dockerinit compiled into the dynamic docker binary to ensure that we always use the two in a perfect pair, and never mix and match.
Copy file name to clipboardExpand all lines: hack/make/test
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -17,7 +17,7 @@ bundle_test() {
17
17
set -x
18
18
cd$test_dir
19
19
go test -i
20
-
go test -v -ldflags "$LDFLAGS-linkmode external -extldflags \"-lpthread -static -Wl,--unresolved-symbols=ignore-in-object-files\""$BUILDFLAGS$TESTFLAGS
20
+
go test -v -ldflags "$LDFLAGS$LDFLAGS_STATIC"$BUILDFLAGS$TESTFLAGS
returnnil, nil, fmt.Errorf("Could not locate dockerinit: This usually means docker was built incorrectly. See http://docs.docker.io/en/latest/contributing/devenvironment for official build instructions.")
// "/usr/libexec includes internal binaries that are not intended to be executed directly by users or shell scripts. Applications may use a single subdirectory under /usr/libexec."
241
+
"/usr/libexec/docker/dockerinit",
242
+
"/usr/local/libexec/docker/dockerinit",
243
+
}
244
+
for_, dockerInit:=rangepossibleInits {
245
+
path, err:=exec.LookPath(dockerInit)
246
+
iferr==nil {
247
+
path, err=filepath.Abs(path)
248
+
iferr!=nil {
249
+
// LookPath already validated that this file exists and is executable (following symlinks), so how could Abs fail?
0 commit comments