[lxc-devel] [crio-lxc/master] [RFC] drop static linking
hallyn on Github
lxc-bot at linuxcontainers.org
Wed Jul 17 19:29:57 UTC 2019
A non-text attachment was scrubbed...
Name: not available
Type: text/x-mailbox
Size: 432 bytes
Desc: not available
URL: <http://lists.linuxcontainers.org/pipermail/lxc-devel/attachments/20190717/b161a3f4/attachment.bin>
-------------- next part --------------
From 8dfe37252b3b3506cc5e6846564839cb4e3f8c0f Mon Sep 17 00:00:00 2001
From: Serge Hallyn <shallyn at cisco.com>
Date: Wed, 17 Jul 2019 14:25:48 -0500
Subject: [PATCH 1/2] remove obsolete fifo-wait.go
Signed-off-by: Serge Hallyn <shallyn at cisco.com>
---
cmd/create.go | 5 +++++
cmd/fifo-wait.go | 48 ------------------------------------------------
2 files changed, 5 insertions(+), 48 deletions(-)
delete mode 100644 cmd/fifo-wait.go
diff --git a/cmd/create.go b/cmd/create.go
index 7c418f2..6e6ed4b 100644
--- a/cmd/create.go
+++ b/cmd/create.go
@@ -82,6 +82,11 @@ func ensureShell(rootfs string) {
}
}
+const (
+ SYNC_FIFO_PATH = "/syncfifo"
+ SYNC_FIFO_CONTENT = "meshuggah rocks"
+)
+
func emitFifoWaiter(file string) error {
fifoWaiter := fmt.Sprintf(`#!/bin/sh
stat /syncfifo
diff --git a/cmd/fifo-wait.go b/cmd/fifo-wait.go
deleted file mode 100644
index be3b400..0000000
--- a/cmd/fifo-wait.go
+++ /dev/null
@@ -1,48 +0,0 @@
-package main
-
-import (
- "os"
- "os/exec"
-
- "github.com/pkg/errors"
- "github.com/urfave/cli"
-)
-
-const (
- SYNC_FIFO_PATH = "/syncfifo"
- SYNC_FIFO_CONTENT = "meshuggah rocks"
-)
-
-var fifoWaitCmd = cli.Command{
- Name: "fifo-wait",
- Action: doFifoWait,
- Hidden: true,
-}
-
-func doFifoWait(ctx *cli.Context) error {
- syncPipe, err := os.Open(SYNC_FIFO_PATH)
- if err != nil {
- return errors.Wrapf(err, "couldn't open %s", SYNC_FIFO_PATH)
- }
- defer syncPipe.Close()
-
- fi, err := syncPipe.Stat()
- if err != nil {
- return errors.Wrapf(err, "couldn't stat %s", SYNC_FIFO_PATH)
- }
-
- if fi.Mode()&os.ModeNamedPipe == 0 {
- return errors.Errorf("%s exists and is not a named pipe", SYNC_FIFO_PATH)
- }
-
- _, err = syncPipe.WriteString(SYNC_FIFO_CONTENT)
- if err != nil {
- return errors.Wrapf(err, "could write to fifo")
- }
-
- cmd := exec.Command(ctx.Args().Get(0), ctx.Args().Tail()...)
- cmd.Stdin = os.Stdin
- cmd.Stdout = os.Stdout
- cmd.Stderr = os.Stderr
- return cmd.Run()
-}
From 74211fc767a65fa2d20c4f2f12995a6b0a8d9fb0 Mon Sep 17 00:00:00 2001
From: Serge Hallyn <shallyn at cisco.com>
Date: Wed, 17 Jul 2019 14:28:55 -0500
Subject: [PATCH 2/2] drop static / foreign building
Signed-off-by: Serge Hallyn <shallyn at cisco.com>
---
Makefile | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/Makefile b/Makefile
index 2501602..c6313d9 100644
--- a/Makefile
+++ b/Makefile
@@ -5,11 +5,7 @@ TEST?=$(patsubst test/%.bats,%,$(wildcard test/*.bats))
CRIO_REPO?=~/packages/cri-o
crio-lxc: $(GO_SRC)
- go build -tags static_build -ldflags "-X main.version=$(COMMIT)" -o crio-lxc ./cmd
-
-.PHONY: foreign
-foreign: $(GO_SRC)
- stacker build --substitute PWD=$$PWD
+ go build -o crio-lxc ./cmd
# make test TEST=basic will run only the basic test.
.PHONY: check
More information about the lxc-devel
mailing list