Bug 611372 - Review Request: perl-Net-Twitter - Perl interface to Twitter
Review Request: perl-Net-Twitter - Perl interface to Twitter
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: Package Review (Show other bugs)
rawhide
All Linux
low Severity medium
: ---
: ---
Assigned To: Petr Šabata
Fedora Extras Quality Assurance
:
Depends On: 619644
Blocks:
  Show dependency treegraph
 
Reported: 2010-07-04 22:15 EDT by Julian C. Dunn
Modified: 2014-03-25 07:57 EDT (History)
5 users (show)

See Also:
Fixed In Version: perl-Net-Twitter-3.18001-1.fc17
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-04-07 23:32:10 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
psabata: fedora‑review+
limburgher: fedora‑cvs+


Attachments (Terms of Use)

  None (edit)
Description Julian C. Dunn 2010-07-04 22:15:40 EDT
Spec URL: http://www.aquezada.com/staff/julian/devel/fedora/perl-Net-Twitter.spec
SRPM URL: http://www.aquezada.com/staff/julian/devel/fedora/perl-Net-Twitter-3.13006-1.fc13.src.rpm
Description:

This is my first package so I'm seeking a sponsor for it.

Net::Twitter is a Perl API to Twitter.

In order to get this to build, I had to rebuild Net::OAuth (perl-Net-OAuth) for version 1.27. I've put the SPEC and SRPM for that here:

http://www.aquezada.com/staff/julian/devel/fedora/perl-Net-OAuth.spec
http://www.aquezada.com/staff/julian/devel/fedora/perl-Net-OAuth-0.27-3.fc13.src.rpm

Not sure if I need to open a separate bugzilla issue for that.
Comment 1 Carl Thompson 2010-07-17 20:33:07 EDT
(unofficial)
http://fedoraproject.org/wiki/Packaging:ReviewGuidelines

rpmlint perl-Net-Twitter.spec 
perl-Net-Twitter.spec: W: invalid-url Source0: http://www.cpan.org/modules/by-module/Net/Net-Twitter-3.13006.tar.gz HTTP Error 404: Not Found
0 packages and 1 specfiles checked; 0 errors, 1 warnings.

error: Failed build dependencies:
	perl(Net::OAuth) >= 0.25 is needed by perl-Net-Twitter-3.13006-1.fc13.noarch

dependencies need to be available from repo or possibly as a package being reviewed (I think).  Maybe put in a bug report to have that package updated.
Comment 2 Julian C. Dunn 2010-07-29 23:33:22 EDT
Fixed; I had a bad URL in the specfile. I also took the liberty of bumping to perl-Net-Twitter-3.13007. So, revised URLs:

Spec: http://www.aquezada.com/staff/julian/devel/fedora/perl-Net-Twitter.spec
SRPM: http://www.aquezada.com/staff/julian/devel/fedora/perl-Net-Twitter-3.13007-1.fc13.src.rpm

I've also filed bug 619644 to get perl-Net-OAuth bumped to something usable.
Comment 3 Jason Tibbitts 2010-12-01 21:05:48 EST
www.aquezada.com does not respond for me; I cannot fetch the srpm to have a look at this package.
Comment 4 Julian C. Dunn 2010-12-02 00:10:56 EST
I don't see this problem; my webhost is up for me. The following URLs return data:

SPEC: http://www.aquezada.com/staff/julian/devel/fedora/perl-Net-Twitter.spec
SRPM: http://www.aquezada.com/staff/julian/devel/fedora/perl-Net-Twitter-3.14002-1.fc14.src.rpm

Note that I've bumped this to version 3.14002 since it's been a while and a new version was released.
Comment 5 Andy Bailey 2010-12-07 12:49:40 EST
I'm able to fetch the spec and srpm, but I found some issues (bear with me, this is a prereview, to determine my level of cluelessness):

download url is incorrect- although a converging-on-pi version was uploaded to cpan, it isn't in the by-name area in the repository. For the review, I set it to:

Source0:        http://search.cpan.org/CPAN/authors/id/M/MM/MMIMS/Net-Twitter-%{version}.tar.gz

The build then failed a few times for me using mock and fc-14 x86_64 as a target.

* requested perl-Net-OAuth version doesn't exist yet (have 0.19, calls for 0.25)

* build fails during test target over missing Test::Exception module

* once that's added I got:

Checking for unpackaged file(s): /usr/lib/rpm/check-files /builddir/build/BUILDROOT/perl-Net-Twitter-3.14002-1.fc14.x86_64
error: Installed (but unpackaged) file(s) found:
   /builddir/.cpan/build/Module-Build-0.3607-yl9YyP/t/install_test18260/foo/bar/Simple.pm
   /builddir/.cpan/build/Module-Build-0.3607-yl9YyP/t/install_test18260/foo/base/bin/script
   /builddir/.cpan/build/Module-Build-0.3607-yl9YyP/t/install_test18260/foo/base/html/lib/Simple.html
   /builddir/.cpan/build/Module-Build-0.3607-yl9YyP/t/install_test18260/foo/base/html/site/lib/Simple.html
   /builddir/.cpan/build/Module-Build-0.3607-yl9YyP/t/install_test18260/foo/base/lib/perl5/Simple.pm

so it looks like Module::Build is another missing build dependency. There were also a bunch of other cpan-related things added, so it looks like cpan is auto adding some other stuff as well (perl-version is one)
Comment 6 Julian C. Dunn 2010-12-11 23:24:52 EST
I've been waiting for the maintainer of Net::OAuth to upgrade to a supported version - bug 619644 was marked as CLOSED NEXTRELEASE but I still don't see it in F14.
Comment 7 Steevithak 2011-03-14 17:03:15 EDT
Is someone still working on this? I need the Net::Twitter::Lite module and there doesn't seem to be an RPM for it currently. Any chance we'll get one in the near future?
Comment 8 Julian C. Dunn 2011-03-16 13:18:55 EDT
(In reply to comment #7)
> Is someone still working on this? I need the Net::Twitter::Lite module and
> there doesn't seem to be an RPM for it currently. Any chance we'll get one in
> the near future?

Hi Steven,

I would love to, but I need the maintainer of Net::OAuth to push the upgraded version before I can work on this further. See bug 619644.
Comment 9 Steevithak 2012-03-03 10:49:41 EST
It's been a year since I last checked in on this. Are we any closer to getting the Net::Twitter module for Fedora?
Comment 10 Julian C. Dunn 2012-03-12 01:39:15 EDT
Steven, et. al:

I'm ready to give this another shot. Here are the new spec and SRPM files:

http://assets.juliandunn.net/fedorapkg/perl-Net-Twitter.spec
http://assets.juliandunn.net/fedorapkg/perl-Net-Twitter-3.18001-1.fc16.src.rpm

I've tested with mock, it seems okay now. Can someone review this and push it forward if it's good to go?
Comment 11 Petr Šabata 2012-03-14 05:52:57 EDT
I'll do the review and possibly sponsor you once I'm happy with the package :)
Comment 12 Petr Šabata 2012-03-15 12:19:19 EDT
Package Review
==============

Key:
- = N/A
x = Pass
! = Fail
? = Not evaluated


==== Generic ====
[x]: MUST Package is licensed with an open-source compatible license and meets
     other legal requirements as defined in the legal section of Packaging
     Guidelines.
[x]: MUST Package successfully compiles and builds into binary rpms on at
     least one supported primary architecture.
[-]: MUST %build honors applicable compiler flags or justifies otherwise.
[!]: MUST All build dependencies are listed in BuildRequires, except for any
     that are listed in the exceptions section of Packaging Guidelines.
[!]: MUST Buildroot is not present
     Note: Buildroot is not needed unless packager plans to package for EPEL5
[-]: MUST Package contains no bundled libraries.
[x]: MUST Changelog in prescribed format.
[!]: MUST Package has no %clean section with rm -rf %{buildroot} (or
     $RPM_BUILD_ROOT)
     Note: Clean is needed only if supporting EPEL
[x]: MUST Sources contain only permissible code or content.
[!]: MUST Each %files section contains %defattr if rpm < 4.4
     Note: defattr(....) present in %files section. This is OK if packaging
     for EPEL5. Otherwise not needed
[-]: MUST Macros in Summary, %description expandable at SRPM build time.
[x]: MUST Package requires other packages for directories it uses.
[x]: MUST Package uses nothing in %doc for runtime.
[x]: MUST Package is not known to require ExcludeArch.
[x]: MUST Permissions on files are set properly.
[x]: MUST Package does not contain duplicates in %files.
[x]: MUST Spec file lacks Packager, Vendor, PreReq tags.
[!]: MUST Package does not run rm -rf %{buildroot} (or $RPM_BUILD_ROOT) at the
     beginning of %install.
     Note: rm -rf is only needed if supporting EPEL5
[-]: MUST Large documentation files are in a -doc subpackage, if required.
[-]: MUST If (and only if) the source package includes the text of the
     license(s) in its own file, then that file, containing the text of the
     license(s) for the package is included in %doc.
[x]: MUST License field in the package spec file matches the actual license.
[x]: MUST Package consistently uses macros (instead of hard-coded directory
     names).
[x]: MUST Package is named according to the Package Naming Guidelines.
[x]: MUST Package does not generate any conflict.
[x]: MUST Package obeys FHS, except libexecdir and /usr/target.
[x]: MUST Package must own all directories that it creates.
[x]: MUST Package does not own files or directories owned by other packages.
[x]: MUST Package installs properly.
[!]: MUST Requires correct, justified where necessary.
[x]: MUST Rpmlint output is silent.
[x]: MUST Sources used to build the package match the upstream source, as
     provided in the spec URL.
/home/contyk/src/review/611372/Net-Twitter-3.18001.tar.gz :
  MD5SUM this package     : 88665d245f72b48ee87817edb5906d00
  MD5SUM upstream package : 88665d245f72b48ee87817edb5906d00
[x]: MUST Spec file is legible and written in American English.
[x]: MUST Spec file name must match the spec package %{name}, in the format
     %{name}.spec.
[-]: MUST Package contains a SysV-style init script if in need of one.
[x]: MUST File names are valid UTF-8.
[-]: MUST Useful -debuginfo package or justification otherwise.
[x]: SHOULD Reviewer should test that the package builds in mock.
[-]: SHOULD If the source package does not include license text(s) as a
     separate file from upstream, the packager SHOULD query upstream to
     include it.
[x]: SHOULD Dist tag is present.
[x]: SHOULD No file requires outside of /etc, /bin, /sbin, /usr/bin,
     /usr/sbin.
[!]: SHOULD Final provides and requires are sane (rpm -q --provides and rpm -q
     --requires).
[?]: SHOULD Package functions as described.
[x]: SHOULD Latest version is packaged.
[x]: SHOULD Package does not include license text files separate from
     upstream.
[x]: SHOULD SourceX is a working URL.
[-]: SHOULD Description and summary sections in the package spec file contains
     translations for supported Non-English languages, if available.
[-]: SHOULD Package should compile and build into binary rpms on all supported
     architectures.
[x]: SHOULD %check is present and all tests pass.
[x]: SHOULD Packages should try to preserve timestamps of original installed
     files.
[-]: SHOULD Spec use %global instead of %define.

Issues:
TODO: There are several missing build dependencies. Although they're somehow pulled in during the build now, it might not be the case in the future and they should be added. Namely:
 - perl(base), perl(lib), perl(Carp), perl(Encode), perl(HTTP::Response), perl(Net::Netrc), and perl(Time::HiRes)
 - perl(LWP::UserAgent) >= 5.819 (actually required in the code)

TODO: BuildRoot tag and, buildroot removal in %install and the %clean section are all obsolete now and should be removed unless you plan to package this for EPEL.

TODO: The same applies to %defattr in your $files section.

TODO: rpmbuild tries to detect perl dependencies these days so you don't have to explicitly mention them in your Requires.  Actually, having them there adds duplicates to the resulting RPM package dependencies.  Please, remove those from your Requires:
 - perl(Data::Visitor::Callback), perl(Digest::SHA), perl(HTML::Entities), perl(HTTP::Request::Common), perl(JSON), perl(List::Util), perl(Moose::Exporter), perl(Moose::Role), perl(MooseX::Aliases), perl(MooseX::Role::Parameterized), perl(Scalar::Util), and perl(URI::Escape).
 - You also list dependencies only needed for build, those should be removed too: perl(Crypt::SSLeay) >= 0.5, perl(Digest::HMAC_SHA1), perl(File::Spec), perl(LWP::UserAgent) >= 2.032
 - And finally, you should also remove underspecified autogenerated runtime dependencies from the resulting RPM package if you require specific versions in your package.  See https://fedoraproject.org/wiki/Packaging:AutoProvidesAndRequiresFiltering for some info about this.  You'll have to filter the following: perl(DateTime), perl(DateTime::Format::Strptime), perl(Devel::StackTrace), perl(Moose), perl(Net::OAuth), perl(Try::Tiny), and perl(URI)

Those wouldn't normally block the review but since this is your first package, I'd like to see those fixed before getting further.

Generated by fedora-review 0.2.0git
External plugins:
Comment 13 Julian C. Dunn 2012-03-17 17:50:34 EDT
(In reply to comment #12)

Hi Petr,

I think I've fixed all these problems, and I have one question before asking for a re-review. To your last point about whether the package needs specific versions of runtime libraries: Is that something that I should infer from the software's Makefile.PL? The actual code doesn't "use" any particular versions of the libraries upon which it depends.
Comment 14 Petr Šabata 2012-03-23 05:49:29 EDT
(In reply to comment #13)
> (In reply to comment #12)
> 
> Hi Petr,
> 
> I think I've fixed all these problems, and I have one question before asking
> for a re-review. To your last point about whether the package needs specific
> versions of runtime libraries: Is that something that I should infer from the
> software's Makefile.PL? The actual code doesn't "use" any particular versions
> of the libraries upon which it depends.

Well, that depends.  You should always inspect the code, the project Makefile.PL/Build.PL and META.* files before you decide.

In this case, LWP::UserAgent 5.819 is used in tests so it should be buildrequired instead of 2.032 specified in Makefile.PL (and META.yml).
Comment 15 Julian C. Dunn 2012-03-23 12:07:47 EDT
Ok. Thanks Petr. After reviewing the package I'm going to go with the assumption that I can use RPM's autorequires generator because I see nothing in the source code that insists on particular versions.

Here's my updated spec and SRPM for a re-review:

http://assets.juliandunn.net/fedorapkg/perl-Net-Twitter.spec
http://assets.juliandunn.net/fedorapkg/perl-Net-Twitter-3.18001-2.fc16.src.rpm
Comment 16 Petr Šabata 2012-03-27 09:30:46 EDT
Looking at the changes...

You've added the required build time dependencies, including the optional ones.
OK.

You've removed %defattr, the BuildRoot tag, buildroot removal in %install but you've kept the %clean section. You could just drop it entirely.
Sort of OK.

About the runtime dependencies -- sadly, rpmbuild doesn't detect everything. It usually fails with 'use's and 'require's in indented blocks, for example.
I see you've just removed them all. I think you're missing some deps now but I'll have to check that again...

I usually respect the versions in Makefile/META since those are the versions the original author developed and tested the module with.  However, as I said before, it's up to you :)
Comment 17 Petr Šabata 2012-03-27 11:06:54 EDT
So, after going through the deps again, I see only perl(Net::Netrc) doesn't get autodetected and you should require it explicitly.
Comment 18 Julian C. Dunn 2012-03-27 11:19:09 EDT
(In reply to comment #17)
> So, after going through the deps again, I see only perl(Net::Netrc) doesn't get
> autodetected and you should require it explicitly.

I left that out deliberately since the author says reading credentials from .netrc is an optional feature; the "require" is wrapped in an "if" statement in the code. Do you think it should be included as a dep unconditionally? I'm happy to include it as an extra Requires if you think it makes sense.
Comment 19 Petr Šabata 2012-03-27 11:33:16 EDT
(In reply to comment #18)
> (In reply to comment #17)
> > So, after going through the deps again, I see only perl(Net::Netrc) doesn't get
> > autodetected and you should require it explicitly.
> 
> I left that out deliberately since the author says reading credentials from
> .netrc is an optional feature;

Fair enough.

> the "require" is wrapped in an "if" statement in
> the code. Do you think it should be included as a dep unconditionally? I'm
> happy to include it as an extra Requires if you think it makes sense.

It's up to you.  If you think most users would benefit from it, it might be a good idea.

Approving.
(You should now submit an SCM request.)
Comment 20 Julian C. Dunn 2012-03-27 12:52:50 EDT
New Package SCM Request
=======================
Package Name: perl-Net-Twitter
Short Description: A Perl interface to the Twitter API
Owners: jdunn
Branches: f15 f16 f17
InitialCC: perl-sig
Comment 21 Jon Ciesla 2012-03-27 12:58:15 EDT
Git done (by process-git-requests).
Comment 22 Fedora Update System 2012-03-27 15:20:10 EDT
perl-Net-Twitter-3.18001-1.fc17 has been submitted as an update for Fedora 17.
https://admin.fedoraproject.org/updates/perl-Net-Twitter-3.18001-1.fc17
Comment 23 Fedora Update System 2012-03-27 15:22:28 EDT
perl-Net-Twitter-3.18001-1.fc16 has been submitted as an update for Fedora 16.
https://admin.fedoraproject.org/updates/perl-Net-Twitter-3.18001-1.fc16
Comment 24 Fedora Update System 2012-03-27 15:23:35 EDT
perl-Net-Twitter-3.18001-1.fc15 has been submitted as an update for Fedora 15.
https://admin.fedoraproject.org/updates/perl-Net-Twitter-3.18001-1.fc15
Comment 25 Fedora Update System 2012-03-28 01:57:06 EDT
perl-Net-Twitter-3.18001-1.fc17 has been pushed to the Fedora 17 testing repository.
Comment 26 Fedora Update System 2012-04-07 23:32:10 EDT
perl-Net-Twitter-3.18001-1.fc16 has been pushed to the Fedora 16 stable repository.
Comment 27 Fedora Update System 2012-04-07 23:33:07 EDT
perl-Net-Twitter-3.18001-1.fc15 has been pushed to the Fedora 15 stable repository.
Comment 28 Fedora Update System 2012-04-11 22:56:35 EDT
perl-Net-Twitter-3.18001-1.fc17 has been pushed to the Fedora 17 stable repository.
Comment 29 Julian C. Dunn 2014-03-24 22:02:33 EDT
Package Change Request
======================
Package Name: perl-Net-Twitter
New Branches: el6
Owners: jdunn

To satisfy bz#10000038
Comment 30 Jon Ciesla 2014-03-25 07:57:13 EDT
Git done (by process-git-requests).

Note You need to log in before you can comment on or make changes to this bug.