- Aug 14, 2022
-
-
Kristian Klausen authored
The [core] repository is reasonably small to run repod-file package inspect on the package files contained in it. We can run this on a schedule to ensure, the packages are valid. Fix #87
-
David Runge authored
tox.ini: Change coverage target to run with `-X dev` to display `ResourceWarnings`.
-
David Runge authored
tests/conftest.py: Change fixtures `broken_json_file`, `valid_mtree_file`, `text_file`, `valid_buildinfov2_file`, `valid_pkginfov2_file`, `debug_pkginfov2_file`, `empty_file` and `invalid_json_file` to yield or return a Path and to not leave behind dangling file descriptors.
-
- Aug 13, 2022
-
-
David Runge authored
tests/cli/test_cli.py: Remove unused fixtures in integration tests. Restructure integration tests so that pacman actually uses the created databases.
-
David Runge authored
tox.ini: Run vulture in the linter target to detect dead code above a 70% confidence in the repod and tests dirs.
-
David Runge authored
poetry.lock: Update poetry lock file after adding vulture.
-
David Runge authored
pyproject.toml: Add vulture to dev dependencies to allow checking for dead code.
-
- Aug 12, 2022
-
-
David Runge authored
repod/cli/argparse.py: Change destinations for `-d`/ `--debug` to `debug_mode` so that it does not shadow `-D`/ `--debug`. Change destinations for `-v`/ `--verbose` to `verbose_mode` to align with `debug_mode`. repod/cli/cli.py: Change occurences of `args.debug` and `args.verbose` targetting the verbosity of the CLI to `args.debug_mode` and `args.verbose_mode`. tests/cli/test_cli.py: Change tests to adapt to renaming of verbosity flag destinations.
-
- Aug 08, 2022
-
-
Chih-Hsuan Yen authored
Fixes #86
-
David Runge authored
docs/repod/changelog.rst: Add changelog entry for CLI changes, explaining which components have been altered and which have been removed.
-
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.
-
David Runge authored
docs/repod/changelog.rst: Add changelog entry for debug repository handling.
-
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`.
-
David Runge authored
docs/repod/changelog.rst: Replace single backticks by double backticks as that properly displays as code.
-
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.
-
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.
-
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 `OutputPackageBase.get_packages_as_models()` to allow providing `packagedesc_version` and `files_version` (default values taken from PackageDescVersionEnum and FilesVersionEnum), so that the output type may be chosen. Change `OutputPackageBase.get_packages_as_models()` to add output for `PackageDescV2`. tests/cli/test_cli.py: Change tests to accomodate for the additional `SyncDatabase` attributes. tests/conftest.py Change instantiations of `SyncDatabase` to set the `desc_version` and `files_version` attributes using the default values. tests/repo/management/test_outputpackage.py: Change tests for `OutputPackageBase.packages_as_models()` to adapt to changes on how data is provided. Change tests for `OutputPackageBase.get_packages_as_models()` so that cases with `PackageDescV2` are also covered. tests/repo/package/test_syncdb.py: Change tests related to `SyncDatabase.outputpackagebase_to_tarfile()` or instantiation of `SyncDatabase` to adapt to the new function signature.
-
- Aug 06, 2022
-
-
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.
-
David Runge authored
tests/conftest.py: Add fixtures packagedescv2 to provide a valid PackageDescV2 to tests.
-
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.
-
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.
-
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.
-
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`.
-
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.
-
David Runge authored
repod/common/models.py,repod/repo/package/syncdb.py: Change documentation marking the PgpSig model/field as optional.
-
David Runge authored
docs/repod/changelog.rst: Add changelog entry for package verification feature.
-
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.
-
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.
-
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.
-
David Runge authored
repod/common/enums.py: Add PkgVerificationTypeEnum to track verification implementations for detached package signatures.
-
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.
-
- Aug 05, 2022
-
-
David Runge authored
docs/repod/changelog.rst: Add changelog entry for .BUILDINFO data in management repository.
-
- Aug 04, 2022
-
-
David Runge authored
docs/repositories/management_repository.rst: Add documentation on OutputBuildInfo, OutputBuildInfoV1 and OutputBuildInfoV2 (including JSON schema).
-
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.
-
- Aug 01, 2022
-
-
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.
-
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.
-
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.
-
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.
-
David Runge authored
* klausenbusk/latest-test: Add CI logic for testing the latest dependencies
-
- Jul 31, 2022
-
-
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
-