From 15f9a01c4200c469460c2395867901861c885acb Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Fri, 8 Sep 2017 17:10:13 -0400 Subject: maint: Add a `check` target to run tests, and add nescessary dependencies This also downgrades the sys/unix dep. The golang.org/x/sys/unix library can't be updated past commit ab9e364efd8b52800ff7ee48a9ffba4e0ed78dfb (where I have it right now) until go commit 93da0b6e66f24c4c307e0df37ceb102a33306174 (currently on master) makes it in to a release. It narrowly missed the cut-off to be in go 1.9; I expect it to be in go 1.10 around February 2018. --- .gitignore | 2 +- .gitmodules | 6 ++++++ LICENSE.bsd2-gocheck.txt | 1 + LICENSE.bsd2-pkg-errors.txt | 1 + LICENSE.bsd3-sys-unix.txt | 1 + LICENSE.bsd3.txt | 1 - LICENSE.txt | 18 +++++++++++------- Makefile | 5 +++++ go/src/github.com/pkg/errors | 1 + go/src/golang.org/x/sys | 2 +- go/src/gopkg.in/check.v1 | 1 + 11 files changed, 29 insertions(+), 10 deletions(-) create mode 120000 LICENSE.bsd2-gocheck.txt create mode 120000 LICENSE.bsd2-pkg-errors.txt create mode 120000 LICENSE.bsd3-sys-unix.txt delete mode 120000 LICENSE.bsd3.txt create mode 160000 go/src/github.com/pkg/errors create mode 160000 go/src/gopkg.in/check.v1 diff --git a/.gitignore b/.gitignore index 40f76d0..78a9c91 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,5 @@ /LICENSE.*.txt -!/LICENSE.bsd3.txt +!/LICENSE.bsd*.txt /nshd.service /nshd.sysusers diff --git a/.gitmodules b/.gitmodules index 5b9a9ba..516ef6d 100644 --- a/.gitmodules +++ b/.gitmodules @@ -13,3 +13,9 @@ [submodule "go/src/golang.org/x/sys"] path = go/src/golang.org/x/sys url = https://go.googlesource.com/sys +[submodule "go/src/gopkg.in/check.v1"] + path = go/src/gopkg.in/check.v1 + url = https://gopkg.in/check.v1 +[submodule "go/src/github.com/pkg/errors"] + path = go/src/github.com/pkg/errors + url = https://github.com/pkg/errors diff --git a/LICENSE.bsd2-gocheck.txt b/LICENSE.bsd2-gocheck.txt new file mode 120000 index 0000000..2332993 --- /dev/null +++ b/LICENSE.bsd2-gocheck.txt @@ -0,0 +1 @@ +go/src/gopkg.in/check.v1/LICENSE \ No newline at end of file diff --git a/LICENSE.bsd2-pkg-errors.txt b/LICENSE.bsd2-pkg-errors.txt new file mode 120000 index 0000000..805d1cd --- /dev/null +++ b/LICENSE.bsd2-pkg-errors.txt @@ -0,0 +1 @@ +go/src/github.com/pkg/errors/LICENSE \ No newline at end of file diff --git a/LICENSE.bsd3-sys-unix.txt b/LICENSE.bsd3-sys-unix.txt new file mode 120000 index 0000000..f33946f --- /dev/null +++ b/LICENSE.bsd3-sys-unix.txt @@ -0,0 +1 @@ +go/src/golang.org/x/sys/LICENSE \ No newline at end of file diff --git a/LICENSE.bsd3.txt b/LICENSE.bsd3.txt deleted file mode 120000 index f33946f..0000000 --- a/LICENSE.bsd3.txt +++ /dev/null @@ -1 +0,0 @@ -go/src/golang.org/x/sys/LICENSE \ No newline at end of file diff --git a/LICENSE.txt b/LICENSE.txt index c7d2dea..25fe9cf 100644 --- a/LICENSE.txt +++ b/LICENSE.txt @@ -2,14 +2,17 @@ The software in this repository is under a number of licenses: bin/ GPL v2+ go/src/nshd/ GPL v2+ - go/src/gopkg.in/yaml.v2 Apache v2.0 - go/src/golang.org/x/sys/unix 3-clause BSD license - go/src/git.lukeshu.com/go/libgnulinux/crypt LGPL v2.1+ - go/src/git.lukeshu.com/go/libgnulinux/dl GPL v2+, with documentation output clarification - go/src/git.lukeshu.com/go/libgnulinux/getgr LGPL v2.1+ + go/src/git.lukeshu.com/go/libgnulinux/crypt/ LGPL v2.1+ + go/src/git.lukeshu.com/go/libgnulinux/dl/ GPL v2+, with documentation output clarification + go/src/git.lukeshu.com/go/libgnulinux/getgr/ LGPL v2.1+ go/src/git.lukeshu.com/go/libnslcd/ LGPL v2.1+ go/src/git.lukeshu.com/go/libsystemd/ Apache v2.0 + go/src/github.com/pkg/errors/ 2-clause BSD license + go/src/golang.org/x/sys/unix 3-clause BSD license + go/src/gopkg.in/check.v1/ 2-clause BSD license + go/src/gopkg.in/yaml.v2/ Apache v2.0 + build-aux/ AGPL v3+ The general notion is that the build system is AGPL (v3+), the core @@ -20,8 +23,9 @@ exceptions: CoreOS and Docker. - The dl package is GPL v2+ licensed because of wording in comments taken from the Linux Programmer's Manual. - - The YAML and sys/unix libraries use other licenses because they are - 3rd-party libraries, and that's how the authors licensed them. + - pkg/errors, sys/unix, Gocheck, and YAML libraries use other + licenses because they are 3rd-party libraries, and that's how the + authors licensed them. The effective license of the 'nshd' program as a whole is GPL v3+; it links together code that is GPL v2+ with code that is Apache v2.0; the diff --git a/Makefile b/Makefile index bd8ee0b..4b5506e 100644 --- a/Makefile +++ b/Makefile @@ -90,6 +90,11 @@ $(outdir)/go/src/nshd/nshd_files/paths.go: $(var.)bindir $(var.)conf_file $(var. $(outdir)/go/bin/nshd: $(outdir)/$(files.generate) $(outdir)/go/src/nshd/nshd_files/paths.go files.out.all += $(outdir)/go/src/nshd/nshd_files/paths.go +$(outdir)/check: + GOPATH=$$PWD/go go test $$(GOPATH=$$PWD/go go list -f '{{.ImportPath}}{{"\n"}}{{join .Deps "\n"}}' $(bins_go) | sort -u | grep -e ^nshd -e '\.[^/]*/') +.PHONY: $(outdir)/check +at.targets += $(outdir)/check + # Install diff --git a/go/src/github.com/pkg/errors b/go/src/github.com/pkg/errors new file mode 160000 index 0000000..c605e28 --- /dev/null +++ b/go/src/github.com/pkg/errors @@ -0,0 +1 @@ +Subproject commit c605e284fe17294bda444b34710735b29d1a9d90 diff --git a/go/src/golang.org/x/sys b/go/src/golang.org/x/sys index 7ddbeae..ab9e364 160000 --- a/go/src/golang.org/x/sys +++ b/go/src/golang.org/x/sys @@ -1 +1 @@ -Subproject commit 7ddbeae9ae08c6a06a59597f0c9edbc5ff2444ce +Subproject commit ab9e364efd8b52800ff7ee48a9ffba4e0ed78dfb diff --git a/go/src/gopkg.in/check.v1 b/go/src/gopkg.in/check.v1 new file mode 160000 index 0000000..20d25e2 --- /dev/null +++ b/go/src/gopkg.in/check.v1 @@ -0,0 +1 @@ +Subproject commit 20d25e2804050c1cd24a7eea1e7a6447dd0e74ec -- cgit v1.2.2