Add a temporary workaround for RPM 4.20 alpha 2 leaking \x1f (unit separators)

Strip them.
This workaround is safe with RPM < 4.20 or when RPM is fixed.
This commit is contained in:
Miro Hrončok 2024-06-04 10:46:50 +02:00
parent d0a66a2871
commit 996ac31b46
2 changed files with 14 additions and 2 deletions

View File

@ -13,7 +13,7 @@ License: MIT
# Increment Y and reset Z when new macros or features are added # Increment Y and reset Z when new macros or features are added
# Increment Z when this is a bugfix or a cosmetic change # Increment Z when this is a bugfix or a cosmetic change
# Dropping support for EOL Fedoras is *not* considered a breaking change # Dropping support for EOL Fedoras is *not* considered a breaking change
Version: 1.12.0 Version: 1.12.1
Release: 1%{?dist} Release: 1%{?dist}
# Macro files # Macro files
@ -171,6 +171,10 @@ export HOSTNAME="rpmbuild" # to speedup tox in network-less mock, see rhbz#1856
%changelog %changelog
* Tue Jun 04 2024 Miro Hrončok <mhroncok@redhat.com> - 1.12.1-1
- Add a temporary workaround for RPM 4.20 alpha 2 leaking \x1f (unit separators)
- Related: rhbz#2284187
* Fri Jan 26 2024 Miro Hrončok <miro@hroncok.cz> - 1.12.0-1 * Fri Jan 26 2024 Miro Hrončok <miro@hroncok.cz> - 1.12.0-1
- Namespace pyproject-rpm-macros generated text files with %%{python3_pkgversion} - Namespace pyproject-rpm-macros generated text files with %%{python3_pkgversion}
- That way, a single-spec can be used to build packages for multiple Python versions - That way, a single-spec can be used to build packages for multiple Python versions

View File

@ -11,5 +11,13 @@ def main(argv):
return ','.join(args.toxenv) return ','.join(args.toxenv)
def strip_x1f(argv):
r"""
Hack workaround for RPM 4.20 alpha 2 leaking \x1f (unit separators).
https://bugzilla.redhat.com/2284187
"""
return [a.strip('\x1f') for a in argv]
if __name__ == '__main__': if __name__ == '__main__':
print(main(sys.argv[1:])) print(main(strip_x1f(sys.argv[1:])))