Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix md5 cache #1354

Closed
wants to merge 6 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions AUTHORS
Original file line number Diff line number Diff line change
Expand Up @@ -63,3 +63,4 @@ List of contributors, in chronological order:
* Ramón N.Rodriguez (https://github.com/runitonmetal)
* Golf Hu (https://github.com/hudeng-go)
* Cookie Fei (https://github.com/wuhuang26)
* Kevin Martin (https://github.com/melraidin)
14 changes: 7 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ prepare: ## Install go module dependencies
go mod download
# install and initialize swagger
go install github.com/swaggo/swag/cmd/swag@latest
PATH=$(BINPATH)/:$(PATH) swag init
PATH=$(BINPATH)/:$(PATH) swag init -q
go mod verify
go mod tidy -v
go generate
Expand Down Expand Up @@ -70,8 +70,8 @@ docker-test: ## Run system tests
@rm -f aptly.test
go generate
# install and initialize swagger
go install github.com/swaggo/swag/cmd/swag@latest
PATH=$(BINPATH)/:$(PATH) swag init
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 Running python tests ...
Expand Down Expand Up @@ -126,7 +126,7 @@ releasetype: # Print release type (ci/release)
build: ## Build aptly
# install and initialize swagger
unset GOBIN; go install github.com/swaggo/swag/cmd/swag@latest
PATH=$(BINPATH)/:$(PATH) swag init
PATH=$(BINPATH)/:$(PATH) swag init -q
# prepare
go mod tidy
go generate
Expand All @@ -137,15 +137,15 @@ 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' -build.exclude_dir system -build.exclude_dir debian -build.exclude_dir docs -- api serve -listen 0.0.0.0:3142
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
@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
PATH=$(BINPATH)/:$(PATH) swag init -q
# set debian version
@if [ "`make -s releasetype`" = "ci" ]; then \
echo CI Build, setting version... ; \
Expand All @@ -169,7 +169,7 @@ binaries: ## Build binary releases (FreeBSD, MacOS, Linux tar)
@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
PATH=$(BINPATH)/:$(PATH) swag init -q
# build aptly
GOOS=$(GOOS) GOARCH=$(GOARCH) go build -o build/tmp/aptly -ldflags='-extldflags=-static'
# install
Expand Down
3 changes: 1 addition & 2 deletions s3/public.go
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ func (storage *PublishedStorage) getMD5(path string) (string, error) {
return "", err
}

return output.Metadata["Md5"], nil
return output.Metadata["md5"], nil
}

// putFile uploads file-like object to
Expand Down Expand Up @@ -430,7 +430,6 @@ func (storage *PublishedStorage) internalFilelist(prefix string, hidePlusWorkaro
/// from listing
continue
}

if prefix == "" {
paths = append(paths, *key.Key)
} else {
Expand Down
4 changes: 2 additions & 2 deletions system/t06_publish/repo.py
Original file line number Diff line number Diff line change
Expand Up @@ -671,12 +671,12 @@ class PublishRepo26Test(BaseTest):
"""
publish repo: sign with passphrase
"""
skipTest = "Failing on CI"
fixtureCmds = [
"aptly repo create local-repo",
"aptly repo add local-repo ${files}",
"gpg --import --batch --passphrase verysecret ${files}/aptly_passphrase.sec"
]
runCmd = "aptly publish repo -keyring=${files}/aptly_passphrase.pub -secret-keyring=${files}/aptly_passphrase.sec -passphrase=verysecret -distribution=maverick local-repo"
runCmd = "aptly publish repo -batch -keyring=${files}/aptly_passphrase.pub -passphrase=verysecret -distribution=maverick local-repo"
gold_processor = BaseTest.expand_environ

def outputMatchPrepare(_, s):
Expand Down
Loading