aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rwxr-xr-xtests/cert.sh46
-rw-r--r--tests/default-openssl.cnf22
-rw-r--r--tests/key.pem51
-rw-r--r--tests/mismatch-openssl.cnf22
-rw-r--r--tests/noemail-openssl.cnf20
-rw-r--r--tests/pkg/.gitignore2
l---------tests/pkg/1/build2.org/auth/create-expired/libfoo-1.0.0.tar.gz (renamed from tests/repository/1/fetch/t1/libfoo-1.0.0.tar.gz)0
-rw-r--r--tests/pkg/1/build2.org/auth/create-expired/repositories33
l---------tests/pkg/1/build2.org/auth/create-noemail/libfoo-1.0.0.tar.gz (renamed from tests/repository/1/satisfy/t1/libfoo-1.0.0.tar.gz)0
-rw-r--r--tests/pkg/1/build2.org/auth/create-noemail/repositories33
l---------tests/pkg/1/build2.org/auth/expired/libfoo-1.0.0.tar.gz (renamed from tests/repository/1/satisfy/t2/libfoo-1.0.0.tar.gz)0
-rw-r--r--tests/pkg/1/build2.org/auth/expired/packages11
-rw-r--r--tests/pkg/1/build2.org/auth/expired/repositories33
-rw-r--r--tests/pkg/1/build2.org/auth/expired/signature13
-rw-r--r--tests/pkg/1/build2.org/auth/libfoo-1.0.0.tar.gz (renamed from tests/repository/1/depend/stable/libfoo-1.0.0.tar.gz)bin348 -> 348 bytes
l---------tests/pkg/1/build2.org/auth/name-mismatch/libfoo-1.0.0.tar.gz (renamed from tests/repository/1/satisfy/t4c/libfoo-1.0.0.tar.gz)0
-rw-r--r--tests/pkg/1/build2.org/auth/name-mismatch/repositories34
l---------tests/pkg/1/build2.org/auth/sha256sum-mismatch/libfoo-1.0.0.tar.gz1
-rw-r--r--tests/pkg/1/build2.org/auth/sha256sum-mismatch/repositories33
l---------tests/pkg/1/build2.org/auth/signature-mismatch/libfoo-1.0.0.tar.gz1
-rw-r--r--tests/pkg/1/build2.org/auth/signature-mismatch/repositories33
l---------tests/pkg/1/build2.org/auth/signed/libfoo-1.0.0.tar.gz1
-rw-r--r--tests/pkg/1/build2.org/auth/signed/repositories33
l---------tests/pkg/1/build2.org/auth/unsigned1/libfoo-1.0.0.tar.gz1
-rw-r--r--tests/pkg/1/build2.org/auth/unsigned1/repositories (renamed from tests/repository/1/depend/stable/repositories)0
l---------tests/pkg/1/build2.org/auth/unsigned2/libfoo-1.0.0.tar.gz1
-rw-r--r--tests/pkg/1/build2.org/auth/unsigned2/repositories (renamed from tests/repository/1/fetch/repositories)0
-rw-r--r--tests/pkg/1/build2.org/common/bar/stable/libbar-1.0.0.tar.gz (renamed from tests/repository/1/common/bar/stable/libbar-1.0.0.tar.gz)bin957 -> 957 bytes
-rw-r--r--tests/pkg/1/build2.org/common/bar/stable/repositories (renamed from tests/repository/1/common/bar/stable/repositories)0
-rw-r--r--tests/pkg/1/build2.org/common/bar/testing/libbar-1.1.0.tar.gz (renamed from tests/repository/1/common/bar/testing/libbar-1.1.0.tar.gz)bin959 -> 959 bytes
-rw-r--r--tests/pkg/1/build2.org/common/bar/testing/repositories (renamed from tests/repository/1/common/bar/testing/repositories)0
-rw-r--r--tests/pkg/1/build2.org/common/bar/unstable/libbar-1.1.1.tar.gz (renamed from tests/repository/1/common/bar/unstable/libbar-1.1.1.tar.gz)bin1189 -> 1189 bytes
-rw-r--r--tests/pkg/1/build2.org/common/bar/unstable/repositories (renamed from tests/repository/1/common/bar/unstable/repositories)0
-rw-r--r--tests/pkg/1/build2.org/common/foo/stable/libfoo-1.0.0.tar.gz (renamed from tests/repository/1/common/foo/stable/libfoo-1.0.0.tar.gz)bin881 -> 881 bytes
-rw-r--r--tests/pkg/1/build2.org/common/foo/stable/repositories (renamed from tests/repository/1/common/foo/stable/repositories)0
-rw-r--r--tests/pkg/1/build2.org/common/foo/testing/libfoo-1.1.0.tar.gz (renamed from tests/repository/1/common/foo/testing/libfoo-1.1.0.tar.gz)bin874 -> 874 bytes
-rw-r--r--tests/pkg/1/build2.org/common/foo/testing/repositories (renamed from tests/repository/1/common/foo/testing/repositories)0
-rw-r--r--tests/pkg/1/build2.org/common/hello/libhello-1.0.0+1.tar.gz (renamed from tests/repository/1/common/hello/libhello-1.0.0+1.tar.gz)bin1489 -> 1489 bytes
-rw-r--r--tests/pkg/1/build2.org/common/hello/repositories36
-rw-r--r--tests/pkg/1/build2.org/common/libhello-1.0.0+1/build/bootstrap.build (renamed from tests/repository/1/common/libhello-1.0.0+1/build/bootstrap.build)0
-rw-r--r--tests/pkg/1/build2.org/common/libhello-1.0.0+1/build/export.build (renamed from tests/repository/1/common/libhello-1.0.0+1/build/export.build)0
-rw-r--r--tests/pkg/1/build2.org/common/libhello-1.0.0+1/build/root.build (renamed from tests/repository/1/common/libhello-1.0.0+1/build/root.build)0
-rw-r--r--tests/pkg/1/build2.org/common/libhello-1.0.0+1/buildfile (renamed from tests/repository/1/common/libhello-1.0.0+1/buildfile)0
-rw-r--r--tests/pkg/1/build2.org/common/libhello-1.0.0+1/hello/buildfile (renamed from tests/repository/1/common/libhello-1.0.0+1/hello/buildfile)0
-rw-r--r--tests/pkg/1/build2.org/common/libhello-1.0.0+1/hello/hello (renamed from tests/repository/1/common/libhello-1.0.0+1/hello/hello)0
-rw-r--r--tests/pkg/1/build2.org/common/libhello-1.0.0+1/hello/hello.cxx (renamed from tests/repository/1/common/libhello-1.0.0+1/hello/hello.cxx)0
-rw-r--r--tests/pkg/1/build2.org/common/libhello-1.0.0+1/manifest (renamed from tests/repository/1/common/libhello-1.0.0+1/manifest)0
-rw-r--r--tests/pkg/1/build2.org/common/libhello-1.0.0+1/tests/build/bootstrap.build (renamed from tests/repository/1/common/libhello-1.0.0+1/tests/build/bootstrap.build)0
-rw-r--r--tests/pkg/1/build2.org/common/libhello-1.0.0+1/tests/build/root.build (renamed from tests/repository/1/common/libhello-1.0.0+1/tests/build/root.build)0
-rw-r--r--tests/pkg/1/build2.org/common/libhello-1.0.0+1/tests/buildfile (renamed from tests/repository/1/common/libhello-1.0.0+1/tests/buildfile)0
-rw-r--r--tests/pkg/1/build2.org/common/libhello-1.0.0+1/tests/test/buildfile (renamed from tests/repository/1/common/libhello-1.0.0+1/tests/test/buildfile)0
-rw-r--r--tests/pkg/1/build2.org/common/libhello-1.0.0+1/tests/test/driver.cxx (renamed from tests/repository/1/common/libhello-1.0.0+1/tests/test/driver.cxx)0
-rw-r--r--tests/pkg/1/build2.org/common/libhello-1.0.0+1/tests/test/test.out (renamed from tests/repository/1/common/libhello-1.0.0+1/tests/test/test.out)0
-rw-r--r--tests/pkg/1/build2.org/common/libhello-1.0.0+1/version (renamed from tests/repository/1/common/libhello-1.0.0+1/version)0
-rw-r--r--tests/pkg/1/build2.org/common/not-a-package.tar.gz (renamed from tests/repository/1/common/not-a-package.tar.gz)bin259 -> 259 bytes
-rw-r--r--tests/pkg/1/build2.org/depend/stable/libbar-1.0.0.tar.gz (renamed from tests/repository/1/depend/stable/libbar-1.0.0.tar.gz)bin354 -> 354 bytes
-rw-r--r--tests/pkg/1/build2.org/depend/stable/libbar-1.1.0.tar.gz (renamed from tests/repository/1/depend/stable/libbar-1.1.0.tar.gz)bin359 -> 359 bytes
-rw-r--r--tests/pkg/1/build2.org/depend/stable/libbar-1.2.0.tar.gz (renamed from tests/repository/1/depend/stable/libbar-1.2.0.tar.gz)bin372 -> 372 bytes
-rw-r--r--tests/pkg/1/build2.org/depend/stable/libbar-1.3.0.tar.gz (renamed from tests/repository/1/depend/stable/libbar-1.3.0.tar.gz)bin378 -> 378 bytes
-rw-r--r--tests/pkg/1/build2.org/depend/stable/libfoo-1.0.0.tar.gz (renamed from tests/repository/1/fetch/libfoo-1.0.0.tar.gz)bin348 -> 348 bytes
-rw-r--r--tests/pkg/1/build2.org/depend/stable/libfoo-1.1.0.tar.gz (renamed from tests/repository/1/depend/stable/libfoo-1.1.0.tar.gz)bin349 -> 349 bytes
-rw-r--r--tests/pkg/1/build2.org/depend/stable/libfoo-1.2.0.tar.gz (renamed from tests/repository/1/depend/stable/libfoo-1.2.0.tar.gz)bin348 -> 348 bytes
-rw-r--r--tests/pkg/1/build2.org/depend/stable/repositories (renamed from tests/repository/1/satisfy/repositories)0
-rw-r--r--tests/pkg/1/build2.org/fetch/libfoo-1.0.0.tar.gz (renamed from tests/repository/1/satisfy/libfoo-1.0.0.tar.gz)bin348 -> 348 bytes
-rw-r--r--tests/pkg/1/build2.org/fetch/libfoo-1.1.0.tar.gz (renamed from tests/repository/1/fetch/libfoo-1.1.0.tar.gz)bin349 -> 349 bytes
-rw-r--r--tests/pkg/1/build2.org/fetch/libfoo-1.1.0/build/bootstrap.build (renamed from tests/repository/1/fetch/libfoo-1.1.0/build/bootstrap.build)0
-rw-r--r--tests/pkg/1/build2.org/fetch/libfoo-1.1.0/buildfile (renamed from tests/repository/1/fetch/libfoo-1.1.0/buildfile)0
-rw-r--r--tests/pkg/1/build2.org/fetch/libfoo-1.1.0/manifest (renamed from tests/repository/1/fetch/libfoo-1.1.0/manifest)0
-rw-r--r--tests/pkg/1/build2.org/fetch/repositories (renamed from tests/repository/1/status/stable/repositories)0
l---------tests/pkg/1/build2.org/fetch/t1/libfoo-1.0.0.tar.gz1
l---------tests/pkg/1/build2.org/fetch/t1/libfoo-1.1.0.tar.gz (renamed from tests/repository/1/fetch/t1/libfoo-1.1.0.tar.gz)0
l---------tests/pkg/1/build2.org/fetch/t1/repositories (renamed from tests/repository/1/fetch/t1/repositories)0
-rw-r--r--tests/pkg/1/build2.org/satisfy/libbar-1.0.0.tar.gz (renamed from tests/repository/1/satisfy/libbar-1.0.0.tar.gz)bin356 -> 356 bytes
-rw-r--r--tests/pkg/1/build2.org/satisfy/libbar-1.1.0.tar.gz (renamed from tests/repository/1/satisfy/libbar-1.1.0.tar.gz)bin360 -> 360 bytes
-rw-r--r--tests/pkg/1/build2.org/satisfy/libbar-1.2.0.tar.gz (renamed from tests/repository/1/satisfy/libbar-1.2.0.tar.gz)bin348 -> 348 bytes
-rw-r--r--tests/pkg/1/build2.org/satisfy/libbaz-1.0.0.tar.gz (renamed from tests/repository/1/satisfy/libbaz-1.0.0.tar.gz)bin359 -> 359 bytes
-rw-r--r--tests/pkg/1/build2.org/satisfy/libbaz-1.1.0.tar.gz (renamed from tests/repository/1/satisfy/libbaz-1.1.0.tar.gz)bin363 -> 363 bytes
-rw-r--r--tests/pkg/1/build2.org/satisfy/libbiz-1.0.0.tar.gz (renamed from tests/repository/1/satisfy/libbiz-1.0.0.tar.gz)bin366 -> 366 bytes
-rw-r--r--tests/pkg/1/build2.org/satisfy/libfoo-0.0.0.tar.gz (renamed from tests/repository/1/satisfy/libfoo-0.0.0.tar.gz)bin348 -> 348 bytes
-rw-r--r--tests/pkg/1/build2.org/satisfy/libfoo-1.0.0.tar.gzbin0 -> 348 bytes
-rw-r--r--tests/pkg/1/build2.org/satisfy/libfoo-1.1.0.tar.gz (renamed from tests/repository/1/satisfy/libfoo-1.1.0.tar.gz)bin349 -> 349 bytes
-rw-r--r--tests/pkg/1/build2.org/satisfy/libfoo-1.1.0/build/bootstrap.build (renamed from tests/repository/1/satisfy/libfoo-1.1.0/build/bootstrap.build)0
-rw-r--r--tests/pkg/1/build2.org/satisfy/libfoo-1.1.0/buildfile (renamed from tests/repository/1/satisfy/libfoo-1.1.0/buildfile)0
-rw-r--r--tests/pkg/1/build2.org/satisfy/libfoo-1.1.0/manifest (renamed from tests/repository/1/satisfy/libfoo-1.1.0/manifest)0
-rw-r--r--tests/pkg/1/build2.org/satisfy/libfoo-1.2.0.tar.gz (renamed from tests/repository/1/satisfy/libfoo-1.2.0.tar.gz)bin350 -> 350 bytes
-rw-r--r--tests/pkg/1/build2.org/satisfy/libfox-1.0.0.tar.gz (renamed from tests/repository/1/satisfy/libfox-1.0.0.tar.gz)bin349 -> 349 bytes
-rw-r--r--tests/pkg/1/build2.org/satisfy/repositories1
l---------tests/pkg/1/build2.org/satisfy/t1/libfoo-1.0.0.tar.gz1
l---------tests/pkg/1/build2.org/satisfy/t1/repositories (renamed from tests/repository/1/satisfy/t1/repositories)0
l---------tests/pkg/1/build2.org/satisfy/t2/libbar-1.0.0.tar.gz (renamed from tests/repository/1/satisfy/t2/libbar-1.0.0.tar.gz)0
l---------tests/pkg/1/build2.org/satisfy/t2/libfoo-1.0.0.tar.gz1
l---------tests/pkg/1/build2.org/satisfy/t2/repositories (renamed from tests/repository/1/satisfy/t2/repositories)0
l---------tests/pkg/1/build2.org/satisfy/t3/libbaz-1.0.0.tar.gz (renamed from tests/repository/1/satisfy/t3/libbaz-1.0.0.tar.gz)0
l---------tests/pkg/1/build2.org/satisfy/t3/libfox-1.0.0.tar.gz (renamed from tests/repository/1/satisfy/t3/libfox-1.0.0.tar.gz)0
-rw-r--r--tests/pkg/1/build2.org/satisfy/t3/repositories (renamed from tests/repository/1/satisfy/t3/repositories)0
l---------tests/pkg/1/build2.org/satisfy/t4a/libfoo-1.1.0.tar.gz (renamed from tests/repository/1/satisfy/t4a/libfoo-1.1.0.tar.gz)0
l---------tests/pkg/1/build2.org/satisfy/t4a/repositories (renamed from tests/repository/1/satisfy/t4a/repositories)0
l---------tests/pkg/1/build2.org/satisfy/t4b/libbar-1.1.0.tar.gz (renamed from tests/repository/1/satisfy/t4b/libbar-1.1.0.tar.gz)0
-rw-r--r--tests/pkg/1/build2.org/satisfy/t4b/repositories (renamed from tests/repository/1/satisfy/t4b/repositories)0
l---------tests/pkg/1/build2.org/satisfy/t4c/libbaz-1.1.0.tar.gz (renamed from tests/repository/1/satisfy/t4c/libbaz-1.1.0.tar.gz)0
l---------tests/pkg/1/build2.org/satisfy/t4c/libfoo-1.0.0.tar.gz1
-rw-r--r--tests/pkg/1/build2.org/satisfy/t4c/repositories (renamed from tests/repository/1/satisfy/t4c/repositories)0
l---------tests/pkg/1/build2.org/satisfy/t4d/libbiz-1.0.0.tar.gz (renamed from tests/repository/1/satisfy/t4d/libbiz-1.0.0.tar.gz)0
l---------tests/pkg/1/build2.org/satisfy/t4d/libfox-1.0.0.tar.gz (renamed from tests/repository/1/satisfy/t4d/libfox-1.0.0.tar.gz)0
-rw-r--r--tests/pkg/1/build2.org/satisfy/t4d/repositories (renamed from tests/repository/1/satisfy/t4d/repositories)0
l---------tests/pkg/1/build2.org/satisfy/t5/libbar-1.2.0.tar.gz (renamed from tests/repository/1/satisfy/t5/libbar-1.2.0.tar.gz)0
l---------tests/pkg/1/build2.org/satisfy/t5/repositories (renamed from tests/repository/1/satisfy/t5/repositories)0
-rw-r--r--tests/pkg/1/build2.org/status/extra/libbar-1.1.0+1.tar.gz (renamed from tests/repository/1/status/extra/libbar-1.1.0+1.tar.gz)bin243 -> 243 bytes
-rw-r--r--tests/pkg/1/build2.org/status/extra/repositories (renamed from tests/repository/1/status/extra/repositories)0
-rw-r--r--tests/pkg/1/build2.org/status/stable/libbar-1.0.0.tar.gz (renamed from tests/repository/1/status/stable/libbar-1.0.0.tar.gz)bin241 -> 241 bytes
-rw-r--r--tests/pkg/1/build2.org/status/stable/libfoo-1.0.0.tar.gz (renamed from tests/repository/1/status/stable/libfoo-1.0.0.tar.gz)bin240 -> 240 bytes
-rw-r--r--tests/pkg/1/build2.org/status/stable/repositories1
-rw-r--r--tests/pkg/1/build2.org/status/testing/libbar-1.0.0+1.tar.gz (renamed from tests/repository/1/status/testing/libbar-1.0.0+1.tar.gz)bin243 -> 243 bytes
-rw-r--r--tests/pkg/1/build2.org/status/testing/libbar-1.1.0.tar.gz (renamed from tests/repository/1/status/testing/libbar-1.1.0.tar.gz)bin242 -> 242 bytes
-rw-r--r--tests/pkg/1/build2.org/status/testing/repositories (renamed from tests/repository/1/status/testing/repositories)0
-rw-r--r--tests/pkg/1/build2.org/status/unstable/libbar-2.0.0.tar.gz (renamed from tests/repository/1/status/unstable/libbar-2.0.0.tar.gz)bin245 -> 245 bytes
-rw-r--r--tests/pkg/1/build2.org/status/unstable/repositories (renamed from tests/repository/1/status/unstable/repositories)0
-rwxr-xr-xtests/pkg/publish (renamed from tests/repository/publish)3
-rw-r--r--tests/repository/.gitignore1
-rw-r--r--tests/repository/1/common/hello/repositories4
-rwxr-xr-xtests/test.sh398
121 files changed, 752 insertions, 120 deletions
diff --git a/tests/cert.sh b/tests/cert.sh
new file mode 100755
index 0000000..156f588
--- /dev/null
+++ b/tests/cert.sh
@@ -0,0 +1,46 @@
+#! /bin/sh
+
+# Normally, you don't need to regenerate the private key.
+#
+# openssl genrsa 4096 > key.pem
+
+# Copy default-cert.pem content to the certificate value of the following
+# manifest files:
+# pkg/1/build2.org/auth/mismatched/signature/repositories
+# pkg/1/build2.org/auth/mismatched/sha256sum/repositories
+# pkg/1/build2.org/auth/signed/repositories
+# pkg/1/build2.org/common/hello/repositories
+#
+openssl req -x509 -new -key key.pem -days 365 -config default-openssl.cnf > \
+ default-cert.pem
+
+# Copy mismatch-cert.pem content to the certificate value of
+# pkg/1/build2.org/auth/mismatched/name/repositories manifest file.
+#
+openssl req -x509 -new -key key.pem -days 365 -config mismatch-openssl.cnf > \
+ mismatch-cert.pem
+
+# Copy noemail-cert.pem content to the certificate value of
+# pkg/1/faulty/auth/noemail/repositories manifest file.
+#
+openssl req -x509 -new -key key.pem -days 365 -config noemail-openssl.cnf > \
+ noemail-cert.pem
+
+# Normally, you have no reason to regenerate expired-cert.pem, as need to keep
+# it expired for the testing purposes. But if you do, copy expired-cert.pem
+# content to the certificate value of the following manifest files:
+# pkg/1/build2.org/auth/expired/repositories
+# pkg/1/faulty/auth/expired/repositories
+#
+# To regenerate the packages and signature manifest files run:
+#
+# ../bpkg/bpkg rep-create pkg/1/build2.org/auth/expired --key key.pem
+#
+# We cannot do it in test.sh since the certificate has expired. This is also
+# the reason why we store these auto-generated manifests in git.
+#
+# Will have to wait 1 day until the certificate expires. Until then test.sh
+# will be failing.
+#
+# openssl req -x509 -new -key key.pem -days 1 -config default-openssl.cnf > \
+# expired-cert.pem
diff --git a/tests/default-openssl.cnf b/tests/default-openssl.cnf
new file mode 100644
index 0000000..c14ec06
--- /dev/null
+++ b/tests/default-openssl.cnf
@@ -0,0 +1,22 @@
+repository = build2.org
+company = Code Synthesis
+email = info@build2.org
+
+
+[ req ]
+
+distinguished_name = req_distinguished_name
+x509_extensions = v3_req
+prompt = no
+utf8 = yes
+
+[ req_distinguished_name ]
+
+O = $company
+CN = name:$repository
+
+[ v3_req ]
+
+keyUsage = critical,digitalSignature
+extendedKeyUsage = critical,codeSigning
+subjectAltName = email:$email
diff --git a/tests/key.pem b/tests/key.pem
new file mode 100644
index 0000000..6615a2d
--- /dev/null
+++ b/tests/key.pem
@@ -0,0 +1,51 @@
+-----BEGIN RSA PRIVATE KEY-----
+MIIJKAIBAAKCAgEA2rvxJe7MXMIygVTVGfMR4B/MTRRRgbKdLcXaUbu+IfdyjGMu
+34GsUG51WzhcNOmNdLX2FHEiiESAPvVbWOEO+ZQL3IIxbXc8IgiNEpNPPR58SFNw
+wd2E6C8pmyN7QhXuy+gpVdwbsN9RWXnXBY9A9JtSt+xBuxeDs/PkdoPH4O3aL2HB
+0TUzTPhHZ23BCSzMXIIqJfxEX2g9eKtPPkRMsLd/X0lRqkutjmXlnKXNCJ8uE8yU
+cuWtPSfsqSiEfvBpfcrJ4trQzYgiXfNp4Cy434SsVV5wB2Uki9fTRy2HY478bHLT
+2wgqVqCLartkOKTawy8bx0C/uA1mxen4U6P9dcKI4j1/oPmiykl0r0HlQIAGOYZz
+xbk52/pkt7LlSLvqW4jtyIhM4p8CgSRvIyI0eJHEt0ztoB6LN1zAdThubomWaImT
+xTLJXzl/fea8JJ+6jsP4NBiIrrnT/HBF1MUEiqLfwjAwTraBPtqH8A6aI+yGPsWP
+AhTtlYeyTKv2qkTFA4QolegtkmjWt/oxFzwCwnLPrN19CFPUFPOGiA1+u7jGNUzp
+9KuNFQXfiay5ZzP8cqj1bfnQDDbLkXn2TOI/6bsbq4FiuqYSW//XdVqaDZlnVvfw
+ozPlKzdKR9wMSs7PP8P7SFGU5oIh5a2zUbbNZxC8Gef7MYD6xMi7TEAU4JECAwEA
+AQKCAgAz75YlpJq/l5i4XrUusSlYZxRyZNWpjwiFGspox8QwenmnXdF+XmLUwjV5
+UFuMcLwWrzHbzrUdV+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Ffg
+bZVlmC+UlzeuMEHalrYVWmIQ29KsF7vo9dKBz1BHMQ77D4lzaV1fZ9EPg+XbbNG2
+6N/rC8ubuC4CjnqMCO0tFM+Gq6ixzDmBkzEWYStEwMQVIkfJ/BxVFHyH8DsRDmvO
+1u3lZ7Ks0HyiSOe45q/E6PnNV+oV6f1EeZESZysuD96fHm8XMC6iBwK0AQ0hUZ4e
+cVzIsHBEMzLJx6On7xQYR7FNmdW+8fJmMXyniCUS9c26upTNwWVDX+U4Y4M=
+-----END RSA PRIVATE KEY-----
diff --git a/tests/mismatch-openssl.cnf b/tests/mismatch-openssl.cnf
new file mode 100644
index 0000000..f4fe4d7
--- /dev/null
+++ b/tests/mismatch-openssl.cnf
@@ -0,0 +1,22 @@
+repository = build2.org/auth/mismatched/name/x
+company = Code Synthesis
+email = info@build2.org
+
+
+[ req ]
+
+distinguished_name = req_distinguished_name
+x509_extensions = v3_req
+prompt = no
+utf8 = yes
+
+[ req_distinguished_name ]
+
+O = $company
+CN = name:$repository
+
+[ v3_req ]
+
+keyUsage = critical,digitalSignature
+extendedKeyUsage = critical,codeSigning
+subjectAltName = email:$email
diff --git a/tests/noemail-openssl.cnf b/tests/noemail-openssl.cnf
new file mode 100644
index 0000000..4fc8618
--- /dev/null
+++ b/tests/noemail-openssl.cnf
@@ -0,0 +1,20 @@
+repository = build2.org
+company = Code Synthesis
+
+
+[ req ]
+
+distinguished_name = req_distinguished_name
+x509_extensions = v3_req
+prompt = no
+utf8 = yes
+
+[ req_distinguished_name ]
+
+O = $company
+CN = name:$repository
+
+[ v3_req ]
+
+keyUsage = critical,digitalSignature
+extendedKeyUsage = critical,codeSigning
diff --git a/tests/pkg/.gitignore b/tests/pkg/.gitignore
new file mode 100644
index 0000000..cd1ec36
--- /dev/null
+++ b/tests/pkg/.gitignore
@@ -0,0 +1,2 @@
+packages
+signature
diff --git a/tests/repository/1/fetch/t1/libfoo-1.0.0.tar.gz b/tests/pkg/1/build2.org/auth/create-expired/libfoo-1.0.0.tar.gz
index 32e5a3c..32e5a3c 120000
--- a/tests/repository/1/fetch/t1/libfoo-1.0.0.tar.gz
+++ b/tests/pkg/1/build2.org/auth/create-expired/libfoo-1.0.0.tar.gz
diff --git a/tests/pkg/1/build2.org/auth/create-expired/repositories b/tests/pkg/1/build2.org/auth/create-expired/repositories
new file mode 100644
index 0000000..8370fa4
--- /dev/null
+++ b/tests/pkg/1/build2.org/auth/create-expired/repositories
@@ -0,0 +1,33 @@
+: 1
+certificate: \
+-----BEGIN CERTIFICATE-----
+MIIFLzCCAxegAwIBAgIJAPIoh0763iYdMA0GCSqGSIb3DQEBCwUAMDMxFzAVBgNV
+BAoMDkNvZGUgU3ludGhlc2lzMRgwFgYDVQQDDA9uYW1lOmJ1aWxkMi5vcmcwHhcN
+MTYwNTAxMTA1MDMyWhcNMTYwNTAyMTA1MDMyWjAzMRcwFQYDVQQKDA5Db2RlIFN5
+bnRoZXNpczEYMBYGA1UEAwwPbmFtZTpidWlsZDIub3JnMIICIjANBgkqhkiG9w0B
+AQEFAAOCAg8AMIICCgKCAgEA2rvxJe7MXMIygVTVGfMR4B/MTRRRgbKdLcXaUbu+
+IfdyjGMu34GsUG51WzhcNOmNdLX2FHEiiESAPvVbWOEO+ZQL3IIxbXc8IgiNEpNP
+PR58SFNwwd2E6C8pmyN7QhXuy+gpVdwbsN9RWXnXBY9A9JtSt+xBuxeDs/PkdoPH
+4O3aL2HB0TUzTPhHZ23BCSzMXIIqJfxEX2g9eKtPPkRMsLd/X0lRqkutjmXlnKXN
+CJ8uE8yUcuWtPSfsqSiEfvBpfcrJ4trQzYgiXfNp4Cy434SsVV5wB2Uki9fTRy2H
+Y478bHLT2wgqVqCLartkOKTawy8bx0C/uA1mxen4U6P9dcKI4j1/oPmiykl0r0Hl
+QIAGOYZzxbk52/pkt7LlSLvqW4jtyIhM4p8CgSRvIyI0eJHEt0ztoB6LN1zAdThu
+bomWaImTxTLJXzl/fea8JJ+6jsP4NBiIrrnT/HBF1MUEiqL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=
+-----END CERTIFICATE-----
+\
diff --git a/tests/repository/1/satisfy/t1/libfoo-1.0.0.tar.gz b/tests/pkg/1/build2.org/auth/create-noemail/libfoo-1.0.0.tar.gz
index 32e5a3c..32e5a3c 120000
--- a/tests/repository/1/satisfy/t1/libfoo-1.0.0.tar.gz
+++ b/tests/pkg/1/build2.org/auth/create-noemail/libfoo-1.0.0.tar.gz
diff --git a/tests/pkg/1/build2.org/auth/create-noemail/repositories b/tests/pkg/1/build2.org/auth/create-noemail/repositories
new file mode 100644
index 0000000..3645b23
--- /dev/null
+++ b/tests/pkg/1/build2.org/auth/create-noemail/repositories
@@ -0,0 +1,33 @@
+: 1
+certificate: \
+-----BEGIN CERTIFICATE-----
+MIIFEzCCAvugAwIBAgIJANxwhIzYRCmBMA0GCSqGSIb3DQEBCwUAMDMxFzAVBgNV
+BAoMDkNvZGUgU3ludGhlc2lzMRgwFgYDVQQDDA9uYW1lOmJ1aWxkMi5vcmcwHhcN
+MTYwNTAxMTYwODQyWhcNMTcwNTAxMTYwODQyWjAzMRcwFQYDVQQKDA5Db2RlIFN5
+bnRoZXNpczEYMBYGA1UEAwwPbmFtZTpidWlsZDIub3JnMIICIjANBgkqhkiG9w0B
+AQEFAAOCAg8AMIICCgKCAgEA2rvxJe7MXMIygVTVGfMR4B/MTRRRgbKdLcXaUbu+
+IfdyjGMu34GsUG51WzhcNOmNdLX2FHEiiESAPvVbWOEO+ZQL3IIxbXc8IgiNEpNP
+PR58SFNwwd2E6C8pmyN7QhXuy+gpVdwbsN9RWXnXBY9A9JtSt+xBuxeDs/PkdoPH
+4O3aL2HB0TUzTPhHZ23BCSzMXIIqJfxEX2g9eKtPPkRMsLd/X0lRqkutjmXlnKXN
+CJ8uE8yUcuWtPSfsqSiEfvBpfcrJ4trQzYgiXfNp4Cy434SsVV5wB2Uki9fTRy2H
+Y478bHLT2wgqVqCLartkOKTawy8bx0C/uA1mxen4U6P9dcKI4j1/oPmiykl0r0Hl
+QIAGOYZzxbk52/pk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9cOyUfoZZuV3Va/IyoOUvwNd5Lxen0mo2LPNlXRMVM
+e44+PKmbFA==
+-----END CERTIFICATE-----
+\
diff --git a/tests/repository/1/satisfy/t2/libfoo-1.0.0.tar.gz b/tests/pkg/1/build2.org/auth/expired/libfoo-1.0.0.tar.gz
index 32e5a3c..32e5a3c 120000
--- a/tests/repository/1/satisfy/t2/libfoo-1.0.0.tar.gz
+++ b/tests/pkg/1/build2.org/auth/expired/libfoo-1.0.0.tar.gz
diff --git a/tests/pkg/1/build2.org/auth/expired/packages b/tests/pkg/1/build2.org/auth/expired/packages
new file mode 100644
index 0000000..9aaf177
--- /dev/null
+++ b/tests/pkg/1/build2.org/auth/expired/packages
@@ -0,0 +1,11 @@
+: 1
+sha256sum: ba75221f5f610f5f9ebee19a7449dfcff5c9fb2c7d87d2482b8324c4ea419950
+:
+name: libfoo
+version: 1.0.0
+summary: libfoo
+license: MIT
+url: http://example.org
+email: pkg@example.org
+location: libfoo-1.0.0.tar.gz
+sha256sum: 642aa60cda80f6579247dfc64192c67ec3f2ed932ae2f56e592000ad9fea435d
diff --git a/tests/pkg/1/build2.org/auth/expired/repositories b/tests/pkg/1/build2.org/auth/expired/repositories
new file mode 100644
index 0000000..8370fa4
--- /dev/null
+++ b/tests/pkg/1/build2.org/auth/expired/repositories
@@ -0,0 +1,33 @@
+: 1
+certificate: \
+-----BEGIN CERTIFICATE-----
+MIIFLzCCAxegAwIBAgIJAPIoh0763iYdMA0GCSqGSIb3DQEBCwUAMDMxFzAVBgNV
+BAoMDkNvZGUgU3ludGhlc2lzMRgwFgYDVQQDDA9uYW1lOmJ1aWxkMi5vcmcwHhcN
+MTYwNTAxMTA1MDMyWhcNMTYwNTAyMTA1MDMyWjAzMRcwFQYDVQQKDA5Db2RlIFN5
+bnRoZXNpczEYMBYGA1UEAwwPbmFtZTpidWlsZDIub3JnMIICIjANBgkqhkiG9w0B
+AQEFAAOCAg8AMIICCgKCAgEA2rvxJe7MXMIygVTVGfMR4B/MTRRR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YoP4xAt6yaQWzv
+wEqqhhZ7tLpjrjK0K2pqsPoupNcNhE31k+6ZdM5Z5oHT844qKIVNJIdlvFwnQ3ed
+grP6gBCLVY7h7GJ0x2ZG/2hYt4My8RqLxFYHaHAzQsmXFATIzT1Yqz1nw+8V3l5P
+m+rXQNVAw7rgpl3T7klbHVfkg5rPa0kF66PkKq5ax46NS6KVj9sNOqkcXL7huQSG
+BnSLTkaLwwrSZWl+DPXeY8TgUGkkEMY6RvYdqoOGZiZSqtMfK9QKsFi79a4Munc8
+ypUPxE++jhtXcarDy0ta3BXrspIg63a2Ab6C5yv2fC31Ec5v75rUxt9BVxMMQdlX
+h9eMe5FmkgkSBcklOShE2kZvTOPUCSq8DK7JuKsKEH3istPto+PpoyT8RxuZ9K2Q
+rr78CskHtj+TVdFv7TAqn2YDx9ki4HJIxWKVanJ+zOBSrJw=
+-----END CERTIFICATE-----
+\
diff --git a/tests/pkg/1/build2.org/auth/expired/signature b/tests/pkg/1/build2.org/auth/expired/signature
new file mode 100644
index 0000000..dc2aeee
--- /dev/null
+++ b/tests/pkg/1/build2.org/auth/expired/signature
@@ -0,0 +1,13 @@
+: 1
+sha256sum: cd05e2ebe9dac484950a54e95a76efba0cac27ec5148dc34fa23a5cd7da72e3d
+signature: \
+geWdw7Gm+Rt+CLDMBby5Y796E8rxwImb0bmcZwGWar9D3vkFm9Kjh00Buuo1PuU7tP1dV6yvRbH8
+NzC0IryEoUJHx9909AJ449ET9Zb+C3ykEeBlKH2wonj7cAVK9ZEDpPEGAtp56XWZQEawl50mwq6t
+XkZAABxtOswXiicdh3HK7kaPHp38/9CBMc0rva6wDnkbTigUYA2ULqLtP5a5mLovVc48zI9A/hmb
+Qx1/Nr7nzTZNDGK7CwTAb1fPam9rZklTfCTPSPUUjvWjM9XdY8cbRE1FrE14TXdyQPxCLzHO2dUO
+YWH5/qMikEoCYhYXQ6KhekoT/MUiVC3PMcYQbYOrOtSxq6RcgnymexBe1XIyld5Rfo1eXu8TK11r
+QPULIqAGy6RwEUhGznuEiGHQwb1UymNyJ/qgr4vBPjJtlvptqG5XNmtiJ22f07nmeVRi2Vg2UyOw
+HoVpy5t/w0tEnUXPA39Vt0v1bUm7Knhc8qL4JFEqK/j/CzEHzEtAjn0aoGuKubCO0WUa+v6ZlkLU
+YrNUIdgT1wgj4yEhLO3g+NsnxFH05D2sfR16rrkI2E6st5crAHR8FOl2FDsWxgKqNbzXZw7rl+Fa
+TobGycX7MDf2mbBmR/KmEkMBJ4mziWLAycSAGyE5VRYDwHPJlQE0143wBzT8eNw4VLm/r+88VYw=
+\
diff --git a/tests/repository/1/depend/stable/libfoo-1.0.0.tar.gz b/tests/pkg/1/build2.org/auth/libfoo-1.0.0.tar.gz
index 28a6a90..28a6a90 100644
--- a/tests/repository/1/depend/stable/libfoo-1.0.0.tar.gz
+++ b/tests/pkg/1/build2.org/auth/libfoo-1.0.0.tar.gz
Binary files differ
diff --git a/tests/repository/1/satisfy/t4c/libfoo-1.0.0.tar.gz b/tests/pkg/1/build2.org/auth/name-mismatch/libfoo-1.0.0.tar.gz
index 32e5a3c..32e5a3c 120000
--- a/tests/repository/1/satisfy/t4c/libfoo-1.0.0.tar.gz
+++ b/tests/pkg/1/build2.org/auth/name-mismatch/libfoo-1.0.0.tar.gz
diff --git a/tests/pkg/1/build2.org/auth/name-mismatch/repositories b/tests/pkg/1/build2.org/auth/name-mismatch/repositories
new file mode 100644
index 0000000..15fa092
--- /dev/null
+++ b/tests/pkg/1/build2.org/auth/name-mismatch/repositories
@@ -0,0 +1,34 @@
+: 1
+certificate: \
+-----BEGIN CERTIFICATE-----
+MIIFXTCCA0WgAwIBAgIJANXKeBuJax30MA0GCSqGSIb3DQEBCwUAMEoxFzAVBgNV
+BAoMDkNvZGUgU3ludGhlc2lzMS8wLQYDVQQDDCZuYW1lOmJ1aWxkMi5vcmcvYXV0
+aC9taXNtYXRjaGVkL25hbWUveDAeFw0xNjA1MDMyMzUyNDJaFw0xNzA1MDMyMzUy
+NDJaM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P7nwapm+tBcrZ3Q5MxareXXOSx1Ac
+4Dh9vDMRevDHZ5LQATHG+Q7zaKmBb0ZeSjJlP4+0680AKN4YDmY1a81uoa1jRXbV
+c4iutSoBaVNdWB5+GGelEjvhzN0gZ22IpS3mjbyCbJNywHQMHBLwtxuFgkdOfPkC
+MGBbvG5TD7SKgQNlfsoQu3UJpokzz7hP1TmjCpSDjGSqJlYvovrHCFQGWjtk0UVQ
+tXAQiVPlMsj2kbxJf2ICYYZuvQbmhvNF049ldrpk26jlDzSZ+5t2jueC+q8knTsn
+p3LPx7sqGfkIq41pxHAQseBSYUEo6r6LwfDQPmwb7fOUpLJm6GdsEkqqUhmB3W6Y
+H4t6PKCjFI91JqTka6oF3Lblf3QLXlMpevBwvgaZAC1d4eiNPq+mSAL6T2Cb8Hvq
+Imzyh6EcMbWD9RSnbDCujBjnj0WXO7VjUqShZ60D78PCdXbaK7RAOX9cLUYO/OHd
+z5vUbBrPvDImu5gJFRLOGKKw/7Yn9um/pyuSHuuucBkjBJ4J/tPi/MBZiWM7g2qc
+obzYoLev74dMkZMZDsGDAcuYX40ZVkF7ATqZC405/fSH
+-----END CERTIFICATE-----
+\
diff --git a/tests/pkg/1/build2.org/auth/sha256sum-mismatch/libfoo-1.0.0.tar.gz b/tests/pkg/1/build2.org/auth/sha256sum-mismatch/libfoo-1.0.0.tar.gz
new file mode 120000
index 0000000..32e5a3c
--- /dev/null
+++ b/tests/pkg/1/build2.org/auth/sha256sum-mismatch/libfoo-1.0.0.tar.gz
@@ -0,0 +1 @@
+../libfoo-1.0.0.tar.gz \ No newline at end of file
diff --git a/tests/pkg/1/build2.org/auth/sha256sum-mismatch/repositories b/tests/pkg/1/build2.org/auth/sha256sum-mismatch/repositories
new file mode 100644
index 0000000..9bcb20a
--- /dev/null
+++ b/tests/pkg/1/build2.org/auth/sha256sum-mismatch/repositories
@@ -0,0 +1,33 @@
+: 1
+certificate: \
+-----BEGIN CERTIFICATE-----
+MIIFLzCCAxegAwIBAgIJ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QTMBGBD2luZm9AYnVpbGQyLm9yZzANBgkqhkiG9w0BAQsFAAOC
+AgEAeBHkz12OPjjFPftCZ8u/9Kq+W0ZnqQqXmSLj5SQFiG5PEUSV19XFcGawwjbU
+6guceUSHhHQr/KhpV02pyoPPtskdognHQCPr6HCR6eeEtfBUSum5dKpJAWqGhszg
+bPCb11/ksBBzpBbc/C+gnU8ZvsglJ/wxrizZ0AYeSdvyWq8pgoh2vGpgdhK5MWhd
+rVGQm+TUVmXyQwNrYDjqhoGZF02UilIekedegWUEvkXnk5rzyzTaX+GwlnsplVY2
+Xijn8cWkO4cCDkthyjfNPgUm8ZgKuBgs+OYRbW4XtuXgeBucBVCryrM8+3OSmzbs
+IBQWL0EDT7bnt2ukE+cUx8Foc/+180KZAdDbUY9MOsYCac3bXnIJd/q1pzkr+OvL
+EXnuIGuzUqVkcD4+ABaWefNUm3KeZwBAupYc9eo2/YzpCUsgAe0PAdgJhcg9D4kX
+2RwwjVpOPWUxevrPq32Lo3R8obfl2aCLzcuiuheb1EcJLlAH67KqdXLDpvZqJ9qi
+iaBCixRl2t3our5VSBWQQefGnH6DWn1JM34zyBbeZdgjyqebSN42p+hADYe2qzdf
+AviHJsBwvt3HYpr3bfU6EDx1cU5D6gNAxzZMkZhnEQ7u6kXDcLyWJhgXcZhGT0xv
+D/x+fIGI1t2XkoOmvuno1MqoDQX3sCYd0bfB/9wwzcNexic=
+-----END CERTIFICATE-----
+\
diff --git a/tests/pkg/1/build2.org/auth/signature-mismatch/libfoo-1.0.0.tar.gz b/tests/pkg/1/build2.org/auth/signature-mismatch/libfoo-1.0.0.tar.gz
new file mode 120000
index 0000000..32e5a3c
--- /dev/null
+++ b/tests/pkg/1/build2.org/auth/signature-mismatch/libfoo-1.0.0.tar.gz
@@ -0,0 +1 @@
+../libfoo-1.0.0.tar.gz \ No newline at end of file
diff --git a/tests/pkg/1/build2.org/auth/signature-mismatch/repositories b/tests/pkg/1/build2.org/auth/signature-mismatch/repositories
new file mode 100644
index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P8P7SFGU5oIh5a2zUbbNZxC8Gef7MYD6xMi7TEAU
+4JECAwEAAaNGMEQwDgYDVR0PAQH/BAQDAgeAMBYGA1UdJQEB/wQMMAoGCCsGAQUF
+BwMDMBoGA1UdEQQTMBGBD2luZm9AYnVpbGQyLm9yZzANBgkqhkiG9w0BAQsFAAOC
+AgEAeBHkz12OPjjFPftCZ8u/9Kq+W0ZnqQqXmSLj5SQFiG5PEUSV19XFcGawwjbU
+6guceUSHhHQr/KhpV02pyoPPtskdognHQCPr6HCR6eeEtfBUSum5dKpJAWqGhszg
+bPCb11/ksBBzpBbc/C+gnU8ZvsglJ/wxrizZ0AYeSdvyWq8pgoh2vGpgdhK5MWhd
+rVGQm+TUVmXyQwNrYDjqhoGZF02UilIekedegWUEvkXnk5rzyzTaX+GwlnsplVY2
+Xijn8cWkO4cCDkthyjfNPgUm8ZgKuBgs+OYRbW4XtuXgeBucBVCryrM8+3OSmzbs
+IBQWL0EDT7bnt2ukE+cUx8Foc/+180KZAdDbUY9MOsYCac3bXnIJd/q1pzkr+OvL
+EXnuIGuzUqVkcD4+ABaWefNUm3KeZwBAupYc9eo2/YzpCUsgAe0PAdgJhcg9D4kX
+2RwwjVpOPWUxevrPq32Lo3R8obfl2aCLzcuiuheb1EcJLlAH67KqdXLDpvZqJ9qi
+iaBCixRl2t3our5VSBWQQefGnH6DWn1JM34zyBbeZdgjyqebSN42p+hADYe2qzdf
+AviHJsBwvt3HYpr3bfU6EDx1cU5D6gNAxzZMkZhnEQ7u6kXDcLyWJhgXcZhGT0xv
+D/x+fIGI1t2XkoOmvuno1MqoDQX3sCYd0bfB/9wwzcNexic=
+-----END CERTIFICATE-----
+\
diff --git a/tests/pkg/1/build2.org/auth/signed/libfoo-1.0.0.tar.gz b/tests/pkg/1/build2.org/auth/signed/libfoo-1.0.0.tar.gz
new file mode 120000
index 0000000..32e5a3c
--- /dev/null
+++ b/tests/pkg/1/build2.org/auth/signed/libfoo-1.0.0.tar.gz
@@ -0,0 +1 @@
+../libfoo-1.0.0.tar.gz \ No newline at end of file
diff --git a/tests/pkg/1/build2.org/auth/signed/repositories b/tests/pkg/1/build2.org/auth/signed/repositories
new file mode 100644
index 0000000..9bcb20a
--- /dev/null
+++ b/tests/pkg/1/build2.org/auth/signed/repositories
@@ -0,0 +1,33 @@
+: 1
+certificate: \
+-----BEGIN CERTIFICATE-----
+MIIFLzCCAxegAwIBAgIJAK41T2Si9cMEMA0GCSqGSIb3DQEBCwUAMDMxFzAVBgNV
+BAoTDkNvZGUgU3ludGhlc2lzMRgwFgYDVQQDEw9uYW1lOmJ1aWxkMi5vcmcwHhcN
+MTYwNDMwMTQyNDQ3WhcNMTcwNDMwMTQyNDQ3WjAzMRcwFQYDVQQKEw5Db2RlIFN5
+bnRoZXNpczEYMBYGA1UEAxMPbmFtZTpidWlsZDIub3JnMIICIjANBgkqhkiG9w0B
+AQEFAAOCAg8AMIICCgKCAgEA2rvxJe7MXMIygVTVGfMR4B/MTRRRgbKdLcXaUbu+
+IfdyjGMu34GsUG51WzhcNOmNdLX2FHEiiESAPvVbWOEO+ZQL3IIxbXc8IgiNEpNP
+PR58SFNwwd2E6C8pmyN7QhXuy+gpVdwbsN9RWXnXBY9A9JtSt+xBuxeDs/PkdoPH
+4O3aL2HB0TUzTPhHZ23BCSzMXIIqJfxEX2g9eKtPPkRMsLd/X0lRqkutjmXlnKXN
+CJ8uE8yUcuWtPSfsqSiEfvBpfcrJ4trQzYgiXfNp4Cy434SsVV5wB2Uki9fTRy2H
+Y478bHLT2wgqVqCLartkOKTawy8bx0C/uA1mxen4U6P9dcKI4j1/oPmiykl0r0Hl
+QIAGOYZzxbk52/pkt7LlSLvqW4jtyIhM4p8CgSRvIyI0eJHEt0ztoB6LN1zAdThu
+bomWaImTxTLJXzl/fea8JJ+6jsP4NBiIrrnT/HBF1MUEiqLfwjAwTraBPtqH8A6a
+I+yGPsWPAhTtlYeyTKv2qkTFA4QolegtkmjWt/oxFzwCwnLPrN19CFPUFPOGiA1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foo-1.0.0.tar.gz
new file mode 120000
index 0000000..32e5a3c
--- /dev/null
+++ b/tests/pkg/1/build2.org/auth/unsigned1/libfoo-1.0.0.tar.gz
@@ -0,0 +1 @@
+../libfoo-1.0.0.tar.gz \ No newline at end of file
diff --git a/tests/repository/1/depend/stable/repositories b/tests/pkg/1/build2.org/auth/unsigned1/repositories
index 5b70556..5b70556 100644
--- a/tests/repository/1/depend/stable/repositories
+++ b/tests/pkg/1/build2.org/auth/unsigned1/repositories
diff --git a/tests/pkg/1/build2.org/auth/unsigned2/libfoo-1.0.0.tar.gz b/tests/pkg/1/build2.org/auth/unsigned2/libfoo-1.0.0.tar.gz
new file mode 120000
index 0000000..32e5a3c
--- /dev/null
+++ b/tests/pkg/1/build2.org/auth/unsigned2/libfoo-1.0.0.tar.gz
@@ -0,0 +1 @@
+../libfoo-1.0.0.tar.gz \ No newline at end of file
diff --git a/tests/repository/1/fetch/repositories b/tests/pkg/1/build2.org/auth/unsigned2/repositories
index 5b70556..5b70556 100644
--- a/tests/repository/1/fetch/repositories
+++ b/tests/pkg/1/build2.org/auth/unsigned2/repositories
diff --git a/tests/repository/1/common/bar/stable/libbar-1.0.0.tar.gz b/tests/pkg/1/build2.org/common/bar/stable/libbar-1.0.0.tar.gz
index d77c1ba..d77c1ba 100644
--- a/tests/repository/1/common/bar/stable/libbar-1.0.0.tar.gz
+++ b/tests/pkg/1/build2.org/common/bar/stable/libbar-1.0.0.tar.gz
Binary files differ
diff --git a/tests/repository/1/common/bar/stable/repositories b/tests/pkg/1/build2.org/common/bar/stable/repositories
index b8ecc1f..b8ecc1f 100644
--- a/tests/repository/1/common/bar/stable/repositories
+++ b/tests/pkg/1/build2.org/common/bar/stable/repositories
diff --git a/tests/repository/1/common/bar/testing/libbar-1.1.0.tar.gz b/tests/pkg/1/build2.org/common/bar/testing/libbar-1.1.0.tar.gz
index f081804..f081804 100644
--- a/tests/repository/1/common/bar/testing/libbar-1.1.0.tar.gz
+++ b/tests/pkg/1/build2.org/common/bar/testing/libbar-1.1.0.tar.gz
Binary files differ
diff --git a/tests/repository/1/common/bar/testing/repositories b/tests/pkg/1/build2.org/common/bar/testing/repositories
index 5ab8cba..5ab8cba 100644
--- a/tests/repository/1/common/bar/testing/repositories
+++ b/tests/pkg/1/build2.org/common/bar/testing/repositories
diff --git a/tests/repository/1/common/bar/unstable/libbar-1.1.1.tar.gz b/tests/pkg/1/build2.org/common/bar/unstable/libbar-1.1.1.tar.gz
index a0fbdc3..a0fbdc3 100644
--- a/tests/repository/1/common/bar/unstable/libbar-1.1.1.tar.gz
+++ b/tests/pkg/1/build2.org/common/bar/unstable/libbar-1.1.1.tar.gz
Binary files differ
diff --git a/tests/repository/1/common/bar/unstable/repositories b/tests/pkg/1/build2.org/common/bar/unstable/repositories
index d4ddcf5..d4ddcf5 100644
--- a/tests/repository/1/common/bar/unstable/repositories
+++ b/tests/pkg/1/build2.org/common/bar/unstable/repositories
diff --git a/tests/repository/1/common/foo/stable/libfoo-1.0.0.tar.gz b/tests/pkg/1/build2.org/common/foo/stable/libfoo-1.0.0.tar.gz
index c29dd9d..c29dd9d 100644
--- a/tests/repository/1/common/foo/stable/libfoo-1.0.0.tar.gz
+++ b/tests/pkg/1/build2.org/common/foo/stable/libfoo-1.0.0.tar.gz
Binary files differ
diff --git a/tests/repository/1/common/foo/stable/repositories b/tests/pkg/1/build2.org/common/foo/stable/repositories
index 13673fb..13673fb 100644
--- a/tests/repository/1/common/foo/stable/repositories
+++ b/tests/pkg/1/build2.org/common/foo/stable/repositories
diff --git a/tests/repository/1/common/foo/testing/libfoo-1.1.0.tar.gz b/tests/pkg/1/build2.org/common/foo/testing/libfoo-1.1.0.tar.gz
index a6c0202..a6c0202 100644
--- a/tests/repository/1/common/foo/testing/libfoo-1.1.0.tar.gz
+++ b/tests/pkg/1/build2.org/common/foo/testing/libfoo-1.1.0.tar.gz
Binary files differ
diff --git a/tests/repository/1/common/foo/testing/repositories b/tests/pkg/1/build2.org/common/foo/testing/repositories
index cd33f88..cd33f88 100644
--- a/tests/repository/1/common/foo/testing/repositories
+++ b/tests/pkg/1/build2.org/common/foo/testing/repositories
diff --git a/tests/repository/1/common/hello/libhello-1.0.0+1.tar.gz b/tests/pkg/1/build2.org/common/hello/libhello-1.0.0+1.tar.gz
index eeff2a0..eeff2a0 100644
--- a/tests/repository/1/common/hello/libhello-1.0.0+1.tar.gz
+++ b/tests/pkg/1/build2.org/common/hello/libhello-1.0.0+1.tar.gz
Binary files differ
diff --git a/tests/pkg/1/build2.org/common/hello/repositories b/tests/pkg/1/build2.org/common/hello/repositories
new file mode 100644
index 0000000..bbe8a66
--- /dev/null
+++ b/tests/pkg/1/build2.org/common/hello/repositories
@@ -0,0 +1,36 @@
+# Hello World repository. Currently does not have any prerequisite
+# repositories.
+#
+: 1
+certificate: \
+-----BEGIN CERTIFICATE-----
+MIIFLzCCAxegAwIBAgIJAK41T2Si9cMEMA0GCSqGSIb3DQEBCwUAMDMxFzAVBgNV
+BAoTDkNvZGUgU3ludGhlc2lzMRgwFgYDVQQDEw9uYW1lOmJ1aWxkMi5vcmcwHhcN
+MTYwNDMwMTQyNDQ3WhcNMTcwNDMwMTQyNDQ3WjAzMRcwFQYDVQQKEw5Db2RlIFN5
+bnRoZXNpczEYMBYGA1UEAxMPbmFtZTpidWlsZDIub3JnMIICIjANBgkqhkiG9w0B
+AQEFAAOCAg8AMIICCgKCAgEA2rvxJe7MXMIygVTVGfMR4B/MTRRRgbKdLcXaUbu+
+IfdyjGMu34GsUG51WzhcNOmNdLX2FHEiiESAPvVbWOEO+ZQL3IIxbXc8IgiNEpNP
+PR58SFNwwd2E6C8pmyN7QhXuy+gpVdwbsN9RWXnXBY9A9JtSt+xBuxeDs/PkdoPH
+4O3aL2HB0TUzTPhHZ23BCSzMXIIqJfxEX2g9eKtPPkRMsLd/X0lRqkutjmXlnKXN
+CJ8uE8yUcuWtPSfsqSiEfvBpfcrJ4trQzYgiXfNp4Cy434SsVV5wB2Uki9fTRy2H
+Y478b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WQQefGnH6DWn1JM34zyBbeZdgjyqebSN42p+hADYe2qzdf
+AviHJsBwvt3HYpr3bfU6EDx1cU5D6gNAxzZMkZhnEQ7u6kXDcLyWJhgXcZhGT0xv
+D/x+fIGI1t2XkoOmvuno1MqoDQX3sCYd0bfB/9wwzcNexic=
+-----END CERTIFICATE-----
+\
diff --git a/tests/repository/1/common/libhello-1.0.0+1/build/bootstrap.build b/tests/pkg/1/build2.org/common/libhello-1.0.0+1/build/bootstrap.build
index c9bf24d..c9bf24d 100644
--- a/tests/repository/1/common/libhello-1.0.0+1/build/bootstrap.build
+++ b/tests/pkg/1/build2.org/common/libhello-1.0.0+1/build/bootstrap.build
diff --git a/tests/repository/1/common/libhello-1.0.0+1/build/export.build b/tests/pkg/1/build2.org/common/libhello-1.0.0+1/build/export.build
index 1eb73b7..1eb73b7 100644
--- a/tests/repository/1/common/libhello-1.0.0+1/build/export.build
+++ b/tests/pkg/1/build2.org/common/libhello-1.0.0+1/build/export.build
diff --git a/tests/repository/1/common/libhello-1.0.0+1/build/root.build b/tests/pkg/1/build2.org/common/libhello-1.0.0+1/build/root.build
index ebe16d5..ebe16d5 100644
--- a/tests/repository/1/common/libhello-1.0.0+1/build/root.build
+++ b/tests/pkg/1/build2.org/common/libhello-1.0.0+1/build/root.build
diff --git a/tests/repository/1/common/libhello-1.0.0+1/buildfile b/tests/pkg/1/build2.org/common/libhello-1.0.0+1/buildfile
index f846f89..f846f89 100644
--- a/tests/repository/1/common/libhello-1.0.0+1/buildfile
+++ b/tests/pkg/1/build2.org/common/libhello-1.0.0+1/buildfile
diff --git a/tests/repository/1/common/libhello-1.0.0+1/hello/buildfile b/tests/pkg/1/build2.org/common/libhello-1.0.0+1/hello/buildfile
index 4903a33..4903a33 100644
--- a/tests/repository/1/common/libhello-1.0.0+1/hello/buildfile
+++ b/tests/pkg/1/build2.org/common/libhello-1.0.0+1/hello/buildfile
diff --git a/tests/repository/1/common/libhello-1.0.0+1/hello/hello b/tests/pkg/1/build2.org/common/libhello-1.0.0+1/hello/hello
index 4f85114..4f85114 100644
--- a/tests/repository/1/common/libhello-1.0.0+1/hello/hello
+++ b/tests/pkg/1/build2.org/common/libhello-1.0.0+1/hello/hello
diff --git a/tests/repository/1/common/libhello-1.0.0+1/hello/hello.cxx b/tests/pkg/1/build2.org/common/libhello-1.0.0+1/hello/hello.cxx
index 65d0aa7..65d0aa7 100644
--- a/tests/repository/1/common/libhello-1.0.0+1/hello/hello.cxx
+++ b/tests/pkg/1/build2.org/common/libhello-1.0.0+1/hello/hello.cxx
diff --git a/tests/repository/1/common/libhello-1.0.0+1/manifest b/tests/pkg/1/build2.org/common/libhello-1.0.0+1/manifest
index 82d79c8..82d79c8 100644
--- a/tests/repository/1/common/libhello-1.0.0+1/manifest
+++ b/tests/pkg/1/build2.org/common/libhello-1.0.0+1/manifest
diff --git a/tests/repository/1/common/libhello-1.0.0+1/tests/build/bootstrap.build b/tests/pkg/1/build2.org/common/libhello-1.0.0+1/tests/build/bootstrap.build
index 2c2de24..2c2de24 100644
--- a/tests/repository/1/common/libhello-1.0.0+1/tests/build/bootstrap.build
+++ b/tests/pkg/1/build2.org/common/libhello-1.0.0+1/tests/build/bootstrap.build
diff --git a/tests/repository/1/common/libhello-1.0.0+1/tests/build/root.build b/tests/pkg/1/build2.org/common/libhello-1.0.0+1/tests/build/root.build
index 672eda8..672eda8 100644
--- a/tests/repository/1/common/libhello-1.0.0+1/tests/build/root.build
+++ b/tests/pkg/1/build2.org/common/libhello-1.0.0+1/tests/build/root.build
diff --git a/tests/repository/1/common/libhello-1.0.0+1/tests/buildfile b/tests/pkg/1/build2.org/common/libhello-1.0.0+1/tests/buildfile
index 4dcbe2a..4dcbe2a 100644
--- a/tests/repository/1/common/libhello-1.0.0+1/tests/buildfile
+++ b/tests/pkg/1/build2.org/common/libhello-1.0.0+1/tests/buildfile
diff --git a/tests/repository/1/common/libhello-1.0.0+1/tests/test/buildfile b/tests/pkg/1/build2.org/common/libhello-1.0.0+1/tests/test/buildfile
index a46969d..a46969d 100644
--- a/tests/repository/1/common/libhello-1.0.0+1/tests/test/buildfile
+++ b/tests/pkg/1/build2.org/common/libhello-1.0.0+1/tests/test/buildfile
diff --git a/tests/repository/1/common/libhello-1.0.0+1/tests/test/driver.cxx b/tests/pkg/1/build2.org/common/libhello-1.0.0+1/tests/test/driver.cxx
index 59bfb2d..59bfb2d 100644
--- a/tests/repository/1/common/libhello-1.0.0+1/tests/test/driver.cxx
+++ b/tests/pkg/1/build2.org/common/libhello-1.0.0+1/tests/test/driver.cxx
diff --git a/tests/repository/1/common/libhello-1.0.0+1/tests/test/test.out b/tests/pkg/1/build2.org/common/libhello-1.0.0+1/tests/test/test.out
index 8ab686e..8ab686e 100644
--- a/tests/repository/1/common/libhello-1.0.0+1/tests/test/test.out
+++ b/tests/pkg/1/build2.org/common/libhello-1.0.0+1/tests/test/test.out
diff --git a/tests/repository/1/common/libhello-1.0.0+1/version b/tests/pkg/1/build2.org/common/libhello-1.0.0+1/version
index 3eefcb9..3eefcb9 100644
--- a/tests/repository/1/common/libhello-1.0.0+1/version
+++ b/tests/pkg/1/build2.org/common/libhello-1.0.0+1/version
diff --git a/tests/repository/1/common/not-a-package.tar.gz b/tests/pkg/1/build2.org/common/not-a-package.tar.gz
index aa10905..aa10905 100644
--- a/tests/repository/1/common/not-a-package.tar.gz
+++ b/tests/pkg/1/build2.org/common/not-a-package.tar.gz
Binary files differ
diff --git a/tests/repository/1/depend/stable/libbar-1.0.0.tar.gz b/tests/pkg/1/build2.org/depend/stable/libbar-1.0.0.tar.gz
index 0ae6e26..0ae6e26 100644
--- a/tests/repository/1/depend/stable/libbar-1.0.0.tar.gz
+++ b/tests/pkg/1/build2.org/depend/stable/libbar-1.0.0.tar.gz
Binary files differ
diff --git a/tests/repository/1/depend/stable/libbar-1.1.0.tar.gz b/tests/pkg/1/build2.org/depend/stable/libbar-1.1.0.tar.gz
index 39dbdf4..39dbdf4 100644
--- a/tests/repository/1/depend/stable/libbar-1.1.0.tar.gz
+++ b/tests/pkg/1/build2.org/depend/stable/libbar-1.1.0.tar.gz
Binary files differ
diff --git a/tests/repository/1/depend/stable/libbar-1.2.0.tar.gz b/tests/pkg/1/build2.org/depend/stable/libbar-1.2.0.tar.gz
index 3a034ff..3a034ff 100644
--- a/tests/repository/1/depend/stable/libbar-1.2.0.tar.gz
+++ b/tests/pkg/1/build2.org/depend/stable/libbar-1.2.0.tar.gz
Binary files differ
diff --git a/tests/repository/1/depend/stable/libbar-1.3.0.tar.gz b/tests/pkg/1/build2.org/depend/stable/libbar-1.3.0.tar.gz
index 19d5a6f..19d5a6f 100644
--- a/tests/repository/1/depend/stable/libbar-1.3.0.tar.gz
+++ b/tests/pkg/1/build2.org/depend/stable/libbar-1.3.0.tar.gz
Binary files differ
diff --git a/tests/repository/1/fetch/libfoo-1.0.0.tar.gz b/tests/pkg/1/build2.org/depend/stable/libfoo-1.0.0.tar.gz
index 28a6a90..28a6a90 100644
--- a/tests/repository/1/fetch/libfoo-1.0.0.tar.gz
+++ b/tests/pkg/1/build2.org/depend/stable/libfoo-1.0.0.tar.gz
Binary files differ
diff --git a/tests/repository/1/depend/stable/libfoo-1.1.0.tar.gz b/tests/pkg/1/build2.org/depend/stable/libfoo-1.1.0.tar.gz
index e03481f..e03481f 100644
--- a/tests/repository/1/depend/stable/libfoo-1.1.0.tar.gz
+++ b/tests/pkg/1/build2.org/depend/stable/libfoo-1.1.0.tar.gz
Binary files differ
diff --git a/tests/repository/1/depend/stable/libfoo-1.2.0.tar.gz b/tests/pkg/1/build2.org/depend/stable/libfoo-1.2.0.tar.gz
index aad6906..aad6906 100644
--- a/tests/repository/1/depend/stable/libfoo-1.2.0.tar.gz
+++ b/tests/pkg/1/build2.org/depend/stable/libfoo-1.2.0.tar.gz
Binary files differ
diff --git a/tests/repository/1/satisfy/repositories b/tests/pkg/1/build2.org/depend/stable/repositories
index 5b70556..5b70556 100644
--- a/tests/repository/1/satisfy/repositories
+++ b/tests/pkg/1/build2.org/depend/stable/repositories
diff --git a/tests/repository/1/satisfy/libfoo-1.0.0.tar.gz b/tests/pkg/1/build2.org/fetch/libfoo-1.0.0.tar.gz
index 28a6a90..28a6a90 100644
--- a/tests/repository/1/satisfy/libfoo-1.0.0.tar.gz
+++ b/tests/pkg/1/build2.org/fetch/libfoo-1.0.0.tar.gz
Binary files differ
diff --git a/tests/repository/1/fetch/libfoo-1.1.0.tar.gz b/tests/pkg/1/build2.org/fetch/libfoo-1.1.0.tar.gz
index e03481f..e03481f 100644
--- a/tests/repository/1/fetch/libfoo-1.1.0.tar.gz
+++ b/tests/pkg/1/build2.org/fetch/libfoo-1.1.0.tar.gz
Binary files differ
diff --git a/tests/repository/1/fetch/libfoo-1.1.0/build/bootstrap.build b/tests/pkg/1/build2.org/fetch/libfoo-1.1.0/build/bootstrap.build
index 54f267e..54f267e 100644
--- a/tests/repository/1/fetch/libfoo-1.1.0/build/bootstrap.build
+++ b/tests/pkg/1/build2.org/fetch/libfoo-1.1.0/build/bootstrap.build
diff --git a/tests/repository/1/fetch/libfoo-1.1.0/buildfile b/tests/pkg/1/build2.org/fetch/libfoo-1.1.0/buildfile
index b3ec74f..b3ec74f 100644
--- a/tests/repository/1/fetch/libfoo-1.1.0/buildfile
+++ b/tests/pkg/1/build2.org/fetch/libfoo-1.1.0/buildfile
diff --git a/tests/repository/1/fetch/libfoo-1.1.0/manifest b/tests/pkg/1/build2.org/fetch/libfoo-1.1.0/manifest
index 3453757..3453757 100644
--- a/tests/repository/1/fetch/libfoo-1.1.0/manifest
+++ b/tests/pkg/1/build2.org/fetch/libfoo-1.1.0/manifest
diff --git a/tests/repository/1/status/stable/repositories b/tests/pkg/1/build2.org/fetch/repositories
index 5b70556..5b70556 100644
--- a/tests/repository/1/status/stable/repositories
+++ b/tests/pkg/1/build2.org/fetch/repositories
diff --git a/tests/pkg/1/build2.org/fetch/t1/libfoo-1.0.0.tar.gz b/tests/pkg/1/build2.org/fetch/t1/libfoo-1.0.0.tar.gz
new file mode 120000
index 0000000..32e5a3c
--- /dev/null
+++ b/tests/pkg/1/build2.org/fetch/t1/libfoo-1.0.0.tar.gz
@@ -0,0 +1 @@
+../libfoo-1.0.0.tar.gz \ No newline at end of file
diff --git a/tests/repository/1/fetch/t1/libfoo-1.1.0.tar.gz b/tests/pkg/1/build2.org/fetch/t1/libfoo-1.1.0.tar.gz
index c004b2a..c004b2a 120000
--- a/tests/repository/1/fetch/t1/libfoo-1.1.0.tar.gz
+++ b/tests/pkg/1/build2.org/fetch/t1/libfoo-1.1.0.tar.gz
diff --git a/tests/repository/1/fetch/t1/repositories b/tests/pkg/1/build2.org/fetch/t1/repositories
index d965b15..d965b15 120000
--- a/tests/repository/1/fetch/t1/repositories
+++ b/tests/pkg/1/build2.org/fetch/t1/repositories
diff --git a/tests/repository/1/satisfy/libbar-1.0.0.tar.gz b/tests/pkg/1/build2.org/satisfy/libbar-1.0.0.tar.gz
index 5dc3a9b..5dc3a9b 100644
--- a/tests/repository/1/satisfy/libbar-1.0.0.tar.gz
+++ b/tests/pkg/1/build2.org/satisfy/libbar-1.0.0.tar.gz
Binary files differ
diff --git a/tests/repository/1/satisfy/libbar-1.1.0.tar.gz b/tests/pkg/1/build2.org/satisfy/libbar-1.1.0.tar.gz
index 881292e..881292e 100644
--- a/tests/repository/1/satisfy/libbar-1.1.0.tar.gz
+++ b/tests/pkg/1/build2.org/satisfy/libbar-1.1.0.tar.gz
Binary files differ
diff --git a/tests/repository/1/satisfy/libbar-1.2.0.tar.gz b/tests/pkg/1/build2.org/satisfy/libbar-1.2.0.tar.gz
index 4572395..4572395 100644
--- a/tests/repository/1/satisfy/libbar-1.2.0.tar.gz
+++ b/tests/pkg/1/build2.org/satisfy/libbar-1.2.0.tar.gz
Binary files differ
diff --git a/tests/repository/1/satisfy/libbaz-1.0.0.tar.gz b/tests/pkg/1/build2.org/satisfy/libbaz-1.0.0.tar.gz
index 1de32b2..1de32b2 100644
--- a/tests/repository/1/satisfy/libbaz-1.0.0.tar.gz
+++ b/tests/pkg/1/build2.org/satisfy/libbaz-1.0.0.tar.gz
Binary files differ
diff --git a/tests/repository/1/satisfy/libbaz-1.1.0.tar.gz b/tests/pkg/1/build2.org/satisfy/libbaz-1.1.0.tar.gz
index 1aa72a8..1aa72a8 100644
--- a/tests/repository/1/satisfy/libbaz-1.1.0.tar.gz
+++ b/tests/pkg/1/build2.org/satisfy/libbaz-1.1.0.tar.gz
Binary files differ
diff --git a/tests/repository/1/satisfy/libbiz-1.0.0.tar.gz b/tests/pkg/1/build2.org/satisfy/libbiz-1.0.0.tar.gz
index 42e3db4..42e3db4 100644
--- a/tests/repository/1/satisfy/libbiz-1.0.0.tar.gz
+++ b/tests/pkg/1/build2.org/satisfy/libbiz-1.0.0.tar.gz
Binary files differ
diff --git a/tests/repository/1/satisfy/libfoo-0.0.0.tar.gz b/tests/pkg/1/build2.org/satisfy/libfoo-0.0.0.tar.gz
index befd2a4..befd2a4 100644
--- a/tests/repository/1/satisfy/libfoo-0.0.0.tar.gz
+++ b/tests/pkg/1/build2.org/satisfy/libfoo-0.0.0.tar.gz
Binary files differ
diff --git a/tests/pkg/1/build2.org/satisfy/libfoo-1.0.0.tar.gz b/tests/pkg/1/build2.org/satisfy/libfoo-1.0.0.tar.gz
new file mode 100644
index 0000000..28a6a90
--- /dev/null
+++ b/tests/pkg/1/build2.org/satisfy/libfoo-1.0.0.tar.gz
Binary files differ
diff --git a/tests/repository/1/satisfy/libfoo-1.1.0.tar.gz b/tests/pkg/1/build2.org/satisfy/libfoo-1.1.0.tar.gz
index e03481f..e03481f 100644
--- a/tests/repository/1/satisfy/libfoo-1.1.0.tar.gz
+++ b/tests/pkg/1/build2.org/satisfy/libfoo-1.1.0.tar.gz
Binary files differ
diff --git a/tests/repository/1/satisfy/libfoo-1.1.0/build/bootstrap.build b/tests/pkg/1/build2.org/satisfy/libfoo-1.1.0/build/bootstrap.build
index b24ee6a..b24ee6a 100644
--- a/tests/repository/1/satisfy/libfoo-1.1.0/build/bootstrap.build
+++ b/tests/pkg/1/build2.org/satisfy/libfoo-1.1.0/build/bootstrap.build
diff --git a/tests/repository/1/satisfy/libfoo-1.1.0/buildfile b/tests/pkg/1/build2.org/satisfy/libfoo-1.1.0/buildfile
index b3ec74f..b3ec74f 100644
--- a/tests/repository/1/satisfy/libfoo-1.1.0/buildfile
+++ b/tests/pkg/1/build2.org/satisfy/libfoo-1.1.0/buildfile
diff --git a/tests/repository/1/satisfy/libfoo-1.1.0/manifest b/tests/pkg/1/build2.org/satisfy/libfoo-1.1.0/manifest
index 3453757..3453757 100644
--- a/tests/repository/1/satisfy/libfoo-1.1.0/manifest
+++ b/tests/pkg/1/build2.org/satisfy/libfoo-1.1.0/manifest
diff --git a/tests/repository/1/satisfy/libfoo-1.2.0.tar.gz b/tests/pkg/1/build2.org/satisfy/libfoo-1.2.0.tar.gz
index 80ce03b..80ce03b 100644
--- a/tests/repository/1/satisfy/libfoo-1.2.0.tar.gz
+++ b/tests/pkg/1/build2.org/satisfy/libfoo-1.2.0.tar.gz
Binary files differ
diff --git a/tests/repository/1/satisfy/libfox-1.0.0.tar.gz b/tests/pkg/1/build2.org/satisfy/libfox-1.0.0.tar.gz
index 9ba7a31..9ba7a31 100644
--- a/tests/repository/1/satisfy/libfox-1.0.0.tar.gz
+++ b/tests/pkg/1/build2.org/satisfy/libfox-1.0.0.tar.gz
Binary files differ
diff --git a/tests/pkg/1/build2.org/satisfy/repositories b/tests/pkg/1/build2.org/satisfy/repositories
new file mode 100644
index 0000000..5b70556
--- /dev/null
+++ b/tests/pkg/1/build2.org/satisfy/repositories
@@ -0,0 +1 @@
+: 1
diff --git a/tests/pkg/1/build2.org/satisfy/t1/libfoo-1.0.0.tar.gz b/tests/pkg/1/build2.org/satisfy/t1/libfoo-1.0.0.tar.gz
new file mode 120000
index 0000000..32e5a3c
--- /dev/null
+++ b/tests/pkg/1/build2.org/satisfy/t1/libfoo-1.0.0.tar.gz
@@ -0,0 +1 @@
+../libfoo-1.0.0.tar.gz \ No newline at end of file
diff --git a/tests/repository/1/satisfy/t1/repositories b/tests/pkg/1/build2.org/satisfy/t1/repositories
index d965b15..d965b15 120000
--- a/tests/repository/1/satisfy/t1/repositories
+++ b/tests/pkg/1/build2.org/satisfy/t1/repositories
diff --git a/tests/repository/1/satisfy/t2/libbar-1.0.0.tar.gz b/tests/pkg/1/build2.org/satisfy/t2/libbar-1.0.0.tar.gz
index 93e8c71..93e8c71 120000
--- a/tests/repository/1/satisfy/t2/libbar-1.0.0.tar.gz
+++ b/tests/pkg/1/build2.org/satisfy/t2/libbar-1.0.0.tar.gz
diff --git a/tests/pkg/1/build2.org/satisfy/t2/libfoo-1.0.0.tar.gz b/tests/pkg/1/build2.org/satisfy/t2/libfoo-1.0.0.tar.gz
new file mode 120000
index 0000000..32e5a3c
--- /dev/null
+++ b/tests/pkg/1/build2.org/satisfy/t2/libfoo-1.0.0.tar.gz
@@ -0,0 +1 @@
+../libfoo-1.0.0.tar.gz \ No newline at end of file
diff --git a/tests/repository/1/satisfy/t2/repositories b/tests/pkg/1/build2.org/satisfy/t2/repositories
index d965b15..d965b15 120000
--- a/tests/repository/1/satisfy/t2/repositories
+++ b/tests/pkg/1/build2.org/satisfy/t2/repositories
diff --git a/tests/repository/1/satisfy/t3/libbaz-1.0.0.tar.gz b/tests/pkg/1/build2.org/satisfy/t3/libbaz-1.0.0.tar.gz
index 189242a..189242a 120000
--- a/tests/repository/1/satisfy/t3/libbaz-1.0.0.tar.gz
+++ b/tests/pkg/1/build2.org/satisfy/t3/libbaz-1.0.0.tar.gz
diff --git a/tests/repository/1/satisfy/t3/libfox-1.0.0.tar.gz b/tests/pkg/1/build2.org/satisfy/t3/libfox-1.0.0.tar.gz
index dcfd7aa..dcfd7aa 120000
--- a/tests/repository/1/satisfy/t3/libfox-1.0.0.tar.gz
+++ b/tests/pkg/1/build2.org/satisfy/t3/libfox-1.0.0.tar.gz
diff --git a/tests/repository/1/satisfy/t3/repositories b/tests/pkg/1/build2.org/satisfy/t3/repositories
index d65b272..d65b272 100644
--- a/tests/repository/1/satisfy/t3/repositories
+++ b/tests/pkg/1/build2.org/satisfy/t3/repositories
diff --git a/tests/repository/1/satisfy/t4a/libfoo-1.1.0.tar.gz b/tests/pkg/1/build2.org/satisfy/t4a/libfoo-1.1.0.tar.gz
index c004b2a..c004b2a 120000
--- a/tests/repository/1/satisfy/t4a/libfoo-1.1.0.tar.gz
+++ b/tests/pkg/1/build2.org/satisfy/t4a/libfoo-1.1.0.tar.gz
diff --git a/tests/repository/1/satisfy/t4a/repositories b/tests/pkg/1/build2.org/satisfy/t4a/repositories
index d965b15..d965b15 120000
--- a/tests/repository/1/satisfy/t4a/repositories
+++ b/tests/pkg/1/build2.org/satisfy/t4a/repositories
diff --git a/tests/repository/1/satisfy/t4b/libbar-1.1.0.tar.gz b/tests/pkg/1/build2.org/satisfy/t4b/libbar-1.1.0.tar.gz
index b9a2de5..b9a2de5 120000
--- a/tests/repository/1/satisfy/t4b/libbar-1.1.0.tar.gz
+++ b/tests/pkg/1/build2.org/satisfy/t4b/libbar-1.1.0.tar.gz
diff --git a/tests/repository/1/satisfy/t4b/repositories b/tests/pkg/1/build2.org/satisfy/t4b/repositories
index 7b85e71..7b85e71 100644
--- a/tests/repository/1/satisfy/t4b/repositories
+++ b/tests/pkg/1/build2.org/satisfy/t4b/repositories
diff --git a/tests/repository/1/satisfy/t4c/libbaz-1.1.0.tar.gz b/tests/pkg/1/build2.org/satisfy/t4c/libbaz-1.1.0.tar.gz
index 0edbce7..0edbce7 120000
--- a/tests/repository/1/satisfy/t4c/libbaz-1.1.0.tar.gz
+++ b/tests/pkg/1/build2.org/satisfy/t4c/libbaz-1.1.0.tar.gz
diff --git a/tests/pkg/1/build2.org/satisfy/t4c/libfoo-1.0.0.tar.gz b/tests/pkg/1/build2.org/satisfy/t4c/libfoo-1.0.0.tar.gz
new file mode 120000
index 0000000..32e5a3c
--- /dev/null
+++ b/tests/pkg/1/build2.org/satisfy/t4c/libfoo-1.0.0.tar.gz
@@ -0,0 +1 @@
+../libfoo-1.0.0.tar.gz \ No newline at end of file
diff --git a/tests/repository/1/satisfy/t4c/repositories b/tests/pkg/1/build2.org/satisfy/t4c/repositories
index 26c0e93..26c0e93 100644
--- a/tests/repository/1/satisfy/t4c/repositories
+++ b/tests/pkg/1/build2.org/satisfy/t4c/repositories
diff --git a/tests/repository/1/satisfy/t4d/libbiz-1.0.0.tar.gz b/tests/pkg/1/build2.org/satisfy/t4d/libbiz-1.0.0.tar.gz
index 70c2fda..70c2fda 120000
--- a/tests/repository/1/satisfy/t4d/libbiz-1.0.0.tar.gz
+++ b/tests/pkg/1/build2.org/satisfy/t4d/libbiz-1.0.0.tar.gz
diff --git a/tests/repository/1/satisfy/t4d/libfox-1.0.0.tar.gz b/tests/pkg/1/build2.org/satisfy/t4d/libfox-1.0.0.tar.gz
index dcfd7aa..dcfd7aa 120000
--- a/tests/repository/1/satisfy/t4d/libfox-1.0.0.tar.gz
+++ b/tests/pkg/1/build2.org/satisfy/t4d/libfox-1.0.0.tar.gz
diff --git a/tests/repository/1/satisfy/t4d/repositories b/tests/pkg/1/build2.org/satisfy/t4d/repositories
index f0e1983..f0e1983 100644
--- a/tests/repository/1/satisfy/t4d/repositories
+++ b/tests/pkg/1/build2.org/satisfy/t4d/repositories
diff --git a/tests/repository/1/satisfy/t5/libbar-1.2.0.tar.gz b/tests/pkg/1/build2.org/satisfy/t5/libbar-1.2.0.tar.gz
index b4a7773..b4a7773 120000
--- a/tests/repository/1/satisfy/t5/libbar-1.2.0.tar.gz
+++ b/tests/pkg/1/build2.org/satisfy/t5/libbar-1.2.0.tar.gz
diff --git a/tests/repository/1/satisfy/t5/repositories b/tests/pkg/1/build2.org/satisfy/t5/repositories
index d965b15..d965b15 120000
--- a/tests/repository/1/satisfy/t5/repositories
+++ b/tests/pkg/1/build2.org/satisfy/t5/repositories
diff --git a/tests/repository/1/status/extra/libbar-1.1.0+1.tar.gz b/tests/pkg/1/build2.org/status/extra/libbar-1.1.0+1.tar.gz
index 890e9e2..890e9e2 100644
--- a/tests/repository/1/status/extra/libbar-1.1.0+1.tar.gz
+++ b/tests/pkg/1/build2.org/status/extra/libbar-1.1.0+1.tar.gz
Binary files differ
diff --git a/tests/repository/1/status/extra/repositories b/tests/pkg/1/build2.org/status/extra/repositories
index ecaa454..ecaa454 100644
--- a/tests/repository/1/status/extra/repositories
+++ b/tests/pkg/1/build2.org/status/extra/repositories
diff --git a/tests/repository/1/status/stable/libbar-1.0.0.tar.gz b/tests/pkg/1/build2.org/status/stable/libbar-1.0.0.tar.gz
index 97e6e32..97e6e32 100644
--- a/tests/repository/1/status/stable/libbar-1.0.0.tar.gz
+++ b/tests/pkg/1/build2.org/status/stable/libbar-1.0.0.tar.gz
Binary files differ
diff --git a/tests/repository/1/status/stable/libfoo-1.0.0.tar.gz b/tests/pkg/1/build2.org/status/stable/libfoo-1.0.0.tar.gz
index 5e7fa17..5e7fa17 100644
--- a/tests/repository/1/status/stable/libfoo-1.0.0.tar.gz
+++ b/tests/pkg/1/build2.org/status/stable/libfoo-1.0.0.tar.gz
Binary files differ
diff --git a/tests/pkg/1/build2.org/status/stable/repositories b/tests/pkg/1/build2.org/status/stable/repositories
new file mode 100644
index 0000000..5b70556
--- /dev/null
+++ b/tests/pkg/1/build2.org/status/stable/repositories
@@ -0,0 +1 @@
+: 1
diff --git a/tests/repository/1/status/testing/libbar-1.0.0+1.tar.gz b/tests/pkg/1/build2.org/status/testing/libbar-1.0.0+1.tar.gz
index 5794085..5794085 100644
--- a/tests/repository/1/status/testing/libbar-1.0.0+1.tar.gz
+++ b/tests/pkg/1/build2.org/status/testing/libbar-1.0.0+1.tar.gz
Binary files differ
diff --git a/tests/repository/1/status/testing/libbar-1.1.0.tar.gz b/tests/pkg/1/build2.org/status/testing/libbar-1.1.0.tar.gz
index b01ac44..b01ac44 100644
--- a/tests/repository/1/status/testing/libbar-1.1.0.tar.gz
+++ b/tests/pkg/1/build2.org/status/testing/libbar-1.1.0.tar.gz
Binary files differ
diff --git a/tests/repository/1/status/testing/repositories b/tests/pkg/1/build2.org/status/testing/repositories
index 7bd7269..7bd7269 100644
--- a/tests/repository/1/status/testing/repositories
+++ b/tests/pkg/1/build2.org/status/testing/repositories
diff --git a/tests/repository/1/status/unstable/libbar-2.0.0.tar.gz b/tests/pkg/1/build2.org/status/unstable/libbar-2.0.0.tar.gz
index 6cc5890..6cc5890 100644
--- a/tests/repository/1/status/unstable/libbar-2.0.0.tar.gz
+++ b/tests/pkg/1/build2.org/status/unstable/libbar-2.0.0.tar.gz
Binary files differ
diff --git a/tests/repository/1/status/unstable/repositories b/tests/pkg/1/build2.org/status/unstable/repositories
index 8f4a5f6..8f4a5f6 100644
--- a/tests/repository/1/status/unstable/repositories
+++ b/tests/pkg/1/build2.org/status/unstable/repositories
diff --git a/tests/repository/publish b/tests/pkg/publish
index 5d3d0f1..00453cc 100755
--- a/tests/repository/publish
+++ b/tests/pkg/publish
@@ -12,5 +12,6 @@ rsync -v -rlpt --copy-unsafe-links \
--include '*.tar.gz' \
--include 'packages' \
--include 'repositories' \
+--include 'signature' \
--exclude '*' \
-1/ build2.org:/var/bpkg/1/tests/
+1/build2.org/ build2.org:/var/pkg/1/
diff --git a/tests/repository/.gitignore b/tests/repository/.gitignore
deleted file mode 100644
index f9ced93..0000000
--- a/tests/repository/.gitignore
+++ /dev/null
@@ -1 +0,0 @@
-packages
diff --git a/tests/repository/1/common/hello/repositories b/tests/repository/1/common/hello/repositories
deleted file mode 100644
index eb30fe1..0000000
--- a/tests/repository/1/common/hello/repositories
+++ /dev/null
@@ -1,4 +0,0 @@
-# Hello World repository. Currently does not have any prerequisite
-# repositories.
-#
-: 1
diff --git a/tests/test.sh b/tests/test.sh
index 0cdcd4f..84ad8be 100755
--- a/tests/test.sh
+++ b/tests/test.sh
@@ -13,7 +13,7 @@
# --remote
# Test using the remote repositories. Normally, you would first run the
# local test in order to create the repositories, then publish them (see
-# repository/publish.sh), and finally run the remote test.
+# pkg/publish.sh), and finally run the remote test.
#
# --valgrind
# Run under valgrind (takes forever).
@@ -79,15 +79,18 @@ fi
bpkg="$bpkg $options"
-# Repository location, name, and absolute location prefixes.
+# Repository location, name, and absolute location prefixes. Note that the
+# local path is carefully crafted so that we end up with the same repository
+# names in both cases. This is necessary for the authentication tests to work
+# in both cases.
#
if [ "$remote" = "y" ]; then
- rep=https://build2.org/pkg/1/tests
- repn=build2.org/tests/
+ rep=https://build2.org/bpkg/1
+ repn=build2.org/
repa=$rep
else
- rep=repository/1
- repn=`pwd`/repository/
+ rep=pkg/1/build2.org
+ repn=build2.org/
repa=`pwd`/$rep
fi
@@ -104,6 +107,11 @@ function test ()
ops="-d $cfg"
fi
+ if [ "$cmd" = "cfg-fetch" -o \
+ "$cmd" = "rep-info" ]; then
+ ops="$ops --auth all"
+ fi
+
if [ -t 0 ]; then
$bpkg $cmd $ops $*
else
@@ -129,6 +137,11 @@ function fail ()
ops="-d $cfg"
fi
+ if [ "$cmd" = "cfg-fetch" -o \
+ "$cmd" = "rep-info" ]; then
+ ops="$ops --auth all"
+ fi
+
if [ "$verbose" = "y" ]; then
$bpkg $cmd $ops $*
else
@@ -164,6 +177,24 @@ function gone ()
#if false; then
+# Repository certificate fingerprint.
+#
+function rep_cert_fp ()
+{
+ cat $1/repositories | \
+ sed -n '/^-----BEGIN CERTIFICATE-----$/,/^-----END CERTIFICATE-----$/p' | \
+ openssl x509 -sha256 -noout -fingerprint | \
+ sed -n 's/^SHA256 Fingerprint=\(.*\)$/\1/p'
+}
+
+# Edit file with sed.
+#
+function edit ()
+{
+ local path=$1; shift
+ sed "$@" $path > $path.bak
+ mv $path.bak $path
+}
##
## Low-level commands.
@@ -175,25 +206,25 @@ function gone ()
##
fail pkg-verify # archive expected
fail pkg-verify ./no-such-file # archive does not exist
-fail pkg-verify repository/1/common/not-a-package.tar.gz
-fail pkg-verify --silent repository/1/common/not-a-package.tar.gz
-test pkg-verify repository/1/common/hello/libhello-1.0.0+1.tar.gz
+fail pkg-verify pkg/1/build2.org/common/not-a-package.tar.gz
+fail pkg-verify --silent pkg/1/build2.org/common/not-a-package.tar.gz
+test pkg-verify pkg/1/build2.org/common/hello/libhello-1.0.0+1.tar.gz
##
## rep-create
##
-fail rep-create # no 'repositories' file
-fail rep-create repository/1/satisfy # unexpected files
+fail rep-create # no 'repositories' file
+fail rep-create pkg/1/build2.org/satisfy # unexpected files
-test rep-create repository/1/common/hello
+test rep-create pkg/1/build2.org/common/hello --key key.pem
-test rep-create repository/1/common/foo/stable
-test rep-create repository/1/common/foo/testing
+test rep-create pkg/1/build2.org/common/foo/stable
+test rep-create pkg/1/build2.org/common/foo/testing
-test rep-create repository/1/common/bar/stable
-test rep-create repository/1/common/bar/testing
-test rep-create repository/1/common/bar/unstable
+test rep-create pkg/1/build2.org/common/bar/stable
+test rep-create pkg/1/build2.org/common/bar/testing
+test rep-create pkg/1/build2.org/common/bar/unstable
##
@@ -201,13 +232,13 @@ test rep-create repository/1/common/bar/unstable
##
fail rep-info # repository location expected
-test rep-info $rep/common/foo/testing <<EOF
+test rep-info --trust-yes $rep/common/foo/testing <<EOF
${repn}common/foo/testing $repa/common/foo/testing
complement ${repn}common/foo/stable $repa/common/foo/stable
libfoo 1.1.0
EOF
-test rep-info -m -r -n $rep/common/bar/unstable <<EOF
+test rep-info -m -r -n --trust-yes $rep/common/bar/unstable <<EOF
${repn}common/bar/unstable $repa/common/bar/unstable
: 1
location: ../../foo/testing
@@ -217,7 +248,7 @@ role: complement
:
EOF
-test rep-info -m -p $rep/common/bar/unstable <<EOF
+test rep-info -m -p --trust-yes $rep/common/bar/unstable <<EOF
: 1
sha256sum: 3034b727288efbb52b7b6e41fe147b815e7b3aa704e8cef6c2ee8d7421ab5b72
:
@@ -290,16 +321,17 @@ fail cfg-fetch # no repositories
# hello repository
#
+hello_fp=`rep_cert_fp pkg/1/build2.org/common/hello`
test cfg-create --wipe
test cfg-add $rep/common/hello
-test cfg-fetch
+test cfg-fetch --trust $hello_fp
test cfg-fetch
# bar/unstable repository
#
test cfg-create --wipe
test cfg-add $rep/common/bar/unstable
-test cfg-fetch
+test cfg-fetch --trust-yes
test cfg-fetch
# both
@@ -307,14 +339,14 @@ test cfg-fetch
test cfg-create --wipe
test cfg-add $rep/common/hello
test cfg-add $rep/common/bar/unstable
-test cfg-fetch
+test cfg-fetch --trust-yes
test cfg-fetch
##
## pkg-fetch
##
-test rep-create repository/1/fetch/t1
+test rep-create pkg/1/build2.org/fetch/t1
test cfg-create --wipe
fail pkg-fetch -e # archive expected
@@ -327,28 +359,28 @@ fail pkg-fetch libfoo/1/2/3 # invalid package version
fail pkg-fetch libfoo/1.0.0 # no repositories
test cfg-add $rep/fetch/t1
fail pkg-fetch libfoo/1.0.0 # no packages
-test cfg-fetch
+test cfg-fetch --trust-yes
fail pkg-fetch libfoo/2+1.0.0 # not available
test cfg-create --wipe
test cfg-add $rep/fetch/t1
-test cfg-fetch
+test cfg-fetch --trust-yes
test pkg-fetch libfoo/1.0.0
stat libfoo/1.0.0 fetched
fail pkg-fetch libfoo/1.0.0
-fail pkg-fetch -e repository/1/fetch/libfoo-1.0.0.tar.gz
+fail pkg-fetch -e pkg/1/build2.org/fetch/libfoo-1.0.0.tar.gz
test pkg-purge libfoo
-test pkg-fetch -e repository/1/fetch/libfoo-1.0.0.tar.gz
+test pkg-fetch -e pkg/1/build2.org/fetch/libfoo-1.0.0.tar.gz
stat libfoo/1.0.0 fetched
test pkg-unpack libfoo
test pkg-fetch -r libfoo/1.1.0
stat libfoo/1.1.0 fetched
test pkg-unpack libfoo
-test pkg-fetch -r -e repository/1/fetch/libfoo-1.0.0.tar.gz
+test pkg-fetch -r -e pkg/1/build2.org/fetch/libfoo-1.0.0.tar.gz
stat libfoo/1.0.0 fetched
test pkg-fetch -r libfoo/1.1.0
stat libfoo/1.1.0 fetched
-test pkg-fetch -r -e repository/1/fetch/libfoo-1.0.0.tar.gz
+test pkg-fetch -r -e pkg/1/build2.org/fetch/libfoo-1.0.0.tar.gz
stat libfoo/1.0.0 fetched
test pkg-purge libfoo
@@ -356,7 +388,7 @@ test pkg-purge libfoo
#
test cfg-create --wipe
test cfg-add $rep/common/hello
-test cfg-fetch
+test cfg-fetch --trust $hello_fp
test pkg-fetch libhello/1.0.0+1
test pkg-purge libhello
@@ -370,37 +402,37 @@ fail pkg-unpack -e # package directory expected
fail pkg-unpack # package name expected
test cfg-add $rep/fetch/t1
-test cfg-fetch
+test cfg-fetch --trust-yes
# existing
#
fail pkg-unpack -e ./no-such-dir # package directory does not exist
-fail pkg-unpack -e ./repository # not a package directory
+fail pkg-unpack -e ./pkg # not a package directory
test pkg-fetch libfoo/1.0.0
-fail pkg-unpack -e repository/1/fetch/libfoo-1.1.0 # already exists
+fail pkg-unpack -e pkg/1/build2.org/fetch/libfoo-1.1.0 # already exists
test pkg-purge libfoo
-test pkg-unpack -e repository/1/fetch/libfoo-1.1.0
+test pkg-unpack -e pkg/1/build2.org/fetch/libfoo-1.1.0
stat libfoo/1.1.0 unpacked
test pkg-purge libfoo
# existing & replace
#
test pkg-fetch libfoo/1.0.0
-fail pkg-unpack -e repository/1/fetch/libfoo-1.1.0
-test pkg-unpack -r -e repository/1/fetch/libfoo-1.1.0
+fail pkg-unpack -e pkg/1/build2.org/fetch/libfoo-1.1.0
+test pkg-unpack -r -e pkg/1/build2.org/fetch/libfoo-1.1.0
stat libfoo/1.1.0 unpacked
test pkg-purge libfoo
test pkg-fetch libfoo/1.0.0
test pkg-unpack libfoo
-fail pkg-unpack -e repository/1/fetch/libfoo-1.1.0
-test pkg-unpack -r -e repository/1/fetch/libfoo-1.1.0
+fail pkg-unpack -e pkg/1/build2.org/fetch/libfoo-1.1.0
+test pkg-unpack -r -e pkg/1/build2.org/fetch/libfoo-1.1.0
stat libfoo/1.1.0 unpacked
test pkg-purge libfoo
# package name
#
fail pkg-unpack libfoo # no such package in configuration
-test pkg-unpack -e repository/1/fetch/libfoo-1.1.0
+test pkg-unpack -e pkg/1/build2.org/fetch/libfoo-1.1.0
fail pkg-unpack libfoo # wrong package state
test pkg-purge libfoo
test pkg-fetch libfoo/1.0.0
@@ -413,7 +445,7 @@ test pkg-purge libfoo
#
test cfg-create --wipe
test cfg-add $rep/common/hello
-test cfg-fetch
+test cfg-fetch --trust $hello_fp
test pkg-fetch libhello/1.0.0+1
test pkg-unpack libhello
test pkg-purge libhello
@@ -429,20 +461,20 @@ fail pkg-purge libfoo # no such package
# purge fetched
#
-test pkg-fetch -e repository/1/fetch/libfoo-1.0.0.tar.gz
+test pkg-fetch -e pkg/1/build2.org/fetch/libfoo-1.0.0.tar.gz
test pkg-purge libfoo
stat libfoo unknown
# --keep
#
-test pkg-fetch -e repository/1/fetch/libfoo-1.0.0.tar.gz
+test pkg-fetch -e pkg/1/build2.org/fetch/libfoo-1.0.0.tar.gz
test pkg-purge -k libfoo
stat libfoo "fetched 1.0.0"
test pkg-purge libfoo
# archive and --purge
#
-cp repository/1/fetch/libfoo-1.0.0.tar.gz $cfg/
+cp pkg/1/build2.org/fetch/libfoo-1.0.0.tar.gz $cfg/
test pkg-fetch -e -p $cfg/libfoo-1.0.0.tar.gz
test pkg-purge libfoo
stat libfoo unknown
@@ -450,20 +482,20 @@ gone $cfg/libfoo-1.0.0.tar.gz
# no archive but --keep
#
-test pkg-unpack -e repository/1/fetch/libfoo-1.1.0
+test pkg-unpack -e pkg/1/build2.org/fetch/libfoo-1.1.0
fail pkg-purge --keep libfoo
stat libfoo "unpacked 1.1.0"
test pkg-purge libfoo
# purge unpacked directory
#
-test pkg-unpack -e repository/1/fetch/libfoo-1.1.0
+test pkg-unpack -e pkg/1/build2.org/fetch/libfoo-1.1.0
test pkg-purge libfoo
stat libfoo unknown
# purge unpacked archive
#
-test pkg-fetch -e repository/1/fetch/libfoo-1.0.0.tar.gz
+test pkg-fetch -e pkg/1/build2.org/fetch/libfoo-1.0.0.tar.gz
test pkg-unpack libfoo
test pkg-purge libfoo
stat libfoo unknown
@@ -471,7 +503,7 @@ gone $cfg/libfoo-1.0.0
# purge unpacked archive but --keep
#
-test pkg-fetch -e repository/1/fetch/libfoo-1.0.0.tar.gz
+test pkg-fetch -e pkg/1/build2.org/fetch/libfoo-1.0.0.tar.gz
test pkg-unpack libfoo
test pkg-purge --keep libfoo
stat libfoo "fetched 1.0.0"
@@ -481,7 +513,7 @@ stat libfoo unknown
# directory and --purge
#
-cp -r repository/1/fetch/libfoo-1.1.0 $cfg/
+cp -r pkg/1/build2.org/fetch/libfoo-1.1.0 $cfg/
test pkg-unpack -e -p $cfg/libfoo-1.1.0
test pkg-purge libfoo
stat libfoo unknown
@@ -489,7 +521,7 @@ gone $cfg/libfoo-1.1.0
# archive and --purge
#
-cp repository/1/fetch/libfoo-1.0.0.tar.gz $cfg/
+cp pkg/1/build2.org/fetch/libfoo-1.0.0.tar.gz $cfg/
test pkg-fetch -e -p $cfg/libfoo-1.0.0.tar.gz
test pkg-unpack libfoo
test pkg-purge libfoo
@@ -499,7 +531,7 @@ gone $cfg/libfoo-1.0.0.tar.gz
# broken
#
-cp repository/1/fetch/libfoo-1.0.0.tar.gz $cfg/
+cp pkg/1/build2.org/fetch/libfoo-1.0.0.tar.gz $cfg/
test pkg-fetch -e -p $cfg/libfoo-1.0.0.tar.gz
test pkg-unpack libfoo
chmod 000 $cfg/libfoo-1.0.0
@@ -521,7 +553,7 @@ stat libfoo unknown
##
test cfg-create --wipe
test cfg-add $rep/common/hello
-test cfg-fetch
+test cfg-fetch --trust $hello_fp
fail pkg-configure # package name expected
fail pkg-configure config.dist.root=/tmp # ditto
@@ -552,7 +584,7 @@ stat libhello/1.0.0 "available 1.0.0+1"
# src != out
#
test cfg-create --wipe
-test pkg-unpack -e repository/1/common/libhello-1.0.0+1
+test pkg-unpack -e pkg/1/build2.org/common/libhello-1.0.0+1
test pkg-configure libhello
stat libhello "configured 1.0.0+1"
test pkg-disfigure libhello
@@ -563,7 +595,7 @@ gone $cfg/libhello-1.0.0+1
# out still exists after disfigure
#
-test pkg-unpack -e repository/1/common/libhello-1.0.0+1
+test pkg-unpack -e pkg/1/build2.org/common/libhello-1.0.0+1
test pkg-configure libhello
touch $cfg/libhello-1.0.0+1/stray
fail pkg-disfigure libhello
@@ -574,7 +606,7 @@ stat libhello unknown
# disfigure failed
#
-test pkg-unpack -e repository/1/common/libhello-1.0.0+1
+test pkg-unpack -e pkg/1/build2.org/common/libhello-1.0.0+1
test pkg-configure libhello
chmod 555 $cfg/libhello-1.0.0+1
fail pkg-disfigure libhello
@@ -586,7 +618,7 @@ stat libhello unknown
# configure failed but disfigure succeeds
#
-test pkg-unpack -e repository/1/common/libhello-1.0.0+1
+test pkg-unpack -e pkg/1/build2.org/common/libhello-1.0.0+1
mkdir -p $cfg/libhello-1.0.0+1/build
chmod 555 $cfg/libhello-1.0.0+1/build
fail pkg-configure libhello
@@ -596,7 +628,7 @@ stat libhello unknown
# configure and disfigure both failed
#
-test pkg-unpack -e repository/1/common/libhello-1.0.0+1
+test pkg-unpack -e pkg/1/build2.org/common/libhello-1.0.0+1
mkdir -p $cfg/libhello-1.0.0+1/build
chmod 555 $cfg/libhello-1.0.0+1 $cfg/libhello-1.0.0+1/build # Trip both con/dis.
fail pkg-configure libhello
@@ -608,10 +640,10 @@ stat libhello unknown
# dependency management
#
-test rep-create repository/1/depend/stable
+test rep-create pkg/1/build2.org/depend/stable
test cfg-create --wipe
test cfg-add $rep/depend/stable
-test cfg-fetch
+test cfg-fetch --trust-yes
test pkg-fetch libbar/1.0.0
test pkg-unpack libbar
@@ -677,10 +709,10 @@ test pkg-purge libbar
##
## pkg-status (also tested in pkg-{fetch,unpack,configure,disfigure,purge})
##
-test rep-create repository/1/status/stable
-test rep-create repository/1/status/extra
-test rep-create repository/1/status/testing
-test rep-create repository/1/status/unstable
+test rep-create pkg/1/build2.org/status/stable
+test rep-create pkg/1/build2.org/status/extra
+test rep-create pkg/1/build2.org/status/testing
+test rep-create pkg/1/build2.org/status/unstable
# basics
#
@@ -688,7 +720,7 @@ test cfg-create --wipe
stat libfoo/1.0.0 "unknown"
stat libfoo "unknown"
test cfg-add $rep/status/stable
-test cfg-fetch
+test cfg-fetch --trust-yes
stat libfoo/1.0.0 "available"
stat libfoo "available 1.0.0"
test pkg-fetch libfoo/1.0.0
@@ -699,20 +731,20 @@ stat libfoo "fetched 1.0.0"
#
test cfg-create --wipe
test cfg-add $rep/status/extra
-test cfg-fetch
+test cfg-fetch --trust-yes
stat libbar "available 1.1.0+1"
test cfg-add $rep/status/stable
-test cfg-fetch
+test cfg-fetch --trust-yes
stat libbar "available 1.1.0+1 1.0.0"
test cfg-create --wipe
test cfg-add $rep/status/testing
-test cfg-fetch
+test cfg-fetch --trust-yes
stat libbar "available 1.1.0 1.0.0+1 1.0.0"
test cfg-create --wipe
test cfg-add $rep/status/unstable
-test cfg-fetch
+test cfg-fetch --trust-yes
stat libbar "available 2.0.0 1.1.0 1.0.0+1 1.0.0"
test pkg-fetch libbar/1.0.0+1
stat libbar "fetched 1.0.0+1; available 2.0.0 1.1.0"
@@ -726,7 +758,7 @@ stat libbar "fetched 2.0.0"
##
test cfg-create --wipe
test cfg-add $rep/common/hello
-test cfg-fetch
+test cfg-fetch --trust $hello_fp
fail pkg-update # package name expected
fail pkg-update libhello # no such package
@@ -747,7 +779,7 @@ test pkg-purge libhello
# src != out
#
test cfg-create --wipe
-test pkg-unpack -e repository/1/common/libhello-1.0.0+1
+test pkg-unpack -e pkg/1/build2.org/common/libhello-1.0.0+1
test pkg-configure libhello
test pkg-update libhello
test pkg-update libhello
@@ -760,7 +792,7 @@ test pkg-purge libhello
##
test cfg-create --wipe
test cfg-add $rep/common/hello
-test cfg-fetch
+test cfg-fetch --trust $hello_fp
fail pkg-clean # package name expected
fail pkg-clean libhello # no such package
@@ -782,7 +814,7 @@ test pkg-purge libhello
# src != out
#
test cfg-create --wipe
-test pkg-unpack -e repository/1/common/libhello-1.0.0+1
+test pkg-unpack -e pkg/1/build2.org/common/libhello-1.0.0+1
test pkg-configure libhello
test pkg-update libhello
test pkg-clean libhello
@@ -800,7 +832,7 @@ test pkg-purge libhello
#
test cfg-create --wipe cxx
test cfg-add $rep/common/hello
-test cfg-fetch
+test cfg-fetch --trust $hello_fp
test pkg-fetch libhello/1.0.0+1
test pkg-unpack libhello
test pkg-configure libhello
@@ -815,20 +847,20 @@ test pkg-purge libhello
# 1 (libfoo)
#
-test rep-create repository/1/satisfy/t1
+test rep-create pkg/1/build2.org/satisfy/t1
test cfg-create --wipe
fail pkg-build -p # package name expected
fail pkg-build -p libfoo # unknown package
fail pkg-build -p libfoo/1.0.0 # unknown package
-test pkg-build -p repository/1/satisfy/libfoo-1.1.0.tar.gz <<EOF
+test pkg-build -p pkg/1/build2.org/satisfy/libfoo-1.1.0.tar.gz <<EOF
build libfoo 1.1.0
EOF
-test pkg-build -p repository/1/satisfy/libfoo-1.1.0/ <<EOF
+test pkg-build -p pkg/1/build2.org/satisfy/libfoo-1.1.0/ <<EOF
build libfoo 1.1.0
EOF
-test pkg-unpack -e repository/1/satisfy/libfoo-1.1.0
+test pkg-unpack -e pkg/1/build2.org/satisfy/libfoo-1.1.0
test pkg-build -p libfoo <<< "build libfoo 1.1.0"
test pkg-build -p libfoo/1.1.0 <<< "build libfoo 1.1.0"
test pkg-build -p libfoo libfoo <<< "build libfoo 1.1.0"
@@ -839,7 +871,7 @@ fail pkg-build -p libfoo/1.0.0
test pkg-purge libfoo
test cfg-add $rep/satisfy/t1
-test cfg-fetch
+test cfg-fetch --trust-yes
test pkg-build -p libfoo <<< "build libfoo 1.0.0"
test pkg-build -p libfoo/1.0.0 <<< "build libfoo 1.0.0"
test pkg-build -p libfoo libfoo <<< "build libfoo 1.0.0"
@@ -848,13 +880,13 @@ test pkg-build -p libfoo/1.0.0 libfoo <<< "build libfoo 1.0.0"
test pkg-build -p libfoo/1.0.0 libfoo/1.0.0 <<< "build libfoo 1.0.0"
fail pkg-build -p libfoo/1.1.0
-test pkg-unpack -e repository/1/satisfy/libfoo-1.1.0
+test pkg-unpack -e pkg/1/build2.org/satisfy/libfoo-1.1.0
test pkg-build -p libfoo <<< "build libfoo 1.1.0"
test pkg-build -p libfoo/1.0.0 <<< "downgrade libfoo 1.0.0"
fail pkg-build -p libfoo/0.0.0
test pkg-purge libfoo
-test pkg-fetch -e repository/1/satisfy/libfoo-0.0.0.tar.gz
+test pkg-fetch -e pkg/1/build2.org/satisfy/libfoo-0.0.0.tar.gz
test pkg-unpack libfoo
test pkg-build -p libfoo <<< "upgrade libfoo 1.0.0"
test pkg-build -p libfoo/0.0.0 <<< "build libfoo 0.0.0"
@@ -863,13 +895,13 @@ test pkg-purge libfoo
# 2 (libbar depends on libfoo)
#
-test rep-create repository/1/satisfy/t2
+test rep-create pkg/1/build2.org/satisfy/t2
test cfg-create --wipe
-fail pkg-build repository/1/satisfy/libbar-1.0.0.tar.gz
+fail pkg-build pkg/1/build2.org/satisfy/libbar-1.0.0.tar.gz
test cfg-add $rep/satisfy/t2
-test cfg-fetch
+test cfg-fetch --trust-yes
test pkg-build -p libbar <<EOF
build libfoo 1.0.0 (required by libbar)
@@ -889,7 +921,7 @@ build libbar 1.0.0
EOF
fail pkg-build -p libbar libfoo/1.1.0
-test pkg-fetch -e repository/1/satisfy/libfoo-0.0.0.tar.gz
+test pkg-fetch -e pkg/1/build2.org/satisfy/libfoo-0.0.0.tar.gz
test pkg-unpack libfoo
test pkg-build -p libbar <<EOF
build libfoo 0.0.0 (required by libbar)
@@ -905,7 +937,7 @@ build libbar 1.0.0
EOF
test pkg-purge libfoo
-test pkg-unpack -e repository/1/satisfy/libfoo-1.1.0
+test pkg-unpack -e pkg/1/build2.org/satisfy/libfoo-1.1.0
test pkg-build -p libbar <<EOF
build libfoo 1.1.0 (required by libbar)
build libbar 1.0.0
@@ -922,10 +954,10 @@ test pkg-purge libfoo
# 3 (libbaz depends on libbar; libbar in prerequisite repository)
#
-test rep-create repository/1/satisfy/t3
+test rep-create pkg/1/build2.org/satisfy/t3
test cfg-create --wipe
test cfg-add $rep/satisfy/t3
-test cfg-fetch
+test cfg-fetch --trust-yes
# only in prerequisite repository
#
@@ -1038,14 +1070,14 @@ EOF
# 4 (libbaz depends on libfoo and libbar; libbar depends on libfoo >= 1.1.0)
#
-test rep-create repository/1/satisfy/t4a
-test rep-create repository/1/satisfy/t4b
-test rep-create repository/1/satisfy/t4c
-test rep-create repository/1/satisfy/t4d
+test rep-create pkg/1/build2.org/satisfy/t4a
+test rep-create pkg/1/build2.org/satisfy/t4b
+test rep-create pkg/1/build2.org/satisfy/t4c
+test rep-create pkg/1/build2.org/satisfy/t4d
test cfg-create --wipe
test cfg-add $rep/satisfy/t4c
-test cfg-fetch
+test cfg-fetch --trust-yes
test pkg-build -p libbaz <<EOF
build libfoo 1.1.0 (required by libbar libbaz)
@@ -1064,7 +1096,7 @@ fail pkg-build -p libfoo/1.1.0 libbaz
# upgrade warning
#
-test pkg-fetch -e repository/1/satisfy/libfoo-0.0.0.tar.gz
+test pkg-fetch -e pkg/1/build2.org/satisfy/libfoo-0.0.0.tar.gz
test pkg-unpack libfoo
test pkg-build -p libbaz <<EOF
upgrade libfoo 1.1.0 (required by libbar libbaz)
@@ -1075,11 +1107,11 @@ test pkg-purge libfoo
# downgrade error
#
-test pkg-fetch -e repository/1/satisfy/libfoo-1.2.0.tar.gz
+test pkg-fetch -e pkg/1/build2.org/satisfy/libfoo-1.2.0.tar.gz
test pkg-unpack libfoo
fail pkg-build -p libbaz
test cfg-add $rep/satisfy/t4a
-test cfg-fetch
+test cfg-fetch --trust-yes
test pkg-build -p libfoo/1.1.0 libbaz <<EOF
downgrade libfoo 1.1.0
build libbar 1.1.0 (required by libbaz)
@@ -1095,7 +1127,7 @@ test pkg-configure libfoo
test pkg-fetch libbar/1.1.0
test pkg-unpack libbar
test pkg-configure libbar
-fail pkg-build -p repository/1/satisfy/libfoo-1.2.0.tar.gz
+fail pkg-build -p pkg/1/build2.org/satisfy/libfoo-1.2.0.tar.gz
fail pkg-build -p libfoo/1.0.0
test pkg-build -p libfoo/1.1.0 <<< "build libfoo 1.1.0"
test pkg-disfigure libbar
@@ -1107,19 +1139,19 @@ test pkg-purge libfoo
#
test cfg-create --wipe
-test pkg-fetch -e repository/1/satisfy/libfoo-1.0.0.tar.gz
+test pkg-fetch -e pkg/1/build2.org/satisfy/libfoo-1.0.0.tar.gz
test pkg-unpack libfoo
test pkg-configure libfoo
-test pkg-fetch -e repository/1/satisfy/libbar-1.0.0.tar.gz
+test pkg-fetch -e pkg/1/build2.org/satisfy/libbar-1.0.0.tar.gz
test pkg-unpack libbar
test pkg-configure libbar
-test pkg-fetch -e repository/1/satisfy/libbaz-1.1.0.tar.gz
+test pkg-fetch -e pkg/1/build2.org/satisfy/libbaz-1.1.0.tar.gz
test pkg-unpack libbaz
test pkg-configure libbaz
test cfg-add $rep/satisfy/t4a
test cfg-add $rep/satisfy/t4b
-test cfg-fetch
+test cfg-fetch --trust-yes
test pkg-build -p libbar <<EOF
upgrade libfoo 1.1.0 (required by libbar libbaz)
@@ -1160,7 +1192,7 @@ EOF
#
test cfg-create --wipe
test cfg-add $rep/satisfy/t4c
-test cfg-fetch
+test cfg-fetch --trust-yes
test pkg-build -y libbaz
stat libfoo/1.1.0 "configured"
stat libbar/1.1.0 "configured"
@@ -1169,14 +1201,14 @@ stat libbaz/1.1.0 "configured hold_package"
# hold
#
test cfg-create --wipe
-test pkg-build -y repository/1/satisfy/libfoo-1.0.0.tar.gz
+test pkg-build -y pkg/1/build2.org/satisfy/libfoo-1.0.0.tar.gz
stat libfoo "configured 1.0.0 hold_package hold_version"
-test pkg-build -y repository/1/satisfy/libfoo-1.1.0/
+test pkg-build -y pkg/1/build2.org/satisfy/libfoo-1.1.0/
stat libfoo "configured 1.1.0 hold_package hold_version"
test cfg-create --wipe
test cfg-add $rep/satisfy/t4c
-test cfg-fetch
+test cfg-fetch --trust-yes
test pkg-build -y libfoo
stat libfoo "configured 1.0.0 hold_package"
test pkg-build -y libfoo/1.0.0
@@ -1184,12 +1216,12 @@ stat libfoo "configured 1.0.0 hold_package hold_version"
test cfg-create --wipe
test cfg-add $rep/satisfy/t4c
-test cfg-fetch
+test cfg-fetch --trust-yes
test pkg-build -y libfoo/1.0.0
stat libfoo "configured 1.0.0 hold_package hold_version"
test cfg-create --wipe
-test pkg-fetch -e repository/1/satisfy/libfoo-1.0.0.tar.gz
+test pkg-fetch -e pkg/1/build2.org/satisfy/libfoo-1.0.0.tar.gz
test pkg-unpack libfoo
test pkg-configure libfoo
stat libfoo "configured 1.0.0"
@@ -1198,7 +1230,7 @@ stat libfoo "configured 1.0.0 hold_package"
test cfg-create --wipe
test cfg-add $rep/satisfy/t4c
-test cfg-fetch
+test cfg-fetch --trust-yes
test pkg-build -y libfoo
stat libfoo "configured 1.0.0 hold_package"
test pkg-build -y libbaz
@@ -1206,30 +1238,30 @@ stat libfoo "configured 1.1.0 hold_package"
test cfg-create --wipe
test cfg-add $rep/satisfy/t4c
-test cfg-fetch
+test cfg-fetch --trust-yes
test pkg-build -y libfoo/1.0.0
stat libfoo "configured 1.0.0 hold_package hold_version"
fail pkg-build -y libbaz
test cfg-create --wipe
test cfg-add $rep/satisfy/t4c
-test cfg-fetch
+test cfg-fetch --trust-yes
test pkg-build -y libbaz
stat libfoo "configured 1.1.0"
# drop prerequisites on downgrade
#
-test rep-create repository/1/satisfy/t5
+test rep-create pkg/1/build2.org/satisfy/t5
test cfg-create --wipe
test cfg-add $rep/satisfy/t2
-test cfg-fetch
+test cfg-fetch --trust-yes
test pkg-build -y libbar
stat libfoo "configured 1.0.0"
stat libbar "configured 1.0.0 hold_package"
test cfg-add $rep/satisfy/t5
-test cfg-fetch
+test cfg-fetch --trust-yes
test pkg-build -y libbar
stat libfoo "available 1.0.0"
@@ -1254,7 +1286,7 @@ fail pkg-drop -p libfoo/1.0.0 # unknown package
test cfg-create --wipe
test cfg-add $rep/satisfy/t4c
-test cfg-fetch
+test cfg-fetch --trust-yes
test pkg-build -y libbaz
test pkg-drop -p -y libfoo libbaz libbar <<EOF
@@ -1319,7 +1351,7 @@ EOF
test cfg-create --wipe
test cfg-add $rep/satisfy/t4d
-test cfg-fetch
+test cfg-fetch --trust-yes
test pkg-build -y libbiz
test pkg-drop -p -y libbiz <<EOF
@@ -1404,3 +1436,141 @@ stat libfoo/1.1.0 "unknown"
stat libbar/1.1.0 "unknown"
stat libbaz/1.1.0 "unknown"
stat libbiz/1.0.0 "available"
+
+##
+## auth
+##
+
+# rep-create
+#
+fail rep-create pkg/1/build2.org/auth/create-noemail --key key.pem
+fail rep-create pkg/1/build2.org/auth/create-expired --key key.pem
+
+fail rep-create pkg/1/build2.org/auth/signed # no --key option
+test rep-create pkg/1/build2.org/auth/signed --key key.pem
+test rep-create pkg/1/build2.org/auth/unsigned1
+test rep-create pkg/1/build2.org/auth/unsigned2
+test rep-create pkg/1/build2.org/auth/name-mismatch --key key.pem
+
+test rep-create pkg/1/build2.org/auth/sha256sum-mismatch --key key.pem
+
+# Tamper signature manifest's sha256sum value.
+#
+s=d374c59b36fdbdbd0d4468665061d94fda9c6c687863dfe72b0bcc34ff9d5fb4
+edit pkg/1/build2.org/auth/sha256sum-mismatch/signature \
+ "s/^\(sha256sum: \).*\$/\1$s/"
+
+test rep-create pkg/1/build2.org/auth/signature-mismatch --key key.pem
+
+# Tamper signature manifest's signature value.
+#
+edit pkg/1/build2.org/auth/signature-mismatch/signature \
+ '/^signature: \\$/,/^\\$/d'
+cat >> pkg/1/build2.org/auth/signature-mismatch/signature << EOF
+signature: \\
+XBjnmXXVHY0RqMI0gL/P4t/vuWwK9JJkLl4Qf2gMxq5k2WQ2CIE56DfG0RaGklgKcI3UxsQZvMQI
+5PNtAHJDjteQ+BqY0io8A43KPX+2LKMU+I825sKmPRjCLYleGM3mNndDkWfYtAzYk5AmR2piqRz0
+D7CLq9GIoQQZO4Fw44muaQDMCRcXy8Txx2jDnretQjx/C0ZQw4M/cd6/cKEKUmLITDkBig9oVlSh
+tpxHqWz5NTbO3vm8ILc03AwiOJHwZweLb6ocJ6a467IJa+F/xUm9B09k8wFWMs+jHXXzHDE0syv7
+lqWL7SvHSjVFrGVFKS6nx7lCj2b8XFiGlwWIwjY4m/VK/5QmbL/lC4f+ww5XT5NG5iYh/eMaCxCJ
+zTg5iZsWNLhrx9uKNrL5xC4z0OONRVOwzu7gsqr0GLWewPyhH0AqJLgOSkw9N7FJwbv2IKNZ88YA
+u2YMXNkXytcQvENLVQDX5oxvUMEurUJFOCuYB/SEnpcwkV5h9RtXzIFVy4OCTU2MhQHDEldI8s7w
+Hga/ct4WupgE228gGdgwJLCbHx6AWBlS9iL10AdS8JkQ9LaZwTMHHz44f8y00X4MiT06gpgDeoQD
+rUyP0KNG65tdWnVTMqg6Q/YXhtRZLHoD6+QbiYLlruR1phu4y4fDt7AKxoXfeme/a86A37UogZY=
+\\
+EOF
+
+# cfg-fetch
+#
+test cfg-create --wipe
+test cfg-add $rep/auth/signed
+test cfg-fetch --trust `rep_cert_fp pkg/1/build2.org/auth/signed`
+test cfg-fetch
+test cfg-fetch --trust-no # certificate is already trusted
+
+test cfg-create --wipe
+test cfg-add $rep/auth/signed
+test cfg-fetch --trust-yes
+test cfg-fetch
+
+test cfg-create --wipe
+test cfg-add $rep/auth/signed
+fail cfg-fetch --trust-no
+
+test cfg-create --wipe
+test cfg-add $rep/auth/signed
+fail cfg-fetch --trust-yes --trust-no # inconsistent options
+
+test cfg-create --wipe
+test cfg-add $rep/auth/unsigned1
+test cfg-fetch --trust-yes
+test cfg-fetch
+test cfg-add $rep/auth/unsigned2
+test cfg-fetch
+test cfg-fetch --trust-no # certificates are already trusted
+
+test cfg-create --wipe
+test cfg-add $rep/auth/unsigned1
+fail cfg-fetch --trust-no
+
+test cfg-create --wipe
+test cfg-add $rep/auth/name-mismatch
+fail cfg-fetch --trust-yes # certificate name mismatch
+
+test cfg-create --wipe
+test cfg-add $rep/auth/expired
+fail cfg-fetch --trust-yes # certificate expired
+
+test cfg-create --wipe
+test cfg-add $rep/auth/sha256sum-mismatch
+fail cfg-fetch --trust-yes # packages file checksum mismatch
+
+test cfg-create --wipe
+test cfg-add $rep/auth/signature-mismatch
+fail cfg-fetch --trust-yes # packages file signature:mismatch
+
+# rep-info
+#
+test cfg-create --wipe
+test rep-info --trust-yes -d $cfg $rep/auth/signed <<EOF
+${repn}auth/signed $repa/auth/signed
+libfoo 1.0.0
+EOF
+
+test rep-info -d $cfg $rep/auth/signed <<EOF
+${repn}auth/signed $repa/auth/signed
+libfoo 1.0.0
+EOF
+
+test cfg-create --wipe
+test rep-info --trust-yes $rep/auth/signed <<EOF
+${repn}auth/signed $repa/auth/signed
+libfoo 1.0.0
+EOF
+
+fail rep-info $rep/auth/signed <<EOF
+${repn}auth/signed $repa/auth/signed
+libfoo 1.0.0
+EOF
+
+test cfg-create --wipe
+test rep-info --trust-yes -d $cfg $rep/auth/unsigned1 <<EOF
+${repn}auth/unsigned1 $repa/auth/unsigned1
+libfoo 1.0.0
+EOF
+
+test rep-info -d $cfg $rep/auth/unsigned2 <<EOF
+${repn}auth/unsigned2 $repa/auth/unsigned2
+libfoo 1.0.0
+EOF
+
+test cfg-create --wipe
+test rep-info --trust-yes $rep/auth/unsigned1 <<EOF
+${repn}auth/unsigned1 $repa/auth/unsigned1
+libfoo 1.0.0
+EOF
+
+fail rep-info $rep/auth/unsigned1 <<EOF
+${repn}auth/unsigned1 $repa/auth/unsigned1
+libfoo 1.0.0
+EOF