diff --git a/.gitignore b/.gitignore index f9c64f0..db7d325 100644 --- a/.gitignore +++ b/.gitignore @@ -39,3 +39,4 @@ /tmt-1.26.0.tar.gz /tmt-1.26.1.tar.gz /tmt-1.27.0.tar.gz +/tmt-1.28.2.tar.gz diff --git a/.packit.yaml b/.packit.yaml index 49ee4bb..3a8ad8c 100644 --- a/.packit.yaml +++ b/.packit.yaml @@ -4,23 +4,15 @@ files_to_sync: - .packit.yaml sync_changelog: true -upstream_project_name: tmt +upstream_package_name: tmt downstream_package_name: tmt upstream_project_url: https://github.com/teemtee/tmt issue_repository: https://github.com/teemtee/tmt -actions: - post-upstream-clone: - - make bump2dev - create-archive: - - make tarball - get-current-version: - - make version - srpm_build_deps: - - make - - python3-docutils + - hatch + - python3-hatch-vcs jobs: @@ -28,12 +20,21 @@ jobs: - job: copr_build trigger: pull_request targets: - fedora-all: {} - epel-9: {} - fedora-39: - additional_repos: - - https://download.copr.fedorainfracloud.org/results/frantisekz/testcloud-wip/fedora-39-x86_64/ + - fedora-all + - epel-9 enable_net: False + actions: + create-archive: + - hatch run docs:man + - hatch build -t sdist + - bash -c "ls dist/tmt-*.tar.gz" + get-current-version: + # Use `dev888` instead of the last version digit to make + # builds older than the final release and newer than + # copr builds from main. Remove the remaining suffix + # generated by `hatch version` as well so that build + # with the latest timestamp always wins. + - bash -c "hatch version | sed -E 's/\\.[0-9]+\\.dev.*/.dev888/'" # Test pull requests - job: tests @@ -84,8 +85,37 @@ jobs: enable_net: False list_on_homepage: True preserve_project: True - owner: psss + owner: "@teemtee" + project: tmt + release_suffix: "{PACKIT_PROJECT_BRANCH}" + actions: + create-archive: + - hatch run docs:man + - hatch build -t sdist + - bash -c "ls dist/tmt-*.tar.gz" + get-current-version: + # Get rid of the the final version digit to make copr + # builds older than the final release + - bash -c "hatch version | sed -E 's/\\.[0-9]+\\.dev/.dev/'" + + # Release to copr + - job: copr_build + trigger: release + targets: + - fedora-all + - epel-9 + enable_net: False + list_on_homepage: True + preserve_project: True + owner: "@teemtee" project: tmt + actions: + create-archive: + - hatch run docs:man + - hatch build -t sdist + - bash -c "ls dist/tmt-*.tar.gz" + get-current-version: + - hatch version # Fedora releases - job: propose_downstream diff --git a/README.packit b/README.packit index ea0650e..8a3b9cd 100644 --- a/README.packit +++ b/README.packit @@ -1,3 +1,3 @@ This repository is maintained by packit. https://packit.dev/ -The file was generated using packit 0.79.1.post14+g9e876412. +The file was generated using packit 0.83.0.post1.dev9+g2e0ea06c. diff --git a/sources b/sources index b589a61..7fbfa78 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (tmt-1.27.0.tar.gz) = 137d57c6eb8c41b92e0f9ccf81ae0e612e8d05e32dc69eb858e00699439b6bebeead6895afea33d19f6106982268c6ee9bb2c832178f6a6d41ac412a85a94528 +SHA512 (tmt-1.28.2.tar.gz) = e21b644698591e622d4a39f9f981e2913c8c1aceb670b4442c806d804868fe0e375d1460258d394805b830b8faba272be92d2c7350d99473df0835d5e56225e6 diff --git a/tmt.spec b/tmt.spec index 82df263..5995f2c 100644 --- a/tmt.spec +++ b/tmt.spec @@ -1,235 +1,213 @@ -Name: tmt -Version: 1.27.0 -Release: 1%{?dist} - -Summary: Test Management Tool -License: MIT -BuildArch: noarch - -# Build only on arches where libguestfs (needed by testcloud) is available -%{?kernel_arches:ExclusiveArch: %{kernel_arches} noarch} -%if 0%{?rhel} >= 9 -ExcludeArch: %{power64} -%endif +Name: tmt +Version: 1.28.2 +Release: %autorelease +Summary: Test Management Tool + +License: MIT +URL: https://github.com/teemtee/tmt +Source0: %{pypi_source tmt} + +BuildArch: noarch +BuildRequires: python3-devel + +Requires: git-core rsync sshpass -URL: https://github.com/teemtee/tmt -Source0: https://github.com/teemtee/tmt/releases/download/%{version}/tmt-%{version}.tar.gz +Obsoletes: python3-tmt < %{version}-%{release} +Obsoletes: tmt-report-html < %{version}-%{release} +Obsoletes: tmt-report-junit < %{version}-%{release} +Obsoletes: tmt-report-polarion < %{version}-%{release} +Obsoletes: tmt-report-reportportal < %{version}-%{release} + +Recommends: bash-completion %define workdir_root /var/tmp/tmt -# Main tmt package requires the Python module -Requires: python%{python3_pkgversion}-%{name} == %{version}-%{release} -Requires: git-core rsync sshpass +%py_provides python3-tmt %description The tmt Python module and command line tool implement the test metadata specification (L1 and L2) and allows easy test execution. -This package contains the command line tool. - -%?python_enable_dependency_generator - - -%package -n python%{python3_pkgversion}-%{name} -Summary: Python library for the %{summary} -BuildRequires: python%{python3_pkgversion}-devel -BuildRequires: python%{python3_pkgversion}-docutils -BuildRequires: python%{python3_pkgversion}-setuptools -BuildRequires: python%{python3_pkgversion}-pytest -BuildRequires: python%{python3_pkgversion}-click -BuildRequires: python%{python3_pkgversion}-fmf >= 1.2.0 -BuildRequires: python%{python3_pkgversion}-requests -BuildRequires: python%{python3_pkgversion}-testcloud >= 0.9.10 -BuildRequires: python%{python3_pkgversion}-markdown -BuildRequires: python%{python3_pkgversion}-junit_xml -BuildRequires: python%{python3_pkgversion}-ruamel-yaml -BuildRequires: python%{python3_pkgversion}-jinja2 -BuildRequires: python%{python3_pkgversion}-pint -# TypeAlias is not available with python3.9 on RHEL9 -%if 0%{?rhel} == 9 -BuildRequires: python%{python3_pkgversion}-typing-extensions -%endif -# Required for tests -BuildRequires: rsync -%{?python_provide:%python_provide python%{python3_pkgversion}-%{name}} -%description -n python%{python3_pkgversion}-%{name} -The tmt Python module and command line tool implement the test -metadata specification (L1 and L2) and allows easy test execution. -This package contains the Python 3 module. - -%package provision-container -Summary: Container provisioner for the Test Management Tool -Obsoletes: tmt-container < 0.17 -Requires: tmt == %{version}-%{release} -Requires: podman -Requires: (ansible or ansible-collection-containers-podman) - -%description provision-container -Dependencies required to run tests in a container environment. - -%package provision-virtual -Summary: Virtual machine provisioner for the Test Management Tool -Obsoletes: tmt-testcloud < 0.17 -Requires: tmt == %{version}-%{release} -Requires: python%{python3_pkgversion}-testcloud >= 0.9.2 -Requires: libvirt-daemon-config-network -Requires: openssh-clients -Requires: (ansible or ansible-core) +%pyproject_extras_subpkg -n tmt export-polarion +%pyproject_extras_subpkg -n tmt report-junit +%pyproject_extras_subpkg -n tmt report-polarion + +%package -n tmt+test-convert +Summary: Dependencies required for tmt test import and export +Obsoletes: tmt-test-convert < %{version}-%{release} +Requires: tmt == %{version}-%{release} +Requires: make +Requires: python3-bugzilla +Requires: python3-nitrate +Requires: python3-html2text +Requires: python3-markdown + +%description -n tmt+test-convert +This is a metapackage bringing in extra dependencies for tmt. +It contains no code, just makes sure the dependencies are installed. + +%package -n tmt+provision-container +Summary: Dependencies required for tmt container provisioner +Obsoletes: tmt-provision-container < %{version}-%{release} +Obsoletes: tmt-container < 0.17 +Requires: tmt == %{version}-%{release} +Requires: podman +Requires: (ansible or ansible-collection-containers-podman) + +%description -n tmt+provision-container +This is a metapackage bringing in extra dependencies for tmt. +It contains no code, just makes sure the dependencies are installed. + +%package -n tmt+provision-virtual +Summary: Dependencies required for tmt virtual machine provisioner +Obsoletes: tmt-provision-virtual < %{version}-%{release} +Obsoletes: tmt-testcloud < 0.17 +Requires: tmt == %{version}-%{release} +Requires: python3-testcloud >= 0.9.10 +Requires: libvirt-daemon-config-network +Requires: openssh-clients +Requires: (ansible or ansible-core) # Recommend qemu system emulators for supported arches %if 0%{?fedora} -Recommends: qemu-system-aarch64-core -Recommends: qemu-system-ppc-core -Recommends: qemu-system-s390x-core -Recommends: qemu-system-x86-core +Recommends: qemu-system-aarch64-core +Recommends: qemu-system-ppc-core +Recommends: qemu-system-s390x-core +Recommends: qemu-system-x86-core %endif -%package provision-beaker -Summary: Beaker provisioner for the Test Management Tool -Requires: tmt = %{version}-%{release} -Requires: python3-mrack-beaker >= 1.12.1 - -%description provision-beaker -Dependencies required to run tests in a Beaker environment. - -%description provision-virtual -Dependencies required to run tests in a local virtual machine. - -%package test-convert -Summary: Test import and export dependencies -Requires: tmt == %{version}-%{release} -Requires: make python3-nitrate python3-html2text python3-markdown -Requires: python3-bugzilla - -%description test-convert -Additional dependencies needed for test metadata import and export. - -%package report-html -Summary: Report plugin with support for generating web pages -Requires: tmt == %{version}-%{release} - -%description report-html -Generate test results in the html format. Quickly review test -output thanks to direct links to output logs. - -%package report-junit -Summary: Report plugin with support for generating JUnit output file -Requires: tmt == %{version}-%{release} -Requires: python3-junit_xml - -%description report-junit -Generate test results in the JUnit format. - -%package report-polarion -Summary: Report plugin with support for generating Polarion test runs -Requires: tmt-report-junit >= %{version} -Requires: python3-pylero - -%description report-polarion -Generate test results in xUnit format for exporting to Polarion. - -%package report-reportportal -Summary: Report step plugin for ReportPortal -Requires: tmt == %{version}-%{release} -Requires: tmt-report-junit == %{version} - -%description report-reportportal -Report test results to a ReportPortal instance. - -%package all -Summary: Extra dependencies for the Test Management Tool -Requires: tmt >= %{version} -Requires: tmt-provision-container >= %{version} -Requires: tmt-provision-virtual >= %{version} -Requires: tmt-test-convert >= %{version} -Requires: tmt-report-html >= %{version} -Requires: tmt-report-junit >= %{version} -Requires: tmt-report-polarion >= %{version} -Requires: tmt-report-reportportal >= %{version} -Requires: tmt-provision-beaker >= %{version} - -%description all +%description -n tmt+provision-virtual +This is a metapackage bringing in extra dependencies for tmt. +It contains no code, just makes sure the dependencies are installed. + +%package -n tmt+provision-beaker +Summary: Dependencies required for tmt beaker provisioner +Provides: tmt-provision-beaker == %{version}-%{release} +Obsoletes: tmt-provision-beaker < %{version}-%{release} +Requires: tmt == %{version}-%{release} +Requires: python3-mrack-beaker + +%description -n tmt+provision-beaker +This is a metapackage bringing in extra dependencies for tmt. +It contains no code, just makes sure the dependencies are installed. + +# Replace with pyproject_extras_subpkg at some point +%package -n tmt+all +Summary: Extra dependencies for the Test Management Tool +Provides: tmt-all == %{version}-%{release} +Obsoletes: tmt-all < %{version}-%{release} +Requires: tmt+test-convert == %{version}-%{release} +Requires: tmt+export-polarion == %{version}-%{release} +Requires: tmt+provision-container == %{version}-%{release} +Requires: tmt+provision-virtual == %{version}-%{release} +Requires: tmt+provision-beaker == %{version}-%{release} +Requires: tmt+report-junit == %{version}-%{release} +Requires: tmt+report-polarion == %{version}-%{release} + +%description -n tmt+all All extra dependencies of the Test Management Tool. Install this package to have all available plugins ready for testing. - %prep -%autosetup +%autosetup -p1 -n tmt-%{version} +%generate_buildrequires +%pyproject_buildrequires %build -%py3_build - +export SETUPTOOLS_SCM_PRETEND_VERSION=%{version} +%pyproject_wheel %install -%py3_install +%pyproject_install +%pyproject_save_files tmt mkdir -p %{buildroot}%{_mandir}/man1 -mkdir -p %{buildroot}/etc/bash_completion.d/ -install -pm 644 tmt.1* %{buildroot}%{_mandir}/man1 -install -pm 644 bin/complete %{buildroot}/etc/bash_completion.d/tmt -mkdir -p %{buildroot}%{workdir_root} -chmod 1777 %{buildroot}%{workdir_root} +install -pm 644 tmt.1 %{buildroot}%{_mandir}/man1 +mkdir -p %{buildroot}%{_datadir}/bash-completion/completions +install -pm 644 completions/bash/%{name} %{buildroot}%{_datadir}/bash-completion/completions/%{name} +mkdir -pm 1777 %{buildroot}%{workdir_root} mkdir -p %{buildroot}/etc/%{name}/ install -pm 644 %{name}/steps/provision/mrack/mrack* %{buildroot}/etc/%{name}/ %check -%{__python3} -m pytest -vv -m 'not web' --ignore=tests/integration - - -%{!?_licensedir:%global license %%doc} - +%pyproject_check_import -%files -%{_mandir}/man1/* -%{_bindir}/%{name} +%files -n tmt -f %{pyproject_files} %doc README.rst examples -%license LICENSE -/etc/bash_completion.d/tmt - -%files -n python%{python3_pkgversion}-%{name} -%{python3_sitelib}/%{name}/ -%{python3_sitelib}/%{name}-*.egg-info/ -%license LICENSE +%{_bindir}/tmt +%{_mandir}/man1/tmt.1.gz %dir %{workdir_root} -%exclude %{python3_sitelib}/%{name}/steps/provision/{,__pycache__/}{podman,testcloud,mrack}.* -%exclude %{python3_sitelib}/%{name}/steps/provision/mrack -%exclude %{python3_sitelib}/%{name}/steps/report/{,__pycache__/}html* -%exclude %{python3_sitelib}/%{name}/steps/report/{,__pycache__/}junit.* -%exclude %{python3_sitelib}/%{name}/steps/report/{,__pycache__/}polarion.* -%exclude %{python3_sitelib}/%{name}/steps/report/{,__pycache__/}reportportal.* - -%exclude %{_sysconfdir}/%{name}/mrack* - -%files provision-container -%{python3_sitelib}/%{name}/steps/provision/{,__pycache__/}podman.* +%{_datadir}/bash-completion/completions/%{name} -%files provision-beaker -%{python3_sitelib}/%{name}/steps/provision/{,__pycache__/}mrack.* +%files -n tmt+provision-container -f %{_pyproject_ghost_distinfo} +%files -n tmt+provision-virtual -f %{_pyproject_ghost_distinfo} +%files -n tmt+test-convert -f %{_pyproject_ghost_distinfo} +%files -n tmt+provision-beaker -f %{_pyproject_ghost_distinfo} +%files -n tmt+all -f %{_pyproject_ghost_distinfo} %config(noreplace) %{_sysconfdir}/%{name}/mrack* -%files provision-virtual -%{python3_sitelib}/%{name}/steps/provision/{,__pycache__/}testcloud.* - -%files report-html -%{python3_sitelib}/%{name}/steps/report/{,__pycache__/}html* - -%files report-junit -%{python3_sitelib}/%{name}/steps/report/{,__pycache__/}junit.* - -%files report-polarion -%{python3_sitelib}/%{name}/steps/report/{,__pycache__/}polarion.* - -%files report-reportportal -%{python3_sitelib}/%{name}/steps/report/{,__pycache__/}reportportal.* - -%files test-convert -%license LICENSE - -%files all -%license LICENSE - - %changelog +* Wed Oct 11 2023 Petr Šplíchal - 1.28.2 +- Build man page during the `release` action + +* Wed Oct 11 2023 Petr Šplíchal - 1.28.1 +- Remove the `.dev0` suffix from the spec `Version` + +* Fri Oct 06 2023 Petr Šplíchal - 1.28.0 +- Update the `release` action with `hatch` changes +- Fix the multihost web test to work with container +- Add `skip` as a supported custom result outcome +- Add docs for the new `--update-missing` option +- Remove irrelevant mention of `rhel-8` in the spec +- Record start/end time & duration of test checks +- Add `--update-missing` to update phase fields only when not set by fmf +- Add --skip-prepare-verify-ssh and --post-install-script to artemis plugin (#2347) +- Force tmt-link pre-commit to use fmf 1.3.0 which brings new features (#2376) +- Add logging of applied adjust rules +- Handle all context dimension values case insensitive +- Hide `OPTIONLESS_FIELDS` from `tmt plan show` +- Add context into the `html` report +- Display test check results in `display` report output +- Fix creation of guest data from plugin options +- Allow wider output +- Beaker plugin is negating Beaker operators by default +- Include link to the data directory in the html report +- Teach logging methods to handle common types +- Move the copr repository to the `teemtee` group +- Add a new `cpu` property `stepping` to hardware +- Extract beakerlib phase name to a failure log +- Always show the real beaker job id +- Create a production copr build for each release +- AVC denials check for tests (#2331) +- Add nice & colorfull help to "make" targets +- Include more dependencies in the dev environment +- Stop using the `_version.py` file +- Replace `opt()` for `--dry/--force` with properties +- Update build names for copr/main and pull requests +- Use `hatch` and `pyproject`, refactor `tmt.spec` +- Use dataclass for log record details instead of typed dict +- Refactor html report plugin to use existing template rendering +- Narrow type of hardware constraint variants +- Refactor parameters of `Plan._iter_steps()` +- Use `format_value()` instead of `pprint()` +- Use the minimal plan to test imported plan execution +- Refactor exception rendering to use generators +- Add the `export` callback for fields (#2288) +- Update a verified-by link for the beaker provision +- Multi-string help texts converted to multiline strings +- Make the upload to PyPI working again +- Hide command event debug logs behind a log topic (#2281) +- Replace `pkg_resources` with `importlib.resources` +- Wrap `click.Choice` use with `choices` parameter +- Lower unnecessary verbosity of podman commands +- Move check-related code into `tmt.checks` +- Disable `systemd-resolved` to prevent dns failures +- Adjust test coverage for deep beakerlib libraries +- Document migration from provision.fmf to tmt (#2325) +- Remove TBD of initiator context for Packit +- Fix output indentation of imported plans +- Copr repo with a group owner requires quotes + * Wed Sep 06 2023 Petr Šplíchal - 1.27.0-1 - Use `testcloud` domain API v2 - Bootstrap before/after test checks (#2210)