Lately I've been working on an EL6 branch of epel-rpm-macros with the goal of removing the need for some of the %ifdefs and line noise and such required if you want to have one spec which builds on Fedora and EL6.
Right now it simply enables %license in the %files section (mapped to %doc as the current workaround does). Feel free to suggest additional macros and I'll add them to the todo list and implement them as time and the nature of rpm allows.
Since having this package in the buildroot has the capacity to break things, I've done a complete rebuild with the macros in place, and of course that turned up unrelated issues. You can find the complete results in the message I sent to this list earlier today.
Now, the problem:
When this macro package is present in the buildroot, a spec using %define (not %global as recommended) for a macro and using that macro in the %files section will break. Generally the macro just ends up undefined when the %files section. Why? Deep RPM macro magic, I guess. Which is why we have long said that you should use %global unless you have a specific reason not to do so.
This breakage troubles me, and I think it would be a deal breaker if we didn't already prohibit use of %define in the guidelines. There aren't many packages which have problems, though, and my testing hasn't turned up any problems that can't be attributed to the macros.
Below is a list of packages which use %define in a way that causes build failures with the macros package. Fixing them up is completely trivial. I am happy to just take care of them, but I'll try to contact the maintainers first.
- J<
electronics-menu-1.0-8.el6.src.rpm chitlesh epylog-1.0.7-1.el6.src.rpm smoote, icon geos-3.3.2-1.el6.src.rpm devrim itcl-3.4-6.el6.src.rpm orion, krege itk-3.4-5.el6.src.rpm orion, krege iwidgets-4.0.2-4.el6.src.rpm orion, krege plplot-5.9.7-3.el6.1.src.rpm orion postgresql-plruby-0.5.3-4.el6.src.rpm devrim, hhorak, praiskup, jmlich python-clientform-0.2.7-6.el6.src.rpm lmacken python-ruledispatch-0.5a0-0.15.svnr2306.el6.src.rpm lmacken python-tgext-crud-0.3.11-1.el6.src.rpm lmacken python-tgfastdata-0.9a6-10.el6.src.rpm lmacken python-TurboMail-3.0-1.el6.src.rpm lmacken, fschwarz retrace-server-1.12-2.el6.src.rpm mtoman ruby-augeas-0.4.1-1.el6.src.rpm lutter, skottler, domcleal rubygem-sqlite3-ruby-1.2.4-5.el6.src.rpm kanarip, stahnma ruby-ldap-0.9.7-10.el6.src.rpm stahnma, stevetraylen ruby-libvirt-0.5.2-2.el6.src.rpm stahnma, clalance ruby-mysql-2.8.2-1.el6.src.rpm orion, kanarip ruby-ncurses-1.3.1-2.el6.src.rpm isimluk ruby-shadow-1.4.1-13.el6.src.rpm stahnma, tmz, skottler snake-0.11-0.20.el6.src.rpm jlaska, wwoods tcllib-1.14-1.el6.src.rpm krege tcl-mysqltcl-3.05-8.el6.src.rpm renep tcl-tcludp-1.0.8-3.el6.src.rpm spot tcl-tktreectrl-2.2.10-1.el6.src.rpm spot tesseract-3.04.00-1.el6.src.rpm karlik, smani tkcon-2.5-4.el6.src.rpm sergiopr xpa-2.1.12-1.el6.src.rpm sergiopr
(I see tktable has been fixed in git already, and blt was fixed immediately after I filed a bugzilla ticket. Thanks!)
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256
On 12/24/2015 11:10 AM, Jason L Tibbitts III wrote:
Lately I've been working on an EL6 branch of epel-rpm-macros with the goal of removing the need for some of the %ifdefs and line noise and such required if you want to have one spec which builds on Fedora and EL6.
Right now it simply enables %license in the %files section (mapped to %doc as the current workaround does). Feel free to suggest additional macros and I'll add them to the todo list and implement them as time and the nature of rpm allows.
%{__global_ldflags} is another macro that it's not available in EPEL6. Please, add it if possible.
Since having this package in the buildroot has the capacity to break things, I've done a complete rebuild with the macros in place, and of course that turned up unrelated issues. You can find the complete results in the message I sent to this list earlier today.
Now, the problem:
When this macro package is present in the buildroot, a spec using %define (not %global as recommended) for a macro and using that macro in the %files section will break. Generally the macro just ends up undefined when the %files section. Why? Deep RPM macro magic, I guess. Which is why we have long said that you should use %global unless you have a specific reason not to do so.
This breakage troubles me, and I think it would be a deal breaker if we didn't already prohibit use of %define in the guidelines. There aren't many packages which have problems, though, and my testing hasn't turned up any problems that can't be attributed to the macros.
Below is a list of packages which use %define in a way that causes build failures with the macros package. Fixing them up is completely trivial. I am happy to just take care of them, but I'll try to contact the maintainers first.
- J<
electronics-menu-1.0-8.el6.src.rpm chitlesh epylog-1.0.7-1.el6.src.rpm smoote, icon geos-3.3.2-1.el6.src.rpm devrim itcl-3.4-6.el6.src.rpm orion, krege itk-3.4-5.el6.src.rpm orion, krege iwidgets-4.0.2-4.el6.src.rpm orion, krege plplot-5.9.7-3.el6.1.src.rpm orion postgresql-plruby-0.5.3-4.el6.src.rpm devrim, hhorak, praiskup, jmlich python-clientform-0.2.7-6.el6.src.rpm lmacken python-ruledispatch-0.5a0-0.15.svnr2306.el6.src.rpm lmacken python-tgext-crud-0.3.11-1.el6.src.rpm lmacken python-tgfastdata-0.9a6-10.el6.src.rpm lmacken python-TurboMail-3.0-1.el6.src.rpm lmacken, fschwarz retrace-server-1.12-2.el6.src.rpm mtoman ruby-augeas-0.4.1-1.el6.src.rpm lutter, skottler, domcleal rubygem-sqlite3-ruby-1.2.4-5.el6.src.rpm kanarip, stahnma ruby-ldap-0.9.7-10.el6.src.rpm stahnma, stevetraylen ruby-libvirt-0.5.2-2.el6.src.rpm stahnma, clalance ruby-mysql-2.8.2-1.el6.src.rpm orion, kanarip ruby-ncurses-1.3.1-2.el6.src.rpm isimluk ruby-shadow-1.4.1-13.el6.src.rpm stahnma, tmz, skottler snake-0.11-0.20.el6.src.rpm jlaska, wwoods tcllib-1.14-1.el6.src.rpm krege tcl-mysqltcl-3.05-8.el6.src.rpm renep tcl-tcludp-1.0.8-3.el6.src.rpm spot tcl-tktreectrl-2.2.10-1.el6.src.rpm spot tesseract-3.04.00-1.el6.src.rpm karlik, smani tkcon-2.5-4.el6.src.rpm sergiopr xpa-2.1.12-1.el6.src.rpm sergiopr
(I see tktable has been fixed in git already, and blt was fixed immediately after I filed a bugzilla ticket. Thanks!) _______________________________________________ epel-devel mailing list epel-devel@lists.fedoraproject.org http://lists.fedoraproject.org/admin/lists/epel-devel@lists.fedoraproject.or...
- -- Antonio Trande
mailto: sagitter 'at' fedoraproject 'dot' org http://fedoraos.wordpress.com/ https://fedoraproject.org/wiki/User:Sagitter GPG Key: 0x565E653C Check on https://keys.fedoraproject.org/
"AT" == Antonio Trande anto.trande@gmail.com writes:
AT> %{__global_ldflags} is another macro that it's not available in AT> EPEL6.
It appears that gets exported as a shell variable in the scope of %build by %__build_pre, as well as being mentioned in the %cmake, %cmake_kde4, %qmake_qt4 and %configure macros. Though some of might not even be present at all in EL6, and %configure is a much simpler macro there.
I would have to override any existing definitions of all of those, but as there's essentially no chance of Red Hat changing those five macros at this point in the EL6 life cycle I don't see that this would be much of an issue. Can you let me know where the lack of %__global_ldflags is causing problems? (Maybe an example spec or two?) Would it help if I just added it to %configure or would it need to go elsewhere as well?
I'll add it to the list in any case.
- J<
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256
On 12/25/2015 08:32 PM, Jason L Tibbitts III wrote:
"AT" == Antonio Trande anto.trande@gmail.com writes:
AT> %{__global_ldflags} is another macro that it's not available in AT> EPEL6.
It appears that gets exported as a shell variable in the scope of %build by %__build_pre, as well as being mentioned in the %cmake, %cmake_kde4, %qmake_qt4 and %configure macros. Though some of might not even be present at all in EL6, and %configure is a much simpler macro there.
I would have to override any existing definitions of all of those, but as there's essentially no chance of Red Hat changing those five macros at this point in the EL6 life cycle I don't see that this would be much of an issue. Can you let me know where the lack of %__global_ldflags is causing problems? (Maybe an example spec or two?)
When %configure, %cmake, ... are not used; like http://pkgs.fedoraproject.org/cgit/wildmagic5.git/tree/wildmagic5.spec
where I use only 'make'.
Would it help if I just added it to %configure or would it need to go elsewhere as well?
I'll add it to the list in any case.
- J<
- -- Antonio Trande
mailto: sagitter 'at' fedoraproject 'dot' org http://fedoraos.wordpress.com/ https://fedoraproject.org/wiki/User:Sagitter GPG Key: 0x565E653C Check on https://keys.fedoraproject.org/
So you're just asking for __global_ldflags to be defined? In EL7 it's:
%__global_ldflags -Wl,-z,relro %{_hardened_ldflags}
Obviously there's no %_hardened_ldflags in EL6, so it would just be defining that macro to -Wl,-z,relro. Does that actually work on EL6? I'm not really that familiar with what version of GCC supports what.
- J<
"JLT" == Jason L Tibbitts tibbs@math.uh.edu writes:
JLT> Does that actually work on EL6?
Looking at the spec, it seems obvious that it works on EL6. The package isn't branched for EL5 but if anyone knows if -Wl,-z,relro will work there than I'll add it there as well (once I get around to doing an EL5 package).
Remember, anything that requires an ifdef on any EPEL release is a candidate for what I'm doing. Obviously some things just aren't going to be possible, at least with RPM macros alone, but I'm willing to try.
- J<
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256
On 12/26/2015 01:26 AM, Jason L Tibbitts III wrote:
"JLT" == Jason L Tibbitts tibbs@math.uh.edu writes:
JLT> Does that actually work on EL6?
Looking at the spec, it seems obvious that it works on EL6. The package isn't branched for EL5 but if anyone knows if -Wl,-z,relro will work there than I'll add it there as well (once I get around to doing an EL5 package).
It works on EPEL5 even if, although I'm using %configure, %__global_ldflags is not automatically defined.
This is an EPEL5 scratch build of tktable I have done right now: http://koji.fedoraproject.org/koji/taskinfo?taskID=12317248
where -Wl,-z,relro is set manually.
Remember, anything that requires an ifdef on any EPEL release is a candidate for what I'm doing. Obviously some things just aren't going to be possible, at least with RPM macros alone, but I'm willing to try.
- J<
- -- Antonio Trande
mailto: sagitter 'at' fedoraproject 'dot' org http://fedoraos.wordpress.com/ https://fedoraproject.org/wiki/User:Sagitter GPG Key: 0x565E653C Check on https://keys.fedoraproject.org/
epel-devel@lists.fedoraproject.org