Bug 240008
Summary: | Review Request: ruby-shadow - ruby bindings for shadow password access | ||||||
---|---|---|---|---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Kostas Georgiou <k.georgiou> | ||||
Component: | Package Review | Assignee: | Mamoru TASAKA <mtasaka> | ||||
Status: | CLOSED NEXTRELEASE | QA Contact: | Fedora Package Reviews List <fedora-package-review> | ||||
Severity: | medium | Docs Contact: | |||||
Priority: | medium | ||||||
Version: | rawhide | CC: | lutter, mtasaka | ||||
Target Milestone: | --- | Flags: | mtasaka:
fedora-review+
kevin: fedora-cvs+ |
||||
Target Release: | --- | ||||||
Hardware: | All | ||||||
OS: | Linux | ||||||
Whiteboard: | |||||||
Fixed In Version: | Doc Type: | Bug Fix | |||||
Doc Text: | Story Points: | --- | |||||
Clone Of: | Environment: | ||||||
Last Closed: | 2007-05-25 16:45:06 UTC | Type: | --- | ||||
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
Kostas Georgiou
2007-05-14 11:17:05 UTC
As I maintain several ruby modules, I make a quick comment. * Are you sure that this is _truly_ licensed under public domain? (Well, actually many packages created by Japanese developer have no license documents or have some original license texts and each time I want to package into rpm style, I have to ask the developer and someone else about the license......) * I strongly think that BuildRequires should also have "BuildRequires: ruby(abi) = 1.8" because you can rebuild this under ruby 1.9 (when ruby 1.9 rpm is out) but it is wrong because the rebuilt rpm should require ruby 1.9, not 1.8 * Fedora's default encoding is UTF-8 and please change the encoding of README.euc to UTF-8 (and rename it). * Compiler flags are wrong (do not honor fedora specific). --------------------------------------------------------------- + make gcc -I. -I. -I/usr/lib/ruby/1.8/i386-linux -I. -DHAVE_GETSPENT -DHAVE_SGETSPENT -DHAVE_FGETSPENT -DHAVE_SETSPENT -DHAVE_ENDSPENT -DHAVE_LCKPWDF -DHAVE_ULCKPWDF -fPIC -c shadow.c gcc -shared -L"/usr/lib" -o shadow.so shadow.o -lruby -lpthread -ldl -lcrypt -lm -lc + exit 0 --------------------------------------------------------------- Thanks for the comments. 1) I will ask just to make sure, the README says "License: Free for any use with your own risk!". Looking again it seems that the debian package has the program with a Ruby/GPL license which is strange. 2) Thinking about it you are right. Although "BuildRequires: ruby(abi) = 1.8" wi ll not solve the problem. Lets say that we have ruby 1.9 as the standard package and ruby 1.8 installed as ruby1.8 by a compat package. The require will pull in ruby1.8 but the package will still be build with 1.9. I'll add the buildrequire but if we are going to have compat packages for ruby in the future this we need something else. 3) Is it OK to rename it to README.jp (after it's converted in utf8)? 4) I missed this somehow, I'll fix it before the next update. (In reply to comment #2) > Thanks for the comments. > > 1) I will ask just to make sure, the README says "License: Free for any use with > your own risk!". Okay. We can regard this as public domain. > 2) Thinking about it you are right. Although "BuildRequires: ruby(abi) = 1.8" wi > ll not solve the problem. Lets say that we have ruby 1.9 as the standard package > and ruby 1.8 installed as ruby1.8 by a compat package. The require will pull in > ruby1.8 but the package will still be build with 1.9. I'll add the buildrequire > but if we are going to have compat packages for ruby in the future this we need > something else. Truly for ruby BuildRequires: ruby(abi) = 1.8" does not prevent this package from being rebuilt by ruby 1.9...... > 3) Is it OK to rename it to README.jp (after it's converted in utf8)? Okay. > 4) I missed this somehow, I'll fix it before the next update. Thanks. Spec URL: http://www.hep.ph.ic.ac.uk/~georgiou/ruby-shadow/ruby-shadow.spec SRPM URL: http://www.hep.ph.ic.ac.uk/~georgiou/ruby-shadow/ruby-shadow-1.4.1-2.FC6.src.rpm Things left to do: confirm license. I would also like to find a better way to handle the abi issue, I don't think that adding "Requires: ruby(abi) = 1.8" is the right way for a binary package, we need to somehow detect the abi we are building with and require that. This is an issue for all binary ruby packages though. Looking at what the rpm requires I get this: $ rpm -q --requires ruby-shadow ... libruby.so.1.8()(64bit) ruby(abi) = 1.8 ... So we already require the 1.8 abi indirectly through libruby.so.1.8 right? This way we will get the right requires even if we build with another version of ruby and ruby(abi) = .. is redundant. (In reply to comment #5) > Looking at what the rpm requires I get this: > $ rpm -q --requires ruby-shadow > ... > libruby.so.1.8()(64bit) > ruby(abi) = 1.8 > ... > > So we already require the 1.8 abi indirectly through libruby.so.1.8 > right? I know it already, however this works only for ruby module packages containing binary modules linked with libruby.so.*. So that we require to add "Requires: ruby(abi) = 1.8" is to make sure that this method works for as many (including noarch, arch-dependent) packages as possible. You can see the same phenomenon on python replated packages, where "Requires: python(abi) = 2.5" is automatically added even to arch-dependent packages. [tasaka1@localhost ~]$ rpm -q --requires python-imaging libc.so.6 libc.so.6(GLIBC_2.0) libc.so.6(GLIBC_2.1) libc.so.6(GLIBC_2.1.3) libc.so.6(GLIBC_2.3) libc.so.6(GLIBC_2.3.4) libc.so.6(GLIBC_2.4) libfreetype.so.6 libjpeg.so.62 libpthread.so.0 libpthread.so.0(GLIBC_2.0) libpython2.5.so.1.0 <======================== libz.so.1 python(abi) = 2.5 <======================== rpmlib(CompressedFileNames) <= 3.0.4-1 rpmlib(PayloadFilesHavePrefix) <= 4.0-1 rtld(GNU_HASH) and we want to apply this python method to ruby module packages _manually_ (we cannot do this automatically now because rpmbuild does not handle ruby abi for now) By the way, are you sponsored? It seems that this is your first submission of package review request...... The _manually_ is the part that I don't like :) What I was really saying was that we should handle ruby in rpmbuild instead of doing things manually. What I should have asked is if anyone is working in adding this to rpmbuild, the manual way will cause us problems when we upgrade ruby, the noarch rpms will still build but they'll require the wrong abi :( If nobody is looking at adding ruby support in rpmbuild I'll have a look. No I am not sponsored yet. It is indeed my first submission :) Yeah, I don't disagree that ruby abi detection must be done by rpmbuild, not manual treatment *in the future*.... But hacking rpm itself is actually beyond my skill and also I cannot tell when automatical ruby abi detection will be added into rpm, and Fedora release. So if you can try "rpm" hacking, I am surely appreciated!! (In reply to comment #9) > No I am not sponsored yet. It is indeed my first submission :) Well, okay. as far as I saw your bugzilla entry I can judge that I can sponsor you. I will review this after I take a bath (I live in Japan). Setting once to block FE-NEEDSPONSOR. When I receive a mail that you need a sponsor, I will sponsor you. Thanks, What do you think about this change? Requires: ruby(abi) = %(%{_bindir}ruby -e "puts RUBY_VERSION.sub(/(\d+\.\d+).*/,'\1')") The regexp could be improved I imagine but it can not be worst than just using "1.8" and we can get away with the BuildRequires. Well, if you do so, perhaps it is better that you define the macro %ruby_abi (for example) such as %define ruby_abi <some regexp> and use: Requires: ruby(abi) = %ruby_abi Yes you are right. I just noticed that the library doesn't work while using Fedora's CFLAGS, time to do some debugging I am afraid :( (In reply to comment #14) > I just noticed that the library doesn't work while using Fedora's CFLAGS, time > to do some debugging I am afraid :( Are there any short examples which brings up the problems you are meeting? require 'shadow' under x86_64 was enough to cause a core dump. The cause was the the struct defines used 0 instead of NULL. I uploaded a newer version with the fix. Spec URL: http://www.hep.ph.ic.ac.uk/~georgiou/ruby-shadow/ruby-shadow.spec SRPM URL: http://www.hep.ph.ic.ac.uk/~georgiou/ruby-shadow/ruby-shadow-1.4.1-3.FC6.src.rpm Version 1.4.1-4 uploaded in the same location with a much cleaner rubi_api macro as suggested by lutter (ruby -rrbconfig -e "puts Config::CONFIG['ruby_version']") Created attachment 154732 [details]
mock build log of ruby-shadow-1.4.1-4 on FC-devel i386
It seems that ruby_abi must be written explicitly...
The problem is that ruby is not in the build root by default, so that when mock looks at the specfile to find the BR's, ruby_abi has no value and expands to nothing, yielding a syntactically incorrect specfile. Either the macro needs to be changed to have a value even if there is no ruby, or 'ruby(abi) = 1.8' should be hardcoded. I see, is one of the following acceptable then? Requires: ruby(abi) = %{?ruby_abi:mock} Requires: ruby(abi) = %{?ruby_abi:1.8} or go back to Requires: ruby(abi) = 1.8 (and reenable BuildRequires: ruby(abi) = 1.8) They are listed in order of preference but I can live with any of them :) (In reply to comment #20) > I see, is one of the following acceptable then? > > Requires: ruby(abi) = %{?ruby_abi:mock} > Requires: ruby(abi) = %{?ruby_abi:1.8} %{?ruby_abi:mock} means * when ruby_abi is defined, the output is "mock" * when ruby_abi is not defined, the output is nothing. So Requires: ruby(abi) = %{?ruby_abi:mock} means * when ruby_abi is defined, this is Requires: ruby(abi) = mock * when ruby_abi is not defined, this is a error. You are right of course, %{ruby_abi} is always defined anyway from this: %{!?ruby_abi: %define ruby_abi %(...)} when ruby is not found it is defined as "". If we want a work around for mock then this should do it (I did checked mock this time) %if "%{ruby_abi}" == "" %define ruby_abi mock (or 1.8) %endif Maybe it's more pain than it's worth, I am not sure I like this solution either. Any preferences? IMO for now writing 1.8 explicitly is the simplest. This is only a workaround by the time rpmbuild supports ruby abi detection and for now I can't find a smart solution...... New spec and rpm uploaded. I switched back to hard coding 1.8. Okay. ------------------------------------------------ This package (ruby-shadow) is APPROVED by me ------------------------------------------------ Please follow the procedure written on: http://fedoraproject.org/wiki/PackageMaintainers/Join from "Get a Fedora Account". At a stage, you will submit a request which tells sponsor members that you need a sponsor. After you do so, please let me know on this bug for confirmation. Then I will sponsor you. Note: now Fedora 8 branch is created, the valid branches on http://fedoraproject.org/wiki/PackageMaintainers/CVSAdminProcedure is: FC-5, FC-6, F7 and devel. If you have some questions, please let me know. It seems that you approved me already while bugzilla was down, thanks. Let me have a look at the docs and I'll fill the template for the branches. New Package CVS Request ======================= Package Name: ruby-shadow Short Description: Ruby bindings for shadow password access Owners: k.georgiou.uk Branches: FC-5 FC-6 F7 devel InitialCC: k.georgiou.uk Please try to rebuild this package on koji and plague buildsys. Sorry I was away until last night, I'll have a go today. I am a bit lost with this failure http://koji.fedoraproject.org/koji/getfile?taskID=16950&name=build.log Notice the following: rm -rf /var/tmp/ruby-shadow-1.4.1-5.fc7-root-kojibuilder ... /usr/bin/install: cannot create regular file `/var/tmp/ruby-shadow-1.4.1-5.fc7-root-kojibuilder/usr/lib/ruby/site_ruby/1.8/powerpc-linux': File exists Any ideas? Can I start another build without increasing the spec release number? I saw the build log and it seems that this is a parallel make problem. Try to remove %{_smp_mflags} from ----------------------------------------------------------- make %{?_smp_mflags} DESTDIR=%{buildroot} install ----------------------------------------------------------- You have to bump release. Yes everything works fine now, all packages are build now. Good to hear! Now closing as NEXTRELEASE. Package Change Request ====================== Package Name: ruby-shadow New Branches: EL-5 cvs done. |