Skip to content

Commit

Permalink
feat: Create the mender-setup CLI tool
Browse files Browse the repository at this point in the history
This strips out the `setup` functionality from the regular mender-client, and
ports it here, to be a free-standing tool.

In order to do so, I was forced to do a small refac of the mender-client, to
split out the mender-config, to hinder it from pulling in a lot of dependencies.

This ports contains a basic CLI, as well as the `setup.go` file, and a simple
ported `setup_test.go` port.

`deb-requirements` and `support/demo.crt` was added for test compatibility.

Ticket: MEN-6452
Changelog: None

Signed-off-by: Ole Petter <ole.orhagen@northern.tech>
  • Loading branch information
oleorhagen committed Sep 29, 2023
1 parent a5ae18a commit dded59c
Show file tree
Hide file tree
Showing 535 changed files with 262,508 additions and 23 deletions.
20 changes: 20 additions & 0 deletions LIC_FILES_CHKSUM.sha256
Original file line number Diff line number Diff line change
@@ -1,2 +1,22 @@
# Apache 2.0 licenses.
52b2497ce07650b825015e80ca7a5d40c360c04c530234ca6d950b0f98bca23a LICENSE
52b2497ce07650b825015e80ca7a5d40c360c04c530234ca6d950b0f98bca23a vendor/github.com/mendersoftware/mender/LICENSE

# BSD-3
2d36597f7117c38b006835ae7f537487207d8ec407aa9d9980794b2030cbc067 vendor/golang.org/x/sys/LICENSE
2d36597f7117c38b006835ae7f537487207d8ec407aa9d9980794b2030cbc067 vendor/golang.org/x/term/LICENSE
8d427fd87bc9579ea368fde3d49f9ca22eac857f91a9dec7e3004bdfab7dee86 vendor/github.com/pkg/errors/LICENSE
2eb550be6801c1ea434feba53bf6d12e7c71c90253e0a9de4a4f46cf88b56477 vendor/github.com/pmezard/go-difflib/LICENSE

# MIT
a55959c4e3e8917bfa857359bb641115336276a6cc97408fd8197e079fb18470 vendor/github.com/cpuguy83/go-md2man/v2/LICENSE.md
da277af11b85227490377fbcac6afccc68be560c4fff36ac05ca62de55345fd7 vendor/github.com/urfave/cli/v2/LICENSE
51a0c9ec7f8b7634181b8d4c03e5b5d204ac21d6e72f46c313973424664b2e6b vendor/github.com/sirupsen/logrus/LICENSE
f8e536c1c7b695810427095dc85f5f80d44ff7c10535e8a9486cf393e2599189 vendor/github.com/stretchr/testify/LICENSE
d18f6323b71b0b768bb5e9616e36da390fbd39369a81807cca352de4e4e6aa0b vendor/gopkg.in/yaml.v3/LICENSE

# Simplified BSD
75e1ca97a84a9da6051dee0114333388216f2c4a5a028296b882ff3d57274735 vendor/github.com/russross/blackfriday/v2/LICENSE.txt

# ISC License
1b93a317849ee09d3d7e4f1d20c2b78ddb230b4becb12d7c224c927b9d470251 vendor/github.com/davecgh/go-spew/LICENSE
9 changes: 7 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,19 +12,24 @@ PKGFILES_notest = $(shell echo $(PKGFILES) | tr ' ' '\n' | grep -v '_test.go' )
VERSION = $(shell git describe --tags --dirty --exact-match 2>/dev/null || git rev-parse --short HEAD)

GO_LDFLAGS = \
-ldflags "-X github.com/mendersoftware/mender-setup/config.Version=$(VERSION)"
-ldflags "-X github.com/mendersoftware/mender-setup/conf.Version=$(VERSION)"

ifeq ($(V),1)
BUILDV = -v
endif

TAGS =
ifneq ($(TAGS),)
BUILDTAGS = -tags '$(TAGS)'
endif

build: mender-setup

clean:
@$(GO) clean

mender-setup: $(PKGFILES)
@$(GO) build $(GO_LDFLAGS) $(BUILDV)
@$(GO) build $(GO_LDFLAGS) $(BUILDV) $(BUILDTAGS)

install: install-bin

Expand Down
Loading

0 comments on commit dded59c

Please sign in to comment.