Bug 1303034 - rpm macro expansion works incorrectly when looping over a long list using lua
rpm macro expansion works incorrectly when looping over a long list using lua
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: rpm (Show other bugs)
23
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: packaging-team-maint
Fedora Extras Quality Assurance
: Reopened
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2016-01-29 06:41 EST by Mike FABIAN
Modified: 2016-04-14 00:23 EDT (History)
10 users (show)

See Also:
Fixed In Version: rpm-4.13.0-0.rc1.12.fc23 rpm-4.12.0.1-16.fc22
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-03-01 20:50:01 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
glibc.spec, broken version, causing the problem (86.62 KB, text/x-rpm-spec)
2016-01-29 06:41 EST, Mike FABIAN
no flags Details

  None (edit)
Description Mike FABIAN 2016-01-29 06:41:28 EST
Created attachment 1119398 [details]
glibc.spec, broken version, causing the problem

rpm-4.13.0-0.rc1.7.fc23.x86_64

See attached glibc.spec file. Try to process it with rpm like this:

$ rpmbuild glibc.spec 
error: line 765: Unterminated rich dependency: (glib: Supplements: (glib
m
Comment 1 Mike FABIAN 2016-01-29 06:48:55 EST
Doing the following change to the attached glibc.spec works around the problem:

iff --git a/glibc.spec b/glibc.spec
index 4b3f454..41705d5 100644
--- a/glibc.spec
+++ b/glibc.spec
@@ -746,8 +746,6 @@ xh \
 yi \
 yo \
 yue \
-zh \
-yu \
 %{nil}
 
 %define language_list_second \
@@ -763,6 +761,7 @@ function(i) print(rpm.expand("%lang_package "..i.."")) end)}\
 %{nil}
 
 %create_lang_packages %language_list
+%create_lang_packages %language_list_second
 
 %define require_langpacks()\
 %{lua:\
@@ -775,6 +774,7 @@ function(i) print(rpm.expand("Requires: %{name}-langpack-"..i.." = %{version}-%{
 Summary: Meta package to require all langpacks
 Group: System Environment/Base
 %require_langpacks %language_list
+%require_langpacks %language_list_second
 %description all-langpacks
 Meta package to require all langpacks

I.e. just making %language_list slightly shorter and putting
two of its entries in %language_list_second and then
using the macros which get the language list as the input twice
makes it work.

The macro expansion works correctly then.

The macro expansion seems to work correctly as long as that %language_list
macro contains not more than 178 languages. When adding more
languages, the macro expansion fails.
Comment 2 Ľuboš Kardoš 2016-02-02 10:13:25 EST
This is already fixed upstream:

https://github.com/rpm-software-management/rpm/commit/61838b0fdacb71a881baac164043b8e40ddfbec5
Comment 3 Ľuboš Kardoš 2016-02-03 03:32:32 EST
Fixed in rawhide in rpm-4.13.0-0.rc1.23.fc24
Comment 4 Mike FABIAN 2016-02-03 07:54:11 EST
(In reply to Ľuboš Kardoš from comment #3)
> Fixed in rawhide in rpm-4.13.0-0.rc1.23.fc24

This seems to fix it indeed.
Comment 5 Ľuboš Kardoš 2016-02-03 09:02:33 EST
Because this is fixed in rawhide and I expect you need this for modifying packages in rawhide and not for changing packages in f23, I am closing this bug as fixed rawhide. If you need this to be fixed also in f23, please reopen the bug.
Comment 6 Carlos O'Donell 2016-02-26 05:14:36 EST
We need it fixed for f24 because the glibc langpack splitup feature requires it.

We would like this fixed in f23 and f22 so that developers can work in those environments to build and manipulate f24 and rawhide spec files.
Comment 7 Parag Nemade 2016-02-26 09:29:23 EST
I asked Ľuboš about this bugfix in rpm-4.13.0-0.rc1.23.fc24 build and he confirmed that. So, this bug is fixed in F24+ builds.
Comment 8 Carlos O'Donell 2016-02-26 09:50:54 EST
(In reply to Parag Nemade from comment #7)
> I asked Ľuboš about this bugfix in rpm-4.13.0-0.rc1.23.fc24 build and he
> confirmed that. So, this bug is fixed in F24+ builds.

Agreed, I had some problems with the ppc and s390 koji builders and in those cases I think they are *behind* in the mass rebuilds and versions.

I can confirm that F24 is now building:
http://koji.fedoraproject.org/koji/taskinfo?taskID=13137477

The problem remains for f22 and f23 though, and our glibc developers are likely using one of those.

So fixing this in f22 and f23 would be great.
Comment 9 Ľuboš Kardoš 2016-02-26 10:52:42 EST
The patch fixing this is easy to apply in f23 but there are some problems with applying it in f22. I will look into this on Monday.
Comment 10 Peter Robinson 2016-02-26 11:02:57 EST
(In reply to Ľuboš Kardoš from comment #9)
> The patch fixing this is easy to apply in f23 but there are some problems
> with applying it in f22. I will look into this on Monday.

I personally believe that just F-23 is fine for this, at least the current stable is needed but maybe not the n-1 one if it's a lot of work there's likely better spots people can be spending their time esp given Carlos says "are likely using one of those." ... I'd get confirmation that F-22 is actually worth the effort.
Comment 11 Fedora Update System 2016-02-29 09:11:29 EST
rpm-4.13.0-0.rc1.12.fc23 has been submitted as an update to Fedora 23. https://bodhi.fedoraproject.org/updates/FEDORA-2016-d360559a79
Comment 12 Fedora Update System 2016-02-29 09:11:31 EST
rpm-4.12.0.1-16.fc22 has been submitted as an update to Fedora 22. https://bodhi.fedoraproject.org/updates/FEDORA-2016-3b03252507
Comment 13 Fedora Update System 2016-02-29 18:50:33 EST
rpm-4.12.0.1-16.fc22 has been pushed to the Fedora 22 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-3b03252507
Comment 14 Fedora Update System 2016-02-29 18:52:17 EST
rpm-4.13.0-0.rc1.12.fc23 has been pushed to the Fedora 23 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-d360559a79
Comment 15 Fedora Update System 2016-03-01 20:49:57 EST
rpm-4.13.0-0.rc1.12.fc23 has been pushed to the Fedora 23 stable repository. If problems still persist, please make note of it in this bug report.
Comment 16 Fedora Update System 2016-04-14 00:23:31 EDT
rpm-4.12.0.1-16.fc22 has been pushed to the Fedora 22 stable repository. If problems still persist, please make note of it in this bug report.

Note You need to log in before you can comment on or make changes to this bug.