Bug 903824 (perl-Convert-Age)
Summary: | Review Request: perl-Convert-Age - converts integer seconds into a compact form and back | ||
---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Normunds <fedorapkg> |
Component: | Package Review | Assignee: | Petr Šabata <psabata> |
Status: | CLOSED CURRENTRELEASE | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
Severity: | medium | Docs Contact: | |
Priority: | unspecified | ||
Version: | rawhide | CC: | package-review, psabata, rvokal |
Target Milestone: | --- | Flags: | psabata:
fedora-review+
gwync: fedora-cvs+ |
Target Release: | --- | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | perl-Convert-Age-0.04-1.fc18 | Doc Type: | Bug Fix |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2014-04-03 16:11:54 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: |
Description
Normunds
2013-01-24 21:44:36 UTC
Bug 903829, Bug 903826, Bug 903824 are my first Fedora packages, yet more to come. I checked them with both Mock and Koji for all Fedora releases (16, 17, 18, 19, rawhide). All packages mentioned below were tested with rpmlint, mock (for i386 arch) and koji (16, 17, 18, 19, rawhide). These are my first packages for Fedora, so if you find something to improve in one of them, don't bother, I'll check other packages for reported problems. Need sponsor. bug 903824 perl-Convert-Age.spec bug 903826 perl-Net-Domain-TLD.spec bug 903829 perl-Time-Interval.spec bug 904328 perl-Config-ApacheFormat.spec bug 904329 perl-Data-Validate-Domain.spec bug 904330 perl-Data-Validate-IP.spec bug 904331 perl-Shell.spec Thanks. I'll look at your packages and possibly sponsor you later :) Issues: Lines 29-31 are useless. None of those files has executable bits set. Interval.* isn't even present in the archive. Line 42 is also not needed as this is done automatically by rpmbuild. Useless build-time dependency: perl(Test::Simple) -- not used anywhere at all. Missing build-time dependencies: perl(Exporter) from lib/Convert/Age.pm:35 perl(Test::More) from various test files Simple commands are preferred over command macros. Consider removing them. Spec file and src package updated. * Removed useless lines * Fixed dependencies. * Replaced macros with simple commands. New package overwritten in original location. Thanks a lot for your review :) Could you help me to fully understand how Requires and BuildRequires are used in Fedora? 1) If I enter put requirement in Requires, it will be automatically used also as BuildRequire. Do I understand this correctly? 2) In bug 904328 you mentioned that Some requirements are not needed in Requires field because rpmbuild automatically detects those requirements. How can I detect what rpmbuild detects? 3) In bug 903826 you asked me to add build time dependency perl(base), perl(constant) which actually is Perl pragma not module. When should I add Perl pragmas like perl(warnings) and perl(strict) to Requires, when shouldn't? 4) Shouldn't it be more correct to put all module requirements to Requires field and all testing requirements to BuildRequires filed (if 1st is true)? Thanks (In reply to comment #6) > Could you help me to fully understand how Requires and BuildRequires are > used in Fedora? > > 1) If I enter put requirement in Requires, it will be automatically used > also as BuildRequire. Do I understand this correctly? No, those two are unrelated. > 2) In bug 904328 you mentioned that Some requirements are not needed in > Requires field because rpmbuild automatically detects those requirements. > How can I detect what rpmbuild detects? The easiest and most reliable way is to build the package and check the resulting binary (not SRPM) for dependencies, e.g. rpm -q --requires -p your-package-1.2-3.fc19.noarch.rpm Currently, in case of perl packages, rpmbuild parses the packaged modules and tries to guess the perl() style dependencies. It works rather well for most cases and therefore you don't need to manually specify them in your spec file (usually). > 3) In bug 903826 you asked me to add build time dependency perl(base), > perl(constant) which actually is Perl pragma not module. When should I add > Perl pragmas like perl(warnings) and perl(strict) to Requires, when > shouldn't? Surprise, they're modules! :) https://metacpan.org/module/base https://metacpan.org/module/constant And requiring true pragmas wouldn't hurt (rpmbuild actually does that too) either since they are listed among the 'perl' package provides -- $ rpm -q --provides perl|grep -E '^perl\((strict|warnings)\)' perl(strict) = 1.07 perl(warnings) = 1.13 -- but given that they are and most likely always be parts of perl, I don't find it necessary. Some people build-require them explicitly, though. > 4) Shouldn't it be more correct to put all module requirements to Requires > field and all testing requirements to BuildRequires filed (if 1st is true)? See 1). The reason why I urge you to add runtime dependencies as buildrequires is that they are actually used during the test phase -- in most cases the module is loaded, e.g. via use_ok() or other means. Of course you always have to see the actual test code. Generally, for buildtime deps ("BuildRequires"): 1. Check the Makefile.PL or Build.PL, whatever the project uses, and add the file's dependencies to your BRs. 2. If you're running the test suite, check and add the direct test file dependencies. 3. If you're running the test suite, check and add the dependencies of modules tested by the test suite too. For runtime deps ("Requires"): 1. Build the package and see the resulting binary RPM's "requires" and compare it with what's actually written in the packaged code. If something is missing, add it explicitly. About the new package -- I see you also added the pragmas deps. That's alright. You can also remove the perl macro on the MODULE_COMPAT line, by the way. Anyhow, the package looks good now and I'll approve it once I sponsor you. Thanks a lot for your comments. Is it OK if I re-check spec files and re-create packages after I have time to digest your comment about Requires and BuildRequires? Or I should notify you for another review cycle? Thanks and best regards. Sure, just update the reviews you've submitted. By the way, I've just sponsored you into the packager group. Now you can submit the SCM request for your approved packages: http://fedoraproject.org/wiki/Package_SCM_admin_requests Please, mention me (psabata) as one of the owners and put "perl-sig" in the InitialCC field too. Package updated (Macro in MODULE_COMPATm, re-checked dependencies according to Requires and BuildRequires practices discussed here, removed e-mail from changelog). New Package SCM Request ======================= Package Name: perl-Convert-Age Short Description: Perl module that converts integer seconds into a "compact" form and back Owners: normunds psabata Branches: f16 f17 f18 f19 InitialCC: perl-sig Incorrect brances in previous request. Corrected here. New Package SCM Request ======================= Package Name: perl-Convert-Age Short Description: Perl module that converts integer seconds into a "compact" form and back Owners: normunds psabata Branches: f16 f17 f18 InitialCC: perl-sig Git done (by process-git-requests). perl-Convert-Age-0.04-1.fc16 has been submitted as an update for Fedora 16. https://admin.fedoraproject.org/updates/perl-Convert-Age-0.04-1.fc16 perl-Convert-Age-0.04-1.fc17 has been submitted as an update for Fedora 17. https://admin.fedoraproject.org/updates/perl-Convert-Age-0.04-1.fc17 perl-Convert-Age-0.04-1.fc18 has been submitted as an update for Fedora 18. https://admin.fedoraproject.org/updates/perl-Convert-Age-0.04-1.fc18 perl-Convert-Age-0.04-1.fc17 has been pushed to the Fedora 17 stable repository. perl-Convert-Age-0.04-1.fc18 has been pushed to the Fedora 18 stable repository. |