There might be spaces in filenames (e.g. in setuptools, they are 🤯) and %{pyproject_files} generated by %pyproject_save_files contains them literally: ... /usr/lib/python3.10/site-packages/setuptools/command/launcher manifest.xml ... /usr/lib/python3.10/site-packages/setuptools/script (dev).tmpl ... When used in the %files section, RPM considers the part before and after space as a separate file and fails with: File must begin with "/": manifest.xml File must begin with "/": (dev).tmpl Escaping the space with a backslash does not help. Putting the entire line in "double quotes" helps.
A reproducer may be found in https://src.fedoraproject.org/rpms/python-setuptools/pull-request/70 (it has a workaround that links to this bugzilla that needs to be removed to reproduce)
This is what I have: import string def escape_rpm_path(path): """ Escape special characters in paths E.g. a space in path otherwise makes RPM think it's multiple paths, unless we put it in "quotes". Or a literal % symbol in path might be expanded as a macro if not escaped. """ if "%" in path: # path = path.replace("%", "%%") is not enough raise NotImplementedError("% symbol in paths, dunno") if any(symbol in path for symbol in string.whitespace): if '"' in path: raise NotImplementedError('" symbol in path with spaces, dunno') return f'"{path}"' # I wish all paths in the world would end up here: return path The NotImplementedErrors are not ideal. I've asked: http://lists.rpm.org/pipermail/rpm-list/2021-June/002048.html
https://src.fedoraproject.org/rpms/pyproject-rpm-macros/pull-request/175
FEDORA-2021-fe1bbcfd07 has been submitted as an update to Fedora 35. https://bodhi.fedoraproject.org/updates/FEDORA-2021-fe1bbcfd07
FEDORA-2021-9874c0ec7b has been submitted as an update to Fedora 34. https://bodhi.fedoraproject.org/updates/FEDORA-2021-9874c0ec7b
FEDORA-2021-ffa81019cf has been submitted as an update to Fedora 33. https://bodhi.fedoraproject.org/updates/FEDORA-2021-ffa81019cf
FEDORA-2021-fe1bbcfd07 has been pushed to the Fedora 35 stable repository. If problem still persists, please make note of it in this bug report.
FEDORA-2021-ffa81019cf has been pushed to the Fedora 33 testing repository. Soon you'll be able to install the update with the following command: `sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2021-ffa81019cf` You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2021-ffa81019cf See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.
FEDORA-2021-9874c0ec7b has been pushed to the Fedora 34 testing repository. Soon you'll be able to install the update with the following command: `sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2021-9874c0ec7b` You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2021-9874c0ec7b See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.
FEDORA-2021-fcf5e2adc6 has been pushed to the Fedora 34 testing repository. Soon you'll be able to install the update with the following command: `sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2021-fcf5e2adc6` You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2021-fcf5e2adc6 See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.
FEDORA-2021-3d06d86fe9 has been pushed to the Fedora 33 testing repository. Soon you'll be able to install the update with the following command: `sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2021-3d06d86fe9` You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2021-3d06d86fe9 See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.
FEDORA-2021-fcf5e2adc6 has been pushed to the Fedora 34 stable repository. If problem still persists, please make note of it in this bug report.
FEDORA-2021-3d06d86fe9 has been pushed to the Fedora 33 stable repository. If problem still persists, please make note of it in this bug report.