From 22e35bf80cea95dc1edce22e729199f61a6fedcd Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Mon, 5 Mar 2018 16:49:24 +0300 Subject: Add .manifest extension to repositories, packages and signature files --- bpkg/fetch-pkg.cxx | 17 ++--- bpkg/manifest-utility.cxx | 4 + bpkg/manifest-utility.hxx | 4 + bpkg/rep-add.cli | 22 +++--- bpkg/rep-create.cli | 6 +- bpkg/rep-create.cxx | 28 +++---- bpkg/rep-fetch.cxx | 15 ++-- doc/manual.cli | 72 +++++++++--------- tests/auth.test | 4 +- tests/auth/cert | 2 +- tests/common/bar/stable/repositories | 6 -- tests/common/bar/stable/repositories.manifest | 6 ++ tests/common/bar/testing/repositories | 8 -- tests/common/bar/testing/repositories.manifest | 8 ++ tests/common/bar/unstable/repositories | 8 -- tests/common/bar/unstable/repositories.manifest | 8 ++ tests/common/foo/stable/repositories | 3 - tests/common/foo/stable/repositories.manifest | 3 + tests/common/foo/testing/repositories | 6 -- tests/common/foo/testing/repositories.manifest | 6 ++ tests/common/git/state0/libbar.tar | Bin 71680 -> 71680 bytes tests/common/git/state0/libfoo.tar | Bin 296960 -> 296960 bytes tests/common/git/state0/style-basic.tar | Bin 71680 -> 71680 bytes tests/common/git/state0/style.tar | Bin 133120 -> 133120 bytes tests/common/git/state1/libbaz.tar | Bin 61440 -> 61440 bytes tests/common/git/state1/libfoo.tar | Bin 378880 -> 378880 bytes tests/common/git/state1/style-basic.tar | Bin 71680 -> 71680 bytes tests/common/git/state1/style.tar | Bin 133120 -> 133120 bytes tests/common/hello/repositories | 4 - tests/common/hello/repositories.manifest | 4 + tests/common/prereq-cycle/extra/repositories | 3 - .../prereq-cycle/extra/repositories.manifest | 3 + tests/common/prereq-cycle/math/repositories | 3 - .../common/prereq-cycle/math/repositories.manifest | 3 + tests/common/prereq-cycle/stable/repositories | 3 - .../prereq-cycle/stable/repositories.manifest | 3 + tests/common/satisfy/repositories | 1 - tests/common/satisfy/repositories.manifest | 1 + tests/common/satisfy/t1/repositories | 1 - tests/common/satisfy/t1/repositories.manifest | 1 + tests/common/satisfy/t2/repositories | 1 - tests/common/satisfy/t2/repositories.manifest | 1 + tests/common/satisfy/t3/repositories | 4 - tests/common/satisfy/t3/repositories.manifest | 4 + tests/common/satisfy/t4a/repositories | 1 - tests/common/satisfy/t4a/repositories.manifest | 1 + tests/common/satisfy/t4b/repositories | 3 - tests/common/satisfy/t4b/repositories.manifest | 3 + tests/common/satisfy/t4c/repositories | 3 - tests/common/satisfy/t4c/repositories.manifest | 3 + tests/common/satisfy/t4d/repositories | 4 - tests/common/satisfy/t4d/repositories.manifest | 4 + tests/common/satisfy/t5/repositories | 1 - tests/common/satisfy/t5/repositories.manifest | 1 + tests/common/t1/repositories | 1 - tests/common/t1/repositories.manifest | 1 + tests/pkg-build.test | 32 ++++---- tests/pkg-clean.test | 8 +- tests/pkg-configure.test | 12 +-- tests/pkg-configure/stable/repositories | 1 - tests/pkg-configure/stable/repositories.manifest | 1 + tests/pkg-drop.test | 16 ++-- tests/pkg-fetch.test | 12 +-- tests/pkg-status.test | 21 ++++-- tests/pkg-status/extra/repositories | 3 - tests/pkg-status/extra/repositories.manifest | 3 + tests/pkg-status/stable/repositories | 1 - tests/pkg-status/stable/repositories.manifest | 1 + tests/pkg-status/testing/repositories | 6 -- tests/pkg-status/testing/repositories.manifest | 6 ++ tests/pkg-status/unstable/repositories | 4 - tests/pkg-status/unstable/repositories.manifest | 4 + tests/pkg-system.test | 12 +-- tests/pkg-system/t1/repositories | 1 - tests/pkg-system/t1/repositories.manifest | 1 + tests/pkg-system/t2/repositories | 1 - tests/pkg-system/t2/repositories.manifest | 1 + tests/pkg-system/t3/repositories | 3 - tests/pkg-system/t3/repositories.manifest | 3 + tests/pkg-unpack.test | 12 +-- tests/pkg-update.test | 8 +- tests/publish | 14 ++-- tests/remote-git.test | 2 +- tests/rep-auth.test | 82 +++++++++++---------- tests/rep-auth/expired/packages | 11 --- tests/rep-auth/expired/packages.manifest | 11 +++ tests/rep-auth/expired/repositories | 33 --------- tests/rep-auth/expired/repositories.manifest | 33 +++++++++ tests/rep-auth/expired/signature | 13 ---- tests/rep-auth/expired/signature.manifest | 13 ++++ tests/rep-auth/unsigned/repositories | 1 - tests/rep-auth/unsigned/repositories.manifest | 1 + tests/rep-create.test | 31 ++++---- tests/rep-create/stable/repositories | 1 - tests/rep-create/stable/repositories.manifest | 1 + tests/rep-create/testing/repositories | 4 - tests/rep-create/testing/repositories.manifest | 4 + tests/rep-fetch.test | 52 ++++++------- tests/rep-fetch/no-cycle/extra/repositories | 1 - .../rep-fetch/no-cycle/extra/repositories.manifest | 1 + tests/rep-fetch/no-cycle/math/repositories | 1 - .../rep-fetch/no-cycle/math/repositories.manifest | 1 + tests/rep-fetch/no-cycle/stable/repositories | 3 - .../no-cycle/stable/repositories.manifest | 3 + tests/rep-info.test | 13 ++-- tests/rep-info/testing/repositories | 6 -- tests/rep-info/testing/repositories.manifest | 6 ++ tests/rep-list.test | 21 ++++-- tests/rep-list/extra/repositories | 3 - tests/rep-list/extra/repositories.manifest | 3 + tests/rep-list/math/repositories | 3 - tests/rep-list/math/repositories.manifest | 3 + tests/rep-list/stable/repositories | 3 - tests/rep-list/stable/repositories.manifest | 3 + tests/rep-list/testing/repositories | 6 -- tests/rep-list/testing/repositories.manifest | 6 ++ tests/rep-remove.test | 26 ++++--- tests/rep-remove/alpha/repositories | 1 - tests/rep-remove/alpha/repositories.manifest | 1 + tests/rep-remove/testing/repositories | 6 -- tests/rep-remove/testing/repositories.manifest | 6 ++ 121 files changed, 476 insertions(+), 432 deletions(-) delete mode 100644 tests/common/bar/stable/repositories create mode 100644 tests/common/bar/stable/repositories.manifest delete mode 100644 tests/common/bar/testing/repositories create mode 100644 tests/common/bar/testing/repositories.manifest delete mode 100644 tests/common/bar/unstable/repositories create mode 100644 tests/common/bar/unstable/repositories.manifest delete mode 100644 tests/common/foo/stable/repositories create mode 100644 tests/common/foo/stable/repositories.manifest delete mode 100644 tests/common/foo/testing/repositories create mode 100644 tests/common/foo/testing/repositories.manifest delete mode 100644 tests/common/hello/repositories create mode 100644 tests/common/hello/repositories.manifest delete mode 100644 tests/common/prereq-cycle/extra/repositories create mode 100644 tests/common/prereq-cycle/extra/repositories.manifest delete mode 100644 tests/common/prereq-cycle/math/repositories create mode 100644 tests/common/prereq-cycle/math/repositories.manifest delete mode 100644 tests/common/prereq-cycle/stable/repositories create mode 100644 tests/common/prereq-cycle/stable/repositories.manifest delete mode 100644 tests/common/satisfy/repositories create mode 100644 tests/common/satisfy/repositories.manifest delete mode 120000 tests/common/satisfy/t1/repositories create mode 120000 tests/common/satisfy/t1/repositories.manifest delete mode 120000 tests/common/satisfy/t2/repositories create mode 120000 tests/common/satisfy/t2/repositories.manifest delete mode 100644 tests/common/satisfy/t3/repositories create mode 100644 tests/common/satisfy/t3/repositories.manifest delete mode 120000 tests/common/satisfy/t4a/repositories create mode 120000 tests/common/satisfy/t4a/repositories.manifest delete mode 100644 tests/common/satisfy/t4b/repositories create mode 100644 tests/common/satisfy/t4b/repositories.manifest delete mode 100644 tests/common/satisfy/t4c/repositories create mode 100644 tests/common/satisfy/t4c/repositories.manifest delete mode 100644 tests/common/satisfy/t4d/repositories create mode 100644 tests/common/satisfy/t4d/repositories.manifest delete mode 120000 tests/common/satisfy/t5/repositories create mode 120000 tests/common/satisfy/t5/repositories.manifest delete mode 100644 tests/common/t1/repositories create mode 100644 tests/common/t1/repositories.manifest delete mode 100644 tests/pkg-configure/stable/repositories create mode 100644 tests/pkg-configure/stable/repositories.manifest delete mode 100644 tests/pkg-status/extra/repositories create mode 100644 tests/pkg-status/extra/repositories.manifest delete mode 100644 tests/pkg-status/stable/repositories create mode 100644 tests/pkg-status/stable/repositories.manifest delete mode 100644 tests/pkg-status/testing/repositories create mode 100644 tests/pkg-status/testing/repositories.manifest delete mode 100644 tests/pkg-status/unstable/repositories create mode 100644 tests/pkg-status/unstable/repositories.manifest delete mode 100644 tests/pkg-system/t1/repositories create mode 100644 tests/pkg-system/t1/repositories.manifest delete mode 100644 tests/pkg-system/t2/repositories create mode 100644 tests/pkg-system/t2/repositories.manifest delete mode 100644 tests/pkg-system/t3/repositories create mode 100644 tests/pkg-system/t3/repositories.manifest delete mode 100644 tests/rep-auth/expired/packages create mode 100644 tests/rep-auth/expired/packages.manifest delete mode 100644 tests/rep-auth/expired/repositories create mode 100644 tests/rep-auth/expired/repositories.manifest delete mode 100644 tests/rep-auth/expired/signature create mode 100644 tests/rep-auth/expired/signature.manifest delete mode 100644 tests/rep-auth/unsigned/repositories create mode 100644 tests/rep-auth/unsigned/repositories.manifest delete mode 100644 tests/rep-create/stable/repositories create mode 100644 tests/rep-create/stable/repositories.manifest delete mode 100644 tests/rep-create/testing/repositories create mode 100644 tests/rep-create/testing/repositories.manifest delete mode 100644 tests/rep-fetch/no-cycle/extra/repositories create mode 100644 tests/rep-fetch/no-cycle/extra/repositories.manifest delete mode 100644 tests/rep-fetch/no-cycle/math/repositories create mode 100644 tests/rep-fetch/no-cycle/math/repositories.manifest delete mode 100644 tests/rep-fetch/no-cycle/stable/repositories create mode 100644 tests/rep-fetch/no-cycle/stable/repositories.manifest delete mode 100644 tests/rep-info/testing/repositories create mode 100644 tests/rep-info/testing/repositories.manifest delete mode 100644 tests/rep-list/extra/repositories create mode 100644 tests/rep-list/extra/repositories.manifest delete mode 100644 tests/rep-list/math/repositories create mode 100644 tests/rep-list/math/repositories.manifest delete mode 100644 tests/rep-list/stable/repositories create mode 100644 tests/rep-list/stable/repositories.manifest delete mode 100644 tests/rep-list/testing/repositories create mode 100644 tests/rep-list/testing/repositories.manifest delete mode 100644 tests/rep-remove/alpha/repositories create mode 100644 tests/rep-remove/alpha/repositories.manifest delete mode 100644 tests/rep-remove/testing/repositories create mode 100644 tests/rep-remove/testing/repositories.manifest diff --git a/bpkg/fetch-pkg.cxx b/bpkg/fetch-pkg.cxx index 09422e7..aba95ab 100644 --- a/bpkg/fetch-pkg.cxx +++ b/bpkg/fetch-pkg.cxx @@ -11,6 +11,7 @@ #include #include +#include using namespace std; using namespace butl; @@ -164,13 +165,11 @@ namespace bpkg } } - static const path repositories ("repositories"); - pkg_repository_manifests pkg_fetch_repositories (const dir_path& d, bool iu) { return fetch_manifest ( - nullptr, d / repositories, iu).first; + nullptr, d / repositories_file, iu).first; } pair @@ -183,20 +182,18 @@ namespace bpkg repository_url u (rl.url ()); path& f (*u.path); - f /= repositories; + f /= repositories_file; return rl.remote () ? fetch_manifest (o, u, iu) : fetch_manifest (&o, f, iu); } - static const path packages ("packages"); - pkg_package_manifests pkg_fetch_packages (const dir_path& d, bool iu) { return fetch_manifest ( - nullptr, d / packages, iu).first; + nullptr, d / packages_file, iu).first; } pair @@ -209,15 +206,13 @@ namespace bpkg repository_url u (rl.url ()); path& f (*u.path); - f /= packages; + f /= packages_file; return rl.remote () ? fetch_manifest (o, u, iu) : fetch_manifest (&o, f, iu); } - static const path signature ("signature"); - signature_manifest pkg_fetch_signature (const common_options& o, const repository_location& rl, @@ -228,7 +223,7 @@ namespace bpkg repository_url u (rl.url ()); path& f (*u.path); - f /= signature; + f /= signature_file; return rl.remote () ? fetch_manifest (o, u, iu).first diff --git a/bpkg/manifest-utility.cxx b/bpkg/manifest-utility.cxx index 6162c21..9f4a012 100644 --- a/bpkg/manifest-utility.cxx +++ b/bpkg/manifest-utility.cxx @@ -14,6 +14,10 @@ using namespace butl; namespace bpkg { + const path repositories_file ("repositories.manifest"); + const path packages_file ("packages.manifest"); + const path signature_file ("signature.manifest"); + package_scheme parse_package_scheme (const char*& s) { diff --git a/bpkg/manifest-utility.hxx b/bpkg/manifest-utility.hxx index 0f820ec..f608858 100644 --- a/bpkg/manifest-utility.hxx +++ b/bpkg/manifest-utility.hxx @@ -12,6 +12,10 @@ namespace bpkg { + extern const path repositories_file; // repositories.manifest + extern const path packages_file; // packages.manifest + extern const path signature_file; // signature.manifest + // Package naming schemes. // enum class package_scheme diff --git a/bpkg/rep-add.cli b/bpkg/rep-add.cli index b566bbd..72da5e5 100644 --- a/bpkg/rep-add.cli +++ b/bpkg/rep-add.cli @@ -84,18 +84,18 @@ namespace bpkg \ A \cb{git} repository is expected to contain either the \cb{manifest} or - \cb{packages} file in the root directory of the repository. If it only - contains \cb{manifest}, then it is assumed to be a single-package + \cb{packages.manifest} file in the root directory of the repository. If + it only contains \cb{manifest}, then it is assumed to be a single-package repository with the \cb{manifest} file being its package manifest. - Otherwise the \cb{packages} file should list the available packages as - described in \l{bpkg#manifest-package-list-git Package List Manifest for - \cb{git} Repositories}. - - A \cb{git} repository may also contain the \cb{repositories} file in the - root directory of the repository. This file can be used to describe the - repository itself as well as specify its prerequisite and complement - repositories. See \l{bpkg#manifest-repository-list Repository List - Manifest} for details on the format and semantics of this file. + Otherwise the \cb{packages.manifest} file should list the available + packages as described in \l{bpkg#manifest-package-list-git Package List + Manifest for \cb{git} Repositories}. + + A \cb{git} repository may also contain the \cb{repositories.manifest} + file in the root directory of the repository. This file can be used to + describe the repository itself as well as specify its prerequisite and + complement repositories. See \l{bpkg#manifest-repository-list Repository + List Manifest} for details on the format and semantics of this file. Supported git protocols are \cb{git://}, \cb{http://}, and \cb{https://} for remote repositories and \cb{file://} for local repositories. While diff --git a/bpkg/rep-create.cli b/bpkg/rep-create.cli index 970125d..40269ab 100644 --- a/bpkg/rep-create.cli +++ b/bpkg/rep-create.cli @@ -19,10 +19,10 @@ namespace bpkg \h|DESCRIPTION| - The \cb{rep-create} command regenerates the \cb{packages} manifest file + The \cb{rep-create} command regenerates the \cb{packages.manifest} file based on the files present in the repository directory. If the - \cb{repositories} manifest file contains a certificate, then the - \cb{signature} manifest file is regenerated as well. In this case the + \cb{repositories.manifest} file contains a certificate, then the + \cb{signature.manifest} file is regenerated as well. In this case the \cb{--key} option must be used to specify the certificate's private key. If is not specified, then the current working directory is used as the repository root." diff --git a/bpkg/rep-create.cxx b/bpkg/rep-create.cxx index 3940c48..56f2f87 100644 --- a/bpkg/rep-create.cxx +++ b/bpkg/rep-create.cxx @@ -16,6 +16,7 @@ #include #include #include +#include #include @@ -49,10 +50,6 @@ namespace bpkg using package_map = map; - static const path repositories ("repositories"); - static const path packages ("packages"); - static const path signature ("signature"); - static void collect (const rep_create_options& o, package_map& map, @@ -91,7 +88,9 @@ namespace bpkg // if (d == root) { - if (p == repositories || p == packages || p == signature) + if (p == repositories_file || + p == packages_file || + p == signature_file) continue; } @@ -181,8 +180,8 @@ namespace bpkg l4 ([&]{trace << "creating repository in " << d;}); - // Load the 'repositories' file to make sure it is there and - // is valid. + // Load the repositories.manifest file to make sure it is there and is + // valid. // pkg_repository_manifests rms ( pkg_fetch_repositories (d, o.ignore_unknown ())); @@ -197,7 +196,7 @@ namespace bpkg collect (o, pm, d, d); pkg_package_manifests manifests; - manifests.sha256sum = sha256 (o, path (d / repositories)); + manifests.sha256sum = sha256 (o, path (d / repositories_file)); for (auto& p: pm) { @@ -211,14 +210,15 @@ namespace bpkg // Serialize packages manifest, optionally generate the signature manifest. // - path p (d / packages); + path p (d / packages_file); try { { - // While we can do nothing about repositories files edited on Windows - // and littered with the carriage return characters, there is no - // reason to litter the auto-generated packages and signature files. + // While we can do nothing about repositories manifest files edited on + // Windows and littered with the carriage return characters, there is + // no reason to litter the auto-generated packages and signature + // manifest files. // ofdstream ofs (p, ios::binary); @@ -240,7 +240,7 @@ namespace bpkg m.sha256sum = sha256 (o, p); m.signature = sign_repository (o, m.sha256sum, key, *cert, d); - p = path (d / signature); + p = path (d / signature_file); ofdstream ofs (p, ios::binary); @@ -255,7 +255,7 @@ namespace bpkg info << "repository manifest contains no certificate" << info << "run 'bpkg help rep-create' for more information"; - try_rmfile (path (d / signature), true); + try_rmfile (path (d / signature_file), true); } } catch (const manifest_serialization& e) diff --git a/bpkg/rep-fetch.cxx b/bpkg/rep-fetch.cxx index 795a170..ab7ce55 100644 --- a/bpkg/rep-fetch.cxx +++ b/bpkg/rep-fetch.cxx @@ -143,13 +143,13 @@ namespace bpkg // // 2. Move from temp_dir// to repos_dir/// // - // 3. Check if repos_dir///repositories exists: + // 3. Check if repos_dir///repositories.manifest exists: // // 3.a If exists, load. // // 3.b Otherwise, synthesize repository list with base repository. // - // 4. Check if repos_dir///packages exists: + // 4. Check if repos_dir///packages.manifest exists: // // 4.a If exists, load. (into "skeleton" packages list to be filled?) // @@ -211,7 +211,7 @@ namespace bpkg // git_repository_manifests rms; { - path f (fd / path ("repositories")); + path f (fd / repositories_file); if (exists (f)) rms = parse_manifest (f, ignore_unknown, rl); @@ -223,7 +223,7 @@ namespace bpkg // git_package_manifests pms; { - path f (fd / path ("packages")); + path f (fd / packages_file); if (exists (f)) pms = parse_manifest (f, ignore_unknown, rl); @@ -595,9 +595,10 @@ namespace bpkg // we use the root repository as the default complement. // // This supports the common use case where the user has a single-package - // git repository and doesn't want to bother with the repositories file. - // This way their package will still pick up its dependencies from the - // configuration, without regards from which repositories they came from. + // git repository and doesn't want to bother with the + // repositories.manifest file. This way their package will still pick up + // its dependencies from the configuration, without regards from which + // repositories they came from. // if (rl.type () == repository_type::git && r->complements.empty () && diff --git a/doc/manual.cli b/doc/manual.cli index 73f82ed..b647a66 100644 --- a/doc/manual.cli +++ b/doc/manual.cli @@ -858,10 +858,11 @@ Note that the comment of the matching exclusion is used by the web interface \h#manifest-package-list-pkg|Package List Manifest for \cb{pkg} Repositories| -The package list manifest (the \c{packages} file found in the \cb{pkg} -repository root directory) describes the list of packages available in the -repository. First comes a manifest that describes the list itself (referred to -as the list manifest). The list manifest synopsis is presented next: +The package list manifest (the \c{packages.manifest} file found in the +\cb{pkg} repository root directory) describes the list of packages available +in the repository. First comes a manifest that describes the list itself +(referred to as the list manifest). The list manifest synopsis is presented +next: \ sha256sum: @@ -885,15 +886,16 @@ The detailed description of each value follows in the subsequent sections. sha256sum: \ -The SHA256 checksum of the \c{repositories} file (described below) that -corresponds to this repository. The \i{sum} value should be 64 characters long -(that is, just the SHA256 value, no file name or any other markers), be -calculated in the binary mode, and use lower-case letters. +The SHA256 checksum of the \c{repositories.manifest} file (described below) +that corresponds to this repository. The \i{sum} value should be 64 +characters long (that is, just the SHA256 value, no file name or any other +markers), be calculated in the binary mode, and use lower-case letters. -[Note: this checksum is used to make sure that the \c{repositories} file that -was fetched is the same as the one that was used to create the \c{packages} -file. This also means that if \c{repositories} is modified in any way, then -\c{packages} must be regenerated as well.] +[Note: this checksum is used to make sure that the \c{repositories.manifest} +file that was fetched is the same as the one that was used to create the +\c{packages.manifest} file. This also means that if \c{repositories.manifest} +is modified in any way, then \c{packages.manifest} must be regenerated as +well.] \h2#manifest-package-list-pkg-package-location|\c{location} (package manifest)| @@ -922,9 +924,9 @@ markers), be calculated in the binary mode, and use lower-case letters. \h#manifest-package-list-git|Package List Manifest for \cb{git} Repositories| -The package list manifest (the \c{packages} file found in the \cb{git} -repository root directory) describes the list of packages available in the -repository. It is a (potentially empty) sequence of manifests with the +The package list manifest (the \c{packages.manifest} file found in the +\cb{git} repository root directory) describes the list of packages available +in the repository. It is a (potentially empty) sequence of manifests with the following synopsis: \ @@ -935,7 +937,7 @@ The detailed description of each value follows in the subsequent sections. As an example, if our repository contained the \c{src/} subdirectory that in turn contained the \c{libfoo} and \c{foo} packages, then the corresponding -\c{packages} file could look like this: +\c{packages.manifest} file could look like this: \ : 1 @@ -1133,9 +1135,10 @@ name prefix/wildcard (without trailing slash) that will be used to verify the repository name(s) that are authenticated with this certificate. See \l{bpkg-repository-signing(1)} for details. -If this value is present then the \c{packages} file must be signed with the -corresponding private key and the signature saved in the \c{signature} file. -See \l{#manifest-signature-pkg Signature Manifest} for details. +If this value is present then the \c{packages.manifest} file must be signed +with the corresponding private key and the signature saved in the +\c{signature.manifest} file. See \l{#manifest-signature-pkg Signature +Manifest} for details. \h#manifest-repository-list|Repository List Manifest| @@ -1143,7 +1146,7 @@ See \l{#manifest-signature-pkg Signature Manifest} for details. @@ TODO See the Repository Chaining document for more information on the terminology and semantics. -The repository list manifest (the \c{repositories} file found in the +The repository list manifest (the \c{repositories.manifest} file found in the repository root directory) describes the repository. First comes a (potentially empty) sequence of repository manifests that describe the prerequisite and complement repositories. After this sequence must come the @@ -1186,15 +1189,15 @@ https://pkg.example.org/1/math/stable \h#manifest-signature-pkg|Signature Manifest for \cb{pkg} Repositories| -The signature manifest (the \c{signature} file found in the \cb{pkg} +The signature manifest (the \c{signature.manifest} file found in the \cb{pkg} repository root directory) contains the signature of the repository's -\c{packages} file. In order to detect the situation where the downloaded -\c{signature} and \c{packages} files belong to different updates, the manifest -contains both the checksum and the signature (which is the encrypted -checksum). [Note: we cannot rely on just the signature since a mismatch could -mean either a split update or tampering.] The manifest synopsis is presented -next followed by the detailed description of each value in subsequent -sections. +\c{packages.manifest} file. In order to detect the situation where the +downloaded \c{signature.manifest} and \c{packages.manifest} files belong to +different updates, the manifest contains both the checksum and the signature +(which is the encrypted checksum). [Note: we cannot rely on just the signature +since a mismatch could mean either a split update or tampering.] The manifest +synopsis is presented next followed by the detailed description of each value +in subsequent sections. \ sha256sum: @@ -1207,9 +1210,10 @@ signature: sha256sum: \ -The SHA256 checksum of the \c{packages} file. The \i{sum} value should be 64 -characters long (that is, just the SHA256 value, no file name or any other -markers), be calculated in the binary mode, and use lower-case letters. +The SHA256 checksum of the \c{packages.manifest} file. The \i{sum} value +should be 64 characters long (that is, just the SHA256 value, no file name or +any other markers), be calculated in the binary mode, and use lower-case +letters. \h2#manifest-signature-pkg-signature|\c{signature}| @@ -1218,9 +1222,9 @@ markers), be calculated in the binary mode, and use lower-case letters. signature: \ -The signature of the \c{packages} file. It should be calculated by encrypting -the above \c{sha256sum} value with the repository certificate's private key -and then \c{base64}-encoding the result. +The signature of the \c{packages.manifest} file. It should be calculated by +encrypting the above \c{sha256sum} value with the repository certificate's +private key and then \c{base64}-encoding the result. " //@@ TODO items (grep). diff --git a/tests/auth.test b/tests/auth.test index 3669894..bb5fdfd 100644 --- a/tests/auth.test +++ b/tests/auth.test @@ -14,8 +14,8 @@ cert = $src_base/auth/default-cert.pem # +set cert_fp <<<$src_base/auth/default-cert-fp -# Manifest certificate name/value. Can be appended to the repositories file to -# sign the repository. +# Manifest certificate name/value. Can be appended to the repositories.manifest +# file to sign the repository. # cert_manifest = $~/cert-manifest +echo 'certificate: \' >=$cert_manifest diff --git a/tests/auth/cert b/tests/auth/cert index 5cb1237..966796a 100755 --- a/tests/auth/cert +++ b/tests/auth/cert @@ -28,7 +28,7 @@ openssl req -x509 -new -key key.pem -days 1825 -config self-any-openssl.cnf > \ # 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: -# ../rep-auth/expired/repositories +# ../rep-auth/expired/repositories.manifest # # To regenerate the packages and signature manifest files run bpkg rep-create # command, for example: diff --git a/tests/common/bar/stable/repositories b/tests/common/bar/stable/repositories deleted file mode 100644 index b8ecc1f..0000000 --- a/tests/common/bar/stable/repositories +++ /dev/null @@ -1,6 +0,0 @@ -# bar/stable -# -: 1 -location: ../../foo/stable -: - diff --git a/tests/common/bar/stable/repositories.manifest b/tests/common/bar/stable/repositories.manifest new file mode 100644 index 0000000..b8ecc1f --- /dev/null +++ b/tests/common/bar/stable/repositories.manifest @@ -0,0 +1,6 @@ +# bar/stable +# +: 1 +location: ../../foo/stable +: + diff --git a/tests/common/bar/testing/repositories b/tests/common/bar/testing/repositories deleted file mode 100644 index 5ab8cba..0000000 --- a/tests/common/bar/testing/repositories +++ /dev/null @@ -1,8 +0,0 @@ -# bar/testing -# -: 1 -location: ../../foo/testing -: -location: ../stable -role: complement -: diff --git a/tests/common/bar/testing/repositories.manifest b/tests/common/bar/testing/repositories.manifest new file mode 100644 index 0000000..5ab8cba --- /dev/null +++ b/tests/common/bar/testing/repositories.manifest @@ -0,0 +1,8 @@ +# bar/testing +# +: 1 +location: ../../foo/testing +: +location: ../stable +role: complement +: diff --git a/tests/common/bar/unstable/repositories b/tests/common/bar/unstable/repositories deleted file mode 100644 index d4ddcf5..0000000 --- a/tests/common/bar/unstable/repositories +++ /dev/null @@ -1,8 +0,0 @@ -# bar/unstable -# -: 1 -location: ../../foo/testing -: -location: ../testing -role: complement -: diff --git a/tests/common/bar/unstable/repositories.manifest b/tests/common/bar/unstable/repositories.manifest new file mode 100644 index 0000000..d4ddcf5 --- /dev/null +++ b/tests/common/bar/unstable/repositories.manifest @@ -0,0 +1,8 @@ +# bar/unstable +# +: 1 +location: ../../foo/testing +: +location: ../testing +role: complement +: diff --git a/tests/common/foo/stable/repositories b/tests/common/foo/stable/repositories deleted file mode 100644 index 13673fb..0000000 --- a/tests/common/foo/stable/repositories +++ /dev/null @@ -1,3 +0,0 @@ -# foo/stable -# -: 1 diff --git a/tests/common/foo/stable/repositories.manifest b/tests/common/foo/stable/repositories.manifest new file mode 100644 index 0000000..13673fb --- /dev/null +++ b/tests/common/foo/stable/repositories.manifest @@ -0,0 +1,3 @@ +# foo/stable +# +: 1 diff --git a/tests/common/foo/testing/repositories b/tests/common/foo/testing/repositories deleted file mode 100644 index cd33f88..0000000 --- a/tests/common/foo/testing/repositories +++ /dev/null @@ -1,6 +0,0 @@ -# foo/testing -# -: 1 -location: ../stable -role: complement -: diff --git a/tests/common/foo/testing/repositories.manifest b/tests/common/foo/testing/repositories.manifest new file mode 100644 index 0000000..cd33f88 --- /dev/null +++ b/tests/common/foo/testing/repositories.manifest @@ -0,0 +1,6 @@ +# foo/testing +# +: 1 +location: ../stable +role: complement +: diff --git a/tests/common/git/state0/libbar.tar b/tests/common/git/state0/libbar.tar index c98479d..4861d35 100644 Binary files a/tests/common/git/state0/libbar.tar and b/tests/common/git/state0/libbar.tar differ diff --git a/tests/common/git/state0/libfoo.tar b/tests/common/git/state0/libfoo.tar index 6c059e6..2707476 100644 Binary files a/tests/common/git/state0/libfoo.tar and b/tests/common/git/state0/libfoo.tar differ diff --git a/tests/common/git/state0/style-basic.tar b/tests/common/git/state0/style-basic.tar index 2e0ef8e..9444ab8 100644 Binary files a/tests/common/git/state0/style-basic.tar and b/tests/common/git/state0/style-basic.tar differ diff --git a/tests/common/git/state0/style.tar b/tests/common/git/state0/style.tar index c7e9d4b..7989e77 100644 Binary files a/tests/common/git/state0/style.tar and b/tests/common/git/state0/style.tar differ diff --git a/tests/common/git/state1/libbaz.tar b/tests/common/git/state1/libbaz.tar index fadd780..b2bf286 100644 Binary files a/tests/common/git/state1/libbaz.tar and b/tests/common/git/state1/libbaz.tar differ diff --git a/tests/common/git/state1/libfoo.tar b/tests/common/git/state1/libfoo.tar index 53c5220..859637a 100644 Binary files a/tests/common/git/state1/libfoo.tar and b/tests/common/git/state1/libfoo.tar differ diff --git a/tests/common/git/state1/style-basic.tar b/tests/common/git/state1/style-basic.tar index 9b46120..a8a3a88 100644 Binary files a/tests/common/git/state1/style-basic.tar and b/tests/common/git/state1/style-basic.tar differ diff --git a/tests/common/git/state1/style.tar b/tests/common/git/state1/style.tar index 4b2e9e9..8ef9104 100644 Binary files a/tests/common/git/state1/style.tar and b/tests/common/git/state1/style.tar differ diff --git a/tests/common/hello/repositories b/tests/common/hello/repositories deleted file mode 100644 index eb30fe1..0000000 --- a/tests/common/hello/repositories +++ /dev/null @@ -1,4 +0,0 @@ -# Hello World repository. Currently does not have any prerequisite -# repositories. -# -: 1 diff --git a/tests/common/hello/repositories.manifest b/tests/common/hello/repositories.manifest new file mode 100644 index 0000000..eb30fe1 --- /dev/null +++ b/tests/common/hello/repositories.manifest @@ -0,0 +1,4 @@ +# Hello World repository. Currently does not have any prerequisite +# repositories. +# +: 1 diff --git a/tests/common/prereq-cycle/extra/repositories b/tests/common/prereq-cycle/extra/repositories deleted file mode 100644 index ecaa454..0000000 --- a/tests/common/prereq-cycle/extra/repositories +++ /dev/null @@ -1,3 +0,0 @@ -: 1 -location: ../stable -: diff --git a/tests/common/prereq-cycle/extra/repositories.manifest b/tests/common/prereq-cycle/extra/repositories.manifest new file mode 100644 index 0000000..ecaa454 --- /dev/null +++ b/tests/common/prereq-cycle/extra/repositories.manifest @@ -0,0 +1,3 @@ +: 1 +location: ../stable +: diff --git a/tests/common/prereq-cycle/math/repositories b/tests/common/prereq-cycle/math/repositories deleted file mode 100644 index 14d6ce0..0000000 --- a/tests/common/prereq-cycle/math/repositories +++ /dev/null @@ -1,3 +0,0 @@ -: 1 -location: ../extra -: diff --git a/tests/common/prereq-cycle/math/repositories.manifest b/tests/common/prereq-cycle/math/repositories.manifest new file mode 100644 index 0000000..14d6ce0 --- /dev/null +++ b/tests/common/prereq-cycle/math/repositories.manifest @@ -0,0 +1,3 @@ +: 1 +location: ../extra +: diff --git a/tests/common/prereq-cycle/stable/repositories b/tests/common/prereq-cycle/stable/repositories deleted file mode 100644 index b49d922..0000000 --- a/tests/common/prereq-cycle/stable/repositories +++ /dev/null @@ -1,3 +0,0 @@ -: 1 -location: ../math -: diff --git a/tests/common/prereq-cycle/stable/repositories.manifest b/tests/common/prereq-cycle/stable/repositories.manifest new file mode 100644 index 0000000..b49d922 --- /dev/null +++ b/tests/common/prereq-cycle/stable/repositories.manifest @@ -0,0 +1,3 @@ +: 1 +location: ../math +: diff --git a/tests/common/satisfy/repositories b/tests/common/satisfy/repositories deleted file mode 100644 index 5b70556..0000000 --- a/tests/common/satisfy/repositories +++ /dev/null @@ -1 +0,0 @@ -: 1 diff --git a/tests/common/satisfy/repositories.manifest b/tests/common/satisfy/repositories.manifest new file mode 100644 index 0000000..5b70556 --- /dev/null +++ b/tests/common/satisfy/repositories.manifest @@ -0,0 +1 @@ +: 1 diff --git a/tests/common/satisfy/t1/repositories b/tests/common/satisfy/t1/repositories deleted file mode 120000 index d965b15..0000000 --- a/tests/common/satisfy/t1/repositories +++ /dev/null @@ -1 +0,0 @@ -../repositories \ No newline at end of file diff --git a/tests/common/satisfy/t1/repositories.manifest b/tests/common/satisfy/t1/repositories.manifest new file mode 120000 index 0000000..0d4767a --- /dev/null +++ b/tests/common/satisfy/t1/repositories.manifest @@ -0,0 +1 @@ +../repositories.manifest \ No newline at end of file diff --git a/tests/common/satisfy/t2/repositories b/tests/common/satisfy/t2/repositories deleted file mode 120000 index d965b15..0000000 --- a/tests/common/satisfy/t2/repositories +++ /dev/null @@ -1 +0,0 @@ -../repositories \ No newline at end of file diff --git a/tests/common/satisfy/t2/repositories.manifest b/tests/common/satisfy/t2/repositories.manifest new file mode 120000 index 0000000..0d4767a --- /dev/null +++ b/tests/common/satisfy/t2/repositories.manifest @@ -0,0 +1 @@ +../repositories.manifest \ No newline at end of file diff --git a/tests/common/satisfy/t3/repositories b/tests/common/satisfy/t3/repositories deleted file mode 100644 index d65b272..0000000 --- a/tests/common/satisfy/t3/repositories +++ /dev/null @@ -1,4 +0,0 @@ -: 1 -location: ../t2 -: - diff --git a/tests/common/satisfy/t3/repositories.manifest b/tests/common/satisfy/t3/repositories.manifest new file mode 100644 index 0000000..d65b272 --- /dev/null +++ b/tests/common/satisfy/t3/repositories.manifest @@ -0,0 +1,4 @@ +: 1 +location: ../t2 +: + diff --git a/tests/common/satisfy/t4a/repositories b/tests/common/satisfy/t4a/repositories deleted file mode 120000 index d965b15..0000000 --- a/tests/common/satisfy/t4a/repositories +++ /dev/null @@ -1 +0,0 @@ -../repositories \ No newline at end of file diff --git a/tests/common/satisfy/t4a/repositories.manifest b/tests/common/satisfy/t4a/repositories.manifest new file mode 120000 index 0000000..0d4767a --- /dev/null +++ b/tests/common/satisfy/t4a/repositories.manifest @@ -0,0 +1 @@ +../repositories.manifest \ No newline at end of file diff --git a/tests/common/satisfy/t4b/repositories b/tests/common/satisfy/t4b/repositories deleted file mode 100644 index 7b85e71..0000000 --- a/tests/common/satisfy/t4b/repositories +++ /dev/null @@ -1,3 +0,0 @@ -: 1 -location: ../t4a -: diff --git a/tests/common/satisfy/t4b/repositories.manifest b/tests/common/satisfy/t4b/repositories.manifest new file mode 100644 index 0000000..7b85e71 --- /dev/null +++ b/tests/common/satisfy/t4b/repositories.manifest @@ -0,0 +1,3 @@ +: 1 +location: ../t4a +: diff --git a/tests/common/satisfy/t4c/repositories b/tests/common/satisfy/t4c/repositories deleted file mode 100644 index 26c0e93..0000000 --- a/tests/common/satisfy/t4c/repositories +++ /dev/null @@ -1,3 +0,0 @@ -: 1 -location: ../t4b -: diff --git a/tests/common/satisfy/t4c/repositories.manifest b/tests/common/satisfy/t4c/repositories.manifest new file mode 100644 index 0000000..26c0e93 --- /dev/null +++ b/tests/common/satisfy/t4c/repositories.manifest @@ -0,0 +1,3 @@ +: 1 +location: ../t4b +: diff --git a/tests/common/satisfy/t4d/repositories b/tests/common/satisfy/t4d/repositories deleted file mode 100644 index 6277925..0000000 --- a/tests/common/satisfy/t4d/repositories +++ /dev/null @@ -1,4 +0,0 @@ -: 1 -location: ../t4c -role: complement -: diff --git a/tests/common/satisfy/t4d/repositories.manifest b/tests/common/satisfy/t4d/repositories.manifest new file mode 100644 index 0000000..6277925 --- /dev/null +++ b/tests/common/satisfy/t4d/repositories.manifest @@ -0,0 +1,4 @@ +: 1 +location: ../t4c +role: complement +: diff --git a/tests/common/satisfy/t5/repositories b/tests/common/satisfy/t5/repositories deleted file mode 120000 index d965b15..0000000 --- a/tests/common/satisfy/t5/repositories +++ /dev/null @@ -1 +0,0 @@ -../repositories \ No newline at end of file diff --git a/tests/common/satisfy/t5/repositories.manifest b/tests/common/satisfy/t5/repositories.manifest new file mode 120000 index 0000000..0d4767a --- /dev/null +++ b/tests/common/satisfy/t5/repositories.manifest @@ -0,0 +1 @@ +../repositories.manifest \ No newline at end of file diff --git a/tests/common/t1/repositories b/tests/common/t1/repositories deleted file mode 100644 index 5b70556..0000000 --- a/tests/common/t1/repositories +++ /dev/null @@ -1 +0,0 @@ -: 1 diff --git a/tests/common/t1/repositories.manifest b/tests/common/t1/repositories.manifest new file mode 100644 index 0000000..5b70556 --- /dev/null +++ b/tests/common/t1/repositories.manifest @@ -0,0 +1 @@ +: 1 diff --git a/tests/pkg-build.test b/tests/pkg-build.test index b1ba0c8..879fc43 100644 --- a/tests/pkg-build.test +++ b/tests/pkg-build.test @@ -23,39 +23,39 @@ # | # |-- t1 # | |-- libfoo-1.0.0.tar.gz -# | `-- repositories +# | `-- repositories.manifest # | # |-- t2 # | |-- libbar-1.0.0.tar.gz -> libfoo # | |-- libfoo-1.0.0.tar.gz -# | `-- repositories +# | `-- repositories.manifest # | # |-- t3 -> t2 (prerequisite) # | |-- libbaz-1.0.0.tar.gz -> libbar # | |-- libfox-1.0.0.tar.gz -# | `-- repositories +# | `-- repositories.manifest # | # |-- t4a # | |-- libfoo-1.1.0.tar.gz -# | `-- repositories +# | `-- repositories.manifest # | # |-- t4b -> t4a (prerequisite) # | |-- libbar-1.1.0.tar.gz -> libfoo == 1.1.0 -# | `-- repositories +# | `-- repositories.manifest # | # |-- t4c -> t4b (prerequisite) # | |-- libbaz-1.1.0.tar.gz -> libfoo, libbar # | |-- libfoo-1.0.0.tar.gz -# | `-- repositories +# | `-- repositories.manifest # | # |-- t4d -> t4c (complement) # | |-- libbiz-1.0.0.tar.gz -> libfox, libfoo, libbaz # | |-- libfox-1.0.0.tar.gz -# | `-- repositories +# | `-- repositories.manifest # | # |-- t5 # | |-- libbar-1.2.0.tar.gz -# | `-- repositories +# | `-- repositories.manifest # | # `-- git # |-- libbar.git -> style-basic.git (prerequisite) @@ -67,14 +67,14 @@ +if ($remote != true) rep_create += 2>! - cp -r $src/t1 $out/t1 && $rep_create $out/t1 &$out/t1/packages - cp -r $src/t2 $out/t2 && $rep_create $out/t2 &$out/t2/packages - cp -r $src/t3 $out/t3 && $rep_create $out/t3 &$out/t3/packages - cp -r $src/t4a $out/t4a && $rep_create $out/t4a &$out/t4a/packages - cp -r $src/t4b $out/t4b && $rep_create $out/t4b &$out/t4b/packages - cp -r $src/t4c $out/t4c && $rep_create $out/t4c &$out/t4c/packages - cp -r $src/t4d $out/t4d && $rep_create $out/t4d &$out/t4d/packages - cp -r $src/t5 $out/t5 && $rep_create $out/t5 &$out/t5/packages + cp -r $src/t1 $out/t1 && $rep_create $out/t1 &$out/t1/packages.manifest + cp -r $src/t2 $out/t2 && $rep_create $out/t2 &$out/t2/packages.manifest + cp -r $src/t3 $out/t3 && $rep_create $out/t3 &$out/t3/packages.manifest + cp -r $src/t4a $out/t4a && $rep_create $out/t4a &$out/t4a/packages.manifest + cp -r $src/t4b $out/t4b && $rep_create $out/t4b &$out/t4b/packages.manifest + cp -r $src/t4c $out/t4c && $rep_create $out/t4c &$out/t4c/packages.manifest + cp -r $src/t4d $out/t4d && $rep_create $out/t4d &$out/t4d/packages.manifest + cp -r $src/t5 $out/t5 && $rep_create $out/t5 &$out/t5/packages.manifest # Create git repositories. # diff --git a/tests/pkg-clean.test b/tests/pkg-clean.test index 64e7931..a76c1e6 100644 --- a/tests/pkg-clean.test +++ b/tests/pkg-clean.test @@ -9,7 +9,7 @@ # pkg-clean # |-- hello # | |-- libhello-1.0.0.tar.gz -# | `-- repositories +# | `-- repositories.manifest # `-- libhello-1.0.0 # |-- build # | |-- bootstrap.build @@ -42,8 +42,10 @@ # Create the signed 'hello' repository. # cp -r $src/hello $out/hello - cat <<<$cert_manifest >+$out/hello/repositories - $rep_create --key $key $out/hello &$out/hello/packages &$out/hello/signature + cat <<<$cert_manifest >+$out/hello/repositories.manifest + + $rep_create --key $key $out/hello &$out/hello/packages.manifest \ + &$out/hello/signature.manifest end pkg_configure += -d cfg "config.cxx=$config.cxx" 2>! diff --git a/tests/pkg-configure.test b/tests/pkg-configure.test index 6e320e9..5a9e6f8 100644 --- a/tests/pkg-configure.test +++ b/tests/pkg-configure.test @@ -12,7 +12,7 @@ # pkg-configure # |-- hello # | |-- libhello-1.0.0.tar.gz -# | `-- repositories +# | `-- repositories.manifest # |-- libhello-1.0.0 # | |-- build # | | |-- bootstrap.build @@ -45,7 +45,7 @@ # |-- libfoo-1.0.0.tar.gz # |-- libfoo-1.1.0.tar.gz # |-- libfoo-1.2.0.tar.gz -# `-- repositories +# `-- repositories.manifest # Prepare repositories used by tests if running in the local mode. # @@ -55,13 +55,15 @@ # Create the signed 'hello' repository. # cp -r $src/hello $out/hello - cat <<<$cert_manifest >+$out/hello/repositories - $rep_create --key $key $out/hello &$out/hello/packages &$out/hello/signature + cat <<<$cert_manifest >+$out/hello/repositories.manifest + + $rep_create --key $key $out/hello &$out/hello/packages.manifest \ + &$out/hello/signature.manifest # Create the 'stable' repository. # cp -r $src/stable $out/stable - $rep_create $out/stable &$out/stable/packages + $rep_create $out/stable &$out/stable/packages.manifest end test.arguments += "config.cxx=$config.cxx" diff --git a/tests/pkg-configure/stable/repositories b/tests/pkg-configure/stable/repositories deleted file mode 100644 index 5b70556..0000000 --- a/tests/pkg-configure/stable/repositories +++ /dev/null @@ -1 +0,0 @@ -: 1 diff --git a/tests/pkg-configure/stable/repositories.manifest b/tests/pkg-configure/stable/repositories.manifest new file mode 100644 index 0000000..5b70556 --- /dev/null +++ b/tests/pkg-configure/stable/repositories.manifest @@ -0,0 +1 @@ +: 1 diff --git a/tests/pkg-drop.test b/tests/pkg-drop.test index 9e63470..0bc52b2 100644 --- a/tests/pkg-drop.test +++ b/tests/pkg-drop.test @@ -9,28 +9,28 @@ # pkg-drop # |-- t4a # | |-- libfoo-1.1.0.tar.gz -# | `-- repositories +# | `-- repositories.manifest # |-- t4b -> t4a (prerequisite) # | |-- libbar-1.1.0.tar.gz -> libfoo == 1.1.0 -# | `-- repositories +# | `-- repositories.manifest # |-- t4c -> t4b (prerequisite) # | |-- libbaz-1.1.0.tar.gz -> libfoo, libbar # | |-- libfoo-1.0.0.tar.gz -# | `-- repositories +# | `-- repositories.manifest # `-- t4d -> t4c (complement) # |-- libbiz-1.0.0.tar.gz -> libfox, libfoo, libbaz # |-- libfox-1.0.0.tar.gz -# `-- repositories +# `-- repositories.manifest # Prepare repositories used by tests if running in the local mode. # +if ($remote != true) rep_create += 2>! - cp -r $src/t4a $out/t4a && $rep_create $out/t4a &$out/t4a/packages - cp -r $src/t4b $out/t4b && $rep_create $out/t4b &$out/t4b/packages - cp -r $src/t4c $out/t4c && $rep_create $out/t4c &$out/t4c/packages - cp -r $src/t4d $out/t4d && $rep_create $out/t4d &$out/t4d/packages + cp -r $src/t4a $out/t4a && $rep_create $out/t4a &$out/t4a/packages.manifest + cp -r $src/t4b $out/t4b && $rep_create $out/t4b &$out/t4b/packages.manifest + cp -r $src/t4c $out/t4c && $rep_create $out/t4c &$out/t4c/packages.manifest + cp -r $src/t4d $out/t4d && $rep_create $out/t4d &$out/t4d/packages.manifest end pkg_build += -d cfg --yes 2>! diff --git a/tests/pkg-fetch.test b/tests/pkg-fetch.test index 34d3397..a63bfbb 100644 --- a/tests/pkg-fetch.test +++ b/tests/pkg-fetch.test @@ -9,11 +9,11 @@ # pkg-fetch # |-- hello # | |-- libhello-1.0.0.tar.gz -# | `-- repositories +# | `-- repositories.manifest # `-- t1 # |-- libfoo-1.0.0.tar.gz # |-- libfoo-1.1.0.tar.gz -# `-- repositories +# `-- repositories.manifest # Prepare repositories used by tests if running in the local mode. # @@ -23,12 +23,14 @@ # Create the signed 'hello' repository. # cp -r $src/hello $out/hello - cat <<<$cert_manifest >+$out/hello/repositories - $rep_create --key $key $out/hello &$out/hello/packages &$out/hello/signature + cat <<<$cert_manifest >+$out/hello/repositories.manifest + + $rep_create --key $key $out/hello &$out/hello/packages.manifest \ + &$out/hello/signature.manifest # Create the 't1' repository. # - cp -r $src/t1 $out/t1 && $rep_create $out/t1 &$out/t1/packages + cp -r $src/t1 $out/t1 && $rep_create $out/t1 &$out/t1/packages.manifest end pkg_purge += -d cfg diff --git a/tests/pkg-status.test b/tests/pkg-status.test index dbdc97e..b2ecb57 100644 --- a/tests/pkg-status.test +++ b/tests/pkg-status.test @@ -9,21 +9,21 @@ # pkg-status # |-- extra -> stable (prerequisite) # | |-- libbar-1.1.0+1.tar.gz -# | `-- repositories +# | `-- repositories.manifest # | # |-- stable # | |-- libbar-1.0.0.tar.gz # | |-- libfoo-1.0.0.tar.gz -# | `-- repositories +# | `-- repositories.manifest # | # |-- testing -> stable (complement), extra (prerequisite) # | |-- libbar-1.0.0+1.tar.gz # | |-- libbar-1.1.0.tar.gz -# | `-- repositories +# | `-- repositories.manifest # | # |-- unstable -> testing (complement) # | |-- libbar-2.0.0.tar.gz -# | `-- repositories +# | `-- repositories.manifest # | # `-- git # |-- libbar.git -> style-basic.git (prerequisite) @@ -33,12 +33,17 @@ # Prepare repositories used by tests if running in the local mode. # +if ($remote != true) + cp -r $src/extra $out/extra + cp -r $src/stable $out/stable + cp -r $src/testing $out/testing + cp -r $src/unstable $out/unstable + c = $rep_create 2>! - cp -r $src/extra $out/extra && $c $out/extra &$out/extra/packages - cp -r $src/stable $out/stable && $c $out/stable &$out/stable/packages - cp -r $src/testing $out/testing && $c $out/testing &$out/testing/packages - cp -r $src/unstable $out/unstable && $c $out/unstable &$out/unstable/packages + $c $out/extra &$out/extra/packages.manifest + $c $out/stable &$out/stable/packages.manifest + $c $out/testing &$out/testing/packages.manifest + $c $out/unstable &$out/unstable/packages.manifest # Create git repositories. # diff --git a/tests/pkg-status/extra/repositories b/tests/pkg-status/extra/repositories deleted file mode 100644 index ecaa454..0000000 --- a/tests/pkg-status/extra/repositories +++ /dev/null @@ -1,3 +0,0 @@ -: 1 -location: ../stable -: diff --git a/tests/pkg-status/extra/repositories.manifest b/tests/pkg-status/extra/repositories.manifest new file mode 100644 index 0000000..ecaa454 --- /dev/null +++ b/tests/pkg-status/extra/repositories.manifest @@ -0,0 +1,3 @@ +: 1 +location: ../stable +: diff --git a/tests/pkg-status/stable/repositories b/tests/pkg-status/stable/repositories deleted file mode 100644 index 5b70556..0000000 --- a/tests/pkg-status/stable/repositories +++ /dev/null @@ -1 +0,0 @@ -: 1 diff --git a/tests/pkg-status/stable/repositories.manifest b/tests/pkg-status/stable/repositories.manifest new file mode 100644 index 0000000..5b70556 --- /dev/null +++ b/tests/pkg-status/stable/repositories.manifest @@ -0,0 +1 @@ +: 1 diff --git a/tests/pkg-status/testing/repositories b/tests/pkg-status/testing/repositories deleted file mode 100644 index 7bd7269..0000000 --- a/tests/pkg-status/testing/repositories +++ /dev/null @@ -1,6 +0,0 @@ -: 1 -location: ../stable -role: complement -: -location: ../extra -: diff --git a/tests/pkg-status/testing/repositories.manifest b/tests/pkg-status/testing/repositories.manifest new file mode 100644 index 0000000..7bd7269 --- /dev/null +++ b/tests/pkg-status/testing/repositories.manifest @@ -0,0 +1,6 @@ +: 1 +location: ../stable +role: complement +: +location: ../extra +: diff --git a/tests/pkg-status/unstable/repositories b/tests/pkg-status/unstable/repositories deleted file mode 100644 index 8f4a5f6..0000000 --- a/tests/pkg-status/unstable/repositories +++ /dev/null @@ -1,4 +0,0 @@ -: 1 -location: ../testing -role: complement -: diff --git a/tests/pkg-status/unstable/repositories.manifest b/tests/pkg-status/unstable/repositories.manifest new file mode 100644 index 0000000..8f4a5f6 --- /dev/null +++ b/tests/pkg-status/unstable/repositories.manifest @@ -0,0 +1,4 @@ +: 1 +location: ../testing +role: complement +: diff --git a/tests/pkg-system.test b/tests/pkg-system.test index 4d6bb39..1344cbf 100644 --- a/tests/pkg-system.test +++ b/tests/pkg-system.test @@ -22,23 +22,23 @@ # | |-- libbar-1.tar.gz -> libbaz == 2 # | |-- libbar-2.tar.gz -> libbaz == 2 # | |-- libbaz-2.tar.gz -# | `-- repositories +# | `-- repositories.manifest # |-- t2 # | |-- foo-2.tar.gz -> libbar >= 2 # | |-- libbar-0+1.tar.gz -# | `-- repositories +# | `-- repositories.manifest # `-- t3 -> t2 (prerequisite) # |-- foo-2.tar.gz -> libbar >= 2 -# `-- repositories +# `-- repositories.manifest # Prepare repositories used by tests if running in the local mode. # +if ($remote != true) rep_create += 2>! - cp -r $src/t1 $out/t1 && $rep_create $out/t1 &$out/t1/packages - cp -r $src/t2 $out/t2 && $rep_create $out/t2 &$out/t2/packages - cp -r $src/t3 $out/t3 && $rep_create $out/t3 &$out/t3/packages + cp -r $src/t1 $out/t1 && $rep_create $out/t1 &$out/t1/packages.manifest + cp -r $src/t2 $out/t2 && $rep_create $out/t2 &$out/t2/packages.manifest + cp -r $src/t3 $out/t3 && $rep_create $out/t3 &$out/t3/packages.manifest end pkg_build += -d cfg --yes diff --git a/tests/pkg-system/t1/repositories b/tests/pkg-system/t1/repositories deleted file mode 100644 index 5b70556..0000000 --- a/tests/pkg-system/t1/repositories +++ /dev/null @@ -1 +0,0 @@ -: 1 diff --git a/tests/pkg-system/t1/repositories.manifest b/tests/pkg-system/t1/repositories.manifest new file mode 100644 index 0000000..5b70556 --- /dev/null +++ b/tests/pkg-system/t1/repositories.manifest @@ -0,0 +1 @@ +: 1 diff --git a/tests/pkg-system/t2/repositories b/tests/pkg-system/t2/repositories deleted file mode 100644 index 5b70556..0000000 --- a/tests/pkg-system/t2/repositories +++ /dev/null @@ -1 +0,0 @@ -: 1 diff --git a/tests/pkg-system/t2/repositories.manifest b/tests/pkg-system/t2/repositories.manifest new file mode 100644 index 0000000..5b70556 --- /dev/null +++ b/tests/pkg-system/t2/repositories.manifest @@ -0,0 +1 @@ +: 1 diff --git a/tests/pkg-system/t3/repositories b/tests/pkg-system/t3/repositories deleted file mode 100644 index 2715634..0000000 --- a/tests/pkg-system/t3/repositories +++ /dev/null @@ -1,3 +0,0 @@ -: 1 -location: ../t2 -: \ No newline at end of file diff --git a/tests/pkg-system/t3/repositories.manifest b/tests/pkg-system/t3/repositories.manifest new file mode 100644 index 0000000..2715634 --- /dev/null +++ b/tests/pkg-system/t3/repositories.manifest @@ -0,0 +1,3 @@ +: 1 +location: ../t2 +: \ No newline at end of file diff --git a/tests/pkg-unpack.test b/tests/pkg-unpack.test index 0ba249f..e4f07d4 100644 --- a/tests/pkg-unpack.test +++ b/tests/pkg-unpack.test @@ -9,7 +9,7 @@ # pkg-unpack # |-- hello # | |-- libhello-1.0.0.tar.gz -# | `-- repositories +# | `-- repositories.manifest # |-- libfoo-1.1.0 # | |-- build # | | `-- bootstrap.build @@ -18,7 +18,7 @@ # `-- t1 # |-- libfoo-1.0.0.tar.gz # |-- libfoo-1.1.0.tar.gz -# `-- repositories +# `-- repositories.manifest # Prepare repositories used by tests if running in the local mode. # @@ -28,12 +28,14 @@ # Create the signed 'hello' repository. # cp -r $src/hello $out/hello - cat <<<$cert_manifest >+$out/hello/repositories - $rep_create --key $key $out/hello &$out/hello/packages &$out/hello/signature + cat <<<$cert_manifest >+$out/hello/repositories.manifest + + $rep_create --key $key $out/hello &$out/hello/packages.manifest \ + &$out/hello/signature.manifest # Create the 't1' repository. # - cp -r $src/t1 $out/t1 && $rep_create $out/t1 &$out/t1/packages + cp -r $src/t1 $out/t1 && $rep_create $out/t1 &$out/t1/packages.manifest end pkg_fetch += -d cfg 2>! diff --git a/tests/pkg-update.test b/tests/pkg-update.test index d2e28ef..965c0b0 100644 --- a/tests/pkg-update.test +++ b/tests/pkg-update.test @@ -9,7 +9,7 @@ # pkg-update # |-- hello # | |-- libhello-1.0.0.tar.gz -# | `-- repositories +# | `-- repositories.manifest # `-- libhello-1.0.0 # |-- build # | |-- bootstrap.build @@ -42,8 +42,10 @@ # Create the signed 'hello' repository. # cp -r $src/hello $out/hello - cat <<<$cert_manifest >+$out/hello/repositories - $rep_create --key $key $out/hello &$out/hello/packages &$out/hello/signature + cat <<<$cert_manifest >+$out/hello/repositories.manifest + + $rep_create --key $key $out/hello &$out/hello/packages.manifest \ + &$out/hello/signature.manifest end pkg_configure += -d cfg "config.cxx=$config.cxx" 2>! diff --git a/tests/publish b/tests/publish index 21c7898..90b20c9 100755 --- a/tests/publish +++ b/tests/publish @@ -24,14 +24,14 @@ done # Publish test pkg repositories. # -rsync -v -rlpt --copy-unsafe-links \ +rsync -v -rlpt --copy-unsafe-links \ --prune-empty-dirs --delete-after --delete-excluded $* \ ---include '*/' \ ---include '*.tar.gz' \ ---include 'packages' \ ---include 'repositories' \ ---include 'signature' \ ---exclude '*' \ +--include '*/' \ +--include '*.tar.gz' \ +--include 'packages.manifest' \ +--include 'repositories.manifest' \ +--include 'signature.manifest' \ +--exclude '*' \ test/*/pkg/1/build2.org/ build2.org:/var/pkg/1/ # Publish test git repositories. diff --git a/tests/remote-git.test b/tests/remote-git.test index 466acb9..37d5438 100644 --- a/tests/remote-git.test +++ b/tests/remote-git.test @@ -61,7 +61,7 @@ end # directory (see above). # # Note that we can expect that the tar program is present on the platform. We -# will use the same options as we do for unpacking of bpkg packages (see +# will use the same options as we do for unpacking of package archives (see # pkg-unpack.cxx). # git_extract = ($cxx.target.class != 'windows' \ diff --git a/tests/rep-auth.test b/tests/rep-auth.test index 1fb7d97..987a3fe 100644 --- a/tests/rep-auth.test +++ b/tests/rep-auth.test @@ -15,12 +15,12 @@ # rep-auth # |-- expired # | |-- foo-1.tar.gz -# | |-- packages -# | |-- repositories -# | `-- signature +# | |-- packages.manifest +# | |-- repositories.manifest +# | `-- signature.manifest # `-- unsigned # |-- foo-1.tar.gz -# `-- repositories +# `-- repositories.manifest # Prepare repositories used by tests if running in the local mode. # @@ -30,7 +30,7 @@ # Create the 'unsigned1' repository. # cp -r $src/unsigned $out/unsigned1 - $rc $out/unsigned1 &$out/unsigned1/packages + $rc $out/unsigned1 &$out/unsigned1/packages.manifest # Create the 'unsigned2' repository. This is a copy of the just created # 'unsigned1' repository. @@ -40,8 +40,10 @@ # Create the 'signed' repository. # cp -r $src/unsigned $out/signed - cat <<<$cert_manifest >+$out/signed/repositories - $rc --key $key $out/signed &$out/signed/packages &$out/signed/signature + cat <<<$cert_manifest >+$out/signed/repositories.manifest + + $rc --key $key $out/signed &$out/signed/packages.manifest \ + &$out/signed/signature.manifest # Create the 'self-match' repository. Note that its certificate name is # the '*build2.org' wildcard (matches build2.org and any single-level @@ -49,24 +51,24 @@ # cp -r $src/unsigned $out/self-match - echo 'certificate: \' >+$out/self-match/repositories - cat <<<$src_base/auth/self-cert.pem >+$out/self-match/repositories - echo '\' >+$out/self-match/repositories + echo 'certificate: \' >+$out/self-match/repositories.manifest + cat <<<$src_base/auth/self-cert.pem >+$out/self-match/repositories.manifest + echo '\' >+$out/self-match/repositories.manifest - $rc --key $key $out/self-match &$out/self-match/packages \ - &$out/self-match/signature + $rc --key $key $out/self-match &$out/self-match/packages.manifest \ + &$out/self-match/signature.manifest # Create the 'self-any-match' repository. Note that its certificate name is # the '**build2.org' wildcard (matches build2.org and any subdomain). # cp -r $src/unsigned $out/self-any-match - echo 'certificate: \' >+$out/self-any-match/repositories - cat <<<$src_base/auth/self-any-cert.pem >+$out/self-any-match/repositories - echo '\' >+$out/self-any-match/repositories + echo 'certificate: \' >+$out/self-any-match/repositories.manifest + cat <<<$src_base/auth/self-any-cert.pem >+$out/self-any-match/repositories.manifest + echo '\' >+$out/self-any-match/repositories.manifest - $rc --key $key $out/self-any-match &$out/self-any-match/packages \ - &$out/self-any-match/signature + $rc --key $key $out/self-any-match &$out/self-any-match/packages.manifest \ + &$out/self-any-match/signature.manifest # Create the 'subdomain-match' repository. Note that its certificate name is # the '*.build2.org' wildcard (matches any single-level subdomain of @@ -74,24 +76,24 @@ # cp -r $src/unsigned $out/subdomain-match - echo 'certificate: \' >+$out/subdomain-match/repositories - cat <<<$src_base/auth/subdomain-cert.pem >+$out/subdomain-match/repositories - echo '\' >+$out/subdomain-match/repositories + echo 'certificate: \' >+$out/subdomain-match/repositories.manifest + cat <<<$src_base/auth/subdomain-cert.pem >+$out/subdomain-match/repositories.manifest + echo '\' >+$out/subdomain-match/repositories.manifest - $rc --key $key $out/subdomain-match &$out/subdomain-match/packages \ - &$out/subdomain-match/signature + $rc --key $key $out/subdomain-match &$out/subdomain-match/packages.manifest \ + &$out/subdomain-match/signature.manifest # Create the 'name-mismatch' repository. Note that its certificate name # mismatches the repository location. # cp -r $src/unsigned $out/name-mismatch - echo 'certificate: \' >+$out/name-mismatch/repositories - cat <<<$src_base/auth/mismatch-cert.pem >+$out/name-mismatch/repositories - echo '\' >+$out/name-mismatch/repositories + echo 'certificate: \' >+$out/name-mismatch/repositories.manifest + cat <<<$src_base/auth/mismatch-cert.pem >+$out/name-mismatch/repositories.manifest + echo '\' >+$out/name-mismatch/repositories.manifest - $rc --key $key $out/name-mismatch &$out/name-mismatch/packages \ - &$out/name-mismatch/signature + $rc --key $key $out/name-mismatch &$out/name-mismatch/packages.manifest \ + &$out/name-mismatch/signature.manifest # Create the 'expired' repository. This repository is "pre-created" and its # certificate is expired by now. So we just copy it from the source @@ -105,7 +107,9 @@ cp -r $out/signed $out/sha256sum-mismatch v = 'd374c59b36fdbdbd0d4468665061d94fda9c6c687863dfe72b0bcc34ff9d5fb4' - sed -i -e "s/^\(sha256sum: \).*\$/\\1$v/" $out/sha256sum-mismatch/signature + + sed -i -e "s/^\(sha256sum: \).*\$/\\1$v/" \ + $out/sha256sum-mismatch/signature.manifest # Create the 'signature-mismatch' repository. This is a copy of the just # created 'signed' repository that has the signature manifest value tampered. @@ -116,7 +120,7 @@ # spaces and terminated with '='). # v = 'mnBAsS529NUdNIQy8EB4si/UK26ICaMywbLeHDVvWOB+AsqZ5rj8VjGDamLbmUrDr3ru7BU1gJU=' - sed -i -e "s%^[^ ]{75}=\$%$v%" $out/signature-mismatch/signature + sed -i -e "s%^[^ ]{75}=\$%$v%" $out/signature-mismatch/signature.manifest end pkg_status += -d cfg @@ -138,8 +142,8 @@ sc = " " # Space character to append to here-document line when required. r = 1/signed +mkdir 1/ +cp -r $src/unsigned $r - +cat <<<$cert_manifest >+$r/repositories - +$rep_create --key $key $r &$r/packages &$r/signature 2>! + +cat <<<$cert_manifest >+$r/repositories.manifest + +$rep_create --key $key $r &$r/packages.manifest &$r/signature.manifest 2>! : rep-fetch : @@ -602,11 +606,11 @@ sc = " " # Space character to append to here-document line when required. { cp -r $src/unsigned rep; - echo 'certificate: \' >+rep/repositories; - cat <<<$src_base/auth/noemail-cert.pem >+rep/repositories; - echo '\' >+rep/repositories; + echo 'certificate: \' >+rep/repositories.manifest; + cat <<<$src_base/auth/noemail-cert.pem >+rep/repositories.manifest; + echo '\' >+rep/repositories.manifest; - $rep_create --key $key rep &rep/packages 2>>/EOE != 0 + $rep_create --key $key rep &rep/packages.manifest 2>>/EOE != 0 adding foo 1 error: invalid certificate for rep/: no email EOE @@ -617,11 +621,11 @@ sc = " " # Space character to append to here-document line when required. { cp -r $src/unsigned rep; - echo 'certificate: \' >+rep/repositories; - cat <<<$src_base/auth/expired-cert.pem >+rep/repositories; - echo '\' >+rep/repositories; + echo 'certificate: \' >+rep/repositories.manifest; + cat <<<$src_base/auth/expired-cert.pem >+rep/repositories.manifest; + echo '\' >+rep/repositories.manifest; - $rep_create --key $key rep &rep/packages 2>>/EOE != 0 + $rep_create --key $key rep &rep/packages.manifest 2>>/EOE != 0 adding foo 1 error: certificate for repository rep/ has expired EOE diff --git a/tests/rep-auth/expired/packages b/tests/rep-auth/expired/packages deleted file mode 100644 index 4fa075a..0000000 --- a/tests/rep-auth/expired/packages +++ /dev/null @@ -1,11 +0,0 @@ -: 1 -sha256sum: dbeea68d374f6ca66b5f65652e26a0d8324d3fe118341ac470c07214ceb34b60 -: -name: foo -version: 1 -summary: The "Foo" utility -license: MIT -url: http://www.example.org/foo -email: foo-users@example.org -location: foo-1.tar.gz -sha256sum: fee330a362a4f87ff42a954aa305b6446d541b7b60000ebcd2fbf68f2b1ae58e diff --git a/tests/rep-auth/expired/packages.manifest b/tests/rep-auth/expired/packages.manifest new file mode 100644 index 0000000..4fa075a --- /dev/null +++ b/tests/rep-auth/expired/packages.manifest @@ -0,0 +1,11 @@ +: 1 +sha256sum: dbeea68d374f6ca66b5f65652e26a0d8324d3fe118341ac470c07214ceb34b60 +: +name: foo +version: 1 +summary: The "Foo" utility +license: MIT +url: http://www.example.org/foo +email: foo-users@example.org +location: foo-1.tar.gz +sha256sum: fee330a362a4f87ff42a954aa305b6446d541b7b60000ebcd2fbf68f2b1ae58e diff --git a/tests/rep-auth/expired/repositories b/tests/rep-auth/expired/repositories deleted file mode 100644 index 7e68ee8..0000000 --- a/tests/rep-auth/expired/repositories +++ /dev/null @@ -1,33 +0,0 @@ -: 1 -certificate: \ ------BEGIN CERTIFICATE----- -MIIFLzCCAxegAwIBAgIJAOx1KvcHxv3GMA0GCSqGSIb3DQEBCwUAMDMxFzAVBgNV -BAoMDkNvZGUgU3ludGhlc2lzMRgwFgYDVQQDDA9uYW1lOmJ1aWxkMi5vcmcwHhcN -MTcwMzAxMTcwMTI0WhcNMTcwMzAyMTcwMTI0WjAzMRcwFQYDVQQKDA5Db2RlIFN5 -bnRoZXNpczEYMBYGA1UEAwwPbmFtZTpidWlsZDIub3JnMIICIjANBgkqhkiG9w0B -AQEFAAOCAg8AMIICCgKCAgEA2rvxJe7MXMIygVTVGfMR4B/MTRRRgbKdLcXaUbu+ -IfdyjGMu34GsUG51WzhcNOmNdLX2FHEiiESAPvVbWOEO+ZQL3IIxbXc8IgiNEpNP -PR58SFNwwd2E6C8pmyN7QhXuy+gpVdwbsN9RWXnXBY9A9JtSt+xBuxeDs/PkdoPH -4O3aL2HB0TUzTPhHZ23BCSzMXIIqJfxEX2g9eKtPPkRMsLd/X0lRqkutjmXlnKXN -CJ8uE8yUcuWtPSfsqSiEfvBpfcrJ4trQzYgiXfNp4Cy434SsVV5wB2Uki9fTRy2H -Y478bHLT2wgqVqCLartkOKTawy8bx0C/uA1mxen4U6P9dcKI4j1/oPmiykl0r0Hl -QIAGOYZzxbk52/pkt7LlSLvqW4jtyIhM4p8CgSRvIyI0eJHEt0ztoB6LN1zAdThu -bomWaImTxTLJXzl/fea8JJ+6jsP4NBiIrrnT/HBF1MUEiqLfwjAwTraBPtqH8A6a -I+yGPsWPAhTtlYeyTKv2qkTFA4QolegtkmjWt/oxFzwCwnLPrN19CFPUFPOGiA1+ -u7jGNUzp9KuNFQXfiay5ZzP8cqj1bfnQDDbLkXn2TOI/6bsbq4FiuqYSW//XdVqa -DZlnVvfwozPlKzdKR9wMSs7PP8P7SFGU5oIh5a2zUbbNZxC8Gef7MYD6xMi7TEAU -4JECAwEAAaNGMEQwDgYDVR0PAQH/BAQDAgeAMBYGA1UdJQEB/wQMMAoGCCsGAQUF -BwMDMBoGA1UdEQQTMBGBD2luZm9AYnVpbGQyLm9yZzANBgkqhkiG9w0BAQsFAAOC -AgEATQmuoB+NC/IF2qoNQnurJWrV63lC4Ozi/VLIqCSR6A4S9TCcoLNDAtcdiyf4 -GrM+/USyV3whpISesXn0ij10OEMe2/9NUoqkO0Q/woN9WtUQActeBxThOcz0NYMi -1vg6krlx1fKpQ5g65yC3qka8VUaV9gtaCHFa6mOxZ9q5DaV2NdBAr+FOutRY6d4v -UySkOyqxfZYLs5W2e+9ofEve17eVNFQwuJY29sw406X+18gYc+KiqldPlwKIhJs1 -CBsWhO0m1GP5dR0gRBmF9WQ4fzNyoYF293ix+WC7eMf2OtRTpo/GEAXDqLlRvpiF -jALhFtcZjiIqrvnkQFq36jyVNcUnxbMKUgW4XJVpYv4uVII47eJk4a8XRGj0d+7b -nuFfT4d6gACN3gfOmtd12uT7dNsn5q0fkGhzR4ppDIyTJpGA8UhHETTRPL+HFcb1 -6kXnRPFS7eoF9DoSGtBhdpRUefj8EPJWhfE7xQvMDTYIE/ccBWp173F+xShr2mgF -xDkHH+vXGFzUZXSEAF2NW9U3bf4bRQpdOkYJsvHJmLYjcGNKdkHjJVWdXmoRpbsR -IC8M7ZPp+/oV5JEinCXRsT1NN+7l8rkec9hNk5sbokVCcyYv+GxL8kRFt2jyLqny -RlM2vM3uhgJNYVSlYsgjjg4QfikV6s+QawjSVi6y4ZnHEho= ------END CERTIFICATE----- -\ diff --git a/tests/rep-auth/expired/repositories.manifest b/tests/rep-auth/expired/repositories.manifest new file mode 100644 index 0000000..7e68ee8 --- /dev/null +++ b/tests/rep-auth/expired/repositories.manifest @@ -0,0 +1,33 @@ +: 1 +certificate: \ +-----BEGIN CERTIFICATE----- +MIIFLzCCAxegAwIBAgIJAOx1KvcHxv3GMA0GCSqGSIb3DQEBCwUAMDMxFzAVBgNV +BAoMDkNvZGUgU3ludGhlc2lzMRgwFgYDVQQDDA9uYW1lOmJ1aWxkMi5vcmcwHhcN +MTcwMzAxMTcwMTI0WhcNMTcwMzAyMTcwMTI0WjAzMRcwFQYDVQQKDA5Db2RlIFN5 +bnRoZXNpczEYMBYGA1UEAwwPbmFtZTpidWlsZDIub3JnMIICIjANBgkqhkiG9w0B +AQEFAAOCAg8AMIICCgKCAgEA2rvxJe7MXMIygVTVGfMR4B/MTRRRgbKdLcXaUbu+ +IfdyjGMu34GsUG51WzhcNOmNdLX2FHEiiESAPvVbWOEO+ZQL3IIxbXc8IgiNEpNP +PR58SFNwwd2E6C8pmyN7QhXuy+gpVdwbsN9RWXnXBY9A9JtSt+xBuxeDs/PkdoPH +4O3aL2HB0TUzTPhHZ23BCSzMXIIqJfxEX2g9eKtPPkRMsLd/X0lRqkutjmXlnKXN +CJ8uE8yUcuWtPSfsqSiEfvBpfcrJ4trQzYgiXfNp4Cy434SsVV5wB2Uki9fTRy2H +Y478bHLT2wgqVqCLartkOKTawy8bx0C/uA1mxen4U6P9dcKI4j1/oPmiykl0r0Hl +QIAGOYZzxbk52/pkt7LlSLvqW4jtyIhM4p8CgSRvIyI0eJHEt0ztoB6LN1zAdThu +bomWaImTxTLJXzl/fea8JJ+6jsP4NBiIrrnT/HBF1MUEiqLfwjAwTraBPtqH8A6a +I+yGPsWPAhTtlYeyTKv2qkTFA4QolegtkmjWt/oxFzwCwnLPrN19CFPUFPOGiA1+ +u7jGNUzp9KuNFQXfiay5ZzP8cqj1bfnQDDbLkXn2TOI/6bsbq4FiuqYSW//XdVqa +DZlnVvfwozPlKzdKR9wMSs7PP8P7SFGU5oIh5a2zUbbNZxC8Gef7MYD6xMi7TEAU +4JECAwEAAaNGMEQwDgYDVR0PAQH/BAQDAgeAMBYGA1UdJQEB/wQMMAoGCCsGAQUF +BwMDMBoGA1UdEQQTMBGBD2luZm9AYnVpbGQyLm9yZzANBgkqhkiG9w0BAQsFAAOC +AgEATQmuoB+NC/IF2qoNQnurJWrV63lC4Ozi/VLIqCSR6A4S9TCcoLNDAtcdiyf4 +GrM+/USyV3whpISesXn0ij10OEMe2/9NUoqkO0Q/woN9WtUQActeBxThOcz0NYMi +1vg6krlx1fKpQ5g65yC3qka8VUaV9gtaCHFa6mOxZ9q5DaV2NdBAr+FOutRY6d4v +UySkOyqxfZYLs5W2e+9ofEve17eVNFQwuJY29sw406X+18gYc+KiqldPlwKIhJs1 +CBsWhO0m1GP5dR0gRBmF9WQ4fzNyoYF293ix+WC7eMf2OtRTpo/GEAXDqLlRvpiF +jALhFtcZjiIqrvnkQFq36jyVNcUnxbMKUgW4XJVpYv4uVII47eJk4a8XRGj0d+7b +nuFfT4d6gACN3gfOmtd12uT7dNsn5q0fkGhzR4ppDIyTJpGA8UhHETTRPL+HFcb1 +6kXnRPFS7eoF9DoSGtBhdpRUefj8EPJWhfE7xQvMDTYIE/ccBWp173F+xShr2mgF +xDkHH+vXGFzUZXSEAF2NW9U3bf4bRQpdOkYJsvHJmLYjcGNKdkHjJVWdXmoRpbsR +IC8M7ZPp+/oV5JEinCXRsT1NN+7l8rkec9hNk5sbokVCcyYv+GxL8kRFt2jyLqny +RlM2vM3uhgJNYVSlYsgjjg4QfikV6s+QawjSVi6y4ZnHEho= +-----END CERTIFICATE----- +\ diff --git a/tests/rep-auth/expired/signature b/tests/rep-auth/expired/signature deleted file mode 100644 index 454653f..0000000 --- a/tests/rep-auth/expired/signature +++ /dev/null @@ -1,13 +0,0 @@ -: 1 -sha256sum: ad6c46b7c2b994957215025de0f0ce9be192f6973a8b36f5d3f3d1670172af1e -signature: \ -PQrvkr6ONdIIrEaORzsgpXNpNkMVmdjW8Ahgpi+sdwyjsxkgMj/0gHjyF0amPi6ae+zUu4igDeKM -JnWuShDMbxLy+zxy6IpjpchwtPymM3euqQnLWebRJ2b+9RlBVGIRCl25VnFn+mmHW76+yRnOT6nI -fYNCM6eiLihWKLRUCnsj18PZSV7EK68Q3iPAUws4F4A63eKqJe/qSWkRjJrVpi+UFDjYkJi9542D -MELmYFXV592UVoQ3PPK+ZU/Ja+cosHND9mHe2xvLKHFnBKUi5LKvZ+aZdiZXisnisX9PgvGzk+5j -qzzJUse21NLA2J4D+jiH8r2fj4qjh1dLHgocQj3GQeN8r18XvaLtP9+tcLYfphWnyOfk3q12xtn8 -h9yNoVPHVsMiYrB7JXX2TM4qPqepi3f8iQmEfZxWqlI5/cpeQz3DTDZ4wagNbBoYzavUqTjriXCU -eLWVZz89JkYhWYTBPx26XZp56TsN16ZrN6oMtHgVy6YmmbjIea7sZXhNc8a/7FCdxap8PZfJS1cW -LieoZqQF5C0O8+sJnYl88Pp76mtQIgXEsfc5TnvgMosQfXbHzMbD7naD0woWqu5GVKWx6+AdK2uH -KbuSXYrJYfmuS2Ptp/T7ZIkRE2YZPe4+lsMkIiqY1fg2qIdWgpQiH0ZE3Ki3GH4FUWEkurWgxYk= -\ diff --git a/tests/rep-auth/expired/signature.manifest b/tests/rep-auth/expired/signature.manifest new file mode 100644 index 0000000..454653f --- /dev/null +++ b/tests/rep-auth/expired/signature.manifest @@ -0,0 +1,13 @@ +: 1 +sha256sum: ad6c46b7c2b994957215025de0f0ce9be192f6973a8b36f5d3f3d1670172af1e +signature: \ +PQrvkr6ONdIIrEaORzsgpXNpNkMVmdjW8Ahgpi+sdwyjsxkgMj/0gHjyF0amPi6ae+zUu4igDeKM +JnWuShDMbxLy+zxy6IpjpchwtPymM3euqQnLWebRJ2b+9RlBVGIRCl25VnFn+mmHW76+yRnOT6nI +fYNCM6eiLihWKLRUCnsj18PZSV7EK68Q3iPAUws4F4A63eKqJe/qSWkRjJrVpi+UFDjYkJi9542D +MELmYFXV592UVoQ3PPK+ZU/Ja+cosHND9mHe2xvLKHFnBKUi5LKvZ+aZdiZXisnisX9PgvGzk+5j +qzzJUse21NLA2J4D+jiH8r2fj4qjh1dLHgocQj3GQeN8r18XvaLtP9+tcLYfphWnyOfk3q12xtn8 +h9yNoVPHVsMiYrB7JXX2TM4qPqepi3f8iQmEfZxWqlI5/cpeQz3DTDZ4wagNbBoYzavUqTjriXCU +eLWVZz89JkYhWYTBPx26XZp56TsN16ZrN6oMtHgVy6YmmbjIea7sZXhNc8a/7FCdxap8PZfJS1cW +LieoZqQF5C0O8+sJnYl88Pp76mtQIgXEsfc5TnvgMosQfXbHzMbD7naD0woWqu5GVKWx6+AdK2uH +KbuSXYrJYfmuS2Ptp/T7ZIkRE2YZPe4+lsMkIiqY1fg2qIdWgpQiH0ZE3Ki3GH4FUWEkurWgxYk= +\ diff --git a/tests/rep-auth/unsigned/repositories b/tests/rep-auth/unsigned/repositories deleted file mode 100644 index 5b70556..0000000 --- a/tests/rep-auth/unsigned/repositories +++ /dev/null @@ -1 +0,0 @@ -: 1 diff --git a/tests/rep-auth/unsigned/repositories.manifest b/tests/rep-auth/unsigned/repositories.manifest new file mode 100644 index 0000000..5b70556 --- /dev/null +++ b/tests/rep-auth/unsigned/repositories.manifest @@ -0,0 +1 @@ +: 1 diff --git a/tests/rep-create.test b/tests/rep-create.test index b64c518..05aca20 100644 --- a/tests/rep-create.test +++ b/tests/rep-create.test @@ -9,10 +9,10 @@ # rep-create # |-- stable # | |-- foo-1.tar.gz -# | `-- repositories +# | `-- repositories.manifest # `-- testing -> stable (complement) # |-- foo-2.tar.gz (manifest with unknown name) -# `-- repositories +# `-- repositories.manifest : unsigned : @@ -27,7 +27,7 @@ { $clone_rep; - $* 1/stable/ 2>>/~%EOE% &1/stable/packages; + $* 1/stable/ 2>>/~%EOE% &1/stable/packages.manifest; adding foo 1 %1 package\(s\) in .+/stable/% EOE @@ -50,7 +50,7 @@ { $clone_rep; - $* --key $key 1/stable/ 2>>/~%EOE% &1/stable/packages; + $* --key $key 1/stable/ 2>>/~%EOE% &1/stable/packages.manifest; adding foo 1 warning: --key option ignored info: repository manifest contains no certificate @@ -78,7 +78,7 @@ : tests. : { - +cp -r $src/stable ./ && cat <<<$cert_manifest >+stable/repositories + +cp -r $src/stable ./ && cat <<<$cert_manifest >+stable/repositories.manifest # Make sure the cloned repository has a valid location, so we can use # rep-info command to validate the repository info. @@ -87,14 +87,15 @@ : with-key : - : Note that as we re-create the repositories file on the fly (see above) its - : sha256sum can vary due to CRs mix-in on Windows. That explains why we do - : not match it exactly. + : Note that as we re-create the repositories.manifest file on the fly (see + : above) its sha256sum can vary due to CRs mix-in on Windows. That explains + : why we do not match it exactly. : { $clone_rep; - $* --key $key 1/stable/ 2>>/~%EOE% &1/stable/packages &1/stable/signature; + $* --key $key 1/stable/ 2>>/~%EOE% &1/stable/packages.manifest \ + &1/stable/signature.manifest; adding foo 1 %1 package\(s\) in .+/stable/% EOE @@ -116,7 +117,7 @@ : without-key : $clone_rep; - $* 1/stable/ 2>>EOE &1/stable/packages != 0 + $* 1/stable/ 2>>EOE &1/stable/packages.manifest != 0 adding foo 1 error: --key option required info: repository manifest contains a certificate @@ -142,7 +143,7 @@ : ignore : $clone_rep; - $* --ignore-unknown testing/ 2>>/~%EOE% &testing/packages + $* --ignore-unknown testing/ 2>>/~%EOE% &testing/packages.manifest adding foo 2 %1 package\(s\) in .+/testing/% EOE @@ -155,13 +156,13 @@ { clone_rep = cp -r $src/stable ./ - : no-repositories-file + : no-repositories-manifest : { - $clone_rep &!stable/repositories; - rm stable/repositories; + $clone_rep &!stable/repositories.manifest; + rm stable/repositories.manifest; - $* stable/ 2>/'error: file stable/repositories does not exist' != 0 + $* stable/ 2>/'error: file stable/repositories.manifest does not exist' != 0 } : unexpected-file diff --git a/tests/rep-create/stable/repositories b/tests/rep-create/stable/repositories deleted file mode 100644 index 5b70556..0000000 --- a/tests/rep-create/stable/repositories +++ /dev/null @@ -1 +0,0 @@ -: 1 diff --git a/tests/rep-create/stable/repositories.manifest b/tests/rep-create/stable/repositories.manifest new file mode 100644 index 0000000..5b70556 --- /dev/null +++ b/tests/rep-create/stable/repositories.manifest @@ -0,0 +1 @@ +: 1 diff --git a/tests/rep-create/testing/repositories b/tests/rep-create/testing/repositories deleted file mode 100644 index 7411f25..0000000 --- a/tests/rep-create/testing/repositories +++ /dev/null @@ -1,4 +0,0 @@ -: 1 -location: ../stable -role: complement -: diff --git a/tests/rep-create/testing/repositories.manifest b/tests/rep-create/testing/repositories.manifest new file mode 100644 index 0000000..7411f25 --- /dev/null +++ b/tests/rep-create/testing/repositories.manifest @@ -0,0 +1,4 @@ +: 1 +location: ../stable +role: complement +: diff --git a/tests/rep-fetch.test b/tests/rep-fetch.test index 237ee6a..ffc833c 100644 --- a/tests/rep-fetch.test +++ b/tests/rep-fetch.test @@ -10,49 +10,49 @@ # |-- bar # | |-- stable -> ../foo/stable (prerequisite) # | | |-- libbar-1.0.0.tar.gz -> libfoo >= 1.0.0 -# | | `-- repositories +# | | `-- repositories.manifest # | |-- testing -> stable (complement), # | | | ../foo/testing (prerequisite) # | | |-- libbar-1.1.0.tar.gz -> libfoo >= 1.1.0 -# | | `-- repositories +# | | `-- repositories.manifest # | `-- unstable -> testing (complement), # | | ../foo/testing (prerequisite) # | |-- libbar-1.1.1.tar.gz -> libfoo >= 1.1.0 -# | `-- repositories +# | `-- repositories.manifest # | # |-- foo # | |-- stable # | | |-- libfoo-1.0.0.tar.gz -# | | `-- repositories +# | | `-- repositories.manifest # | `-- testing -> stable (complement) # | |-- libfoo-1.1.0.tar.gz -# | `-- repositories +# | `-- repositories.manifest # | # `-- hello # | |-- libhello-1.0.0.tar.gz -# | `-- repositories +# | `-- repositories.manifest # | # |-- circle # | |-- extra -> stable (prerequisite) # | | |-- libbar-1.1.0+1.tar.gz -# | | `-- repositories +# | | `-- repositories.manifest # | |-- math -> extra (prerequisite) # | | |-- libbar-1.0.0.tar.gz -# | | `-- repositories +# | | `-- repositories.manifest # | `-- stable -> math (prerequisite) # | |-- libfoo-1.0.0.tar.gz -# | `-- repositories +# | `-- repositories.manifest # | # |-- no-circle # | |-- extra # | | |-- libbar-1.1.0+1.tar.gz -# | | `-- repositories +# | | `-- repositories.manifest # | |-- math # | | |-- libbar-1.0.0.tar.gz -# | | `-- repositories +# | | `-- repositories.manifest # | `-- stable -> extra (prerequisite) # | |-- libfoo-1.0.0.tar.gz -# | `-- repositories +# | `-- repositories.manifest # | # `-- git/* (see rep-fetch-git.test) @@ -64,28 +64,30 @@ # Create the signed 'hello' repository. # cp -r $src/hello $out/hello - cat <<<$cert_manifest >+$out/hello/repositories - $rep_create --key $key $out/hello &$out/hello/packages &$out/hello/signature + cat <<<$cert_manifest >+$out/hello/repositories.manifest + + $rep_create --key $key $out/hello &$out/hello/packages.manifest \ + &$out/hello/signature.manifest # Create 'foo/*' repositories. # cp -r $src/foo $out/foo - $rep_create $out/foo/stable &$out/foo/stable/packages - $rep_create $out/foo/testing &$out/foo/testing/packages + $rep_create $out/foo/stable &$out/foo/stable/packages.manifest + $rep_create $out/foo/testing &$out/foo/testing/packages.manifest # Create 'bar/*' repositories. # cp -r $src/bar $out/bar - $rep_create $out/bar/stable &$out/bar/stable/packages - $rep_create $out/bar/testing &$out/bar/testing/packages - $rep_create $out/bar/unstable &$out/bar/unstable/packages + $rep_create $out/bar/stable &$out/bar/stable/packages.manifest + $rep_create $out/bar/testing &$out/bar/testing/packages.manifest + $rep_create $out/bar/unstable &$out/bar/unstable/packages.manifest # Create 'cycle/*' repositories. # cp -r $src/cycle $out/cycle - $rep_create $out/cycle/extra &$out/cycle/extra/packages - $rep_create $out/cycle/math &$out/cycle/math/packages - $rep_create $out/cycle/stable &$out/cycle/stable/packages + $rep_create $out/cycle/extra &$out/cycle/extra/packages.manifest + $rep_create $out/cycle/math &$out/cycle/math/packages.manifest + $rep_create $out/cycle/stable &$out/cycle/stable/packages.manifest # Create git repositories. # @@ -253,9 +255,9 @@ $* 2>>/EOE != 0 +mkdir -p $path.directory($nc_rep) +cp -r $src/no-cycle "$nc_rep" # Strip trailing slash. - +$rep_create $nc_rep/extra 2>! &$nc_rep/extra/packages - +$rep_create $nc_rep/math 2>! &$nc_rep/math/packages - +$rep_create $nc_rep/stable 2>! &$nc_rep/stable/packages + +$rep_create $nc_rep/extra 2>! &$nc_rep/extra/packages.manifest + +$rep_create $nc_rep/math 2>! &$nc_rep/math/packages.manifest + +$rep_create $nc_rep/stable 2>! &$nc_rep/stable/packages.manifest math_rep = $nc_rep/math stable_rep = $nc_rep/stable diff --git a/tests/rep-fetch/no-cycle/extra/repositories b/tests/rep-fetch/no-cycle/extra/repositories deleted file mode 100644 index 5b70556..0000000 --- a/tests/rep-fetch/no-cycle/extra/repositories +++ /dev/null @@ -1 +0,0 @@ -: 1 diff --git a/tests/rep-fetch/no-cycle/extra/repositories.manifest b/tests/rep-fetch/no-cycle/extra/repositories.manifest new file mode 100644 index 0000000..5b70556 --- /dev/null +++ b/tests/rep-fetch/no-cycle/extra/repositories.manifest @@ -0,0 +1 @@ +: 1 diff --git a/tests/rep-fetch/no-cycle/math/repositories b/tests/rep-fetch/no-cycle/math/repositories deleted file mode 100644 index 5b70556..0000000 --- a/tests/rep-fetch/no-cycle/math/repositories +++ /dev/null @@ -1 +0,0 @@ -: 1 diff --git a/tests/rep-fetch/no-cycle/math/repositories.manifest b/tests/rep-fetch/no-cycle/math/repositories.manifest new file mode 100644 index 0000000..5b70556 --- /dev/null +++ b/tests/rep-fetch/no-cycle/math/repositories.manifest @@ -0,0 +1 @@ +: 1 diff --git a/tests/rep-fetch/no-cycle/stable/repositories b/tests/rep-fetch/no-cycle/stable/repositories deleted file mode 100644 index 14d6ce0..0000000 --- a/tests/rep-fetch/no-cycle/stable/repositories +++ /dev/null @@ -1,3 +0,0 @@ -: 1 -location: ../extra -: diff --git a/tests/rep-fetch/no-cycle/stable/repositories.manifest b/tests/rep-fetch/no-cycle/stable/repositories.manifest new file mode 100644 index 0000000..14d6ce0 --- /dev/null +++ b/tests/rep-fetch/no-cycle/stable/repositories.manifest @@ -0,0 +1,3 @@ +: 1 +location: ../extra +: diff --git a/tests/rep-info.test b/tests/rep-info.test index 2b6aa0f..13a1148 100644 --- a/tests/rep-info.test +++ b/tests/rep-info.test @@ -9,7 +9,7 @@ # rep-info # |-- testing -> stable (complement), ../foo/testing (prerequisite) # | |-- foo-1.tar.gz -# | `-- repositories +# | `-- repositories.manifest # | # `-- git # |-- libbar.git -> style-basic.git (prerequisite) @@ -23,13 +23,15 @@ # Create the unsigned 'testing' repository. # cp -r $src/testing $out/testing - $rc $out/testing &$out/testing/packages + $rc $out/testing &$out/testing/packages.manifest # Create the signed 'testing' repository. # cp -r $src/testing $out/signed - cat <<<$cert_manifest >+$out/signed/repositories - $rc --key $key $out/signed &$out/signed/packages &$out/signed/signature + cat <<<$cert_manifest >+$out/signed/repositories.manifest + + $rc --key $key $out/signed &$out/signed/packages.manifest \ + &$out/signed/signature.manifest # Create git repositories. # @@ -160,7 +162,8 @@ else : manifest-lists : - : The packages and repositories files are present in the repository root. + : The packages.manifest and repositories.manifest files are present in the + : repository root. : $* "$rep/libbar.git#master" >>~%EOO% %git:.+libbar#master .+libbar.git#master% diff --git a/tests/rep-info/testing/repositories b/tests/rep-info/testing/repositories deleted file mode 100644 index 3cc2531..0000000 --- a/tests/rep-info/testing/repositories +++ /dev/null @@ -1,6 +0,0 @@ -: 1 -location: ../../foo/testing -: -location: ../stable -role: complement -: diff --git a/tests/rep-info/testing/repositories.manifest b/tests/rep-info/testing/repositories.manifest new file mode 100644 index 0000000..3cc2531 --- /dev/null +++ b/tests/rep-info/testing/repositories.manifest @@ -0,0 +1,6 @@ +: 1 +location: ../../foo/testing +: +location: ../stable +role: complement +: diff --git a/tests/rep-list.test b/tests/rep-list.test index 398d887..c2a2900 100644 --- a/tests/rep-list.test +++ b/tests/rep-list.test @@ -9,19 +9,19 @@ # rep-list # |-- extra -> stable (prerequisite) # | |-- libbar-1.1.0+1.tar.gz -# | `-- repositories +# | `-- repositories.manifest # | # |-- math -> extra (prerequisite) # | |-- libbar-1.0.0.tar.gz -# | `-- repositories +# | `-- repositories.manifest # | # |-- stable -> math (prerequisite) # | |-- libfoo-1.0.0.tar.gz -# | `-- repositories +# | `-- repositories.manifest # | # `-- testing -> stable (complement), extra (prerequisite) # | |-- libbar-2.0.0.tar.gz -# | `-- repositories +# | `-- repositories.manifest # | # `-- git # |-- libbar.git -> style-basic.git (prerequisite) @@ -30,12 +30,17 @@ # Prepare repositories used by tests if running in the local mode. # +if ($remote != true) + cp -r $src/extra $out/extra + cp -r $src/math $out/math + cp -r $src/stable $out/stable + cp -r $src/testing $out/testing + c = $rep_create 2>! - cp -r $src/extra $out/extra && $c $out/extra &$out/extra/packages - cp -r $src/math $out/math && $c $out/math &$out/math/packages - cp -r $src/stable $out/stable && $c $out/stable &$out/stable/packages - cp -r $src/testing $out/testing && $c $out/testing &$out/testing/packages + $c $out/extra &$out/extra/packages.manifest + $c $out/math &$out/math/packages.manifest + $c $out/stable &$out/stable/packages.manifest + $c $out/testing &$out/testing/packages.manifest # Create git repositories. # diff --git a/tests/rep-list/extra/repositories b/tests/rep-list/extra/repositories deleted file mode 100644 index ecaa454..0000000 --- a/tests/rep-list/extra/repositories +++ /dev/null @@ -1,3 +0,0 @@ -: 1 -location: ../stable -: diff --git a/tests/rep-list/extra/repositories.manifest b/tests/rep-list/extra/repositories.manifest new file mode 100644 index 0000000..ecaa454 --- /dev/null +++ b/tests/rep-list/extra/repositories.manifest @@ -0,0 +1,3 @@ +: 1 +location: ../stable +: diff --git a/tests/rep-list/math/repositories b/tests/rep-list/math/repositories deleted file mode 100644 index 14d6ce0..0000000 --- a/tests/rep-list/math/repositories +++ /dev/null @@ -1,3 +0,0 @@ -: 1 -location: ../extra -: diff --git a/tests/rep-list/math/repositories.manifest b/tests/rep-list/math/repositories.manifest new file mode 100644 index 0000000..14d6ce0 --- /dev/null +++ b/tests/rep-list/math/repositories.manifest @@ -0,0 +1,3 @@ +: 1 +location: ../extra +: diff --git a/tests/rep-list/stable/repositories b/tests/rep-list/stable/repositories deleted file mode 100644 index b49d922..0000000 --- a/tests/rep-list/stable/repositories +++ /dev/null @@ -1,3 +0,0 @@ -: 1 -location: ../math -: diff --git a/tests/rep-list/stable/repositories.manifest b/tests/rep-list/stable/repositories.manifest new file mode 100644 index 0000000..b49d922 --- /dev/null +++ b/tests/rep-list/stable/repositories.manifest @@ -0,0 +1,3 @@ +: 1 +location: ../math +: diff --git a/tests/rep-list/testing/repositories b/tests/rep-list/testing/repositories deleted file mode 100644 index 7bd7269..0000000 --- a/tests/rep-list/testing/repositories +++ /dev/null @@ -1,6 +0,0 @@ -: 1 -location: ../stable -role: complement -: -location: ../extra -: diff --git a/tests/rep-list/testing/repositories.manifest b/tests/rep-list/testing/repositories.manifest new file mode 100644 index 0000000..7bd7269 --- /dev/null +++ b/tests/rep-list/testing/repositories.manifest @@ -0,0 +1,6 @@ +: 1 +location: ../stable +role: complement +: +location: ../extra +: diff --git a/tests/rep-remove.test b/tests/rep-remove.test index e451def..98d566f 100644 --- a/tests/rep-remove.test +++ b/tests/rep-remove.test @@ -9,23 +9,23 @@ # rep-remove # |-- extra -> stable (prerequisite) # | |-- libbar-1.1.0+1.tar.gz -# | `-- repositories +# | `-- repositories.manifest # | # |-- math -> extra (prerequisite) # | |-- libbar-1.0.0.tar.gz -# | `-- repositories +# | `-- repositories.manifest # | # |-- stable -> math (prerequisite) # | |-- libfoo-1.0.0.tar.gz -# | `-- repositories +# | `-- repositories.manifest # | # `-- testing -> stable (complement), extra (prerequisite) # | |-- libbar-2.0.0.tar.gz -# | `-- repositories +# | `-- repositories.manifest # | # `-- alpha # | |-- libbar-2.0.0.tar.gz -# | `-- repositories +# | `-- repositories.manifest # | # `-- git # `-- style-basic.git @@ -33,13 +33,19 @@ # Prepare repositories used by tests if running in the local mode. # +if ($remote != true) + cp -r $src/extra $out/extra + cp -r $src/math $out/math + cp -r $src/stable $out/stable + cp -r $src/testing $out/testing + cp -r $src/alpha $out/alpha + c = $rep_create 2>! - cp -r $src/extra $out/extra && $c $out/extra &$out/extra/packages - cp -r $src/math $out/math && $c $out/math &$out/math/packages - cp -r $src/stable $out/stable && $c $out/stable &$out/stable/packages - cp -r $src/testing $out/testing && $c $out/testing &$out/testing/packages - cp -r $src/alpha $out/alpha && $c $out/alpha &$out/alpha/packages + $c $out/extra &$out/extra/packages.manifest + $c $out/math &$out/math/packages.manifest + $c $out/stable &$out/stable/packages.manifest + $c $out/testing &$out/testing/packages.manifest + $c $out/alpha &$out/alpha/packages.manifest # Create git repositories. # diff --git a/tests/rep-remove/alpha/repositories b/tests/rep-remove/alpha/repositories deleted file mode 100644 index 5b70556..0000000 --- a/tests/rep-remove/alpha/repositories +++ /dev/null @@ -1 +0,0 @@ -: 1 diff --git a/tests/rep-remove/alpha/repositories.manifest b/tests/rep-remove/alpha/repositories.manifest new file mode 100644 index 0000000..5b70556 --- /dev/null +++ b/tests/rep-remove/alpha/repositories.manifest @@ -0,0 +1 @@ +: 1 diff --git a/tests/rep-remove/testing/repositories b/tests/rep-remove/testing/repositories deleted file mode 100644 index 7bd7269..0000000 --- a/tests/rep-remove/testing/repositories +++ /dev/null @@ -1,6 +0,0 @@ -: 1 -location: ../stable -role: complement -: -location: ../extra -: diff --git a/tests/rep-remove/testing/repositories.manifest b/tests/rep-remove/testing/repositories.manifest new file mode 100644 index 0000000..7bd7269 --- /dev/null +++ b/tests/rep-remove/testing/repositories.manifest @@ -0,0 +1,6 @@ +: 1 +location: ../stable +role: complement +: +location: ../extra +: -- cgit v1.1