#!/usr/bin/make -f # These are hacks for the v0 component/branch only. export DH_GOLANG_EXCLUDES := python_interop go-tuf/v0/cmd/tuf # v0 keeps its own import path, which sigstore uses, so move it out of v2. export DH_GOLANG_BUILDPKG := github.com/theupdateframework/go-tuf/v2/... \ github.com/theupdateframework/go-tuf/v0/... V0 = _build/src/github.com/theupdateframework/go-tuf/v0 V2 = _build/src/github.com/theupdateframework/go-tuf/v2 execute_after_dh_auto_configure: # dh_auto_configure links the installed go-tuf (via sigstore) here. # autopkgtest starts from the installed tree, where v0 is in place. if [ -d $(V2)/v0 ]; then \ [ ! -L $(V0) ] || rm -v $(V0); \ mv $(V2)/v0 $(V0); \ fi execute_before_dh_auto_build: find _build/src/github.com/theupdateframework/go-tuf/v0 -type f -print0 | xargs -0 perl -pi -e 's,github.com/flynn/go-docopt,github.com/docopt/docopt-go,' cd _build/src/github.com/theupdateframework/go-tuf/v0; \ rgrep -q "github.com/theupdateframework/go-tuf/v0" . \ || find . -type f -print0 | xargs -0 \ perl -pi -e 's,github.com/theupdateframework/go-tuf,github.com/theupdateframework/go-tuf/v0,' %: dh $@ --builddirectory=_build --buildsystem=golang execute_after_dh_auto_build: #--- FAIL: TestDownLoadFile (0.00s) # --- FAIL: TestDownLoadFile/success (0.00s) # --- PASS: TestDownLoadFile/invalid_url (0.00s) # --- PASS: TestDownLoadFile/invalid_url_format (0.00s) # --- FAIL: TestDownLoadFile/invalid_path (0.00s) # --- FAIL: TestDownLoadFile/data_too_long (0.00s) #FAIL #FAIL github.com/theupdateframework/go-tuf/metadata/fetcher 0.007s rm -fv _build/src/github.com/theupdateframework/go-tuf/v2/metadata/fetcher/fetcher_test.go #exit status 1 #FAIL github.com/theupdateframework/go-tuf/metadata/trustedmetadata 0.004s rm -fv _build/src/github.com/theupdateframework/go-tuf/v2/metadata/trustedmetadata/trustedmetadata_test.go #exit status 1 #FAIL github.com/theupdateframework/go-tuf/metadata 0.003s rm -fv _build/src/github.com/theupdateframework/go-tuf/v2/metadata/metadata_test.go rm -fv _build/src/github.com/theupdateframework/go-tuf/v2/metadata/metadata_api_test.go B = $(CURDIR)/debian/tmp/usr/bin execute_after_dh_auto_install: cp -a $(V0) debian/tmp/usr/share/gocode/src/github.com/theupdateframework/go-tuf/ rm -rv debian/tmp/usr/share/gocode/src/github.com/theupdateframework/go-tuf/v0/client/python_interop # go.mod names the module .../go-tuf/v0, which is not a valid module path, # and dh-go copies it into go.work (https://bugs.debian.org/1151720). rm -v debian/tmp/usr/share/gocode/src/github.com/theupdateframework/go-tuf/v0/go.mod \ debian/tmp/usr/share/gocode/src/github.com/theupdateframework/go-tuf/v0/go.sum rm -fv $(B)/client rm -fv $(B)/repository rm -fv $(B)/signer rm -fv $(B)/tuf