diff --git a/.packit.yaml b/.packit.yaml new file mode 100644 index 0000000..ac1b57a --- /dev/null +++ b/.packit.yaml @@ -0,0 +1,19 @@ +# See the documentation for more information: +# https://packit.dev/docs/configuration/ + +jobs: + - job: pull_from_upstream + trigger: release + dist_git_branches: + rawhide: + fast_forward_merge_into: + - fedora-branched + - job: koji_build + trigger: commit + dist_git_branches: + - fedora-all + - job: bodhi_update + trigger: commit + dist_git_branches: + - fedora-branched +version_update_mask: \d+\.\d+\. diff --git a/543.patch b/543.patch new file mode 100644 index 0000000..206547e --- /dev/null +++ b/543.patch @@ -0,0 +1,109 @@ +From e0942417a1c267781a8b676789730457dcb2e6fa Mon Sep 17 00:00:00 2001 +From: Martin Weinelt +Date: Sun, 20 Jun 2021 15:18:37 +0200 +Subject: [PATCH] Use custom YAML subclass to be compatible with + ruamel_yaml>=0.17 + +Signed-off-by: Martin Weinelt +--- + whipper/common/yaml.py | 18 ++++++++++++++++++ + whipper/result/logger.py | 11 ++++++----- + whipper/test/test_result_logger.py | 14 ++++++-------- + 3 files changed, 30 insertions(+), 13 deletions(-) + create mode 100644 whipper/common/yaml.py + +diff --git a/whipper/common/yaml.py b/whipper/common/yaml.py +new file mode 100644 +index 00000000..4edb0b36 +--- /dev/null ++++ b/whipper/common/yaml.py +@@ -0,0 +1,18 @@ ++from ruamel.yaml import YAML as ruamel_YAML ++from ruamel.yaml.compat import StringIO ++ ++# https://yaml.readthedocs.io/en/latest/example.html#output-of-dump-as-a-string ++class YAML(ruamel_YAML): ++ def __init__(self, *args, **kwargs): ++ super().__init__() ++ self.width = 4000 ++ self.default_flow_style = False ++ ++ def dump(self, data, stream=None, **kw): ++ inefficient = False ++ if stream is None: ++ inefficient = True ++ stream = StringIO() ++ ruamel_YAML.dump(self, data, stream, **kw) ++ if inefficient: ++ return stream.getvalue() +diff --git a/whipper/result/logger.py b/whipper/result/logger.py +index b7043adc..f4471a00 100644 +--- a/whipper/result/logger.py ++++ b/whipper/result/logger.py +@@ -1,12 +1,12 @@ + import time + import hashlib + import re +-import ruamel.yaml as yaml + from ruamel.yaml.comments import CommentedMap as OrderedDict + + import whipper + + from whipper.common import common ++from whipper.common.yaml import YAML + from whipper.result import result + + +@@ -148,11 +148,12 @@ def logRip(self, ripResult, epoch): + data["EOF"] = "End of status report" + riplog["Conclusive status report"] = data + ++ yaml = YAML( ++ typ="rt", ++ pure=True ++ ) + riplog = yaml.dump( +- riplog, +- default_flow_style=False, +- width=4000, +- Dumper=yaml.RoundTripDumper ++ riplog + ) + # Add a newline after the "Log creation date" line + riplog = re.sub( +diff --git a/whipper/test/test_result_logger.py b/whipper/test/test_result_logger.py +index 411b61af..98c89ab5 100644 +--- a/whipper/test/test_result_logger.py ++++ b/whipper/test/test_result_logger.py +@@ -3,8 +3,8 @@ + import os + import re + import unittest +-import ruamel.yaml + ++from whipper.common.yaml import YAML + from whipper.result.result import TrackResult, RipResult + from whipper.result.logger import WhipperLogger + +@@ -163,16 +163,14 @@ def testLogger(self): + )) + ) + +- yaml = ruamel.yaml.YAML() ++ yaml = YAML( ++ typ='rt', ++ pure=True ++ ) + parsedLog = yaml.load(actual) + self.assertEqual( + actual, +- ruamel.yaml.dump( +- parsedLog, +- default_flow_style=False, +- width=4000, +- Dumper=ruamel.yaml.RoundTripDumper +- ) ++ yaml.dump(parsedLog) + ) + log_body = "\n".join(actualLines[:-1]).encode() + self.assertEqual( diff --git a/changelog b/changelog new file mode 100644 index 0000000..7fece2f --- /dev/null +++ b/changelog @@ -0,0 +1,156 @@ +* Sat Jul 20 2024 Fedora Release Engineering - 0.10.0-15 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild + +* Mon Jul 01 2024 Matthew Martin - 0.10.0-14 +- Cherry pick commit from upstream that updates now deprecated usage of dump in ruamel.yaml + +* Fri Jun 07 2024 Python Maint - 0.10.0-13 +- Rebuilt for Python 3.13 + +* Sat Jan 27 2024 Fedora Release Engineering - 0.10.0-12 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + +* Sat Jul 22 2023 Fedora Release Engineering - 0.10.0-11 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild + +* Tue Jun 13 2023 Python Maint - 0.10.0-10 +- Rebuilt for Python 3.12 + +* Mon Apr 24 2023 Peter Oliver - 0.10.0-9 +- SPDX migration. + +* Sat Jan 21 2023 Fedora Release Engineering - 0.10.0-8 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild + +* Sat Jul 23 2022 Fedora Release Engineering - 0.10.0-7 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild + +* Mon Jun 13 2022 Python Maint - 0.10.0-6 +- Rebuilt for Python 3.11 + +* Sat Jan 22 2022 Fedora Release Engineering - 0.10.0-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild + +* Fri Jul 23 2021 Fedora Release Engineering - 0.10.0-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild + +* Fri Jun 04 2021 Python Maint - 0.10.0-3 +- Rebuilt for Python 3.10 + +* Mon May 24 2021 Matthew Ruszczyk - 0.10.0-2 +- Include new python3-discid dependency + +* Mon May 17 2021 Matthew Ruszczyk - 0.10.0-1 +- Update to 0.10.0 + +* Wed Jan 27 2021 Fedora Release Engineering - 0.9.0-10 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild + +* Wed Jul 29 2020 Fedora Release Engineering - 0.9.0-9 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild + +* Tue May 26 2020 Miro Hrončok - 0.9.0-8 +- Rebuilt for Python 3.9 + +* Tue Mar 31 2020 Adrian Reber - 0.9.0-7 +- Rebuilt for libcdio-2.1.0 + +* Thu Mar 12 2020 Matthew Ruszczyk - 0.9.0-6 +- Bump release for rebuild + +* Thu Mar 12 2020 Matthew Ruszczyk - 0.9.0-5 +- Bump release for rebuild + +* Tue Mar 10 2020 Matthew Ruszczyk - 0.9.0-4 +- Bump release for rebuild due to Koji outage + +* Tue Mar 10 2020 Matthew Ruszczyk - 0.9.0-3 +- Adjust pycdio to require python3 version + +* Fri Jan 31 2020 Fedora Release Engineering - 0.9.0-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild + +* Wed Dec 04 2019 Matthew Ruszczyk - 0.9.0-1 +- Update to release of 0.9.0 + +* Mon Dec 02 2019 Matthew Ruszczyk - 0.9.0-0.1 +- Prerelease of 0.9.0, intended to comply with impending Py2 retirement + +* Sat Jul 27 2019 Fedora Release Engineering - 0.7.3-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild + +* Sun Feb 03 2019 Fedora Release Engineering - 0.7.3-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild + +* Mon Dec 17 2018 Matthew Ruszczyk - 0.7.3-1 +- Update to 0.7.3 + +* Thu Nov 01 2018 Matthew Ruszczyk - 0.7.2-3 +- Adjustment to metainfodir fix + +* Thu Nov 01 2018 Matthew Ruszczyk - 0.7.2-2 +- Fix metainfodir on f27 + +* Thu Nov 01 2018 Matthew Ruszczyk - 0.7.2-1 +- Update to version 0.7.2 + +* Tue Oct 23 2018 Matthew Ruszczyk - 0.7.1-1 +- Update to version 0.7.1 + +* Mon Oct 22 2018 Matthew Ruszczyk - 0.7.0-3 +- New upstream repository + +* Sat Jul 14 2018 Fedora Release Engineering - 0.7.0-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild + +* Mon Apr 16 2018 Matthew Ruszczyk - 0.7.0-1 +- Update to version 0.7.0. + +* Tue Feb 20 2018 Matthew Ruszczyk - 0.6.0-7 +- Exclude s390x due to missing cdrdao dependency. + +* Sat Feb 17 2018 Matthew Ruszczyk - 0.6.0-6 +- Added gcc build requirement. + +* Tue Feb 13 2018 Matthew Ruszczyk - 0.6.0-5 +- Fix missing python2-setuptools requirement. + +* Mon Feb 12 2018 Matthew Ruszczyk - 0.6.0-4 +- Fix ownership of directories and returned to a single package. + +* Wed Feb 7 2018 Matthew Ruszczyk - 0.6.0-3 +- Fix incorrect gobject dependency. + +* Fri Feb 2 2018 Matthew Ruszczyk - 0.6.0-2 +- Split Requires into separate lines and commenting patch. + +* Fri Feb 2 2018 Matthew Ruszczyk - 0.6.0-1 +- Update to version 0.6.0. + +* Tue Jan 23 2018 Matthew Ruszczyk - 0.5.1-5 +- Adjust accuraterip patch to include debug info. + +* Tue Jun 27 2017 Matthew Ruszczyk - 0.5.1-4 +- Move python2 sitelib into python2 subpackage. + +* Tue Apr 25 2017 Matthew Ruszczyk - 0.5.1-3 +- Added license and doc macros to conform with proper best practices. + +* Mon Apr 24 2017 Matthew Ruszczyk - 0.5.1-2 +- Remove libsndfile dependency, rpm picks that up on build. + +* Mon Apr 24 2017 Matthew Ruszczyk - 0.5.1-1 +- Version 0.5.1 + +* Sun Jan 8 2017 Matthew Ruszczyk - 0.4.2-1 +- Version 0.4.2 released. Removal of submodule logic. + +* Wed Dec 21 2016 Matthew Ruszczyk - 0.4.0-3 +- Fixed setup macro and patches accuraterip-checksum to the correct bin + directory + +* Wed Dec 21 2016 Matthew Ruszczyk - 0.4.0-2 +- Added forgotten python2 requirement + +* Wed Dec 21 2016 Matthew Ruszczyk - 0.4.0-1 +- Initial RPM release diff --git a/whipper.spec b/whipper.spec index f39a217..caf68cc 100644 --- a/whipper.spec +++ b/whipper.spec @@ -1,55 +1,63 @@ -%global srcname whipper -%global sum Python CD-DA ripper preferring accuracy over speed -%global desc CD ripper preferring accuracy over speed - - -Name: %{srcname} +Name: whipper Version: 0.10.0 -Release: 8%{?dist} -Summary: %{sum} +Release: %autorelease +Summary: Python CD-DA ripper preferring accuracy over speed URL: https://github.com/whipper-team/whipper -License: GPLv3+ +License: GPL-3.0-or-later +Source: https://github.com/whipper-team/%{name}/archive/v%{version}.tar.gz -Source0: https://github.com/whipper-team/%{srcname}/archive/v%{version}.tar.gz +# Fix now deprecated usage of dump in ruamel.yaml causing crash (https://github.com/whipper-team/whipper/issues/626) +# Cherry pick commit fixing this from upstream +Patch: https://patch-diff.githubusercontent.com/raw/whipper-team/whipper/pull/543.patch -BuildRequires: python3-devel -BuildRequires: python3-setuptools -BuildRequires: python3-setuptools_scm BuildRequires: gcc BuildRequires: libsndfile-devel BuildRequires: libappstream-glib +BuildRequires: python3dist(musicbrainzngs) +BuildRequires: python3dist(mutagen) +BuildRequires: python3dist(pycdio) +BuildRequires: python3dist(pygobject) +BuildRequires: python3dist(ruamel-yaml) +BuildRequires: python3dist(twisted) +BuildRequires: python3-pkg-resources Requires: cdrdao -Requires: libcdio-paranoia -Requires: gobject-introspection -Requires: python3-gobject -Requires: python3-setuptools -Requires: python3-musicbrainzngs -Requires: python3-mutagen -Requires: python3-requests -Requires: python3-ruamel-yaml -Requires: python3-pycdio -Requires: python3-discid Requires: flac +Requires: libcdio-paranoia +Requires: python3dist(discid) +Requires: python3dist(musicbrainzngs) +Requires: python3dist(mutagen) +Requires: python3dist(pycdio) +Requires: python3dist(pygobject) +Requires: python3dist(ruamel-yaml) Requires: sox # Exclude s390x due to missing cdrdao dep ExcludeArch: s390x + %description -%{desc} +CD ripper preferring accuracy over speed + %prep -%autosetup +%autosetup -p1 + + +%generate_buildrequires +%pyproject_buildrequires + %build export SETUPTOOLS_SCM_PRETEND_VERSION=%{version} -%py3_build +%pyproject_wheel + %install export SETUPTOOLS_SCM_PRETEND_VERSION=%{version} -%py3_install +%pyproject_install +%pyproject_save_files -l %{name} 'accuraterip*' %if "%_metainfodir" != "%{_datadir}/metainfo" mv %{buildroot}%{_datadir}/metainfo/ \ @@ -58,149 +66,18 @@ mv %{buildroot}%{_datadir}/metainfo/ \ appstream-util validate-relax --nonet %{buildroot}/%{_metainfodir}/com.github.whipper_team.Whipper.metainfo.xml -%files + +%check +%pyproject_check_import + + +%files -f %{pyproject_files} +%doc CHANGELOG.md +%doc README.md %{_bindir}/whipper %{_bindir}/accuraterip-checksum %{_metainfodir}/com.github.whipper_team.Whipper.metainfo.xml -%{python3_sitearch}/%{srcname}/ -%{python3_sitearch}/%{srcname}-*.egg-info/ -%{python3_sitearch}/accuraterip* -%license LICENSE -%doc README.md TODO CHANGELOG.md HACKING COVERAGE + %changelog -* Sat Jan 21 2023 Fedora Release Engineering - 0.10.0-8 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild - -* Sat Jul 23 2022 Fedora Release Engineering - 0.10.0-7 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild - -* Mon Jun 13 2022 Python Maint - 0.10.0-6 -- Rebuilt for Python 3.11 - -* Sat Jan 22 2022 Fedora Release Engineering - 0.10.0-5 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild - -* Fri Jul 23 2021 Fedora Release Engineering - 0.10.0-4 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild - -* Fri Jun 04 2021 Python Maint - 0.10.0-3 -- Rebuilt for Python 3.10 - -* Mon May 24 2021 Matthew Ruszczyk - 0.10.0-2 -- Include new python3-discid dependency - -* Mon May 17 2021 Matthew Ruszczyk - 0.10.0-1 -- Update to 0.10.0 - -* Wed Jan 27 2021 Fedora Release Engineering - 0.9.0-10 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild - -* Wed Jul 29 2020 Fedora Release Engineering - 0.9.0-9 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild - -* Tue May 26 2020 Miro Hrončok - 0.9.0-8 -- Rebuilt for Python 3.9 - -* Tue Mar 31 2020 Adrian Reber - 0.9.0-7 -- Rebuilt for libcdio-2.1.0 - -* Thu Mar 12 2020 Matthew Ruszczyk - 0.9.0-6 -- Bump release for rebuild - -* Thu Mar 12 2020 Matthew Ruszczyk - 0.9.0-5 -- Bump release for rebuild - -* Tue Mar 10 2020 Matthew Ruszczyk - 0.9.0-4 -- Bump release for rebuild due to Koji outage - -* Tue Mar 10 2020 Matthew Ruszczyk - 0.9.0-3 -- Adjust pycdio to require python3 version - -* Fri Jan 31 2020 Fedora Release Engineering - 0.9.0-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild - -* Wed Dec 04 2019 Matthew Ruszczyk - 0.9.0-1 -- Update to release of 0.9.0 - -* Mon Dec 02 2019 Matthew Ruszczyk - 0.9.0-0.1 -- Prerelease of 0.9.0, intended to comply with impending Py2 retirement - -* Sat Jul 27 2019 Fedora Release Engineering - 0.7.3-3 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild - -* Sun Feb 03 2019 Fedora Release Engineering - 0.7.3-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild - -* Mon Dec 17 2018 Matthew Ruszczyk - 0.7.3-1 -- Update to 0.7.3 - -* Thu Nov 01 2018 Matthew Ruszczyk - 0.7.2-3 -- Adjustment to metainfodir fix - -* Thu Nov 01 2018 Matthew Ruszczyk - 0.7.2-2 -- Fix metainfodir on f27 - -* Thu Nov 01 2018 Matthew Ruszczyk - 0.7.2-1 -- Update to version 0.7.2 - -* Tue Oct 23 2018 Matthew Ruszczyk - 0.7.1-1 -- Update to version 0.7.1 - -* Mon Oct 22 2018 Matthew Ruszczyk - 0.7.0-3 -- New upstream repository - -* Sat Jul 14 2018 Fedora Release Engineering - 0.7.0-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild - -* Mon Apr 16 2018 Matthew Ruszczyk - 0.7.0-1 -- Update to version 0.7.0. - -* Tue Feb 20 2018 Matthew Ruszczyk - 0.6.0-7 -- Exclude s390x due to missing cdrdao dependency. - -* Sat Feb 17 2018 Matthew Ruszczyk - 0.6.0-6 -- Added gcc build requirement. - -* Tue Feb 13 2018 Matthew Ruszczyk - 0.6.0-5 -- Fix missing python2-setuptools requirement. - -* Mon Feb 12 2018 Matthew Ruszczyk - 0.6.0-4 -- Fix ownership of directories and returned to a single package. - -* Wed Feb 7 2018 Matthew Ruszczyk - 0.6.0-3 -- Fix incorrect gobject dependency. - -* Fri Feb 2 2018 Matthew Ruszczyk - 0.6.0-2 -- Split Requires into separate lines and commenting patch. - -* Fri Feb 2 2018 Matthew Ruszczyk - 0.6.0-1 -- Update to version 0.6.0. - -* Tue Jan 23 2018 Matthew Ruszczyk - 0.5.1-5 -- Adjust accuraterip patch to include debug info. - -* Tue Jun 27 2017 Matthew Ruszczyk - 0.5.1-4 -- Move python2 sitelib into python2 subpackage. - -* Tue Apr 25 2017 Matthew Ruszczyk - 0.5.1-3 -- Added license and doc macros to conform with proper best practices. - -* Mon Apr 24 2017 Matthew Ruszczyk - 0.5.1-2 -- Remove libsndfile dependency, rpm picks that up on build. - -* Mon Apr 24 2017 Matthew Ruszczyk - 0.5.1-1 -- Version 0.5.1 - -* Sun Jan 8 2017 Matthew Ruszczyk - 0.4.2-1 -- Version 0.4.2 released. Removal of submodule logic. - -* Wed Dec 21 2016 Matthew Ruszczyk - 0.4.0-3 -- Fixed setup macro and patches accuraterip-checksum to the correct bin - directory - -* Wed Dec 21 2016 Matthew Ruszczyk - 0.4.0-2 -- Added forgotten python2 requirement - -* Wed Dec 21 2016 Matthew Ruszczyk - 0.4.0-1 -- Initial RPM release +%autochangelog