python37.spec is a rather long and complicated yet valid spec file. spectool -g however chokes on it.
spectool -g
$ fedpkg clone python37 && cd python37 $ git checkout 6a6a8d $ LANG=C.utf-8 spectool -D -g python37.spec temp dir: /tmp/spectool_FbuhayG7GU temp spec filename: /tmp/spectool_FbuhayG7GU/spec_7d6ZEYJw7A stderr filename: /tmp/spectool_FbuhayG7GU/stderr_gHdB_IBeNo $ cat /tmp/spectool_FbuhayG7GU/stderr_gHdB_IBeNo error: line 818: Unclosed %if
The unclosed if in /tmp/spectool_FbuhayG7GU/spec_7d6ZEYJw7A really is there, becasue the file is truncated and ends on line 865 with:
/tmp/spectool_FbuhayG7GU/spec_7d6ZEYJw7A
EOF_/tmp/spectool_FbuhayG7GU/spec_7d6ZEYJw7A
The file is truncated right before the following:
%description
That makes me think that spectool is choking on the fact that we have 2 %descriptions in the spec, conditionalized with bcond. Will try to create a smaller reproducer.
Smaller reproducer:
Name: reproducer Version: 0.1 Release: 1%{?dist} Summary: Reproducer for a double description License: MIT BuildArch: noarch Source: https://www.python.org/ftp/python/%{version}/Python-%{version}%{prerel}.tar.xz %bcond_without whatnot %if %{with whatnot} %description This is the first description %else %description This is the second description %endif %prep %build %install %files
What does rpmspec -P reproducer.spec output?
rpmspec -P reproducer.spec
Name: reproducer Version: 0.1 Release: 1.fc27 Summary: Reproducer for a double description License: MIT BuildArch: noarch Source: https://www.python.org/ftp/python/0.1/Python-0.1%{prerel}.tar.xz %description This is the first description %prep %build %install %files
This is still bugging me very much.
Found a workaround:
$ spectool -g <(rpmspec -P python3.spec)
This is bugging me as well :/
The spectool implementation has been completely replaced. Please try the new implementation and see if it solves your problems!
8b00f7a2a731a769410b76b71ea555f062f0af0d ?
Yes.
Works like a charm.
Excellent!
Metadata Update from @ngompa: - Issue status updated to: Closed (was: Open)