Escape % symbols in macro files comments

This is most likely not neccessary but can prevent serious problems like:

https://bugzilla.redhat.com/show_bug.cgi?id=1953910
This commit is contained in:
Miro Hrončok 2021-04-27 10:00:02 +02:00
commit 03a1e3ba65
3 changed files with 20 additions and 11 deletions

View file

@ -47,7 +47,7 @@
# a specific version (e.g. 34 in Fedora EPEL7)
%python3_pkgversion 3
# Set to /bin/true to avoid %ifdefs and %{? in specfiles
# Set to /bin/true to avoid %%ifdefs and %%{? in specfiles
%__python3_other /bin/true
%py3_other_build /bin/true
%py3_other_install /bin/true
@ -68,7 +68,7 @@
# Creates Python 2 dist tag(s) after converting names to canonical format
# Needs to first put all arguments into a list, because invoking a different
# macro (%py_dist_name) overwrites them
# macro (%%py_dist_name) overwrites them
%py2_dist() %{lua:\
args = {}\
arg = 1\
@ -88,7 +88,7 @@
# Creates Python 3 dist tag(s) after converting names to canonical format
# Needs to first put all arguments into a list, because invoking a different
# macro (%py_dist_name) overwrites them
# macro (%%py_dist_name) overwrites them
%py3_dist() %{lua:\
python3_pkgversion = rpm.expand("%python3_pkgversion");\
args = {}\
@ -110,12 +110,12 @@
# Macro to replace overly complicated references to PyPI source files.
# Expands to the pythonhosted URL for a package
# Accepts zero to three arguments:
# 1: The PyPI project name, defaulting to %srcname if it is defined, then
# %pypi_name if it is defined, then just %name.
# 2: The PYPI version, defaulting to %version with tildes stripped.
# 1: The PyPI project name, defaulting to %%srcname if it is defined, then
# %%pypi_name if it is defined, then just %%name.
# 2: The PYPI version, defaulting to %%version with tildes stripped.
# 3: The file extension, defaulting to "tar.gz". (A period will be added
# automatically.)
# Requires %__pypi_url and %__pypi_default_extension to be defined.
# Requires %%__pypi_url and %%__pypi_default_extension to be defined.
%__pypi_url https://files.pythonhosted.org/packages/source/
%__pypi_default_extension tar.gz