[Bug 613965] New: Specfile rewrite breaking marcros
http://bugzilla.novell.com/show_bug.cgi?id=613965 http://bugzilla.novell.com/show_bug.cgi?id=613965#c0 Summary: Specfile rewrite breaking marcros Classification: openSUSE Product: openSUSE.org Version: unspecified Platform: Other OS/Version: Other Status: NEW Severity: Normal Priority: P5 - None Component: BuildService AssignedTo: bnc-team-screening@forge.provo.novell.com ReportedBy: pzb@novell.com QAContact: adrian@novell.com CC: aj@novell.com Found By: --- Blocker: --- The following snippet is from a build log. Now that it is removing a '{' from the macro, resulting in invalid perl, which breaks the build. ----------------------------------------------------------------- I have the following modifications for perl-Params-Validate.spec: 4c4 < Release: %(echo `awk '{ print $2 }' %{SOURCE9999}`)%{?dist} ---
Release: 1.1 11,13c11,13 < Requires: %(perl -MConfig -le 'if (defined $Config{useithreads}) { print "perl(:WITH_ITHREADS)" } else { print "perl(:WITHOUT_ITHREADS)" }') < Requires: %(perl -MConfig -le 'if (defined $Config{usethreads}) { print "perl(:WITH_THREADS)" } else { print "perl(:WITHOUT_THREADS)" }') < Requires: %(perl -MConfig -le 'if (defined $Config{uselargefiles}) { print "perl(:WITH_LARGEFILES)" } else { print "perl(:WITHOUT_LARGEFILES)" }')
Requires: %(perl -MConfig -le 'if (defined $Config{useithreads}) { print "perl(:WITH_ITHREADS)" } else "perl(:WITHOUT_ITHREADS)" }') Requires: %(perl -MConfig -le 'if (defined $Config{usethreads}) { print "perl(:WITH_THREADS)" } else "perl(:WITHOUT_THREADS)" }') Requires: %(perl -MConfig -le 'if (defined $Config{uselargefiles}) { print "perl(:WITH_LARGEFILES)" } else "perl(:WITHOUT_LARGEFILES)" }')
-- Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
http://bugzilla.novell.com/show_bug.cgi?id=613965 http://bugzilla.novell.com/show_bug.cgi?id=613965#c1 Adrian Schröter <adrian@novell.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |WONTFIX --- Comment #1 from Adrian Schröter <adrian@novell.com> 2010-06-14 12:20:50 UTC --- we will never allow to execute random code during dependency calculation. This would create security and performance problems. -- Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
http://bugzilla.novell.com/show_bug.cgi?id=613965 http://bugzilla.novell.com/show_bug.cgi?id=613965#c2 Peter Bowen <pzb@novell.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |REOPENED Resolution|WONTFIX | --- Comment #2 from Peter Bowen <pzb@novell.com> 2010-06-14 12:33:42 UTC --- This has nothing to do with build dependency calculation. These macros are only used during the build, not for build dependencies. -- Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
http://bugzilla.novell.com/show_bug.cgi?id=613965 http://bugzilla.novell.com/show_bug.cgi?id=613965#c3 --- Comment #3 from Andreas Jaeger <aj@novell.com> 2010-06-14 12:41:53 UTC --- Peter, it seems to me that the Requires lines needs to be interpreted by the Build Service to calculate which packages are needed. Doesn't it? I agree with the Release Line, this shouldn't be a problem but I think Adrian has a good point here with Requires. -- Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
http://bugzilla.novell.com/show_bug.cgi?id=613965 http://bugzilla.novell.com/show_bug.cgi?id=613965#c4 --- Comment #4 from Peter Bowen <pzb@novell.com> 2010-06-14 12:49:09 UTC --- There are two different kinds of requires in a specfile: BuildRequires: These say what is needed to build a package. Requires: and PreReq: These say what is needed to install a package. Macros in these lines are run once during the build and then the resulting value is saved in the built RPM. So, in this case, it runs perl during the build process and then adds either "perl(:WITH_THREADS)" or "perl(:WITHOUT_THREADS)" in the requirements list. The macro is not used at install time or when calculating build requirements. -- Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
http://bugzilla.novell.com/show_bug.cgi?id=613965 http://bugzilla.novell.com/show_bug.cgi?id=613965#c5 Adrian Schröter <adrian@novell.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|REOPENED |RESOLVED Resolution| |WONTFIX --- Comment #5 from Adrian Schröter <adrian@novell.com> 2010-06-14 12:53:55 UTC --- Requires are also BuildRequires. If you buildrequire "qt-devel" it is important also to install "x11-devel" which is required by qt-devel for example. All what you can do here is %if %my_macro BuildRequire: perl(:WITH_THREADS) %else BuildRequire: perl(:WITHOUT_THREADS) %fi and control it via %my_macro in prjconf. -- Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
http://bugzilla.novell.com/show_bug.cgi?id=613965 http://bugzilla.novell.com/show_bug.cgi?id=613965#c6 Peter Bowen <pzb@novell.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |REOPENED Resolution|WONTFIX | --- Comment #6 from Peter Bowen <pzb@novell.com> 2010-06-14 13:01:18 UTC --- Yes, you need to calculate the requirements of packages that in the build requires list. However, as I said above, these macros are expanded at build time, not install time. It is completely valid for a specfile to have: Name: myPkg BuildRequires: pkgA Requires: pkgB In this case, pkgA should be installed when building myPkg but not when installing the package itself. And pkgB should be installed when installing myPkg, but not when building myPkg. If the following is in the spec: Requires: %(echo "pkgB") Then the resulting package will have just pkgB as the dependency. The macro will not be embedded in the dependency. Put another way, all of the following are equivalent: Requires: pkgB Requires: %(echo "pkgB") %define ineed pkgB Requires: %ineed In all those cases, the explicit pkgB will end up in the rpm header. -- Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
http://bugzilla.novell.com/show_bug.cgi?id=613965 http://bugzilla.novell.com/show_bug.cgi?id=613965#c7 Adrian Schröter <adrian@novell.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|REOPENED |RESOLVED Resolution| |WONTFIX --- Comment #7 from Adrian Schröter <adrian@novell.com> 2010-06-14 13:07:50 UTC --- This would require to setup a vm to run the native distro just for evaluate this dependency. Also the spec file does not describe which version of this particular echo command shall be used (sh, bash, ash, .. ?). So the build is not reproducable and performance of scheduling would be horrible. We don't support this by intention therefore and I don't see that we will ever do. Note: we never promissed that all kind of cruel hacks from all distro build enviroments are supported. We just support a way to build in a reproducable way for all these distro. -- Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
http://bugzilla.novell.com/show_bug.cgi?id=613965 http://bugzilla.novell.com/show_bug.cgi?id=613965#c8 Michael Schröder <mls@novell.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|WONTFIX |FIXED --- Comment #8 from Michael Schröder <mls@novell.com> 2010-06-14 13:35:47 UTC --- Fixed in latest version of "build" by simply ignoring lines with %(. Thanks for the report! -- Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
http://bugzilla.novell.com/show_bug.cgi?id=613965 http://bugzilla.novell.com/show_bug.cgi?id=613965#c9 Andreas Jaeger <aj@novell.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |REOPENED Resolution|FIXED | AssignedTo|bnc-team-screening@forge.pr |mls@novell.com |ovo.novell.com | --- Comment #9 from Andreas Jaeger <aj@novell.com> 2010-06-14 13:37:50 UTC --- Adrian, we speak about Requires not BuildRequires. Peter, the release line you can change in the projectconfig so that it does not get changed. Please make that change and let's discuss only the Requires change here. -- Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
http://bugzilla.novell.com/show_bug.cgi?id=613965 http://bugzilla.novell.com/show_bug.cgi?id=613965#c10 Andreas Jaeger <aj@novell.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|REOPENED |RESOLVED Resolution| |FIXED --- Comment #10 from Andreas Jaeger <aj@novell.com> 2010-06-14 13:38:21 UTC --- Requires is fixed - thanks Michael and Peter! -- Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
http://bugzilla.novell.com/show_bug.cgi?id=613965 http://bugzilla.novell.com/show_bug.cgi?id=613965#c11 --- Comment #11 from Adrian Schröter <adrian@novell.com> 2010-06-14 13:54:35 UTC --- sorry for the confusion, that comes when one just read the reports via mail and three similar reports exist at the same time :/ -- Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
http://bugzilla.novell.com/show_bug.cgi?id=613965 http://bugzilla.novell.com/show_bug.cgi?id=613965#c12 Swamp Workflow Management <swamp@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status Whiteboard| |maint:released:sle11-sp1:34 | |881 --- Comment #12 from Swamp Workflow Management <swamp@suse.com> 2010-08-09 20:09:00 UTC --- Update released for: build Products: SLE-SDK 11-SP1 (i386, ia64, ppc64, s390x, x86_64) -- Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
participants (1)
-
bugzilla_noreply@novell.com