Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.
Bug 1303034 - rpm macro expansion works incorrectly when looping over a long list using lua
Summary: rpm macro expansion works incorrectly when looping over a long list using lua
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: rpm
Version: 23
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Packaging Maintenance Team
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-01-29 11:41 UTC by Mike FABIAN
Modified: 2016-04-14 04:23 UTC (History)
10 users (show)

Fixed In Version: rpm-4.13.0-0.rc1.12.fc23 rpm-4.12.0.1-16.fc22
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-03-02 01:50:01 UTC
Type: Bug
Embargoed:


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

Description Mike FABIAN 2016-01-29 11:41:28 UTC
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 11:48:55 UTC
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 15:13:25 UTC
This is already fixed upstream:

https://github.com/rpm-software-management/rpm/commit/61838b0fdacb71a881baac164043b8e40ddfbec5

Comment 3 Ľuboš Kardoš 2016-02-03 08:32:32 UTC
Fixed in rawhide in rpm-4.13.0-0.rc1.23.fc24

Comment 4 Mike FABIAN 2016-02-03 12:54:11 UTC
(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 14:02:33 UTC
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 10:14:36 UTC
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 14:29:23 UTC
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 14:50:54 UTC
(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 15:52:42 UTC
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 16:02:57 UTC
(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 14:11:29 UTC
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 14:11:31 UTC
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 23:50:33 UTC
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 23:52:17 UTC
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-02 01:49:57 UTC
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 04:23:31 UTC
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.