From f8a8344049d6f22ea702f83d4cbd4477f3f3f2ef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mika=C3=ABl=20Cluseau?= Date: Sat, 20 Jan 2024 14:20:51 +0100 Subject: [PATCH] move novit.nc to new domains --- .gitlab-ci.yml | 32 -------------------------------- cmd/dkl/main.go | 8 ++++---- go.mod | 9 +++++---- go.sum | 15 +++------------ modd.conf | 2 +- pkg/cmd/dynlay/dynlay.go | 2 +- pkg/cmd/files/files.go | 2 +- pkg/cmd/files/list.go | 2 +- pkg/cmd/init/boot/boot.go | 2 +- pkg/cmd/init/boot/files.go | 7 ++++--- pkg/cmd/init/boot/lvm.go | 6 +++--- pkg/cmd/init/boot/network.go | 6 +++--- pkg/cmd/init/init.go | 6 +++--- pkg/cmd/init/service/service.go | 4 ++-- pkg/cmd/logger/logger.go | 2 +- pkg/sys/config.go | 2 +- pkg/vars/vars.go | 2 +- 17 files changed, 35 insertions(+), 74 deletions(-) delete mode 100644 .gitlab-ci.yml diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml deleted file mode 100644 index 390c499..0000000 --- a/.gitlab-ci.yml +++ /dev/null @@ -1,32 +0,0 @@ -image: golang:1.10.3 - -variables: - REPO_NAME: novit.nc/direktil/inits - -before_script: - - mkdir -p $GOPATH/src/$(dirname $REPO_NAME) - - ln -svf $CI_PROJECT_DIR $GOPATH/src/$REPO_NAME - - cd $GOPATH/src/$REPO_NAME - -stages: - - test - - build - -format: - stage: test - script: - - go fmt ./... - - go vet ./... - - go test -race ./... - -compile: - stage: build - script: - - go build ./cmd/dkl-apply-config - - go build ./cmd/dkl-system-init - - CGO_ENABLED=0 go build ./cmd/dkl-initrd-init - artifacts: - paths: - - dkl-apply-config - - dkl-system-init - - dkl-initrd-init diff --git a/cmd/dkl/main.go b/cmd/dkl/main.go index c76f2f1..2a2de42 100644 --- a/cmd/dkl/main.go +++ b/cmd/dkl/main.go @@ -5,10 +5,10 @@ import ( "github.com/spf13/cobra" - "novit.nc/direktil/inits/pkg/cmd/applyconfig" - cmddynlay "novit.nc/direktil/inits/pkg/cmd/dynlay" - cmdinit "novit.nc/direktil/inits/pkg/cmd/init" - cmdlogger "novit.nc/direktil/inits/pkg/cmd/logger" + "novit.tech/direktil/inits/pkg/cmd/applyconfig" + cmddynlay "novit.tech/direktil/inits/pkg/cmd/dynlay" + cmdinit "novit.tech/direktil/inits/pkg/cmd/init" + cmdlogger "novit.tech/direktil/inits/pkg/cmd/logger" ) func main() { diff --git a/go.mod b/go.mod index f6e2244..00c2e7a 100644 --- a/go.mod +++ b/go.mod @@ -1,4 +1,4 @@ -module novit.nc/direktil/inits +module novit.tech/direktil/inits go 1.21 @@ -6,21 +6,22 @@ require ( github.com/antage/mntent v0.0.0-20141129103236-834970000c6c github.com/fsnotify/fsnotify v1.7.0 github.com/go-ping/ping v1.1.0 + github.com/rs/zerolog v1.31.0 github.com/spf13/cobra v1.8.0 - novit.nc/direktil/pkg v0.0.0-20220221171542-fd3ce3a1491b + novit.tech/direktil/pkg v0.0.0-20240120131645-39b9b401ba38 ) require ( github.com/google/uuid v1.5.0 // indirect github.com/inconshreveable/mousetrap v1.1.0 // indirect + github.com/kr/pretty v0.1.0 // indirect github.com/mattn/go-colorable v0.1.13 // indirect github.com/mattn/go-isatty v0.0.20 // indirect - github.com/rs/zerolog v1.31.0 // indirect github.com/spf13/pflag v1.0.5 // indirect github.com/ulikunitz/xz v0.5.11 // indirect golang.org/x/net v0.20.0 // indirect golang.org/x/sync v0.6.0 // indirect golang.org/x/sys v0.16.0 // indirect + gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect - novit.tech/direktil/pkg v0.0.0-20240120130241-9d53113010e7 // indirect ) diff --git a/go.sum b/go.sum index d49d1bf..fddf680 100644 --- a/go.sum +++ b/go.sum @@ -21,8 +21,8 @@ github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA= github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg= github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= -github.com/mattn/go-isatty v0.0.19 h1:JITubQf0MOLdlGRuRq+jtsDlekdYPia9ZFsB8h/APPA= github.com/mattn/go-isatty v0.0.19/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= +github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY= github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/rs/xid v1.5.0/go.mod h1:trrq9SKmegXys3aeAKXMUTdJsYXVwGY3RLcfgqegfbg= @@ -33,13 +33,11 @@ github.com/spf13/cobra v1.8.0 h1:7aJaZx1B85qltLMc546zn58BxxfZdR/W22ej9CFoEf0= github.com/spf13/cobra v1.8.0/go.mod h1:WXLWApfZ71AjXPya3WOlMsY9yMs7YeiHhFVlvLyhcho= github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= -github.com/ulikunitz/xz v0.5.6/go.mod h1:2bypXElzHzzJZwzH67Y6wb67pO62Rzfn7BSiF4ABRW8= github.com/ulikunitz/xz v0.5.11 h1:kpFauv27b6ynzBNT/Xy+1k+fK4WswhN/6PN5WhFAGw8= github.com/ulikunitz/xz v0.5.11/go.mod h1:nbz6k7qbPmH4IRqmfOplQw/tblSgqTqBwxkY0oWt/14= github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= -golang.org/x/crypto v0.16.0/go.mod h1:gCAAfMLgwOJRpTjQ2zCCt2OcSfYMTeZVSRtQlPC7Nq4= golang.org/x/crypto v0.18.0/go.mod h1:R0j02AL6hcrfOiy9T4ZYp/rcWeMxM3L6QYxlOuEG1mg= golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= @@ -68,14 +66,12 @@ golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.15.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/sys v0.16.0 h1:xWw16ngr6ZMtmxDyKyIgsE93KNKz5HKmMa3b8ALHidU= golang.org/x/sys v0.16.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= golang.org/x/term v0.8.0/go.mod h1:xPskH00ivmX89bAKVGSKKtLOWNx2+17Eiy94tnKShWo= -golang.org/x/term v0.15.0/go.mod h1:BDl952bC7+uMoWR75FIrCDx79TPU9oHkTZ9yRbYOrX0= golang.org/x/term v0.16.0/go.mod h1:yn7UURbUtPyrVJPGPq404EukNFxcm/foM+bV/bfcDsY= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= @@ -91,13 +87,8 @@ golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8T gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 h1:qIbj1fsPNlZgppZ+VLlY7N33q108Sa+fhmuc+sWQYwY= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -novit.nc/direktil/pkg v0.0.0-20220221171542-fd3ce3a1491b h1:4KIhYb83Qwe6I0BLr0bnRuFvWto7hfuBEGsnQ6HVG3U= -novit.nc/direktil/pkg v0.0.0-20220221171542-fd3ce3a1491b/go.mod h1:zwTVO6U0tXFEaga73megQIBK7yVIKZJVePaIh/UtdfU= -novit.tech/direktil/pkg v0.0.0-20231217121409-827fa62f58aa h1:eBk9nQTxIJU5cT8aJVjfRWiUd4sv8YV0kXALbSFOKdI= -novit.tech/direktil/pkg v0.0.0-20231217121409-827fa62f58aa/go.mod h1:AYEEjNi7ljJG+V4F4LzxWntfbSs+KnNPO3kqvcEzIU4= -novit.tech/direktil/pkg v0.0.0-20240120130241-9d53113010e7 h1:1pEj6cB9yU9X5b+p8mE2p03wEZmm8cbQJNC0a88Sawc= -novit.tech/direktil/pkg v0.0.0-20240120130241-9d53113010e7/go.mod h1:pRp7IoklUf96JawbpzJR9+tzcTayRVHzHLW/QRZVmyQ= +novit.tech/direktil/pkg v0.0.0-20240120131645-39b9b401ba38 h1:1Q1X91BwE1g1NFqeA9sJh7G9OS4D75QTWHNnzXZgY70= +novit.tech/direktil/pkg v0.0.0-20240120131645-39b9b401ba38/go.mod h1:zjezU6tELE880oYHs/WAauGBupKIEQQ7KqWTB69RW10= diff --git a/modd.conf b/modd.conf index 0f6c48a..d497d39 100644 --- a/modd.conf +++ b/modd.conf @@ -1,6 +1,6 @@ modd.conf {} -**/*.go layer/**/* test-vm update-test-data { +**/*.go go.mod go.sum layer/**/* test-vm update-test-data { prep: go test ./... prep: mkdir -p dist prep: CGO_ENABLED=0 go build -o dist/ -trimpath ./... diff --git a/pkg/cmd/dynlay/dynlay.go b/pkg/cmd/dynlay/dynlay.go index cc76af6..897386a 100644 --- a/pkg/cmd/dynlay/dynlay.go +++ b/pkg/cmd/dynlay/dynlay.go @@ -13,7 +13,7 @@ import ( "github.com/spf13/cobra" ) -var urlPrefix = "https://dkl.novit.nc/dist/layers" +var urlPrefix = "https://dkl.novit.io/dist/layers" func Command() (c *cobra.Command) { c = &cobra.Command{ diff --git a/pkg/cmd/files/files.go b/pkg/cmd/files/files.go index c5ee0e2..06e5111 100644 --- a/pkg/cmd/files/files.go +++ b/pkg/cmd/files/files.go @@ -4,7 +4,7 @@ import ( "log" "github.com/spf13/cobra" - pconfig "novit.nc/direktil/pkg/config" + pconfig "novit.tech/direktil/pkg/config" ) var ( diff --git a/pkg/cmd/files/list.go b/pkg/cmd/files/list.go index 243d8b1..ed104a4 100644 --- a/pkg/cmd/files/list.go +++ b/pkg/cmd/files/list.go @@ -6,7 +6,7 @@ import ( "github.com/spf13/cobra" - pconfig "novit.nc/direktil/pkg/config" + pconfig "novit.tech/direktil/pkg/config" ) func listCommand() (cmd *cobra.Command) { diff --git a/pkg/cmd/init/boot/boot.go b/pkg/cmd/init/boot/boot.go index bf60667..47d7df6 100644 --- a/pkg/cmd/init/boot/boot.go +++ b/pkg/cmd/init/boot/boot.go @@ -5,7 +5,7 @@ import ( "github.com/spf13/cobra" - "novit.nc/direktil/inits/pkg/sys" + "novit.tech/direktil/inits/pkg/sys" ) var ( diff --git a/pkg/cmd/init/boot/files.go b/pkg/cmd/init/boot/files.go index 3443514..304457f 100644 --- a/pkg/cmd/init/boot/files.go +++ b/pkg/cmd/init/boot/files.go @@ -5,8 +5,9 @@ import ( "strconv" "syscall" - "novit.nc/direktil/inits/pkg/apply" - "novit.nc/direktil/inits/pkg/sys" + "novit.tech/direktil/pkg/config/apply" + + "novit.tech/direktil/inits/pkg/sys" ) func setupFiles() { @@ -54,7 +55,7 @@ func setupFiles() { } // - files - if err := apply.Files(cfg); err != nil { + if err := apply.Files(cfg, ""); err != nil { log.Fatal("FATAL: ", err) } } diff --git a/pkg/cmd/init/boot/lvm.go b/pkg/cmd/init/boot/lvm.go index e6e6444..244a838 100644 --- a/pkg/cmd/init/boot/lvm.go +++ b/pkg/cmd/init/boot/lvm.go @@ -11,10 +11,10 @@ import ( "syscall" "time" - "novit.nc/direktil/pkg/config" + "novit.tech/direktil/pkg/config" - "novit.nc/direktil/inits/pkg/sys" - "novit.nc/direktil/inits/pkg/vars" + "novit.tech/direktil/inits/pkg/sys" + "novit.tech/direktil/inits/pkg/vars" ) func setupLVM() { diff --git a/pkg/cmd/init/boot/network.go b/pkg/cmd/init/boot/network.go index f77b8f3..de509fb 100644 --- a/pkg/cmd/init/boot/network.go +++ b/pkg/cmd/init/boot/network.go @@ -11,10 +11,10 @@ import ( "time" "github.com/go-ping/ping" - "novit.nc/direktil/pkg/config" + "novit.tech/direktil/pkg/config" - "novit.nc/direktil/inits/pkg/sys" - "novit.nc/direktil/inits/pkg/vars" + "novit.tech/direktil/inits/pkg/sys" + "novit.tech/direktil/inits/pkg/vars" ) var networkStarted = map[string]bool{} diff --git a/pkg/cmd/init/init.go b/pkg/cmd/init/init.go index 0c776fc..f75706a 100644 --- a/pkg/cmd/init/init.go +++ b/pkg/cmd/init/init.go @@ -6,9 +6,9 @@ import ( "github.com/spf13/cobra" - initboot "novit.nc/direktil/inits/pkg/cmd/init/boot" - initdefault "novit.nc/direktil/inits/pkg/cmd/init/default" - initservice "novit.nc/direktil/inits/pkg/cmd/init/service" + initboot "novit.tech/direktil/inits/pkg/cmd/init/boot" + initdefault "novit.tech/direktil/inits/pkg/cmd/init/default" + initservice "novit.tech/direktil/inits/pkg/cmd/init/service" ) func Command() (c *cobra.Command) { diff --git a/pkg/cmd/init/service/service.go b/pkg/cmd/init/service/service.go index 6e72d8a..75f8114 100644 --- a/pkg/cmd/init/service/service.go +++ b/pkg/cmd/init/service/service.go @@ -7,9 +7,9 @@ import ( "time" "github.com/spf13/cobra" - plog "novit.nc/direktil/pkg/log" + plog "novit.tech/direktil/pkg/log" - cmdlogger "novit.nc/direktil/inits/pkg/cmd/logger" + cmdlogger "novit.tech/direktil/inits/pkg/cmd/logger" ) var ( diff --git a/pkg/cmd/logger/logger.go b/pkg/cmd/logger/logger.go index c7d4202..0a546b4 100644 --- a/pkg/cmd/logger/logger.go +++ b/pkg/cmd/logger/logger.go @@ -7,7 +7,7 @@ import ( "path/filepath" "github.com/spf13/cobra" - plog "novit.nc/direktil/pkg/log" + plog "novit.tech/direktil/pkg/log" ) func Command() (c *cobra.Command) { diff --git a/pkg/sys/config.go b/pkg/sys/config.go index e009958..34577e8 100644 --- a/pkg/sys/config.go +++ b/pkg/sys/config.go @@ -4,7 +4,7 @@ import ( "log" "sync" - "novit.nc/direktil/pkg/config" + "novit.tech/direktil/pkg/config" ) const cfgPath = "/config.yaml" diff --git a/pkg/vars/vars.go b/pkg/vars/vars.go index 073c080..bfa1618 100644 --- a/pkg/vars/vars.go +++ b/pkg/vars/vars.go @@ -3,7 +3,7 @@ package vars import ( "bytes" - "novit.nc/direktil/pkg/config" + "novit.tech/direktil/pkg/config" ) type Var struct {