1. 08 Aug, 2022 9 commits
    • Chih-Hsuan Yen's avatar
    • David Runge's avatar
      Add changelog entry for CLI changes · 8f0153e0
      David Runge authored
      docs/repod/changelog.rst:
      Add changelog entry for CLI changes, explaining which components have
      been altered and which have been removed.
      8f0153e0
    • David Runge's avatar
      Export sync database to binary repository directory · 8b77e354
      David Runge authored
      repod/cli/argparse.py:
      Change `ArgParseFactory.repod_file()` to rename the `repod-file`
      subcommand `management` to `repo` and rename its subsubcommands from
      `import` and `export` to `importdb` and `writedb`.
      Change `ArgParseFactory.repod_file()` to alter the `repod-file repo
      writedb` subcommand to not accept a file path anymore, as the sync
      databases are written to the target repository's binary repository
      directory.
      Change `ArgParseFactory.repod_file()` to remove the `repod-file syncdb`
      subcommand as it is the reverse pendant to the previous `repod-file
      management` subcommand.
      
      repod/cli/cli.py:
      Rename `repod_file_management()` to `repod_file_repo()`.
      Change actions in `repod_file_repo()` to reflect the `repod-file`
      subcommands `importdb` and `writedb`.
      Change `repod_file_repo()` to create the repository sync databases in
      the repository binary repository (including symlinks).
      Remove obsolete `repod_file_syncdb()`.
      Change `repod_file()` to adapt to the renamed and removed functions.
      
      tests/cli/test_cli.py:
      Adapt tests for `repod_file_repo()` and `repod_file()` to changes.
      Remove tests for `repod_file_syncdb()`.
      Adapt `transform_databases()` to changes in CLI signature.
      8b77e354
    • David Runge's avatar
      Add changelog entry for debug repository handling · feb1efc1
      David Runge authored
      docs/repod/changelog.rst:
      Add changelog entry for debug repository handling.
      feb1efc1
    • David Runge's avatar
      Add changelog for use of config layer in CLI · f41e4150
      David Runge authored
      docs/repod/changelog.rst:
      Add changelog entry for use of config layer in CLI and the new man page
      for `repod.conf`.
      f41e4150
    • David Runge's avatar
      Fix backticks in changelog · 989e2a32
      David Runge authored
      docs/repod/changelog.rst:
      Replace single backticks by double backticks as that properly displays
      as code.
      989e2a32
    • David Runge's avatar
      Add changelog entry for PackageDescV2 · fa2a4a7b
      David Runge authored
      docs/repod/changelog.rst:
      Add changelog entry for PackageDescV2 explaining how to make use of the
      new (but not default) PackageDesc version.
      fa2a4a7b
    • David Runge's avatar
      Add man page documentation about syncdb_settings · a58397bd
      David Runge authored
      docs/repod/man/repod_conf.rst:
      Extend the repod.conf man page with documentation on syncdb_settings and
      its options and default values.
      a58397bd
    • David Runge's avatar
      Use SyncDatabase with desc_version and files_version · 0f79e97e
      David Runge authored
      repod/repo/package/syncdb.py:
      Change `SyncDatabase` to also cover which versions of `PackageDesc` and
      `Files` are used to export data, using the `desc_version` and
      `files_version` attributes.
      Change `SyncDatabase.outputpackagebase_to_tarfile()` require
      packagedesc_version and files_version so that `SyncDatabase` may be
      instantiated properly when calling
      `OutputPackageBase.get_packages_as_models()`.
      
      repod/cli/cli.py:
      Change instantiations of `SyncDatabase` to set the `desc_version` and
      `files_version` attributes to those found in the Settings instance.
      
      repod/repo/management/outputpackage.py:
      Remove fields for `files_version`, `output_package_version` and
      `package_desc_version` from OUTPUT_PACKAGE_BASE_VERSIONS as they are now
      set in `repod.common.enums`.
      Change `OutputPackageBase.from_dict()` to rely on default values
      provided by `FilesVersionEnum` and `OutputPackageVersionEnum` instead of
      the data from OUTPUT_PACKAGE_BASE_VERSIONS.
      Change `OutputPacka...
      0f79e97e
  2. 06 Aug, 2022 14 commits
    • David Runge's avatar
      Add SyncDbSettings to Settings · 941eb3b9
      David Runge authored
      repod/config/settings.py:
      Add `SyncDbSettings`, which tracks attributes for `desc_version` and
      `files_version` that can be set for repository sync databases to define
      which versions of Files and PackageDesc will be exported.
      941eb3b9
    • David Runge's avatar
      Add fixture for PackageDescV2 · b2b8b97d
      David Runge authored
      tests/conftest.py:
      Add fixtures packagedescv2 to provide a valid PackageDescV2 to tests.
      b2b8b97d
    • David Runge's avatar
      Add enums to describe versions of classes · f5979073
      David Runge authored
      repod/common/enums.py:
      Add FilesVersionEnum to describe versions of Files,
      OutputPackageVersionEnum to describe versions of OutputPackage and
      PackageDescVersionEnum to describe versions of PackageDesc.
      f5979073
    • David Runge's avatar
      Add documentation on PackageDescV2 · b3ed2426
      David Runge authored
      docs/repositories/management_repository.rst:
      Add documentation and JSON schema for PackageDescV2.
      
      docs/repositories/sync_database.rst:
      Add documentation on Desc v2.
      b3ed2426
    • David Runge's avatar
      Fix wrong documentation on PGPSIG in Desc v1 · d1d3dbcf
      David Runge authored
      docs/repositories/sync_database.rst:
      Fix documentation on the `%PGPSIG%` identifier in Desc v1. It is in fact
      not a required identifier in the desc file.
      d1d3dbcf
    • David Runge's avatar
      Add PackageDescV2, which removes pgpsig · 5818849f
      David Runge authored
      repod/repo/package/syncdb.py:
      Add `PackageDescV2`, which removes pgpsig.
      Change `export_schema()` to also export the schema for `PackageDescV2`.
      
      repod/templates/desc_v2.j2:
      Add jinja2 template which is used for rendering instances of
      `PackageDescV2`.
      
      tests/repo/package/test_syncdb.py:
      Change `test_files_from_dict_derive_file_version()` to add test cases
      which cover the creation of `PackageDescV2`.
      5818849f
    • David Runge's avatar
      Do not use host configuration when testing Settings · 265ef0a1
      David Runge authored
      tests/config/test_settings.py:
      Change `test_systemsettings()` and `test_usersettings()` to not make use
      of configuration files potentially existing on the host by patching
      `repod.config.settings.CUSTOM_CONFIG` to point to an empty file.
      
      tests/conftest.py:
      Change `usersettings` fixture to not make use configuration files
      potentially existing on the host system by patching
      `repod.config.settings.CUSTOM_CONFIG` to point to an empty file.
      265ef0a1
    • David Runge's avatar
      Fix documentation on PgpSig · ad8beee7
      David Runge authored
      repod/common/models.py,repod/repo/package/syncdb.py:
      Change documentation marking the PgpSig model/field as optional.
      ad8beee7
    • David Runge's avatar
      Add changelog entry for package verification · a93eced3
      David Runge authored
      docs/repod/changelog.rst:
      Add changelog entry for package verification feature.
      a93eced3
    • David Runge's avatar
      Add information on package signature verification to man page · 0410cc95
      David Runge authored
      docs/repod/man/repod_conf.rst:
      Add information on package signature verification to man page for
      repod.conf.
      Add link to pacman-key man page.
      0410cc95
    • David Runge's avatar
      Add package signature verification to CLI · 00c10a9c
      David Runge authored
      repod/cli/cli.py:
      Change `repod_file_package()` to use package signature verification
      based on `PacmanKeyVerifier` if it is configured and signatures are
      provided.
      
      tests/cli/test_cli.py:
      Change tests for `repod_file_package()` to also cover cases in which
      package verification takes place.
      00c10a9c
    • David Runge's avatar
      Add package_verification to Settings · c305f031
      David Runge authored
      repod/config/settings.py:
      Add the optional attribute package_verification to Settings to track the
      verification type used for verifying detached package signatures.
      c305f031
    • David Runge's avatar
      Add enum to identify package signature verification implementations · 36330700
      David Runge authored
      repod/common/enums.py:
      Add PkgVerificationTypeEnum to track verification implementations
      for detached package signatures.
      36330700
    • David Runge's avatar
      Add PGP verification using pacman-key · 9a27fdb3
      David Runge authored
      repod/verification/pgp.py:
      Add abstract base class `PGPVerifier`, which may be used to implement
      different ways of doing verification of detached PGP signatures.
      Add `PacmanKeyVerifier`, which derives from `PGPVerifier` and implements
      its `verify()` method to verify detached PGP signatures of packages.
      
      repod/verification/__init__.py:
      Expose `PacmanKeyVerifier`.
      
      tests/verification/test_pgp.py:
      Add test to cover `PacmanKeyVerifier.verify()` both as unit test and as
      integration test. The latter is allowed to fail, as on systems with
      large (and old) pacman caches it is very likely to hit a package
      signature which is no longer valid when verifying using the current
      system's pacman-key.
      9a27fdb3
  3. 05 Aug, 2022 1 commit
  4. 04 Aug, 2022 2 commits
    • David Runge's avatar
      Add documentation for OutputBuildInfo · b097591f
      David Runge authored
      docs/repositories/management_repository.rst:
      Add documentation on OutputBuildInfo, OutputBuildInfoV1 and
      OutputBuildInfoV2 (including JSON schema).
      b097591f
    • David Runge's avatar
      Add subset BuildInfo data as OutputBuildInfo to OutputPackageBase · ee2c52ab
      David Runge authored
      repod/repo/management/outputpackage.py:
      Add `OutputBuildInfo` and the versioned child classes
      `OutputBuildInfoV1` and `OutputBuildInfoV2`, which track a subset of the
      data of `BuildInfoV1` and `BuildInfoV2` (respectively).
      Change `OutputPackageBaseV1` to track the optional field buildinfo (an
      instance of `OutputBuildInfo`).
      Change `OutputPackageBase.from_package()` to populate the buildinfo
      field for `OutputPackageBaseV1`.
      Change `export_schemas()` to also export JSON schema for
      `OutputBuildInfoV1` and `OutputBuildInfoV2`.
      
      repod/repo/management/__init__.py:
      Expose `OutputBuildInfo`.
      
      tests/conftest.py:
      Add BuildInfoV9999 class to provide a BuildInfo with an invalid version
      in tests.
      Fix wrong format version used in `valid_buildinfov2` fixture.
      Change fixture `outputpackagebasev1` to also populate the `buildinfo`
      field of the returned `OutputPackageBaseV1`.
      
      tests/repo/management/test_outputpackage.py:
      Add parametrized test for `OutputBuildInfo.from_buildinfo()`.
      
      tests/repo/package/test_syncdb.py:
      Fix `test_package_desc_v1_get_output_package_base_v1()` to remove the
      buildinfo field of the used `OutputPackageBase` fixture, as it
      represents data that could never be retrieved from a repository sync
      database.
      ee2c52ab
  5. 01 Aug, 2022 5 commits
    • David Runge's avatar
      Fail if non-debug package is provided to debug repo · f23f26ed
      David Runge authored
      repod/cli/cli.py:
      Change repod_file_package() to fail if a debug repository is targetted,
      but any of the provided packages is not a debug package (can only be
      checked if newer pacman versions are in use, which support PkgInfoV2).
      Change documentation of repod_file_management(), repod_file_syncdb() and
      repod_file_schema() to include information about raised errors.
      
      tests/conftest.py:
      Add fixtures debug_pkginfov2_stringio, debug_pkginfov2_file and
      debug_package_file to be able to provide a debug package for tests.
      Change test_repod_file_package() to optionally rely on a debug package
      instead of a default package.
      f23f26ed
    • David Runge's avatar
      Extend CLI by use of debug repository · 3e0bb519
      David Runge authored
      repod/cli/cli.py:
      Extend the functionality of the CLI to allow targetting the debug
      repository of a given repository if the respective flag is provided.
      
      tests/cli/test_cli.py:
      Extend tests for targetting the debug repository.
      3e0bb519
    • David Runge's avatar
      Add flag to target debug package · 01f5a4b1
      David Runge authored
      repod/cli/argparse.py:
      Add `-D`/ `--debug` flag to relevant subcommands of repod-file which
      allows to target thedebug repository of a given repository.
      01f5a4b1
    • David Runge's avatar
      Add debug repo to PackageRepo · c5e5c097
      David Runge authored
      repod/config/settings.py:
      Extend the PackageRepo model by an optional debug repository attribute,
      which follows the same terminology as that of the staging and testing
      attributes.
      Change PackageRepo.name to be of type Path explicitly.
      Rename PackageRepo.validate_unique_staging_testing() to
      PackageRepo.validate_unique_repository_dirs() and skip it if any of the
      attribute validators failed.
      Change variable naming in PackageRepo.validate_unique_repository_dirs()
      to be more explicit.
      Change Settings validation to also validate and consolidate debug
      repository directories.
      
      tests/conftest.py:
      Change packagerepo_in_tmp_path fixture to also expose a debug
      repository.
      
      tests/config/test_settings.py:
      Adapt tests to changes in model validation and consolidation.
      c5e5c097
    • David Runge's avatar
      Merge remote-tracking branch 'klausenbusk/latest-test' · 9ba40637
      David Runge authored
      * klausenbusk/latest-test:
        Add CI logic for testing the latest dependencies
      9ba40637
  6. 31 Jul, 2022 1 commit
    • Kristian Klausen's avatar
      Add CI logic for testing the latest dependencies · 6adf1eae
      Kristian Klausen authored
      This way we can catch breaking upstream changes early and adapt the code
      sooner rather than later.
      
      It works by checking if the CI variable TEST_LATEST is set to "true" all
      dependencies is bumped to the latest version, before tests are run. The
      plan is to test the latest dependencies on a schedule.
      
      Fix #67
      6adf1eae
  7. 30 Jul, 2022 1 commit
  8. 21 Jul, 2022 1 commit
  9. 19 Jul, 2022 1 commit
  10. 17 Jul, 2022 4 commits
  11. 16 Jul, 2022 1 commit
    • David Runge's avatar
      Integrate repository dirs with CLI · 7a5733d0
      David Runge authored
      repod/cli/argparse.py:
      Change the arguments for `repod-file package import`, `repod-file
      management import`, `repod-file management export`, `repod-file syncdb
      export`, `repod-file syncdb import` to include indicators for whether to
      target staging or testing repository and to clarify that repositories
      are targetted by name, instead of targetting paths.
      
      repod/cli/cli.py:
      Change `repod_file_package()`, `repod_file_management()` and
      `repod_file_syncdb()` to require a Settings instance as well as clearly
      specifying which repository is targetted (stable, staging or testing).
      
      tests/cli/test_cli.py:
      Change tests for `repod_file_package()`, `repod_file_management()` and
      `repod_file_syncdb()` to reflect the changes in functionality.
      Change integration tests to target the previously setup repositories for
      output and input instead of relying on dummy directories.
      7a5733d0