forked from Mirantis/cri-dockerd
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix version output, fix Ubuntu packaging, fix systemd socket file
- Loading branch information
Showing
16 changed files
with
130 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
// +build !dockerless !windows | ||
|
||
package remote | ||
|
||
import ( | ||
"net" | ||
|
||
"github.com/coreos/go-systemd/v22/activation" | ||
"github.com/pkg/errors" | ||
) | ||
|
||
func listenFd(addr string) (net.Listener, error) { | ||
var ( | ||
err error | ||
listeners []net.Listener | ||
) | ||
|
||
listeners, err = activation.Listeners() | ||
if err != nil { | ||
return nil, err | ||
} | ||
|
||
if len(listeners) == 0 { | ||
return nil, errors.New("no sockets found via socket activation: make sure the service was started by systemd") | ||
} | ||
|
||
if addr == "" { | ||
return listeners[0], nil | ||
} | ||
|
||
//TODO: systemd fd selection (default is 3) | ||
return nil, errors.New("not supported yet") | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
// +build !dockerless windows | ||
|
||
package server | ||
|
||
import ( | ||
"net" | ||
|
||
"github.com/pkg/errors" | ||
) | ||
|
||
func listenFd(addr string) (net.Listener, error) { | ||
return nil, errors.New("listening on a file descriptor is not supported on Windows") | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
ARCH=$(shell uname -m) | ||
BUILDTIME=$(shell date -u -d "@$${SOURCE_DATE_EPOCH:-$$(date +%s)}" --rfc-3339 ns 2> /dev/null | sed -e 's/ /T/') | ||
GO_VERSION:=1.13.11 | ||
PLATFORM=Docker Engine - Community | ||
PLATFORM=cri-dockerd | ||
SHELL:=/bin/bash | ||
VERSION?=0.1.0 | ||
VERSION?=0.1.0-dev | ||
|
||
export BUILDTIME | ||
export PLATFORM |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
package version | ||
|
||
var ( | ||
// Version of the product | ||
Version = "0.1.0" | ||
// PreRelease is set during the build | ||
PreRelease = "" | ||
// GitCommit is set during the build | ||
GitCommit = "HEAD" | ||
// BuildTime is set during the build | ||
BuildTime = "<unknown>" | ||
) | ||
|
||
const ( | ||
// PlatformName of the product | ||
PlatformName = "cri-dockerd" | ||
) | ||
|
||
// FullVersion returns the formatted "$Version[-$PreRelease] ($GitCommit)" | ||
func FullVersion() string { | ||
if PreRelease != "" { | ||
return Version + "-" + PreRelease + " (" + GitCommit + ")" | ||
} | ||
return Version + " (" + GitCommit + ")" | ||
} | ||
|
||
// TagVersion returns "$Version[-$PreRelease]" without the git commit | ||
func TagVersion() string { | ||
if PreRelease != "" { | ||
return Version + "-" + PreRelease | ||
} | ||
return Version | ||
} |