You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Building Dogtag PKI package with packit provide the folloing error:
2025-05-16 15:17:53.588 logging.py DEBUG v11.6.0-301-gef79d8fa0c
2025-05-16 15:17:53.690 utils.py ERROR Preparation of the repository for creation of an SRPM failed: line 1648: Too many names: %files -n dogtag-pki -f\\ .mfiles
Traceback (most recent call last):
File "/usr/lib/python3.13/site-packages/specfile/spec_parser.py", line 233, in get_rpm_spec
return rpm.spec(tmp.name, flags)
~~~~~~~~^^^^^^^^^^^^^^^^^
ValueError: can't parse specfile
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/usr/lib/python3.13/site-packages/packit/api.py", line 1979, in prepare_sources
self.up.prepare_upstream_for_srpm_creation(
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
upstream_ref=upstream_ref,
^^^^^^^^^^^^^^^^^^^^^^^^^^
...<4 lines>...
env=self.common_env(),
^^^^^^^^^^^^^^^^^^^^^^
)
^
File "/usr/lib/python3.13/site-packages/packit/upstream.py", line 1052, in prepare_upstream_for_srpm_creation
SRPMBuilder(upstream=self, ref=upstream_ref).prepare(
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
update_release=update_release,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
...<2 lines>...
env=env,
^^^^^^^^
)
^
File "/usr/lib/python3.13/site-packages/packit/upstream.py", line 1552, in prepare
self._fix_specfile_to_use_local_archive(
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
archive=created_archive,
^^^^^^^^^^^^^^^^^^^^^^^^
update_release=update_release,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
release_suffix=release_suffix,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
)
^
File "/usr/lib/python3.13/site-packages/packit/upstream.py", line 1522, in _fix_specfile_to_use_local_archive
new_release = self.upstream.get_spec_release(release_suffix)
File "/usr/lib/python3.13/site-packages/packit/upstream.py", line 889, in get_spec_release
original_release_number = self.specfile.expanded_release.split(".", 1)[0]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.13/site-packages/specfile/specfile.py", line 768, in expanded_release
return self.expand(self.release, extra_macros=[("dist", "")])
~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.13/site-packages/specfile/specfile.py", line 307, in expand
self._parser.parse(str(self), extra_macros)
~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.13/site-packages/specfile/spec_parser.py", line 387, in parse
self.spec, self.tainted = self._do_parse(content, extra_macros)
~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.13/site-packages/specfile/spec_parser.py", line 301, in _do_parse
spec = get_rpm_spec(content, rpm.RPMSPEC_ANYARCH | rpm.RPMSPEC_FORCE)
File "/usr/lib/python3.13/site-packages/specfile/spec_parser.py", line 235, in get_rpm_spec
raise RPMException(stderr=stderr) from e
specfile.exceptions.RPMException: line 1648: Too many names: %files -n dogtag-pki -f\\ .mfiles
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/usr/lib/python3.13/site-packages/packit/cli/utils.py", line 47, in covered_func
func(config=config, *args, **kwargs) # noqa: B026
~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.13/site-packages/packit/cli/utils.py", line 143, in covered_func
func(*args, **decorated_func_kwargs)
~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.13/site-packages/packit/cli/prepare_sources.py", line 193, in prepare_sources
api.prepare_sources(
~~~~~~~~~~~~~~~~~~~^
upstream_ref=upstream_ref,
^^^^^^^^^^^^^^^^^^^^^^^^^^
...<4 lines>...
create_symlinks=create_symlinks,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
)
^
File "/usr/lib/python3.13/site-packages/packit/api.py", line 1988, in prepare_sources
raise PackitSRPMException(
f"Preparation of the repository for creation of an SRPM failed: {ex}",
) from ex
packit.exceptions.PackitSRPMException: Preparation of the repository for creation of an SRPM failed: line 1648: Too many names: %files -n dogtag-pki -f\\ .mfiles
2025-05-16 15:17:53.694 local_project.py DEBUG Cleaning: /tmp/tmp938844s_
What did you expect to happen?
It should properly generate the source package because the spec file is valid and works properly.
Example URL(s)
The error can be seen in all Packit build of DogtagPKI.
Steps to reproduce
Approach 1:
1. Try to reproduce packit build from the above
Approach 2 (it produce the same errror):
1. Getting the pki project from the repository https://github.com/dogtagpki/pki
2. open python interpreter
3. Run the following commands:
>>> from specfile import Specfile
>>> spec = Specfile(path="/home/mfargetta/Projects/upstream/pki/pki.spec")
>>> print(spec.expanded_version)
11.7.0
>>> print(spec.expanded_name)
pki
>>> print(spec.expanded_version)
Traceback (most recent call last):
File "/usr/lib/python3.13/site-packages/specfile/spec_parser.py", line 233, in get_rpm_spec
return rpm.spec(tmp.name, flags)
~~~~~~~~^^^^^^^^^^^^^^^^^
ValueError: can't parse specfileThe above exception was the direct cause of the following exception:Traceback (most recent call last): File "<python-input-4>", line 1, in <module> print(spec.expanded_version) ^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.13/site-packages/specfile/specfile.py", line 692, in getter return getattr(tags, name).expanded_value ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.13/site-packages/specfile/tags.py", line 287, in expanded_value return self._context.expand(self.value) ~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^ File "/usr/lib/python3.13/site-packages/specfile/specfile.py", line 307, in expand self._parser.parse(str(self), extra_macros) ~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.13/site-packages/specfile/spec_parser.py", line 387, in parse self.spec, self.tainted = self._do_parse(content, extra_macros) ~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.13/site-packages/specfile/spec_parser.py", line 301, in _do_parse spec = get_rpm_spec(content, rpm.RPMSPEC_ANYARCH | rpm.RPMSPEC_FORCE) File "/usr/lib/python3.13/site-packages/specfile/spec_parser.py", line 235, in get_rpm_spec raise RPMException(stderr=stderr) from especfile.exceptions.RPMException: line 1648: Too many names: %files -n dogtag-pki -f\\ .mfiles
Workaround
There is an existing workaround that can be used until this issue is fixed.
Participation
I am willing to submit a pull request for this issue. (Packit team is happy to help!)
The text was updated successfully, but these errors were encountered:
@fmarco76 After the linked PR is merged, fixed specfile build will be available in our development Copr repo and the fix will be deployed to Packit Service production on Monday next week. Is it ok or do you need the fix sooner?
What happened? What is the problem?
Building
Dogtag PKI
package with packit provide the folloing error:What did you expect to happen?
It should properly generate the source package because the spec file is valid and works properly.
Example URL(s)
The error can be seen in all Packit build of DogtagPKI.
Steps to reproduce
Workaround
Participation
The text was updated successfully, but these errors were encountered: