diff --git a/.github/workflows/golangci-lint.yml b/.github/workflows/golangci-lint.yml index b38e497bf..8da4335af 100644 --- a/.github/workflows/golangci-lint.yml +++ b/.github/workflows/golangci-lint.yml @@ -35,7 +35,7 @@ jobs: - name: Install and initialize swagger run: | go install github.com/swaggo/swag/cmd/swag@latest - swag init + swag init -q --markdownFiles docs shell: sh - name: golangci-lint diff --git a/.github/workflows/scripts/upload-artifacts.sh b/.github/workflows/scripts/upload-artifacts.sh index 181ff1e03..e41697df4 100755 --- a/.github/workflows/scripts/upload-artifacts.sh +++ b/.github/workflows/scripts/upload-artifacts.sh @@ -82,6 +82,7 @@ update_publish() { _state=`echo $jsonret | jq .State` if [ "$_state" = "2" ]; then _success=1 + curl -fsS -X DELETE -u $aptly_user:$aptly_password ${aptly_api}/api/tasks/$_task_id break fi if [ "$_state" = "3" ]; then diff --git a/.gitignore b/.gitignore index 6b1b20816..495b35f50 100644 --- a/.gitignore +++ b/.gitignore @@ -67,4 +67,7 @@ debian/aptly-dbg.debhelper.log debian/aptly-dbg.substvars debian/aptly-dbg/ -docs/ +docs/docs.go +docs/swagger.json +docs/swagger.yaml +docs/swagger.conf diff --git a/Makefile b/Makefile index 6e1411096..99c628408 100644 --- a/Makefile +++ b/Makefile @@ -3,70 +3,80 @@ VERSION=$(shell make -s version) PYTHON?=python3 TESTS?= BINPATH?=$(GOPATH)/bin -RUN_LONG_TESTS?=yes GOLANGCI_LINT_VERSION=v1.54.1 # version supporting go 1.19 COVERAGE_DIR?=$(shell mktemp -d) GOOS=$(shell go env GOHOSTOS) GOARCH=$(shell go env GOHOSTARCH) -RELEASE=no + # Uncomment to update test outputs # CAPTURE := "--capture" -# Self-documenting Makefile -# https://marmelab.com/blog/2016/02/29/auto-documented-makefile.html help: ## Print this help @grep -E '^[a-zA-Z][a-zA-Z0-9_-]*:.*?## .*$$' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}' prepare: ## Install go module dependencies - # set version - @make version > VERSION - # download modules - go mod download - # install and initialize swagger - go install github.com/swaggo/swag/cmd/swag@latest - PATH=$(BINPATH)/:$(PATH) swag init -q + # Prepare go modules go mod verify go mod tidy -v + # Generate VERSION file go generate -install: - @echo "\e[33m\e[1mBuilding aptly ...\e[0m" - go generate - @out=`mktemp`; if ! go install -v > $$out 2>&1; then cat $$out; rm -f $$out; echo "\nBuild failed\n"; exit 1; else rm -f $$out; fi +releasetype: # Print release type: ci (on any branch/commit), release (on a tag) + @reltype=ci ; \ + gitbranch=`git rev-parse --abbrev-ref HEAD` ; \ + if [ "$$gitbranch" = "HEAD" ] && [ "$$FORCE_CI" != "true" ]; then \ + gittag=`git describe --tags --exact-match 2>/dev/null` ;\ + if echo "$$gittag" | grep -q '^v[0-9]'; then \ + reltype=release ; \ + fi ; \ + fi ; \ + echo $$reltype -system-test: install ## Run system tests in github CI -ifeq ($(RUN_LONG_TESTS), yes) - go generate - # install etcd +version: ## Print aptly version + @ci="" ; \ + if [ "`make -s releasetype`" = "ci" ]; then \ + ci=`TZ=UTC git show -s --format='+%cd.%h' --date=format-local:'%Y%m%d%H%M%S'`; \ + fi ; \ + if which dpkg-parsechangelog > /dev/null 2>&1; then \ + echo `dpkg-parsechangelog -S Version`$$ci; \ + else \ + echo `grep ^aptly -m1 debian/changelog | sed 's/.*(\([^)]\+\)).*/\1/'`$$ci ; \ + fi + +swagger-install: + # Install swag + @test -f $(BINPATH)/swag || GOOS=linux GOARCH=amd64 go install github.com/swaggo/swag/cmd/swag@latest + # Generate swagger.conf + cp docs/swagger.conf.tpl docs/swagger.conf + echo "// @version $(VERSION)" >> docs/swagger.conf + +swagger: swagger-install + # Generate swagger docs + @PATH=$(BINPATH)/:$(PATH) swag init --markdownFiles docs --generalInfo docs/swagger.conf + +etcd-install: + # Install etcd test -d /srv/etcd || system/t13_etcd/install-etcd.sh - system/t13_etcd/start-etcd.sh & - # build coverage binary - go test -v -coverpkg="./..." -c -tags testruncli - kill `cat /tmp/etcd.pid` - if [ ! -e ~/aptly-fixture-db ]; then git clone https://github.com/aptly-dev/aptly-fixture-db.git ~/aptly-fixture-db/; fi - if [ ! -e ~/aptly-fixture-pool ]; then git clone https://github.com/aptly-dev/aptly-fixture-pool.git ~/aptly-fixture-pool/; fi - cd /home/runner; curl -O http://repo.aptly.info/system-tests/etcd.db.xz; xz -d etcd.db.xz - PATH=$(BINPATH)/:$(PATH) && APTLY_VERSION=$(VERSION) FORCE_COLOR=1 $(PYTHON) system/run.py --long $(TESTS) --coverage-dir $(COVERAGE_DIR) $(CAPTURE) -endif +flake8: ## run flake8 on system test python files + flake8 system/ + +lint: + # Install golangci-lint + go install github.com/golangci/golangci-lint/cmd/golangci-lint@$(GOLANGCI_LINT_VERSION) + # Running lint + @PATH=$(BINPATH)/:$(PATH) golangci-lint run -docker-test: ## Run system tests - @echo "\e[33m\e[1mBuilding aptly.test ...\e[0m" - @rm -f aptly.test + +build: prepare swagger ## Build aptly + go build -o build/aptly + +install: + @echo "\e[33m\e[1mBuilding aptly ...\e[0m" go generate - # install and initialize swagger - test -f $(BINPATH)/swag || go install github.com/swaggo/swag/cmd/swag@latest - PATH=$(BINPATH)/:$(PATH) swag init -q - # build coverage binary - go test -v -coverpkg="./..." -c -tags testruncli - @echo "\e[33m\e[1mRunning python tests ...\e[0m" - @test -e aws.creds && . ./aws.creds; \ - export PATH=$(BINPATH)/:$(PATH); \ - export APTLY_VERSION=$(VERSION); \ - $(PYTHON) system/run.py --long $(TESTS) --coverage-dir $(COVERAGE_DIR) $(CAPTURE) $(TEST) - -test: prepare ## Run unit tests - @test -d /srv/etcd || system/t13_etcd/install-etcd.sh + @out=`mktemp`; if ! go install -v > $$out 2>&1; then cat $$out; rm -f $$out; echo "\nBuild failed\n"; exit 1; else rm -f $$out; fi + +test: prepare swagger etcd-install ## Run unit tests @echo "\e[33m\e[1mStarting etcd ...\e[0m" @mkdir -p /tmp/etcd-data; system/t13_etcd/start-etcd.sh > /tmp/etcd-data/etcd.log 2>&1 & @echo "\e[33m\e[1mRunning go test ...\e[0m" @@ -76,62 +86,28 @@ test: prepare ## Run unit tests @rm -f /tmp/etcd-data/etcd.log @ret=`cat .unit-test.ret`; if [ "$$ret" = "0" ]; then echo "\n\e[32m\e[1mUnit Tests SUCCESSFUL\e[0m"; else echo "\n\e[31m\e[1mUnit Tests FAILED\e[0m"; fi; rm -f .unit-test.ret; exit $$ret +system-test: prepare swagger etcd-install ## Run system tests + # build coverage binary + go test -v -coverpkg="./..." -c -tags testruncli + # Download fixture-db, fixture-pool, etcd.db + if [ ! -e ~/aptly-fixture-db ]; then git clone https://github.com/aptly-dev/aptly-fixture-db.git ~/aptly-fixture-db/; fi + if [ ! -e ~/aptly-fixture-pool ]; then git clone https://github.com/aptly-dev/aptly-fixture-pool.git ~/aptly-fixture-pool/; fi + test -f ~/etcd.db || (curl -o ~/etcd.db.xz http://repo.aptly.info/system-tests/etcd.db.xz && xz -d ~/etcd.db.xz) + # Run system tests + PATH=$(BINPATH)/:$(PATH) && FORCE_COLOR=1 $(PYTHON) system/run.py --long $(TESTS) --coverage-dir $(COVERAGE_DIR) $(CAPTURE) $(TEST) + bench: @echo "\e[33m\e[1mRunning benchmark ...\e[0m" go test -v ./deb -run=nothing -bench=. -benchmem -mem.png: mem.dat mem.gp - gnuplot mem.gp - open mem.png - -man: ## Create man pages - make -C man - -version: ## Print aptly version - @ci="" ; \ - if [ "`make -s releasetype`" = "ci" ]; then \ - ci=`TZ=UTC git show -s --format='+%cd.%h' --date=format-local:'%Y%m%d%H%M%S'`; \ - fi ; \ - if which dpkg-parsechangelog > /dev/null 2>&1; then \ - echo `dpkg-parsechangelog -S Version`$$ci; \ - else \ - echo `grep ^aptly -m1 debian/changelog | sed 's/.*(\([^)]\+\)).*/\1/'`$$ci ; \ - fi - -releasetype: # Print release type (ci/release) - @reltype=ci ; \ - gitbranch=`git rev-parse --abbrev-ref HEAD` ; \ - if [ "$$gitbranch" = "HEAD" ] && [ "$$FORCE_CI" != "true" ]; then \ - gittag=`git describe --tags --exact-match` ;\ - if echo "$$gittag" | grep -q '^v[0-9]'; then \ - reltype=release ; \ - fi ; \ - fi ; \ - echo $$reltype +serve: prepare swagger-install ## Run development server (auto recompiling) + test -f $(BINPATH)/air || go install github.com/air-verse/air@v1.52.3 + cp debian/aptly.conf ~/.aptly.conf + sed -i /enableSwaggerEndpoint/s/false/true/ ~/.aptly.conf + PATH=$(BINPATH):$$PATH air -build.pre_cmd 'swag init -q --markdownFiles docs --generalInfo docs/swagger.conf' -build.exclude_dir docs,system,debian,pgp/keyrings,pgp/test-bins,completion.d,man,deb/testdata,console,_man,cmd,systemd -- api serve -listen 0.0.0.0:3142 -build: ## Build aptly - # install and initialize swagger - unset GOBIN; go install github.com/swaggo/swag/cmd/swag@latest - PATH=$(BINPATH)/:$(PATH) swag init -q - # prepare - go mod tidy - go generate - # build - go build -o build/aptly - -dev-server: prepare ## Run dev-server - go install github.com/air-verse/air@v1.52.3 - cp debian/aptly.conf /var/lib/aptly/.aptly.conf - sed -i /enableSwaggerEndpoint/s/false/true/ /var/lib/aptly/.aptly.conf - PATH=$(BINPATH):$$PATH air -build.pre_cmd 'swag init -q' -build.exclude_dir system -build.exclude_dir debian -build.exclude_dir docs -- api serve -listen 0.0.0.0:3142 - -dpkg: ## Build debian packages +dpkg: prepare swagger ## Build debian packages @test -n "$(DEBARCH)" || (echo "please define DEBARCH"; exit 1) - # go generate - GOPATH=$$PWD/.go go generate -v - # install and initialize swagger - go install github.com/swaggo/swag/cmd/swag@latest - PATH=$(BINPATH)/:$(PATH) swag init -q # set debian version @if [ "`make -s releasetype`" = "ci" ]; then \ echo CI Build, setting version... ; \ @@ -150,12 +126,7 @@ dpkg: ## Build debian packages mkdir -p build && mv ../*.deb build/ ; \ cd build && ls -l *.deb -binaries: ## Build binary releases (FreeBSD, MacOS, Linux tar) - # set version - @make version > VERSION - # install and initialize swagger - GOOS=linux GOARCH=amd64 go install github.com/swaggo/swag/cmd/swag@latest - PATH=$(BINPATH)/:$(PATH) swag init -q +binaries: prepare swagger ## Build binary releases (FreeBSD, MacOS, Linux tar) # build aptly GOOS=$(GOOS) GOARCH=$(GOARCH) go build -o build/tmp/aptly -ldflags='-extldflags=-static' # install @@ -178,35 +149,45 @@ docker-image: ## Build aptly-dev docker image @docker build -f system/Dockerfile . -t aptly-dev docker-build: ## Build aptly in docker container - @docker run -it --rm -v ${PWD}:/work/src aptly-dev /work/src/system/run-aptly-cmd make build + @docker run -it --rm -v ${PWD}:/work/src aptly-dev /work/src/system/docker-wrapper build docker-shell: ## Run aptly and other commands in docker container - @docker run -it --rm -v ${PWD}:/work/src aptly-dev /work/src/system/run-aptly-cmd + @docker run -it --rm -v ${PWD}:/work/src aptly-dev /work/src/system/docker-wrapper || true docker-deb: ## Build debian packages in docker container - @docker run -it --rm -v ${PWD}:/work/src aptly-dev /work/src/system/build-deb + @docker run -it --rm -v ${PWD}:/work/src aptly-dev /work/src/system/docker-wrapper dpkg DEBARCH=amd64 -docker-unit-tests: ## Run unit tests in docker container - @docker run -it --rm -v ${PWD}:/app aptly-dev /app/system/run-unit-tests +docker-unit-test: ## Run unit tests in docker container + @docker run -it --rm -v ${PWD}:/work/src aptly-dev /work/src/system/docker-wrapper test -docker-system-tests: ## Run system tests in docker container (add TEST=t04_mirror or TEST=UpdateMirror26Test to run only specific tests) - @docker run -it --rm -v ${PWD}:/app aptly-dev /app/system/run-system-tests $(TEST) +docker-system-test: ## Run system tests in docker container (add TEST=t04_mirror or TEST=UpdateMirror26Test to run only specific tests) + @docker run -it --rm -v ${PWD}:/work/src aptly-dev /work/src/system/docker-wrapper system-test $(TEST) -docker-dev-server: ## Run development server (auto recompiling) on http://localhost:3142 - @docker run -it --rm -p 3142:3142 -v ${PWD}:/work/src aptly-dev /work/src/system/docker-wrapper dev-server +docker-serve: ## Run development server (auto recompiling) on http://localhost:3142 + @docker run -it --rm -p 3142:3142 -v ${PWD}:/work/src aptly-dev /work/src/system/docker-wrapper serve || true docker-lint: ## Run golangci-lint in docker container - @docker run -it --rm -v ${PWD}:/app -e GOLANGCI_LINT_VERSION=$(GOLANGCI_LINT_VERSION) aptly-dev /app/system/run-golangci-lint + @docker run -it --rm -v ${PWD}:/work/src aptly-dev /work/src/system/docker-wrapper lint docker-binaries: ## Build binary releases (FreeBSD, MacOS, Linux tar) in docker container - @docker run -it --rm -v ${PWD}:/app aptly-dev /app/system/build-binaries + @docker run -it --rm -v ${PWD}:/work/src aptly-dev /work/src/system/docker-wrapper binaries -flake8: ## run flake8 on system tests - flake8 system +docker-man: ## Create man page in docker container + @docker run -it --rm -v ${PWD}:/work/src aptly-dev /work/src/system/docker-wrapper man -clean: ## remove local build and module cache - test -d .go/ && chmod u+w -R .go/ && rm -rf .go/ || true - rm -rf build/ docs/ obj-*-linux-gnu* - rm -f unit.out aptly.test +mem.png: mem.dat mem.gp + gnuplot mem.gp + open mem.png -.PHONY: help man prepare version binaries docker-release docker-system-tests docker-unit-tests docker-lint docker-build docker-image build docker-shell clean releasetype dpkg dev-server docker-dev-server flake8 +man: ## Create man pages + make -C man + +clean: ## remove local build and module cache + # Clean all generated and build files + find .go/ -type d ! -perm -u=w -exec chmod u+w {} \; + rm -rf .go/ + rm -rf build/ obj-*-linux-gnu* tmp/ + rm -f unit.out aptly.test VERSION docs/docs.go docs/swagger.json docs/swagger.yaml docs/swagger.conf + find system/ -type d -name __pycache__ -exec rm -rf {} \; 2>/dev/null || true + +.PHONY: help man prepare swagger version binaries docker-release docker-system-tests docker-unit-tests docker-lint docker-build docker-image build docker-shell clean releasetype dpkg serve docker-serve flake8 diff --git a/api/api.go b/api/api.go index a52406d80..c66a44b1b 100644 --- a/api/api.go +++ b/api/api.go @@ -23,12 +23,38 @@ import ( // 3. SnapshotCollection // 4. PublishedRepoCollection -// GET /api/version +type aptlyVersion struct { + // Aptly Version + Version string `json:"Version"` +} + +// @Summary Aptly version +// @Description **Get aptly version** +// @Description Returns the aptly version +// @Tags Status +// @Produce json +// @Success 200 {object} aptlyVersion +// @Router /api/version [get] func apiVersion(c *gin.Context) { c.JSON(200, gin.H{"Version": aptly.Version}) } -// GET /api/ready +type aptlyStatus struct { + // Aptly Status + Status string `json:"Status" example:"'Aptly is ready', 'Aptly is unavailable', 'Aptly is healthy'"` +} + +// @Summary Ready State +// @Description **Get aptly ready state** +// @Description +// @Description Return aptly ready state: +// @Description - `Aptly is ready` (HTTP 200) +// @Description - `Aptly is unavailable` (HTTP 503) +// @Tags Status +// @Produce json +// @Success 200 {object} aptlyStatus "Aptly is ready" +// @Failure 503 {object} aptlyStatus "Aptly is unavailable" +// @Router /api/ready [get] func apiReady(isReady *atomic.Value) func(*gin.Context) { return func(c *gin.Context) { if isReady == nil || !isReady.Load().(bool) { @@ -40,7 +66,15 @@ func apiReady(isReady *atomic.Value) func(*gin.Context) { } } -// GET /api/healthy +// @Summary Health State +// @Description **Get aptly health state** +// @Description +// @Description Return aptly health state: +// @Description - `Aptly is healthy` (HTTP 200) +// @Tags Status +// @Produce json +// @Success 200 {object} aptlyStatus +// @Router /api/healthy [get] func apiHealthy(c *gin.Context) { c.JSON(200, gin.H{"Status": "Aptly is healthy"}) } diff --git a/api/db.go b/api/db.go index 3f8b826dd..5f7727fff 100644 --- a/api/db.go +++ b/api/db.go @@ -11,7 +11,14 @@ import ( "github.com/gin-gonic/gin" ) -// POST /api/db/cleanup +// @Summary TODO +// @Description **ToDo** +// @Description To Do +// @Tags Database +// @Produce json +// @Success 200 {object} string "msg" +// @Failure 404 {object} Error "Not Found" +// @Router /api/db/cleanup [post] func apiDbCleanup(c *gin.Context) { resources := []string{string(task.AllResourcesKey)} diff --git a/api/files.go b/api/files.go index bd9296cc1..09e081e77 100644 --- a/api/files.go +++ b/api/files.go @@ -33,10 +33,10 @@ func verifyDir(c *gin.Context) bool { return true } -// @Summary Get files -// @Description Get list of uploaded files. +// @Summary List Files +// @Description **Get list of uploaded files** // @Tags Files -// @Produce json +// @Produce json // @Success 200 {array} string "List of files" // @Router /api/files [get] func apiFilesListDirs(c *gin.Context) { @@ -66,7 +66,14 @@ func apiFilesListDirs(c *gin.Context) { c.JSON(200, list) } -// POST /files/:dir/ +// @Summary TODO +// @Description **ToDo** +// @Description To Do +// @Tags Files +// @Produce json +// @Success 200 {object} string "msg" +// @Failure 404 {object} Error "Not Found" +// @Router /api/files/{dir} [post] func apiFilesUpload(c *gin.Context) { if !verifyDir(c) { return @@ -120,7 +127,14 @@ func apiFilesUpload(c *gin.Context) { } -// GET /files/:dir +// @Summary TODO +// @Description **ToDo** +// @Description To Do +// @Tags Files +// @Produce json +// @Success 200 {object} string "msg" +// @Failure 404 {object} Error "Not Found" +// @Router /api/files/{dir} [get] func apiFilesListFiles(c *gin.Context) { if !verifyDir(c) { return @@ -158,7 +172,14 @@ func apiFilesListFiles(c *gin.Context) { c.JSON(200, list) } -// DELETE /files/:dir +// @Summary TODO +// @Description **ToDo** +// @Description To Do +// @Tags Files +// @Produce json +// @Success 200 {object} string "msg" +// @Failure 404 {object} Error "Not Found" +// @Router /api/files/{dir} [delete] func apiFilesDeleteDir(c *gin.Context) { if !verifyDir(c) { return @@ -173,7 +194,14 @@ func apiFilesDeleteDir(c *gin.Context) { c.JSON(200, gin.H{}) } -// DELETE /files/:dir/:name +// @Summary TODO +// @Description **ToDo** +// @Description To Do +// @Tags Files +// @Produce json +// @Success 200 {object} string "msg" +// @Failure 404 {object} Error "Not Found" +// @Router /api/files/{dir}/{name} [delete] func apiFilesDeleteFile(c *gin.Context) { if !verifyDir(c) { return diff --git a/api/gpg.go b/api/gpg.go index 605b6c1db..7d837bf67 100644 --- a/api/gpg.go +++ b/api/gpg.go @@ -11,7 +11,14 @@ import ( "github.com/gin-gonic/gin" ) -// POST /api/gpg +// @Summary TODO +// @Description **ToDo** +// @Description To Do +// @Tags GPG +// @Produce json +// @Success 200 {object} string "msg" +// @Failure 404 {object} Error "Not Found" +// @Router /api/gpg [post] func apiGPGAddKey(c *gin.Context) { var b struct { Keyserver string diff --git a/api/graph.go b/api/graph.go index d04e687f8..cd04063b0 100644 --- a/api/graph.go +++ b/api/graph.go @@ -12,6 +12,14 @@ import ( "github.com/gin-gonic/gin" ) +// @Summary TODO +// @Description **ToDo** +// @Description To Do +// @Tags Graph +// @Produce json +// @Success 200 {object} string "msg" +// @Failure 404 {object} Error "Not Found" +// @Router /api/graph [get] // GET /api/graph.:ext?layout=[vertical|horizontal(default)] func apiGraph(c *gin.Context) { var ( diff --git a/api/packages.go b/api/packages.go index 09ae785a5..e649a80e4 100644 --- a/api/packages.go +++ b/api/packages.go @@ -4,7 +4,14 @@ import ( "github.com/gin-gonic/gin" ) -// GET /api/packages/:key +// @Summary TODO +// @Description **ToDo** +// @Description To Do +// @Tags Packages +// @Produce json +// @Success 200 {object} string "msg" +// @Failure 404 {object} Error "Not Found" +// @Router /api/packages/{key} [get] func apiPackagesShow(c *gin.Context) { collectionFactory := context.NewCollectionFactory() p, err := collectionFactory.PackageCollection().ByKey([]byte(c.Params.ByName("key"))) diff --git a/api/publish.go b/api/publish.go index a520878a0..9c759ae36 100644 --- a/api/publish.go +++ b/api/publish.go @@ -84,7 +84,14 @@ func apiPublishList(c *gin.Context) { c.JSON(200, result) } -// POST /publish/:prefix +// @Summary TODO +// @Description **ToDo** +// @Description To Do +// @Tags Publish +// @Produce json +// @Success 200 {object} string "msg" +// @Failure 404 {object} Error "Not Found" +// @Router /api/publish/{prefix} [post] func apiPublishRepoOrSnapshot(c *gin.Context) { param := parseEscapedPath(c.Params.ByName("prefix")) storage, prefix := deb.ParsePrefix(param) @@ -246,7 +253,14 @@ func apiPublishRepoOrSnapshot(c *gin.Context) { }) } -// PUT /publish/:prefix/:distribution +// @Summary TODO +// @Description **ToDo** +// @Description To Do +// @Tags Publish +// @Produce json +// @Success 200 {object} string "msg" +// @Failure 404 {object} Error "Not Found" +// @Router /api/publish/{prefix}/{distribution} [put] func apiPublishUpdateSwitch(c *gin.Context) { param := parseEscapedPath(c.Params.ByName("prefix")) storage, prefix := deb.ParsePrefix(param) @@ -364,7 +378,14 @@ func apiPublishUpdateSwitch(c *gin.Context) { }) } -// DELETE /publish/:prefix/:distribution +// @Summary TODO +// @Description **ToDo** +// @Description To Do +// @Tags Publish +// @Produce json +// @Success 200 {object} string "msg" +// @Failure 404 {object} Error "Not Found" +// @Router /api/publish/{prefix}/{distribution} [delete] func apiPublishDrop(c *gin.Context) { force := c.Request.URL.Query().Get("force") == "1" skipCleanup := c.Request.URL.Query().Get("SkipCleanup") == "1" diff --git a/api/repos.go b/api/repos.go index 81425f999..81798d775 100644 --- a/api/repos.go +++ b/api/repos.go @@ -18,7 +18,14 @@ import ( "github.com/gin-gonic/gin" ) -// GET /repos +// @Summary TODO +// @Description **ToDo** +// @Description To Do +// @Tags Repos +// @Produce json +// @Success 200 {object} string "msg" +// @Failure 404 {object} Error "Not Found" +// @Router /api/repos [get] func reposListInAPIMode(localRepos map[string]utils.FileSystemPublishRoot) gin.HandlerFunc { return func(c *gin.Context) { c.Writer.Header().Set("Content-Type", "text/html; charset=utf-8") @@ -35,7 +42,16 @@ func reposListInAPIMode(localRepos map[string]utils.FileSystemPublishRoot) gin.H } } -// GET /repos/:storage/*pkgPath +// @Summary TODO +// @Description **ToDo** +// @Description To Do +// @Tags Repos +// @Param storage path string true "Storage" +// @Param pkgPath path string true "Package Path" allowReserved=true +// @Produce json +// @Success 200 {object} string "msg" +// @Failure 404 {object} Error "Not Found" +// @Router /api/{storage}/{pkgPath} [get] func reposServeInAPIMode(c *gin.Context) { pkgpath := c.Param("pkgPath") @@ -51,7 +67,8 @@ func reposServeInAPIMode(c *gin.Context) { } // @Summary Get repos -// @Description Get list of available repos. Each repo is returned as in “show” API. +// @Description **Get list of available repos** +// @Description Each repo is returned as in “show” API. // @Tags Repos // @Produce json // @Success 200 {array} deb.LocalRepo @@ -69,7 +86,7 @@ func apiReposList(c *gin.Context) { c.JSON(200, result) } -// @Summary Create repository +// @Summary TODO // @Description Create a local repository. // @Tags Repos // @Produce json @@ -108,7 +125,14 @@ func apiReposCreate(c *gin.Context) { c.JSON(201, repo) } -// PUT /api/repos/:name +// @Summary TODO +// @Description **ToDo** +// @Description To Do +// @Tags Repos +// @Produce json +// @Success 200 {object} string "msg" +// @Failure 404 {object} Error "Not Found" +// @Router /api/repos/{name} [put] func apiReposEdit(c *gin.Context) { var b struct { Name *string @@ -180,7 +204,14 @@ func apiReposShow(c *gin.Context) { c.JSON(200, repo) } -// DELETE /api/repos/:name +// @Summary TODO +// @Description **ToDo** +// @Description To Do +// @Tags Repos +// @Produce json +// @Success 200 {object} string "msg" +// @Failure 404 {object} Error "Not Found" +// @Router /api/repos/{name} [delete] func apiReposDrop(c *gin.Context) { force := c.Request.URL.Query().Get("force") == "1" name := c.Params.ByName("name") @@ -215,7 +246,14 @@ func apiReposDrop(c *gin.Context) { }) } -// GET /api/repos/:name/packages +// @Summary TODO +// @Description **ToDo** +// @Description To Do +// @Tags Repos +// @Produce json +// @Success 200 {object} string "msg" +// @Failure 404 {object} Error "Not Found" +// @Router /api/repos/{name}/packages [get] func apiReposPackagesShow(c *gin.Context) { collectionFactory := context.NewCollectionFactory() collection := collectionFactory.LocalRepoCollection() @@ -296,7 +334,14 @@ func apiReposPackagesAddDelete(c *gin.Context, taskNamePrefix string, cb func(li }) } -// POST /repos/:name/packages +// @Summary TODO +// @Description **ToDo** +// @Description To Do +// @Tags Repos +// @Produce json +// @Success 200 {object} string "msg" +// @Failure 404 {object} Error "Not Found" +// @Router /api/repos/{name}/packages [post] func apiReposPackagesAdd(c *gin.Context) { apiReposPackagesAddDelete(c, "Add packages to repo ", func(list *deb.PackageList, p *deb.Package, out aptly.Progress) error { out.Printf("Adding package %s\n", p.Name) @@ -304,7 +349,14 @@ func apiReposPackagesAdd(c *gin.Context) { }) } -// DELETE /repos/:name/packages +// @Summary TODO +// @Description **ToDo** +// @Description To Do +// @Tags Repos +// @Produce json +// @Success 200 {object} string "msg" +// @Failure 404 {object} Error "Not Found" +// @Router /api/repos/{name}/packages [delete] func apiReposPackagesDelete(c *gin.Context) { apiReposPackagesAddDelete(c, "Delete packages from repo ", func(list *deb.PackageList, p *deb.Package, out aptly.Progress) error { out.Printf("Removing package %s\n", p.Name) @@ -313,7 +365,14 @@ func apiReposPackagesDelete(c *gin.Context) { }) } -// POST /repos/:name/file/:dir/:file +// @Summary TODO +// @Description **ToDo** +// @Description To Do +// @Tags Repos +// @Produce json +// @Success 200 {object} string "msg" +// @Failure 404 {object} Error "Not Found" +// @Router /api/repos/{name}/file/{dir}/{file} [post] func apiReposPackageFromFile(c *gin.Context) { // redirect all work to dir method apiReposPackageFromDir(c) @@ -454,7 +513,14 @@ func apiReposPackageFromDir(c *gin.Context) { }) } -// POST /repos/:name/copy/:src/:file +// @Summary TODO +// @Description **ToDo** +// @Description To Do +// @Tags Repos +// @Produce json +// @Success 200 {object} string "msg" +// @Failure 404 {object} Error "Not Found" +// @Router /api/repos/{name}/copy/{src}/{file} [post] func apiReposCopyPackage(c *gin.Context) { dstRepoName := c.Params.ByName("name") srcRepoName := c.Params.ByName("src") @@ -598,13 +664,27 @@ func apiReposCopyPackage(c *gin.Context) { }) } -// POST /repos/:name/include/:dir/:file +// @Summary TODO +// @Description **ToDo** +// @Description To Do +// @Tags Repos +// @Produce json +// @Success 200 {object} string "msg" +// @Failure 404 {object} Error "Not Found" +// @Router /api/repos/{name}/include/{dir}/{file} [post] func apiReposIncludePackageFromFile(c *gin.Context) { // redirect all work to dir method apiReposIncludePackageFromDir(c) } -// POST /repos/:name/include/:dir +// @Summary TODO +// @Description **ToDo** +// @Description To Do +// @Tags Repos +// @Produce json +// @Success 200 {object} string "msg" +// @Failure 404 {object} Error "Not Found" +// @Router /api/repos/{name}/include/{dir} [post] func apiReposIncludePackageFromDir(c *gin.Context) { forceReplace := c.Request.URL.Query().Get("forceReplace") == "1" noRemoveFiles := c.Request.URL.Query().Get("noRemoveFiles") == "1" diff --git a/api/router.go b/api/router.go index d5b6e6123..aaf6e7fba 100644 --- a/api/router.go +++ b/api/router.go @@ -12,7 +12,7 @@ import ( "github.com/prometheus/client_golang/prometheus/promhttp" "github.com/rs/zerolog/log" - _ "github.com/aptly-dev/aptly/docs" // import docs + "github.com/aptly-dev/aptly/docs" swaggerFiles "github.com/swaggo/files" ginSwagger "github.com/swaggo/gin-swagger" ) @@ -27,26 +27,22 @@ func apiMetricsGet() gin.HandlerFunc { } func redirectSwagger(c *gin.Context) { + if c.Request.URL.Path == "/docs/index.html" { + c.Redirect(http.StatusMovedPermanently, "/docs.html") + return + } if c.Request.URL.Path == "/docs/" { - c.Redirect(http.StatusMovedPermanently, "/docs/index.html") + c.Redirect(http.StatusMovedPermanently, "/docs.html") + return + } + if c.Request.URL.Path == "/docs" { + c.Redirect(http.StatusMovedPermanently, "/docs.html") return } c.Next() } // Router returns prebuilt with routes http.Handler -// @title Aptly API -// @version 1.0 -// @description Aptly REST API Documentation - -// @contact.name Aptly -// @contact.url http://github.com/aptly-dev/aptly -// @contact.email support@aptly.info - -// @license.name MIT License -// @license.url http://www. - -// @BasePath /api func Router(c *ctx.AptlyContext) http.Handler { if aptly.EnableDebug { gin.SetMode(gin.DebugMode) @@ -73,6 +69,9 @@ func Router(c *ctx.AptlyContext) http.Handler { router.Use(gin.Recovery(), gin.ErrorLogger()) if c.Config().EnableSwaggerEndpoint { + router.GET("docs.html", func(c *gin.Context) { + c.Data(http.StatusOK, "text/html; charset=utf-8", docs.DocsHTML) + }) router.Use(redirectSwagger) url := ginSwagger.URL("/docs/doc.json") router.GET("/docs/*any", ginSwagger.WrapHandler(swaggerFiles.Handler, url)) diff --git a/api/s3.go b/api/s3.go index 33ed0c83e..19be7537a 100644 --- a/api/s3.go +++ b/api/s3.go @@ -4,8 +4,8 @@ import ( "github.com/gin-gonic/gin" ) -// @Summary Get S3 buckets -// @Description Get list of S3 buckets. +// @Summary S3 buckets +// @Description **Get list of S3 buckets** // @Tags S3 // @Produce json // @Success 200 {array} string "List of S3 buckets" diff --git a/api/snapshot.go b/api/snapshot.go index 3e84b1f20..fa0e3c204 100644 --- a/api/snapshot.go +++ b/api/snapshot.go @@ -39,7 +39,14 @@ func apiSnapshotsList(c *gin.Context) { c.JSON(200, result) } -// POST /api/mirrors/:name/snapshots/ +// @Summary TODO +// @Description **ToDo** +// @Description To Do +// @Tags Snapshots +// @Produce json +// @Success 200 {object} string "msg" +// @Failure 404 {object} Error "Not Found" +// @Router /api/mirrors/{name}/snapshots [post] func apiSnapshotsCreateFromMirror(c *gin.Context) { var ( err error @@ -98,7 +105,14 @@ func apiSnapshotsCreateFromMirror(c *gin.Context) { }) } -// POST /api/snapshots +// @Summary TODO +// @Description **ToDo** +// @Description To Do +// @Tags Snapshots +// @Produce json +// @Success 200 {object} string "msg" +// @Failure 404 {object} Error "Not Found" +// @Router /api/snapshots [post] func apiSnapshotsCreate(c *gin.Context) { var ( err error @@ -172,7 +186,14 @@ func apiSnapshotsCreate(c *gin.Context) { }) } -// POST /api/repos/:name/snapshots +// @Summary TODO +// @Description **ToDo** +// @Description To Do +// @Tags Snapshots +// @Produce json +// @Success 200 {object} string "msg" +// @Failure 404 {object} Error "Not Found" +// @Router /api/repos/{name}/snapshots [post] func apiSnapshotsCreateFromRepository(c *gin.Context) { var ( err error @@ -226,7 +247,14 @@ func apiSnapshotsCreateFromRepository(c *gin.Context) { }) } -// PUT /api/snapshots/:name +// @Summary TODO +// @Description **ToDo** +// @Description To Do +// @Tags Snapshots +// @Produce json +// @Success 200 {object} string "msg" +// @Failure 404 {object} Error "Not Found" +// @Router /api/snapshots/{name} [put] func apiSnapshotsUpdate(c *gin.Context) { var ( err error @@ -276,7 +304,14 @@ func apiSnapshotsUpdate(c *gin.Context) { }) } -// GET /api/snapshots/:name +// @Summary TODO +// @Description **ToDo** +// @Description To Do +// @Tags Snapshots +// @Produce json +// @Success 200 {object} string "msg" +// @Failure 404 {object} Error "Not Found" +// @Router /api/snapshots/{name} [get] func apiSnapshotsShow(c *gin.Context) { collectionFactory := context.NewCollectionFactory() collection := collectionFactory.SnapshotCollection() @@ -296,7 +331,14 @@ func apiSnapshotsShow(c *gin.Context) { c.JSON(200, snapshot) } -// DELETE /api/snapshots/:name +// @Summary TODO +// @Description **ToDo** +// @Description To Do +// @Tags Snapshots +// @Produce json +// @Success 200 {object} string "msg" +// @Failure 404 {object} Error "Not Found" +// @Router /api/snapshots/{name} [delete] func apiSnapshotsDrop(c *gin.Context) { name := c.Params.ByName("name") force := c.Request.URL.Query().Get("force") == "1" @@ -335,7 +377,14 @@ func apiSnapshotsDrop(c *gin.Context) { }) } -// GET /api/snapshots/:name/diff/:withSnapshot +// @Summary TODO +// @Description **ToDo** +// @Description To Do +// @Tags Snapshots +// @Produce json +// @Success 200 {object} string "msg" +// @Failure 404 {object} Error "Not Found" +// @Router /api/snapshots/{name}/diff/{withSnapshot} [get] func apiSnapshotsDiff(c *gin.Context) { onlyMatching := c.Request.URL.Query().Get("onlyMatching") == "1" @@ -386,7 +435,14 @@ func apiSnapshotsDiff(c *gin.Context) { c.JSON(200, result) } -// GET /api/snapshots/:name/packages +// @Summary TODO +// @Description **ToDo** +// @Description To Do +// @Tags Snapshots +// @Produce json +// @Success 200 {object} string "msg" +// @Failure 404 {object} Error "Not Found" +// @Router /api/snapshots/{name}/packages [get] func apiSnapshotsSearchPackages(c *gin.Context) { collectionFactory := context.NewCollectionFactory() collection := collectionFactory.SnapshotCollection() diff --git a/api/task.go b/api/task.go index 189d79319..a33510aa0 100644 --- a/api/task.go +++ b/api/task.go @@ -20,21 +20,41 @@ func apiTasksList(c *gin.Context) { c.JSON(200, list.GetTasks()) } -// POST /tasks-clear +// @Summary TODO +// @Description **ToDo** +// @Description To Do +// @Tags Tasks +// @Produce json +// @Success 200 {object} string "msg" +// @Router /api/tasks-clear [post] func apiTasksClear(c *gin.Context) { list := context.TaskList() list.Clear() c.JSON(200, gin.H{}) } -// GET /tasks-wait +// @Summary TODO +// @Description **ToDo** +// @Description To Do +// @Tags Tasks +// @Produce json +// @Success 200 {object} string "msg" +// @Failure 404 {object} Error "Not Found" +// @Router /api/tasks-wait [get] func apiTasksWait(c *gin.Context) { list := context.TaskList() list.Wait() c.JSON(200, gin.H{}) } -// GET /tasks/:id/wait +// @Summary TODO +// @Description **ToDo** +// @Description To Do +// @Tags Tasks +// @Produce json +// @Success 200 {object} string "msg" +// @Failure 404 {object} Error "Not Found" +// @Router /api/tasks/{id}/wait [get] func apiTasksWaitForTaskByID(c *gin.Context) { list := context.TaskList() id, err := strconv.ParseInt(c.Params.ByName("id"), 10, 0) @@ -52,7 +72,14 @@ func apiTasksWaitForTaskByID(c *gin.Context) { c.JSON(200, task) } -// GET /tasks/:id +// @Summary TODO +// @Description **ToDo** +// @Description To Do +// @Tags Tasks +// @Produce json +// @Success 200 {object} string "msg" +// @Failure 404 {object} Error "Not Found" +// @Router /api/tasks/{id} [get] func apiTasksShow(c *gin.Context) { list := context.TaskList() id, err := strconv.ParseInt(c.Params.ByName("id"), 10, 0) @@ -71,7 +98,14 @@ func apiTasksShow(c *gin.Context) { c.JSON(200, task) } -// GET /tasks/:id/output +// @Summary TODO +// @Description **ToDo** +// @Description To Do +// @Tags Tasks +// @Produce json +// @Success 200 {object} string "msg" +// @Failure 404 {object} Error "Not Found" +// @Router /api/tasks/{id}/output [get] func apiTasksOutputShow(c *gin.Context) { list := context.TaskList() id, err := strconv.ParseInt(c.Params.ByName("id"), 10, 0) @@ -90,7 +124,14 @@ func apiTasksOutputShow(c *gin.Context) { c.JSON(200, output) } -// GET /tasks/:id/detail +// @Summary TODO +// @Description **ToDo** +// @Description To Do +// @Tags Tasks +// @Produce json +// @Success 200 {object} string "msg" +// @Failure 404 {object} Error "Not Found" +// @Router /api/tasks/{id}/detail [get] func apiTasksDetailShow(c *gin.Context) { list := context.TaskList() id, err := strconv.ParseInt(c.Params.ByName("id"), 10, 0) @@ -109,7 +150,14 @@ func apiTasksDetailShow(c *gin.Context) { c.JSON(200, detail) } -// GET /tasks/:id/return_value +// @Summary TODO +// @Description **ToDo** +// @Description To Do +// @Tags Tasks +// @Produce json +// @Success 200 {object} string "msg" +// @Failure 404 {object} Error "Not Found" +// @Router /api/tasks/{id}/return_value [get] func apiTasksReturnValueShow(c *gin.Context) { list := context.TaskList() id, err := strconv.ParseInt(c.Params.ByName("id"), 10, 0) @@ -127,7 +175,14 @@ func apiTasksReturnValueShow(c *gin.Context) { c.JSON(200, output) } -// DELETE /tasks/:id +// @Summary TODO +// @Description **ToDo** +// @Description To Do +// @Tags Tasks +// @Produce json +// @Success 200 {object} string "msg" +// @Failure 404 {object} Error "Not Found" +// @Router /api/tasks/{id} [delete] func apiTasksDelete(c *gin.Context) { list := context.TaskList() id, err := strconv.ParseInt(c.Params.ByName("id"), 10, 0) @@ -146,7 +201,16 @@ func apiTasksDelete(c *gin.Context) { c.JSON(200, delTask) } -// POST /tasks-dummy +// FIXME: used for testing only, remove: + +// @Summary TODO +// @Description **ToDo** +// @Description To Do +// @Tags Tasks +// @Produce json +// @Success 200 {object} string "msg" +// @Failure 404 {object} Error "Not Found" +// @Router /api/tasks-dummy [post] func apiTasksDummy(c *gin.Context) { resources := []string{"dummy"} taskName := "Dummy task" diff --git a/debian/aptly.conf b/debian/aptly.conf index d091e4745..4d627fc4b 100644 --- a/debian/aptly.conf +++ b/debian/aptly.conf @@ -1,38 +1,248 @@ +// vim: : filetype=json { + +// General +/////////// + + // Aptly storage directory + // - downloaded packages (`rootDir`/pool) + // - database (`rootDir`/db) + // - published repositories (`rootDir`/public) "rootDir": "~/.aptly", + + // number of attempts to open DB if it's locked by other instance; can be overridden with option `-db-open-attempts` + "databaseOpenAttempts": -1, + + // + "AsyncAPI": false, + + // + "enableMetricsEndpoint": false, + + // Enable API documentation on /docs + "enableSwaggerEndpoint": false, + + // + "logLevel": "info", + + // + "logFormat": "default", + + // + "serveInAPIMode": false, + + // OBSOLETE + // in aptly up to version 1.0.0, package files were stored in internal package pool + // with MD5-dervied path, since 1.1.0 package pool layout was changed; + // if option is enabled, aptly stops checking for legacy paths; + // by default option is enabled for new aptly installations and disabled when + // upgrading from older versions + "skipLegacyPool": true, + +// Database +//////////// + + // + "databaseBackend": { + // + "type": "", + // + "url": "", + // + "dbPath": "" + // + }, + +// Mirroring +///////////// + + // downloader to use + // - "default" (normal downloader) + // - "grab" (more robust) + "downloader": "default", + + // number of parallel download threads to use when downloading packages "downloadConcurrency": 4, + + // limit in kbytes/sec on download speed while mirroring remote repositories "downloadSpeedLimit": 0, + + // number of retries for download attempts "downloadRetries": 0, - "downloader": "default", - "databaseOpenAttempts": -1, + + // download source packages per default + "downloadSourcePackages": false, + + + // list of architectures to process; if left empty defaults to all available architectures; can be overridden with option `-architectures` "architectures": [], + + // follow contents of `Suggests:` field when processing dependencies for the package "dependencyFollowSuggests": false, + + // follow contents of `Recommends:` field when processing dependencies for the package "dependencyFollowRecommends": false, + + // when dependency looks like `package-a | package-b`, follow both variants always "dependencyFollowAllVariants": false, + + // follow dependency from binary package to source package "dependencyFollowSource": false, + + // print additional details while resolving dependencies (useful for debugging) "dependencyVerboseResolve": false, + +// Signing +/////////// + + // gpg provider to use: + // - "internal" (Go internal implementation) + // - 'gpg" (external `gpg` utility, uses GnuPG 1.x if available or GnuPG 2.x otherwise) + "gpgProvider": "gpg", + + // don't sign published repositories with gpg(1), also can be disabled on per-repo basis using `-skip-signing` flag when publishing "gpgDisableSign": false, + + // don't verify remote mirrors with gpg(1), also can be disabled on per-mirror basis using `-ignore-signatures` flag when creating and updating mirrors "gpgDisableVerify": false, - "gpgProvider": "gpg", - "downloadSourcePackages": false, - "skipLegacyPool": true, + + +// PPA +/////// + + // specifies paramaters for short PPA url expansion, if left blank they default to output of `lsb_release` command "ppaDistributorID": "ubuntu", + + // cwcodename for short PPA url expansion "ppaCodename": "", + + // "skipContentsPublishing": false, + + // "skipBz2Publishing": false, - "FileSystemPublishEndpoints": {}, - "S3PublishEndpoints": {}, - "SwiftPublishEndpoints": {}, - "AzurePublishEndpoints": {}, - "AsyncAPI": false, - "enableMetricsEndpoint": false, - "logLevel": "info", - "logFormat": "default", - "serveInAPIMode": false, - "databaseBackend": { - "type": "", - "url": "", - "dbPath": "" + +// Storage Endpoints +///////////////////// + + // Filesystem publishing endpoints + // + // aptly defaults to publish to a single publish directory under `rootDir`/public. For + // a more advanced publishing strategy, you can define one or more filesystem endpoints in the + // `FileSystemPublishEndpoints` list of the aptly configuration file. Each endpoint has a name + // and the following associated settings: + // + // * `rootDir`: + // The publish directory, e.g., `/opt/srv/aptly_public`. + // * `linkMethod`: + // This is one of `hardlink`, `symlink` or `copy`. It specifies how aptly links the + // files from the internal pool to the published directory. + // If not specified, empty or wrong, this defaults to `hardlink`. + // * `verifyMethod`: + // This is used only when setting the `linkMethod` to `copy`. Possible values are + // `md5` and `size`. It specifies how aptly compares existing links from the + // internal pool to the published directory. The `size` method compares only the + // file sizes, whereas the `md5` method calculates the md5 checksum of the found + // file and compares it to the desired one. + // If not specified, empty or wrong, this defaults to `md5`. + // + // In order to publish to such an endpoint, specify the endpoint as `filesystem:endpoint-name` + // with `endpoint-name` as the name given in the aptly configuration file. For example: + // + // `aptly publish snapshot wheezy-main filesystem:test1:wheezy/daily` + "FileSystemPublishEndpoints": { + }, + + // S3 Endpoint Support + // + // cloud storage). First, publishing + // endpoints should be described in aptly configuration file. Each endpoint has name + // and associated settings: + // + // * `region`: + // Amazon region for S3 bucket (e.g. `us-east-1`) + // * `bucket`: + // bucket name + // * `endpoint`: + // (optional) when using S3-compatible cloud storage, specify hostname of service endpoint here, + // region is ignored if endpoint is set (set region to some human-readable name) + // (should be left blank for real Amazon S3) + // * `prefix`: + // (optional) do publishing under specified prefix in the bucket, defaults to + // no prefix (bucket root) + // * `acl`: + // (optional) assign ACL to published files (one of the canned ACLs in Amazon + // terminology). Useful values: `private` (default), `public-read` (public + // repository) or `none` (don't set ACL). Public repositories could be consumed by `apt` using + // HTTP endpoint (Amazon bucket should be configured for "website hosting"), + // for private repositories special apt S3 transport is required. + // * `awsAccessKeyID`, `awsSecretAccessKey`: + // (optional) Amazon credentials to access S3 bucket. If not supplied, + // environment variables `AWS_ACCESS_KEY_ID` and `AWS_SECRET_ACCESS_KEY` + // are used. + // * `storageClass`: + // (optional) Amazon S3 storage class, defaults to `STANDARD`. Other values + // available: `REDUCED_REDUNDANCY` (lower price, lower redundancy) + // * `encryptionMethod`: + // (optional) server-side encryption method, defaults to none. Currently + // the only available encryption method is `AES256` + // * `plusWorkaround`: + // (optional) workaround misbehavior in apt and Amazon S3 + // for files with `+` in filename by + // creating two copies of package files with `+` in filename: one original + // and another one with spaces instead of plus signs + // With `plusWorkaround` enabled, package files with plus sign + // would be stored twice. aptly might not cleanup files with spaces when published + // repository is dropped or updated (switched) to new version of repository (snapshot) + // * `disableMultiDel`: + // (optional) for S3-compatible cloud storages which do not support `MultiDel` S3 API, + // enable this setting (file deletion would be slower with this setting enabled) + // * `forceSigV2`: + // (optional) disable Signature V4 support, useful with non-AWS S3-compatible object stores + // which do not support SigV4, shouldn't be enabled for AWS + // * `forceVirtualHostedStyle`: + // (optional) disable path style visit, useful with non-AWS S3-compatible object stores + // which only support virtual hosted style + // * `debug`: + // (optional) enables detailed request/response dump for each S3 operation + // + // In order to publish to S3, specify endpoint as `s3:endpoint-name:` before + // publishing prefix on the command line, e.g.: + // + // `aptly publish snapshot wheezy-main s3:test:` + "S3PublishEndpoints": { + }, + + // Swift Endpoint Support + // + // aptly could be configured to publish repository directly to OpenStack Swift. First, + // publishing endpoints should be described in aptly configuration file. Each endpoint + // has name and associated settings: + // + // * `container`: + // container name + // * `prefix`: + // (optional) do publishing under specified prefix in the container, defaults to + // no prefix (container root) + // * `osname`, `password`: + // (optional) OpenStack credentials to access Keystone. If not supplied, + // environment variables `OS_USERNAME` and `OS_PASSWORD` are used. + // * `tenant`, `tenantid`: + // (optional) OpenStack tenant name and id (in order to use v2 authentication). + // * `authurl`: + // (optional) the full url of Keystone server (including port, and version). + // example `http://identity.example.com:5000/v2.0` + // + // In order to publish to Swift, specify endpoint as `swift:endpoint-name:` before + // publishing prefix on the command line, e.g.: + // + // `aptly publish snapshot jessie-main swift:test:` + "SwiftPublishEndpoints": { }, - "enableSwaggerEndpoint": false + + // Azure Endpoint Support + // + "AzurePublishEndpoints": { + } + } diff --git a/debian/control b/debian/control index eeb0b996e..7e9dc5452 100644 --- a/debian/control +++ b/debian/control @@ -87,7 +87,7 @@ Testsuite: autopkgtest-pkg-go Package: aptly Architecture: any -Depends: ${misc:Depends}, ${shlibs:Depends}, bzip2, xz-utils, adduser +Depends: ${misc:Depends}, ${shlibs:Depends}, bzip2, xz-utils, adduser, gpg (>= 2.2.12) Built-Using: ${misc:Static-Built-Using}, ${misc:Built-Using} Description: Debian repository management tool aptly is a Swiss army knife for Debian repository management. diff --git a/docs/Database.md b/docs/Database.md new file mode 100644 index 000000000..8786b3ff5 --- /dev/null +++ b/docs/Database.md @@ -0,0 +1 @@ +# Aptly Database Operations diff --git a/docs/Publish.md b/docs/Publish.md new file mode 100644 index 000000000..d87c87cc7 --- /dev/null +++ b/docs/Publish.md @@ -0,0 +1,29 @@ +# Aptly Publish Points +
+ +Publish snapshot or local repo as Debian repository which could be +served by HTTP/FTP/rsync server. Repository is signed by user's key with +GnuPG. Key should be created beforehand (see section GPG Keys below). +Published repository could be consumed directly by apt. + +Repositories could be published to Amazon S3 service: create bucket, +[configure publishing endpoint](/doc/feature/s3/) and use S3 endpoint when +publishing. + + +#### GPG Keys + +GPG key is required to sign any published repository. Key should be +generated before publishing first repository. + +Key generation, storage, backup and revocation is out of scope of this +document, there are many tutorials available, e.g. [this one](http://fedoraproject.org/wiki/Creating_GPG_Keys). + +Publiс part of the key should be exported from your keyring using `gpg --export --armor` and +imported into apt keyring using `apt-key` tool on all machines that would be using published +repositories. + +Signing releases is highly recommended, but if you want to skip it, you +can either use `gpgDisableSign` configuration option or `--skip-signing` +flag. +
diff --git a/docs/Status.md b/docs/Status.md new file mode 100644 index 000000000..e19de2dbc --- /dev/null +++ b/docs/Status.md @@ -0,0 +1,10 @@ +# Aptly Status Information +
+ +## Something + +Very interesting ... asd wer + + + +
diff --git a/docs/api.md b/docs/api.md new file mode 100644 index 000000000..9d236ce28 --- /dev/null +++ b/docs/api.md @@ -0,0 +1,112 @@ + +Using aptly via REST API allows to achieve two goals: + +1. Remote access to aptly service: e.g. uploading packages and publishing them from CI server. +2. Concurrent access to aptly by multiple users. + +#### Quickstart + +Run `aptly api serve` to start HTTP service: + + $ aptly api serve + Starting web server at: :8080 (press Ctrl+C to quit)... + [GIN-debug] GET /api/version --> github.com/aptly-dev/aptly/api.apiVersion (4 handlers) + ... + +By default aptly would listen on `:8080`, but it could be changed with `-listen` flag. + +Usage: + + $ aptly api serve -listen=:8080 + +Flags: + +- `-listen=":8080"`: host:port for HTTP listening +- `-no-lock`: don't lock the database + +When `-no-lock` option is enabled, API server acquires and drops the lock +around all the operations, so that API and CLI could be used concurrently. + +Try some APIs: + + $ curl http://localhost:8080/api/version + {"Version":"0.9~dev"} + + $ curl -F file=@aptly_0.8_i386.deb http://localhost:8080/api/files/aptly_0.8 + ["aptly_0.8/aptly_0.8_i386.deb"] + + $ curl -X POST -H 'Content-Type: application/json' --data '{"Name": "aptly-repo"}' http://localhost:8080/api/repos + {"Name":"aptly-repo","Comment":"","DefaultDistribution":"","DefaultComponent":""} + + $ curl -X POST http://localhost:8080/api/repos/aptly-repo/file/aptly_0.8 + {"failedFiles":[],"report":{"warnings":[],"added":["aptly_0.8_i386 added"],"removed":[]}} + + $ curl http://localhost:8080/api/repos/aptly-repo/packages + ["Pi386 aptly 0.8 966561016b44ed80"] + + $ curl -X POST -H 'Content-Type: application/json' --data '{"Distribution": "wheezy", "Sources": [{"Name": "aptly-repo"}]}' http://localhost:8080/api/publish//repos + {"Architectures":["i386"],"Distribution":"wheezy","Label":"","Origin":"","Prefix":".","SourceKind":"local","Sources":[{"Component":"main","Name":"aptly-repo"}],"Storage":""} + +#### Security + +For security reasons it is advised to let Aptly listen on a Unix domain socket rather than a port. Sockets are subject to file permissions and thus allow for user-level access control while binding to a port only gives host-level access control. To use a socket simply run Aptly with a suitable listen flag such as `aptly api serve -listen=unix:///var/run/aptly.sock`. + +Aptly's HTTP API shouldn't be directly exposed to the Internet: there's no authentication/protection of APIs. To publish the API it could be proxied through a HTTP proxy or server (e.g. nginx) to add an authentication mechanism or disallow all non-GET requests. [Reference example](https://github.com/sepich/nginx-ldap) for LDAP based per-repo access with nginx. + +#### Notes + +1. Some things (for example, S3 publishing endpoints) could be set up only using configuration file, so it requires restart of aptly HTTP server in order for changes to take effect. +1. GPG key passphrase can't be input on console, so either passwordless GPG keys are required or passphrase should be specified in API parameters. +1. Some script might be required to start/stop aptly HTTP service. +1. Some parameters are given as part of URLs, which requires proper url encoding. Unfortunately, at the moment it's not possible to pass URL arguments with `/` in them. + +### How to implement equivalent of aptly commands using API + +* `aptly mirror`: [mirror API](/doc/api/mirror) + * `list`: list + * `create`: create + * `drop`: delete + * `show`: show + * `search`: show packages/search + * `update`: update mirror +* `aptly repo`: [local repos API](/doc/api/repos) + * `add`: [file upload API](/doc/api/files) + add packages from uploaded file + * `copy`: show packages/search + add packages by key + * `create`: create + * `drop`: delete + * `edit`: edit + * `import`: not available, as mirror API is not implemented yet + * `list`: list + * `move`: show packages/search + add packages by key + delete packages by key + * `remove`: show packages/search + delete packages by key + * `rename`: not available yet, should be part of edit API + * `search`: show packages/search + * `show`: show +* `aptly snapshot`: [snapshots API](/doc/api/snapshots) + * `create`: + * empty: create snapshot with empty package references + * from mirror: not available yet + * from local repo: create snapshot from local repo + * `diff`: snapshot difference API + * `drop`: delete + * `filter`: show packages/search + create snapshot from package references + * `list`: list + * `merge`: show packages/search + processing + create snapshot from package references + * `pull`: show packages/search + processing + create snapshot from package references (might be implemented as API in future versions) + * `rename`: edit + * `search`: show packages/search + * `show`: show + * `verify`: not available yet +* `aptly publish`: [publish API](/doc/api/publish) + * `drop`: delete + * `list`: list + * `repo`: publish repo + * `snapshot`: publish snapshot + * `switch`: switch/update + * `update`: switch/update +* `aptly package`: [packages API](/doc/api/packages) + * `search`: not available yet + * `show`: only one format, with package key as input +* `aptly graph`: [graph API](/doc/api/misc) +* `aptly version`: [version API](/doc/api/misc) +* `aptly db`: not available yet diff --git a/docs/docs.html b/docs/docs.html new file mode 100644 index 000000000..cb405d9bd --- /dev/null +++ b/docs/docs.html @@ -0,0 +1,142 @@ + + + + + Swagger UI + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + diff --git a/docs/index.go b/docs/index.go new file mode 100644 index 000000000..4a09caeb7 --- /dev/null +++ b/docs/index.go @@ -0,0 +1,8 @@ +package docs + +import ( + _ "embed" +) + +//go:embed docs.html +var DocsHTML []byte diff --git a/docs/swagger.conf.tpl b/docs/swagger.conf.tpl new file mode 100644 index 000000000..670470b98 --- /dev/null +++ b/docs/swagger.conf.tpl @@ -0,0 +1,16 @@ +package docs + +// @title Aptly API +// @description.markdown + +// @contact.name Aptly +// @contact.url http://github.com/aptly-dev/aptly + +// @Tag.name Publish +// @Tag.description.markdown +// @Tag.name Database +// @Tag.description.markdown +// @Tag.name Status +// @Tag.description.markdown + +// version will be appended here: diff --git a/go.mod b/go.mod index 7b6568a79..8967b6deb 100644 --- a/go.mod +++ b/go.mod @@ -100,6 +100,7 @@ require ( github.com/prometheus/procfs v0.15.1 // indirect github.com/rivo/uniseg v0.4.7 // indirect github.com/rogpeppe/go-internal v1.10.0 // indirect + github.com/swaggo/swag v1.16.3 // indirect github.com/twitchyliquid64/golang-asm v0.15.1 // indirect go.etcd.io/etcd/api/v3 v3.5.15 // indirect go.etcd.io/etcd/client/pkg/v3 v3.5.15 // indirect @@ -110,7 +111,6 @@ require ( golang.org/x/sync v0.8.0 // indirect golang.org/x/text v0.17.0 // indirect golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d // indirect - google.golang.org/genproto v0.0.0-20230822172742-b8732ec3820d // indirect google.golang.org/genproto/googleapis/api v0.0.0-20240318140521-94a12d6c2237 // indirect google.golang.org/genproto/googleapis/rpc v0.0.0-20240318140521-94a12d6c2237 // indirect google.golang.org/grpc v1.64.1 // indirect @@ -128,6 +128,5 @@ require ( github.com/aws/smithy-go v1.20.3 github.com/swaggo/files v1.0.1 github.com/swaggo/gin-swagger v1.6.0 - github.com/swaggo/swag v1.16.3 go.etcd.io/etcd/client/v3 v3.5.15 ) diff --git a/go.sum b/go.sum index f2ec6ca46..ac476e318 100644 --- a/go.sum +++ b/go.sum @@ -1,5 +1,3 @@ -cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= github.com/AlekSi/pointer v1.1.0 h1:SSDMPcXD9jSl8FPy9cRzoRaMJtm9g9ggGTxecRUbQoI= github.com/AlekSi/pointer v1.1.0/go.mod h1:y7BvfRI3wXPWKXEBhU71nbnIEEZX0QTSB2Bj48UJIZE= github.com/Azure/azure-pipeline-go v0.2.3 h1:7U9HBg1JFK3jHl5qmo4CTZKFTVgMwdFHMVtCdfBE21U= @@ -17,7 +15,6 @@ github.com/Azure/go-autorest/logger v0.2.1 h1:IG7i4p/mDa2Ce4TRyAO8IHnVhAVF3RFU+Z github.com/Azure/go-autorest/logger v0.2.1/go.mod h1:T9E3cAhj2VqvPOtCYAvby9aBXkZmbF5NWuPV8+WeEW8= github.com/Azure/go-autorest/tracing v0.6.0 h1:TYi4+3m5t6K48TGI9AUdb+IzbnSxvnvUMfuitfgcfuo= github.com/Azure/go-autorest/tracing v0.6.0/go.mod h1:+vhtPC754Xsa23ID7GlGsrdKBpUA79WCAKPPZVC2DeU= -github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/DisposaBoy/JsonConfigReader v0.0.0-20171218180944-5ea4d0ddac55 h1:jbGlDKdzAZ92NzK65hUP98ri0/r50vVVvmZsFP/nIqo= github.com/DisposaBoy/JsonConfigReader v0.0.0-20171218180944-5ea4d0ddac55/go.mod h1:GCzqZQHydohgVLSIqRKZeTt8IGb1Y4NaFfim3H40uUI= github.com/KyleBanks/depth v1.2.1 h1:5h8fQADFrWtarTdtDudMmGsC7GPbOAu6RVB3ffsVFHc= @@ -28,11 +25,6 @@ github.com/PuerkitoBio/purell v1.1.1 h1:WEQqlqaGbrPkxLJWfBwQmfEAE1Z7ONdDLqrN38tN github.com/PuerkitoBio/purell v1.1.1/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578 h1:d+Bc7a5rLufV/sSk/8dngufqelfh6jnri85riMAaF/M= github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE= -github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= -github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= -github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= -github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= -github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= github.com/awalterschulze/gographviz v2.0.1+incompatible h1:XIECBRq9VPEQqkQL5pw2OtjCAdrtIgFKoJU8eT98AS8= github.com/awalterschulze/gographviz v2.0.1+incompatible/go.mod h1:GEV5wmg4YquNw7v1kkyoX9etIk8yVmXj+AkDHuuETHs= github.com/aws/aws-sdk-go-v2 v1.30.3 h1:jUeBtG0Ih+ZIFH0F4UkmL9w3cSpaMv9tYYDbzILP8dY= @@ -71,8 +63,6 @@ github.com/aws/aws-sdk-go-v2/service/sts v1.25.2 h1:vwyiRTnXLqsak/6WAQ+uTRhVqKI6 github.com/aws/aws-sdk-go-v2/service/sts v1.25.2/go.mod h1:4EqRHDCKP78hq3zOnmFXu5k0j4bXbRFfCh/zQ6KnEfQ= github.com/aws/smithy-go v1.20.3 h1:ryHwveWzPV5BIof6fyDvor6V3iUL7nTfiTKXHiW05nE= github.com/aws/smithy-go v1.20.3/go.mod h1:krry+ya/rV9RDcV/Q16kpu6ypI4K2czasz0NC3qS14E= -github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= -github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= github.com/bwesterb/go-ristretto v1.2.3/go.mod h1:fUIoIZaG73pV5biE2Blr2xEzDoMj7NFEuV9ekS419A0= @@ -81,8 +71,6 @@ github.com/bytedance/sonic v1.8.0 h1:ea0Xadu+sHlu7x5O3gKhRpQ1IKiMrSiHttPF0ybECuA github.com/bytedance/sonic v1.8.0/go.mod h1:i736AoUSYt75HyZLoJW9ERYxcy6eaN6h4BZXU064P/U= github.com/cavaliergopher/grab/v3 v3.0.1 h1:4z7TkBfmPjmLAAmkkAZNX/6QJ1nNFdv3SdIHXju0Fr4= github.com/cavaliergopher/grab/v3 v3.0.1/go.mod h1:1U/KNnD+Ft6JJiYoYBAimKH2XrYptb8Kl3DFGmsjpq4= -github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= -github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs= github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/cheggaaa/pb v1.0.25 h1:tFpebHTkI7QZx1q1rWGOKhbunhZ3fMaxTvHDWn1bH/4= @@ -90,27 +78,17 @@ github.com/cheggaaa/pb v1.0.25/go.mod h1:pQciLPpbU0oxA0h+VJYYLxO+XeDQb5pZijXscXH github.com/chenzhuoyu/base64x v0.0.0-20211019084208-fb5309c8db06/go.mod h1:DH46F32mSOjUmXrMHnKwZdA8wcEefY7UVqBKYGjpdQY= github.com/chenzhuoyu/base64x v0.0.0-20221115062448-fe3a3abad311 h1:qSGYFH7+jGhDF8vLC+iwCD4WpbV1EBDSzWkJODFLams= github.com/chenzhuoyu/base64x v0.0.0-20221115062448-fe3a3abad311/go.mod h1:b583jCggY9gE99b6G5LEC39OIiVsWj+R97kbl5odCEk= -github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= github.com/cloudflare/circl v1.3.3/go.mod h1:5XYMA4rFBvNIrhs50XuiBJ15vF2pZn4nnUKZrLbUZFA= github.com/cloudflare/circl v1.4.0 h1:BV7h5MgrktNzytKmWjpOtdYrf0lkkbF8YMlBGPhJQrY= github.com/cloudflare/circl v1.4.0/go.mod h1:PDRU+oXvdD7KCtgKxW95M5Z8BpSCJXQORiZFnBQS5QU= -github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= -github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= github.com/coreos/go-semver v0.3.0 h1:wkHLiw0WNATZnSG7epLsujiMCgPAc9xhjJ4tgnAxmfM= github.com/coreos/go-semver v0.3.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= -github.com/coreos/go-systemd/v22 v22.3.2/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= github.com/coreos/go-systemd/v22 v22.5.0 h1:RrqgGjYQKalulkV8NGVIfkXQf6YYmOyiJKk8iXXhfZs= github.com/coreos/go-systemd/v22 v22.5.0/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= -github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= -github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= -github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= -github.com/envoyproxy/go-control-plane v0.9.9-0.20210217033140-668b12f5399d/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= -github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= github.com/fatih/color v1.17.0 h1:GlRw1BRJxkpqUCBKzKOw098ed57fEsKeNjpTe3cSjK4= github.com/fatih/color v1.17.0/go.mod h1:YZ7TlrGPkiz6ku9fK3TLD/pl3CpsiFyu8N92HLgmosI= github.com/form3tech-oss/jwt-go v3.2.2+incompatible h1:TcekIExNqud5crz4xD2pavyTgWiPvpYe4Xau31I0PRk= @@ -118,17 +96,12 @@ github.com/form3tech-oss/jwt-go v3.2.2+incompatible/go.mod h1:pbq4aXjuKjdthFRnoD github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= github.com/fsnotify/fsnotify v1.4.9 h1:hsms1Qyu0jgnwNXIxa+/V/PDsU6CfLf6CNO8H7IWoS4= github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= -github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= github.com/gin-contrib/gzip v0.0.6 h1:NjcunTcGAj5CO1gn4N8jHOSIeRFHIbn51z6K+xaN4d4= github.com/gin-contrib/gzip v0.0.6/go.mod h1:QOJlmV2xmayAjkNS2Y8NQsMneuRShOU/kjovCXNuzzk= github.com/gin-contrib/sse v0.1.0 h1:Y/yl/+YNO8GZSjAhjMsSuLt29uWRFHdHYUb5lYOV9qE= github.com/gin-contrib/sse v0.1.0/go.mod h1:RHrZQHXnP2xjPF+u1gW/2HnVO7nvIa9PG3Gm+fLHvGI= github.com/gin-gonic/gin v1.9.0 h1:OjyFBKICoexlu99ctXNR2gg+c5pKrKMuyjgARg9qeY8= github.com/gin-gonic/gin v1.9.0/go.mod h1:W1Me9+hsUSyj3CePGrd1/QrKJMSJ1Tu/0hFEH89961k= -github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= -github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= -github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= -github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= github.com/go-openapi/jsonpointer v0.19.3/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= github.com/go-openapi/jsonpointer v0.19.5 h1:gZr+CIYByUqjcgeLXnQu2gHYQC9o73G2XUeOFYEICuY= github.com/go-openapi/jsonpointer v0.19.5/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= @@ -147,49 +120,33 @@ github.com/go-playground/universal-translator v0.18.1 h1:Bcnm0ZwsGyWbCzImXv+pAJn github.com/go-playground/universal-translator v0.18.1/go.mod h1:xekY+UJKNuX9WP91TpwSH2VMlDf28Uj24BCp08ZFTUY= github.com/go-playground/validator/v10 v10.11.2 h1:q3SHpufmypg+erIExEKUmsgmhDTyhcJ38oeKGACXohU= github.com/go-playground/validator/v10 v10.11.2/go.mod h1:NieE624vt4SCTJtD87arVLvdmjPAeV8BQlHtMnw9D7s= -github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= github.com/goccy/go-json v0.10.2 h1:CrxCmQqYDkv1z7lO7Wbh2HN93uovUHgrECaO5ZrCXAU= github.com/goccy/go-json v0.10.2/go.mod h1:6MelG93GURQebXPDq3khkgXZkazVtN9CRI+MGFi0w8I= github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= -github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= -github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= -github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA= github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs= github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w= github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= -github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8= github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= -github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= -github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek= github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps= github.com/golang/snappy v0.0.1/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golang/snappy v0.0.2 h1:aeE13tS0IiQgFjYdoL8qN3K1N2bXXtI6Vi51/y7BpMw= github.com/golang/snappy v0.0.2/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= -github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/uuid v1.0.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.2.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk= -github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= github.com/h2non/filetype v1.1.3 h1:FKkx9QbD7HR/zjK1Ia5XiBsq9zdLi5Kf3zGyFTAFkGg= github.com/h2non/filetype v1.1.3/go.mod h1:319b3zT68BvV+WRj7cwy856M2ehB3HqNOt6sy1HndBY= github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= @@ -202,11 +159,8 @@ github.com/jlaffaye/ftp v0.2.0 h1:lXNvW7cBu7R/68bknOX3MrRIIqZ61zELs1P2RAiA3lg= github.com/jlaffaye/ftp v0.2.0/go.mod h1:is2Ds5qkhceAPy2xD6RLI6hmp/qysSoymZ+Z2uTnspI= github.com/josharian/intern v1.0.0 h1:vlS4z54oSdjm0bgjRigI+G1HpF+tI+9rE5LLzOg8HmY= github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y= -github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= -github.com/json-iterator/go v1.1.9/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= -github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= github.com/kjk/lzma v0.0.0-20120628231508-2a7c55cad4a2 h1:TVZQgMi+I83S3rCuE65HnmDO6+wFPRi3n2LOzr+tr68= @@ -217,8 +171,6 @@ github.com/klauspost/cpuid/v2 v2.0.9 h1:lgaqFMSdTdQYdZ04uHyN2d/eKdOMyi2YLSvlQIBF github.com/klauspost/cpuid/v2 v2.0.9/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg= github.com/klauspost/pgzip v1.2.5 h1:qnWYvvKqedOF2ulHpMG72XQol4ILEJ8k2wwRl/Km8oE= github.com/klauspost/pgzip v1.2.5/go.mod h1:Ch1tH69qFZu15pkjo5kYi6mth2Zzwzt50oCQKQE9RUs= -github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= -github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= @@ -249,19 +201,15 @@ github.com/mattn/go-runewidth v0.0.15 h1:UNAjwbU9l54TA3KzvqLGxwWjHmMgBUVhBiTjelZ github.com/mattn/go-runewidth v0.0.15/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w= github.com/mattn/go-shellwords v1.0.12 h1:M2zGm7EW6UQJvDeQxo4T51eKPurbeFbe8WtebGE2xrk= github.com/mattn/go-shellwords v1.0.12/go.mod h1:EZzvwXDESEeg03EKmM+RmDnNOPKG4lLtQsUlTZDWQ8Y= -github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= github.com/mkrautz/goar v0.0.0-20150919110319-282caa8bd9da h1:Iu5QFXIMK/YrHJ0NgUnK0rqYTTyb0ldt/rqNenAj39U= github.com/mkrautz/goar v0.0.0-20150919110319-282caa8bd9da/go.mod h1:NfnmoBY0gGkr3/NmI+DP/UXbZvOCurCUYAzOdYJjlOc= github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= -github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= -github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq1c1nUAm88MOHcQC9l5mIlSMApZMrHA= github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= -github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f h1:y5//uYreIhSUg3J1GEMiLbxo1LJaP8RfCpH6pymGZus= github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f/go.mod h1:ZdcZmHo+o7JKHSa8/e818NopupXU1YMK5fe1lsApnBw= github.com/ncw/swift v1.0.53 h1:luHjjTNtekIEvHg5KdAFIBaH7bWfNkefwFnpDffSIks= @@ -281,36 +229,21 @@ github.com/pborman/uuid v1.2.0/go.mod h1:X/NO0urCmaxf9VXbdlT7C2Yzkj2IKimNn4k+gtP github.com/pelletier/go-toml/v2 v2.1.0 h1:FnwAJ4oYMvbT/34k9zzHuZNrhlz48GB3/s6at6/MHO4= github.com/pelletier/go-toml/v2 v2.1.0/go.mod h1:tJU2Z3ZkXwnxa4DPO899bsyIoywizdUvyaeZurnPPDc= github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e/go.mod h1:pJLUxLENpZxwdsKMEsNbx1VGcRFpLqf3715MtcvvzbA= -github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= -github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= -github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= -github.com/prometheus/client_golang v1.5.1/go.mod h1:e9GMxYsXl05ICDXkRhurwBS4Q3OK1iX/F2sw+iXX5zU= github.com/prometheus/client_golang v1.20.0 h1:jBzTZ7B099Rg24tny+qngoynol8LtVYlA2bqx3vEloI= github.com/prometheus/client_golang v1.20.0/go.mod h1:PIEt8X02hGcP8JWbeHyeZ53Y/jReSnHgO035n//V5WE= -github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= -github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p8ais2e9E= github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQyHDk9E3jmP2AmGiY= -github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= -github.com/prometheus/common v0.9.1/go.mod h1:yhUN8i9wzaXS3w1O07YhxHEBxD+W35wd8bs7vj7HSQ4= github.com/prometheus/common v0.59.1 h1:LXb1quJHWm1P6wq/U824uxYi4Sg0oGvNeUm1z5dJoX0= github.com/prometheus/common v0.59.1/go.mod h1:GpWM7dewqmVYcd7SmRaiWVe9SSqjf0UrwnYnpEZNuT0= -github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= -github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= -github.com/prometheus/procfs v0.0.8/go.mod h1:7Qr8sr6344vo1JqZ6HhLceV9o3AJ1Ff+GxbHq6oeK9A= github.com/prometheus/procfs v0.15.1 h1:YagwOFzUgYfKKHX6Dr+sHT7km/hxC76UB0learggepc= github.com/prometheus/procfs v0.15.1/go.mod h1:fB45yRUv8NstnjriLhBQLuOUt+WW4BsoGhij/e3PBqk= github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= github.com/rivo/uniseg v0.4.7 h1:WUdvkW8uEhrYfLC4ZzdpI2ztxP1I582+49Oc5Mq64VQ= github.com/rivo/uniseg v0.4.7/go.mod h1:FN3SvrM+Zdj16jyLfmOkMNblXMcoc8DfTHruCPUcx88= -github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/fJaraNFVN+nFs= github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= @@ -319,8 +252,6 @@ github.com/rs/zerolog v1.29.1 h1:cO+d60CHkknCbvzEWxP0S9K6KqyTjrCNUy1LdQLCGPc= github.com/rs/zerolog v1.29.1/go.mod h1:Le6ESbR7hc+DP6Lt1THiV8CQSdkkNrd3R0XbEgp3ZBU= github.com/saracen/walker v0.1.2 h1:/o1TxP82n8thLvmL4GpJXduYaRmJ7qXp8u9dSlV0zmo= github.com/saracen/walker v0.1.2/go.mod h1:0oKYMsKVhSJ+ful4p/XbjvXbMgLEkLITZaxozsl4CGE= -github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= -github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= github.com/smira/commander v0.0.0-20140515201010-f408b00e68d5 h1:jLFwP6SDEUHmb6QSu5n2FHseWzMio1ou1FV9p7W6p7I= github.com/smira/commander v0.0.0-20140515201010-f408b00e68d5/go.mod h1:XTQy55hw5s3pxmC42m7X0/b+9naXQ1rGN9Of6BGIZmU= github.com/smira/flag v0.0.0-20170926215700-695ea5e84e76 h1:OM075OkN4x9IB1mbzkzaKaJjFxx8Mfss8Z3E1LHwawQ= @@ -330,13 +261,9 @@ github.com/smira/go-ftp-protocol v0.0.0-20140829150050-066b75c2b70d/go.mod h1:Jm github.com/smira/go-xz v0.1.0 h1:1zVLT1sITUKcWNysfHMLZWJ2Yh7yJfhREsgmUdK4zb0= github.com/smira/go-xz v0.1.0/go.mod h1:OmdEWnIIkuLzRLHGF4YtjDzF9VFUevEcP6YxDPRqVrs= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= -github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= -github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= -github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= @@ -361,32 +288,21 @@ github.com/wsxiaoys/terminal v0.0.0-20160513160801-0940f3fc43a0 h1:3UeQBvD0TFrlV github.com/wsxiaoys/terminal v0.0.0-20160513160801-0940f3fc43a0/go.mod h1:IXCdmsXIht47RaVFLEdVnh1t+pgYtTAhQGj73kz+2DM= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= -go.etcd.io/etcd/api/v3 v3.5.0-rc.0 h1:oPIG9qBFXiGJFM1StoFd5EVllfVIhd7pPjB/mcMCzCg= -go.etcd.io/etcd/api/v3 v3.5.0-rc.0/go.mod h1:cbVKeC6lCfl7j/8jBhAK6aIYO9XOjdptoxU/nLQcPvs= go.etcd.io/etcd/api/v3 v3.5.15 h1:3KpLJir1ZEBrYuV2v+Twaa/e2MdDCEZ/70H+lzEiwsk= go.etcd.io/etcd/api/v3 v3.5.15/go.mod h1:N9EhGzXq58WuMllgH9ZvnEr7SI9pS0k0+DHZezGp7jM= -go.etcd.io/etcd/client/pkg/v3 v3.5.0-rc.0 h1:7mW2vCG+tthhWwORSD/G0eesRZ6ZkOh19P7CyrT9xfA= -go.etcd.io/etcd/client/pkg/v3 v3.5.0-rc.0/go.mod h1:IJHfcCEKxYu1Os13ZdwCwIUTUVGYTSAM3YSwc9/Ac1g= go.etcd.io/etcd/client/pkg/v3 v3.5.15 h1:fo0HpWz/KlHGMCC+YejpiCmyWDEuIpnTDzpJLB5fWlA= go.etcd.io/etcd/client/pkg/v3 v3.5.15/go.mod h1:mXDI4NAOwEiszrHCb0aqfAYNCrZP4e9hRca3d1YK8EU= -go.etcd.io/etcd/client/v3 v3.5.0-rc.0 h1:W2gUtoUho3+X5tCffYA3VfA7fH9DokrhGMscvZskuXc= -go.etcd.io/etcd/client/v3 v3.5.0-rc.0/go.mod h1:5+cKiK2IEMa230cLFrLL3+3sKlPPKASjiLOmG8tZ8vY= go.etcd.io/etcd/client/v3 v3.5.15 h1:23M0eY4Fd/inNv1ZfU3AxrbbOdW79r9V9Rl62Nm6ip4= go.etcd.io/etcd/client/v3 v3.5.15/go.mod h1:CLSJxrYjvLtHsrPKsy7LmZEE+DK2ktfd2bN4RhBMwlU= -go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= go.uber.org/goleak v1.2.0 h1:xqgm/S+aQvhWFTtR0XK3Jvg7z8kGV8P4X14IzwN3Eqk= go.uber.org/goleak v1.2.0/go.mod h1:XJYK+MuIchqpmGmUSAzotztawfKvYLUIgg7guXrwVUo= -go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9iU= go.uber.org/multierr v1.10.0 h1:S0h4aNzvfcFsC3dRF1jLoaov7oRaKqRGC/pUEJ2yvPQ= go.uber.org/multierr v1.10.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y= -go.uber.org/zap v1.17.0/go.mod h1:MXVU+bhUf/A7Xi2HNOnopQOrmycQ5Ih87HtOu4q5SSo= go.uber.org/zap v1.26.0 h1:sI7k6L95XOKS281NhVKOFCUNIvv9e0w4BF8N3u+tCRo= go.uber.org/zap v1.26.0/go.mod h1:dtElttAiwGvoJ/vj4IwHBS/gXsEu/pZ50mUIRWuG0so= golang.org/x/arch v0.0.0-20210923205945-b76863e36670 h1:18EFjUmQOcUvxNYSkA6jO9VAiXCnxFY6NyDX0bHDmkU= golang.org/x/arch v0.0.0-20210923205945-b76863e36670/go.mod h1:5om86z9Hs0C8fWVUuoMHwpExlXzs5Tkyp9hOrfG7pp8= -golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= @@ -397,37 +313,21 @@ golang.org/x/crypto v0.3.1-0.20221117191849-2c476679df9a/go.mod h1:hebNnKkNXi2Uz golang.org/x/crypto v0.7.0/go.mod h1:pYwdfH91IfpZVANVyUOhSIPZaFoJGxTFbZhFTx+dXZU= golang.org/x/crypto v0.26.0 h1:RrRspgV4mU+YwB4FYnuBoKsUapNIL5cohGAmSH3azsw= golang.org/x/crypto v0.26.0/go.mod h1:GY7jblb9wI+FOo5y8/S2oY4zWP07AkOJ4+jxCqdqn54= -golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= -golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= -golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= -golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/lint v0.0.0-20210508222113-6edffad5e616/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= -golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= 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= golang.org/x/mod v0.17.0 h1:zY54UmvipHiNd+pm+m0x9KhZ9hl1/7QNMyxXbc6ICqA= golang.org/x/mod v0.17.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= -golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20191112182307-2180aed22343/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200520004742-59133d7f0dd7/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20200813134508-3edf25e44fcc/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= -golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= -golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= golang.org/x/net v0.0.0-20210421230115-4e50805a0758/go.mod h1:72T/g9IO56b78aLF+1Kcs5dz7/ng1VjMUvfKvpfy+jM= golang.org/x/net v0.0.0-20210610132358-84b48f89b13b/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20220630215102-69896b714898/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= @@ -438,42 +338,29 @@ golang.org/x/net v0.7.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= golang.org/x/net v0.8.0/go.mod h1:QVkue5JL9kW//ek3r6jTKnTFis1tRmNAW2P1shuFdJc= golang.org/x/net v0.28.0 h1:a9JDOJc5GMUJ0+UDqmLT86WiEy7iWyIhz8gz8E4e5hE= golang.org/x/net v0.28.0/go.mod h1:yqtgsTWOOnlGLG9GFRrK3++bGOUEkNBoHZc8MEDWPNg= -golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= -golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.8.0 h1:3NFvSEYkUoMifnESzZl15y791HH1qU2xm6eCJU5ZPXQ= golang.org/x/sync v0.8.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= -golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190904154756-749cb33beabd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191112214154-59a1497f0cea/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200519105757-fe76b779f299/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200814200057-3d37ad5750ed/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210403161142-5e06dd20ab57/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210420072515-93ed5bcd2bfe/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= @@ -497,7 +384,6 @@ golang.org/x/term v0.23.0/go.mod h1:DgV24QBUrK6jhZXl+20l6UWznPlwAHm1Q1mGHtydmSk= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= @@ -508,15 +394,9 @@ golang.org/x/text v0.17.0/go.mod h1:BuEKDfySbSR4drPmRPG/7iBdf8hvFMuRexcpahXilzY= golang.org/x/time v0.5.0 h1:o7cqy6amK/52YcAKIPlM3a+Fpj35zvRj2TP+e1xFSfk= golang.org/x/time v0.5.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= -golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.1.2/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU= golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d h1:vU5i/LfpvrRCpgM/VPfJLg5KjxD3E+hfT1SH+d9zLwg= @@ -526,27 +406,10 @@ golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8T golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= -google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= -google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= -google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= -google.golang.org/genproto v0.0.0-20200513103714-09dca8ec2884/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= -google.golang.org/genproto v0.0.0-20210602131652-f16073e35f0c/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0= -google.golang.org/genproto v0.0.0-20230410155749-daa745c078e1 h1:KpwkzHKEF7B9Zxg18WzOa7djJ+Ha5DzthMyZYQfEn2A= -google.golang.org/genproto v0.0.0-20230410155749-daa745c078e1/go.mod h1:nKE/iIaLqn2bQwXBg8f1g2Ylh6r5MN5CmZvuzZCgsCU= -google.golang.org/genproto v0.0.0-20230822172742-b8732ec3820d h1:VBu5YqKPv6XiJ199exd8Br+Aetz+o08F+PLMnwJQHAY= -google.golang.org/genproto v0.0.0-20230822172742-b8732ec3820d/go.mod h1:yZTlhN0tQnXo3h00fuXNCxJdLdIdnVFVBaRJ5LWBbw4= google.golang.org/genproto/googleapis/api v0.0.0-20240318140521-94a12d6c2237 h1:RFiFrvy37/mpSpdySBDrUdipW/dHwsRwh3J3+A9VgT4= google.golang.org/genproto/googleapis/api v0.0.0-20240318140521-94a12d6c2237/go.mod h1:Z5Iiy3jtmioajWHDGFk7CeugTyHtPvMHA4UTmUkyalE= google.golang.org/genproto/googleapis/rpc v0.0.0-20240318140521-94a12d6c2237 h1:NnYq6UN9ReLM9/Y01KWNOWyI5xQ9kbIms5GGJVwS/Yc= google.golang.org/genproto/googleapis/rpc v0.0.0-20240318140521-94a12d6c2237/go.mod h1:WtryC6hu0hhx87FDGxWCDptyssuo68sk10vYjF+T9fY= -google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= -google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= -google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= -google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= -google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTpR3n0= -google.golang.org/grpc v1.38.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= google.golang.org/grpc v1.64.1 h1:LKtvyfbX3UGVPFcGqJ9ItpVWW6oN/2XqTxfAnwRRXiA= google.golang.org/grpc v1.64.1/go.mod h1:hiQF4LFZelK2WKaP6W0L92zGHtiQdZxk8CrSdvyjeP0= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= @@ -554,18 +417,11 @@ google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE= google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo= -google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= -google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= -google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= -google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= -google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.34.2 h1:6xV6lTsCfpGD21XK49h7MhtcApnLqkfYgPcdHftf6hg= google.golang.org/protobuf v1.34.2/go.mod h1:qYOHts0dSfpeUzUFpOMr/WGzszTmLH+DiWniOlNbLDw= -gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= @@ -574,21 +430,13 @@ gopkg.in/cheggaaa/pb.v1 v1.0.28/go.mod h1:V/YB90LKu/1FcN3WVnfiiE5oMCibMjukxqG/qS gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= -gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.3/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.5/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.3.0/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.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.0-20200615113413-eeeca48fe776/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= rsc.io/pdf v0.1.1/go.mod h1:n8OzWcQ6Sp37PL01nO98y4iUCRdTGarVfzxY20ICaU4= -sigs.k8s.io/yaml v1.2.0/go.mod h1:yfXDCHCao9+ENCvLSE62v9VSji2MKu5jeNfTrofGhJc= diff --git a/man/Makefile b/man/Makefile index de73526da..064630cb3 100644 --- a/man/Makefile +++ b/man/Makefile @@ -4,7 +4,7 @@ all: $(RUBYBINPATH)/ronn generate $(RUBYBINPATH)/ronn: gem install --user-install specific_install - gem specific_install --user-install -l smira/ronn + gem specific_install --user-install -l https://github.com/smira/ronn.git -b 49e19e2409e462a96fd0f2a50ceead07f392893d generate: PATH=$(RUBYBINPATH):$(PATH) go run ../_man/gen.go diff --git a/system/Dockerfile b/system/Dockerfile index 7663fd8b6..6e24c5fc6 100644 --- a/system/Dockerfile +++ b/system/Dockerfile @@ -2,24 +2,24 @@ FROM debian:bookworm-slim RUN echo deb http://deb.debian.org/debian bookworm-backports main > /etc/apt/sources.list.d/backports.list -RUN apt-get update -y && apt-get install -y --no-install-recommends curl gnupg apg bzip2 xz-utils ca-certificates \ +RUN apt-get update -y && apt-get install -y --no-install-recommends curl gnupg bzip2 xz-utils ca-certificates vim procps \ golang/bookworm-backports golang-go/bookworm-backports golang-doc/bookworm-backports golang-src/bookworm-backports \ - make git python3 python3-requests-unixsocket python3-termcolor python3-swiftclient python3-boto python3-azure-storage g++ python3-etcd3 python3-plyvel graphviz devscripts sudo dh-golang binutils-i686-linux-gnu binutils-aarch64-linux-gnu binutils-arm-linux-gnueabihf bash-completion zip && \ + make git python3 python3-requests-unixsocket python3-termcolor python3-swiftclient python3-boto python3-azure-storage \ + g++ python3-etcd3 python3-plyvel graphviz devscripts sudo dh-golang binutils-i686-linux-gnu binutils-aarch64-linux-gnu \ + binutils-arm-linux-gnueabihf bash-completion zip ruby3.1-dev && \ apt-get clean && rm -rf /var/lib/apt/lists/* RUN useradd -m --shell /bin/sh --home-dir /var/lib/aptly aptly RUN sed -i 's/#force_color_prompt=yes/force_color_prompt=yes/' /var/lib/aptly/.bashrc RUN mkdir /work -WORKDIR /work +WORKDIR /work/src RUN chown aptly /work RUN cd /var/lib/aptly; git clone https://github.com/aptly-dev/aptly-fixture-db.git RUN cd /var/lib/aptly; git clone https://github.com/aptly-dev/aptly-fixture-pool.git -RUN cd /var/lib/aptly; curl -O http://repo.aptly.info/system-tests/etcd.db.xz; xz -d etcd.db.xz +RUN cd /var/lib/aptly; curl -O http://repo.aptly.info/system-tests/etcd.db.xz && xz -d etcd.db.xz RUN echo "aptly ALL=(ALL) NOPASSWD: ALL" > /etc/sudoers.d/aptly ADD system/t13_etcd/install-etcd.sh /src/ RUN /src/install-etcd.sh RUN rm -rf /src - -CMD /app/system/run-system-tests diff --git a/system/build-binaries b/system/build-binaries deleted file mode 100755 index 43e9de0c7..000000000 --- a/system/build-binaries +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/sh - -# cleanup -rm -rf /app/build/tmp - -usermod -u `stat -c %u /app` aptly >/dev/null -chown -R `stat -c %u /app` /var/lib/aptly - -su - aptly -c "cd /app; export GOPATH=/app/.go; make binaries" diff --git a/system/build-deb b/system/build-deb index 902d51de6..3c70e0b0e 100755 --- a/system/build-deb +++ b/system/build-deb @@ -7,7 +7,7 @@ su aptly -c 'set -e; cd /work/src; GOPATH=$PWD/.go go generate -v # install and initialize swagger GOPATH=$PWD/.go go install github.com/swaggo/swag/cmd/swag@latest -PATH=$PWD/.go/bin:$PATH swag init +PATH=$PWD/.go/bin:$PATH swag init -q --markdownFiles docs git checkout debian/changelog DEBEMAIL="CI " dch -v `make version` "CI build" dpkg-buildpackage -us -uc -b -d diff --git a/system/docker-wrapper b/system/docker-wrapper index e129ba0b3..ee7011425 100755 --- a/system/docker-wrapper +++ b/system/docker-wrapper @@ -1,12 +1,14 @@ #!/bin/sh -e +# make sure files are written with correct user ownership usermod -u `stat -c %u /work/src` aptly >/dev/null chown -R `stat -c %u /work/src` /var/lib/aptly if [ -z "$@" ]; then - echo Error: no make target specified - exit 1 + cmd="bash" +else + cmd="make $@" fi cd /work/src -su aptly -c "GOPATH=$PWD/.go make $@" +sudo -u aptly PATH=$PATH:/work/src/build GOPATH=/work/src/.go $cmd diff --git a/system/run-aptly-cmd b/system/run-aptly-cmd deleted file mode 100755 index b3d0ad1f1..000000000 --- a/system/run-aptly-cmd +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/sh - -cmd=$@ -test -z "$cmd" && cmd="bash" - -usermod -u `stat -c %u /work/src` aptly >/dev/null -chown -R `stat -c %u /work/src` /var/lib/aptly - -cd /work/src -exec sudo -u aptly PATH=$PATH:/work/src/build GOPATH=/work/src/.go $cmd diff --git a/system/run-golangci-lint b/system/run-golangci-lint deleted file mode 100755 index 149211218..000000000 --- a/system/run-golangci-lint +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/sh -e - -usermod -u `stat -c %u /app` aptly >/dev/null -chown -R `stat -c %u /app` /var/lib/aptly - -su aptly -c "set -e; cd /app; export GOPATH=/app/.go; go install github.com/golangci/golangci-lint/cmd/golangci-lint@$GOLANGCI_LINT_VERSION; PATH=\$PATH:/app/.go/bin golangci-lint run" diff --git a/system/run-system-tests b/system/run-system-tests deleted file mode 100755 index 58ac82f56..000000000 --- a/system/run-system-tests +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/sh - -# cleanup -rm -rf /app/tmp -rm -rf /tmp/aptly* - -usermod -u `stat -c %u /app` aptly >/dev/null -chown -R `stat -c %u /app` /var/lib/aptly - -su - aptly -c "cd /app; export GOPATH=/app/.go; make docker-test TEST=$@" diff --git a/system/run-unit-tests b/system/run-unit-tests deleted file mode 100755 index 34b98bc47..000000000 --- a/system/run-unit-tests +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/sh - -# cleanup -rm -rf /app/tmp -rm -rf /tmp/aptly* - -mkdir -p /srv -usermod -u `stat -c %u /app` aptly >/dev/null -chown -R `stat -c %u /app` /var/lib/aptly /srv - -su - aptly -c "cd /app; export export GOPATH=/app/.go; go mod tidy; make test" diff --git a/system/run.py b/system/run.py index f4a2ef4fa..599afe5f3 100755 --- a/system/run.py +++ b/system/run.py @@ -184,12 +184,10 @@ def run(include_long_tests=False, capture_results=False, tests=None, filters=Non if __name__ == "__main__": - if 'APTLY_VERSION' not in os.environ: - try: - os.environ['APTLY_VERSION'] = os.popen( - "make version").read().strip() - except BaseException as e: - print("Failed to capture current version: ", e) + try: + os.environ['APTLY_VERSION'] = os.popen("make -s version").read().strip() + except BaseException as e: + print("Failed to capture current version: ", e) if sys.version_info < PYTHON_MINIMUM_VERSION: raise RuntimeError(f'Tests require Python {PYTHON_MINIMUM_VERSION} or higher.') diff --git a/system/t07_serve/serve.py b/system/t07_serve/serve.py index 457b9f593..4f473f3ba 100644 --- a/system/t07_serve/serve.py +++ b/system/t07_serve/serve.py @@ -41,7 +41,7 @@ class Serve1Test(BaseTest): "aptly publish snapshot -keyring=${files}/aptly.pub -secret-keyring=${files}/aptly.sec snap2 debian", "aptly publish snapshot -keyring=${files}/aptly.pub -secret-keyring=${files}/aptly.sec -component=main,contrib snap1 snap2 multi", ] - runCmd = "aptly serve -listen=127.0.0.1:8765" + runCmd = "../aptly.test serve -listen=127.0.0.1:8765" def run(self): try: diff --git a/utils/config.go b/utils/config.go index b25ba4ea5..b061649f5 100644 --- a/utils/config.go +++ b/utils/config.go @@ -6,6 +6,8 @@ import ( "os" "path/filepath" "strings" + + "github.com/DisposaBoy/JsonConfigReader" ) // ConfigStructure is structure of main configuration @@ -192,7 +194,7 @@ func LoadConfig(filename string, config *ConfigStructure) error { } defer f.Close() - dec := json.NewDecoder(f) + dec := json.NewDecoder(JsonConfigReader.New(f)) return dec.Decode(&config) }