From 60490eed9f7405e815978a813ac7f2deb4604eb0 Mon Sep 17 00:00:00 2001 From: Christian Goll Date: Thu, 7 Apr 2022 11:32:08 +0200 Subject: [PATCH 1/4] Cleanup TOOLS_DIR and updated linter version --- Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index c7c42693..a7421035 100644 --- a/Makefile +++ b/Makefile @@ -86,7 +86,7 @@ CONFIG := $(shell pwd) GO_TOOLS_BIN := $(addprefix $(TOOLS_BIN)/, $(notdir $(GO_TOOLS))) GO_TOOLS_VENDOR := $(addprefix vendor/, $(GO_TOOLS)) GOLANGCI_LINT := $(TOOLS_BIN)/golangci-lint -GOLANGCI_LINT_VERSION := v1.31.0 +GOLANGCI_LINT_VERSION := v1.45.2 # use GOPROXY for older git clients and speed up downloads GOPROXY ?= https://proxy.golang.org @@ -245,6 +245,7 @@ clean: rm -f warewulf.spec rm -f config rm -f Defaults.mk + rm -rf $(TOOLS_DIR) install: files install_wwclient From a3c82cda4cd1145c1b98d6aeb67874e11d44f25a Mon Sep 17 00:00:00 2001 From: Christian Goll Date: Thu, 7 Apr 2022 11:32:31 +0200 Subject: [PATCH 2/4] fixed linting --- internal/app/wwctl/container/exec/child/main.go | 6 ++---- internal/app/wwctl/container/exec/main.go | 6 ++---- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/internal/app/wwctl/container/exec/child/main.go b/internal/app/wwctl/container/exec/child/main.go index c24473c0..7a1d2d63 100644 --- a/internal/app/wwctl/container/exec/child/main.go +++ b/internal/app/wwctl/container/exec/child/main.go @@ -30,14 +30,12 @@ func CobraRunE(cmd *cobra.Command, args []string) error { os.Exit(1) } containerPath := container.RootFsDir(containerName) - passwdTime := time.Now() fileStat, _ := os.Stat(path.Join(containerPath, "/etc/passwd")) unixStat := fileStat.Sys().(*syscall.Stat_t) - passwdTime = time.Unix(int64(unixStat.Ctim.Sec), int64(unixStat.Ctim.Nsec)) - groupTime := time.Now() + passwdTime := time.Unix(int64(unixStat.Ctim.Sec), int64(unixStat.Ctim.Nsec)) fileStat, _ = os.Stat(path.Join(containerPath, "/etc/group")) unixStat = fileStat.Sys().(*syscall.Stat_t) - groupTime = time.Unix(int64(unixStat.Ctim.Sec), int64(unixStat.Ctim.Nsec)) + groupTime := time.Unix(int64(unixStat.Ctim.Sec), int64(unixStat.Ctim.Nsec)) wwlog.Printf(wwlog.DEBUG, "passwd: %v\n", passwdTime) wwlog.Printf(wwlog.DEBUG, "group: %v\n", groupTime) diff --git a/internal/app/wwctl/container/exec/main.go b/internal/app/wwctl/container/exec/main.go index 2e91a88c..4d405e91 100644 --- a/internal/app/wwctl/container/exec/main.go +++ b/internal/app/wwctl/container/exec/main.go @@ -51,14 +51,12 @@ func CobraRunE(cmd *cobra.Command, args []string) error { allargs = append(allargs, args...) containerPath := container.RootFsDir(containerName) - passwdTime := time.Now() fileStat, _ := os.Stat(path.Join(containerPath, "/etc/passwd")) unixStat := fileStat.Sys().(*syscall.Stat_t) - passwdTime = time.Unix(int64(unixStat.Ctim.Sec), int64(unixStat.Ctim.Nsec)) - groupTime := time.Now() + passwdTime := time.Unix(int64(unixStat.Ctim.Sec), int64(unixStat.Ctim.Nsec)) fileStat, _ = os.Stat(path.Join(containerPath, "/etc/group")) unixStat = fileStat.Sys().(*syscall.Stat_t) - groupTime = time.Unix(int64(unixStat.Ctim.Sec), int64(unixStat.Ctim.Nsec)) + groupTime := time.Unix(int64(unixStat.Ctim.Sec), int64(unixStat.Ctim.Nsec)) wwlog.Printf(wwlog.DEBUG, "passwd: %v\n", passwdTime) wwlog.Printf(wwlog.DEBUG, "group: %v\n", groupTime) From 1e14b4459be364fcae3fc8ee8de597bdecc0467c Mon Sep 17 00:00:00 2001 From: Christian Goll Date: Thu, 7 Apr 2022 11:50:01 +0200 Subject: [PATCH 3/4] Added Contributors closes #268 --- CONTRIBUTORS.md | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 CONTRIBUTORS.md diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md new file mode 100644 index 00000000..dad95d3d --- /dev/null +++ b/CONTRIBUTORS.md @@ -0,0 +1,20 @@ +Gregory Kurtzer @gmk +Christian Goll @mslacken +Niko Kivel @kivel +Jeremy Siadal @jcsiadal +Shannon V. Davidson +Brian Clemens @brianclemens +Michael L. Young @ajyounge +Ian Kaneshiro @ikaneshiro +MatthewHink @MatthewHink +WestleyR @WestleyK +Michael L. Young +Yong Qin +Yoshiaki SENDA +Cooper, Trevor +Masahiko OHKUBO +John Hanks @griznog +Rob Jansen +svdavidson +David McFarlane <54093156+Prepultrue@users.noreply.github.com> +TerranWorks From bf141888586c8bb745317e49fe60041fe1d1de7c Mon Sep 17 00:00:00 2001 From: Christian Goll Date: Thu, 7 Apr 2022 14:26:56 +0200 Subject: [PATCH 4/4] fixed typo in Contributors --- CONTRIBUTORS.md | 42 ++++++++++++++++++++++-------------------- 1 file changed, 22 insertions(+), 20 deletions(-) diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md index dad95d3d..03899dca 100644 --- a/CONTRIBUTORS.md +++ b/CONTRIBUTORS.md @@ -1,20 +1,22 @@ -Gregory Kurtzer @gmk -Christian Goll @mslacken -Niko Kivel @kivel -Jeremy Siadal @jcsiadal -Shannon V. Davidson -Brian Clemens @brianclemens -Michael L. Young @ajyounge -Ian Kaneshiro @ikaneshiro -MatthewHink @MatthewHink -WestleyR @WestleyK -Michael L. Young -Yong Qin -Yoshiaki SENDA -Cooper, Trevor -Masahiko OHKUBO -John Hanks @griznog -Rob Jansen -svdavidson -David McFarlane <54093156+Prepultrue@users.noreply.github.com> -TerranWorks +# Contributors + +* Gregory Kurtzer @gmk +* Christian Goll @mslacken +* Niko Kivel @kivel +* Jeremy Siadal @jcsiadal +* Shannon V. Davidson +* Brian Clemens @brianclemens +* Michael L. Young @ajyounge +* Ian Kaneshiro @ikaneshiro +* MatthewHink @MatthewHink +* WestleyR @WestleyK +* Michael L. Young +* Yong Qin +* Yoshiaki Senda +* Cooper, Trevor +* Masahiko Ohkubo +* John Hanks @griznog +* Rob Jansen +* svdavidson +* David McFarlane <54093156+Prepultrue@users.noreply.github.com> +* TerranWorks