Bug 850943
Summary: | -e:1: Use RbConfig instead of obsolete and deprecated Config. | ||||||
---|---|---|---|---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | John Florian <john> | ||||
Component: | ruby | Assignee: | Bohuslav "Slavek" Kabrda <bkabrda> | ||||
Status: | CLOSED NOTABUG | QA Contact: | Fedora Extras Quality Assurance <extras-qa> | ||||
Severity: | medium | Docs Contact: | |||||
Priority: | unspecified | ||||||
Version: | 17 | CC: | bkabrda, ffesti, jeremy, jnovy, jzeleny, mmorsi, mtasaka, packaging-team, pknirsch, pmatilai, sergio, tagoh, vanmeeuwen+fedora, vondruch | ||||
Target Milestone: | --- | Keywords: | Reopened | ||||
Target Release: | --- | ||||||
Hardware: | Unspecified | ||||||
OS: | All | ||||||
Whiteboard: | |||||||
Fixed In Version: | Doc Type: | Bug Fix | |||||
Doc Text: | Story Points: | --- | |||||
Clone Of: | Environment: | ||||||
Last Closed: | 2012-08-24 15:16:50 UTC | Type: | Bug | ||||
Regression: | --- | Mount Type: | --- | ||||
Documentation: | --- | CRM: | |||||
Verified Versions: | Category: | --- | |||||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||
Cloudforms Team: | --- | Target Upstream Version: | |||||
Embargoed: | |||||||
Attachments: |
|
Description
John Florian
2012-08-22 20:21:30 UTC
That's ruby, not rpmbuild, complaining about the software you're packaging, and its up to upstream developers of that software to fix it. Okay fair enough, but it is still an unresolved issue so I've corrected the component and reopened this report. FWIW, this is with ruby-1.9.3.194-14.fc17. What do you mean by saying: "rpmbuild issues this error message twice (but otherwise seems unaffected) for each *.rb (Ruby) file it encounters while building a package."? Could you attach the rpmbuild output? Does this also happen in mock? If I get it correctly, you get this when running the files from the package (e.g. in tests or so) - am I right here? If yes, this is not Ruby issue. The problem is that upstream uses obsolete Config instead of RbConfig. I don't really see anything we can do about that other than sending pull request fixing this. Created attachment 606889 [details]
rpmbuild output showing reported error message
(In reply to comment #4) > What do you mean by saying: > "rpmbuild issues this error message twice (but otherwise seems unaffected) > for each *.rb (Ruby) file it encounters while building a package."? > Could you attach the rpmbuild output? Done. > Does this also happen in mock? I don't use mock. I've tried in the past to get it going, but the process was too cumbersome/slow compared to my custom build script which just makes a temporary tarball of a project and then calls this: make_rpms() { announce "Building Binary- and Source-RPM" setarch $RPMBUILD_ARCH rpmbuild -ta --clean $RPMBUILD_OPTS $tarball return $? } where: RPMBUILD_OPTS="--target i386" RPMBUILD_ARCH="i386" > > If I get it correctly, you get this when running the files from the package > (e.g. in tests or so) - am I right here? No, which is why I originally pegged this to rpmbuild. No where in my spec file do I run or cause Ruby to be run, directly at least. I'd guess this happens somewhere in one of the /usr/lib/rpm/ scripts, but I don't see anything obvious there. Could you please show us your .spec file as well? Or SRPM would be even better. Doh! My humble appologies to all involved here. My employer won't permit to share the complete sources, so I had intended to hack up something that I could share with the bare essence of the problem still present. That's when I noticed the following at the top of my spec file: %{!?ruby_sitelibdir: %define ruby_sitelibdir %(ruby -rrbconfig -e 'puts Config::CONFIG["sitelibdir"]')} I probably needed such a custom %define as this dates back to the Fedora 10 days. If anyone is aware of a premade %define that is preferred circa Fedora 17/18 I'd be very appreciative of the enlightenment. Otherwise editing the one I have as suggested by the warning does eliminate the warnings. On further review of http://fedoraproject.org/wiki/Packaging:Ruby I now see my original mistake was that I had failed to have this present in my spec: BuildRequires: ruby-devel Again, my applogies to all and many thanks for the help. Yes, that is the problem and solution. Actually if you are packaging gem, you may find useful rubygems-devel as well. as comment says: change Config by RbConfig http://stackoverflow.com/questions/13693713/use-rbconfig-instead-of-obsolete-and-deprecated-config |