Bug 681424 - Review Request: perl-Net-SSH-Expect - SSH wrapper to execute remote commands
Summary: Review Request: perl-Net-SSH-Expect - SSH wrapper to execute remote commands
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: Package Review
Version: rawhide
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Jeffrey Ness
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-03-02 05:08 UTC by Carl Thompson
Modified: 2011-04-16 18:23 UTC (History)
4 users (show)

Fixed In Version: perl-Net-SSH-Expect-1.09-5.el6
Clone Of:
Environment:
Last Closed: 2011-03-09 03:15:50 UTC
Type: ---
Embargoed:
jeffrey.ness: fedora-review+
j: fedora-cvs+


Attachments (Terms of Use)

Description Carl Thompson 2011-03-02 05:08:39 UTC
Spec URL: http://red-dragon.com/perl-Net-SSH-Expect.spec
SRPM URL: http://red-dragon.com/perl-Net-SSH-Expect-1.09-1..fc13.src.rpm
Description: This is a perl module for SSH wrapper to execute remote commands

rpmlint on spec and binary rpms return no errors and 4 spelling warnings
koji build passed on F13-F15, rawhide, epel5/epel6

Submitting for F13+ at this time

Comment 1 Carl Thompson 2011-03-02 05:12:25 UTC
SRPM URL: http://red-dragon.com/perl-Net-SSH-Expect-1.09-1.fc13.src.rpm

Typo in original url

Comment 2 Jeffrey Ness 2011-03-02 15:20:06 UTC
PASSED PACKAGE SPECIFIC HAVE's:
http://fedoraproject.org/wiki/Packaging/Perl#Perl_Requires_and_Provides

[ pass ] - License tag
[ pass ] - Directory Ownership
[ pass ] - Requires and Provides (virtual name)
[ pass ] - Versioned MODULE_COMPAT_Requires
[ pass ] - URL Tag
[ pass ] - Testing and Test Suites

FAILED MUST HAVE's:

[ fail ] MUST: Each package must consistently use macros.
         * Source0 should use %{version} 
         * In %check and %install you should use %{__make} similar to how you did in %build
[ fail ] MUST: Using %{buildroot} vs $RPM_BUILD_ROOT
            http://fedoraproject.org/wiki/PackagingGuidelines#Using_.25.7Bbuildroot.7D_and_.25.7Boptflags.7D_vs_.24RPM_BUILD_ROOT_and_.24RPM_OPT_FLAGS
          * You should pick a style and use it consistently throughout your packaging.

PASSED MUST HAVE'S:   

[ pass ] MUST: rpmlint must be run on every package
[ pass ] MUST: The package must be named according to the Package Naming 
         Guidelines
[ pass ] MUST: The spec file name must match the base package %{name}
[ pass ] MUST: The package must be licensed with a Fedora approved license
         and meet the Licensing Guidelines
[ pass ] MUST: The License field in the package spec file must match the 
         actual license
[ ---- ] 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 must be included in %doc
[ pass ] MUST: The spec file must be written in American English.
[ pass ] MUST: The sources used to build the package must match the upstream 
         source, as provided in the spec URL. Reviewers should use md5sum for 
         this task. If no upstream URL can be specified for this package, 
         please see the Source URL Guidelines for how to deal with this.
[ pass ] MUST: The package MUST successfully compile and build into binary 
         rpms on at least one primary architecture
[ ---- ] MUST: If the package does not successfully compile, build or work on 
         an architecture, then those architectures should be listed in the 
         spec in ExcludeArch. Each architecture listed in ExcludeArch MUST 
         have a bug filed in bugzilla, describing the reason that the package 
         does not compile/build/work on that architecture. The bug number MUST 
         be placed in a comment, next to the corresponding ExcludeArch line
[ pass ] MUST: All build dependencies must be listed in BuildRequires, except 
         for any that are listed in the exceptions section of the Packaging 
         Guidelines ; inclusion of those as BuildRequires is optional. Apply 
         common sense.
[ ---- ] MUST: The spec file MUST handle locales properly. This is done by 
         using the %find_lang macro. Using %{_datadir}/locale/* is strictly 
         forbidden
[ ---- ] MUST: Every binary RPM package (or subpackage) which stores shared 
         library files (not just symlinks) in any of the dynamic linker's 
         default paths, must call ldconfig in %post and %postun.
[ ---- ] MUST: If the package is designed to be relocatable, the packager must 
         state this fact in the request for review, along with the 
         rationalization for relocation of that specific package. Without 
         this, use of Prefix: /usr is considered a blocker.
[ pass ] MUST: A package must own all directories that it creates. If it does 
         not create a directory that it uses, then it should require a package 
         which does create that directory.
[ pass ] MUST: A package must not contain any duplicate files in the %files 
         listing.
[ pass ] MUST: Permissions on files must be set properly. Executables should 
         be set with executable permissions, for example. Every %files section 
         must include a %defattr(...) line.
[ pass ] MUST: Each package must have a %clean section, which contains rm -rf
         %{buildroot} (or $RPM_BUILD_ROOT).
[ pass ] MUST: The package must contain code, or permissible content.
[ ---- ] MUST: Large documentation files must go in a -doc subpackage. (The 
         definition of large is left up to the packager's best judgement, but 
         is not restricted to size. Large can refer to either size or 
         quantity).
[ ---- ] MUST: If a package includes something as %doc, it must not affect the 
         runtime of the application. To summarize: If it is in %doc, the 
         program must run properly if it is not present.
[ ---- ] MUST: Header files must be in a -devel package.
[ ---- ] MUST: Static libraries must be in a -static package.
[ ---- ] MUST: Packages containing pkgconfig(.pc) files must 'Requires: 
         pkgconfig' (for directory ownership and usability).
[ ---- ] MUST: If a package contains library files with a suffix (e.g. 
         libfoo.so.1.1), then library files that end in .so (without suffix) 
         must go in a -devel package.
[ ---- ] MUST: In the vast majority of cases, devel packages must require the 
         base package using a fully versioned dependency: Requires: %{name} =
         %{version}-%{release}
[ ---- ] MUST: Packages must NOT contain any .la libtool archives, these must 
         be removed in the spec if they are built.
[ ---- ] MUST: Packages containing GUI applications must include a
         %{name}.desktop file, and that file must be properly installed with 
         desktop-file-install in the %install section. If you feel that your 
         packaged GUI application does not need a .desktop file, you must put 
         a comment in the spec file with your explanation.
[ ---- ] MUST: Packages must not own files or directories already owned by 
         other packages. The rule of thumb here is that the first package to 
         be installed should own the files or directories that other packages 
         may rely upon. This means, for example, that no package in Fedora 
         should ever share ownership with any of the files or directories 
         owned by the filesystem or man package. If you feel that you have a 
         good reason to own a file or directory that another package owns, 
         then please present that at package review time.
[ pass ] MUST: At the beginning of %install, each package MUST run rm -rf
         %{buildroot} (or $RPM_BUILD_ROOT).
[ pass ] MUST: All filenames in rpm packages must be valid UTF-8.

Comment 3 Ralf Corsepius 2011-03-02 15:37:10 UTC
This package's spec file looks very strange - It seems to be cluttered with weird stuff.


Please clean it up or add explicit comments outlining what you are doing to your spec file - I would not approve it.

Comment 4 Carl Thompson 2011-03-03 03:15:58 UTC
Spec URL: http://red-dragon.com/perl-Net-SSH-Expect.spec
SRPM URL: http://red-dragon.com/perl-Net-SSH-Expect-1.09-2.fc13.src.rpm

1) Updated spec and used macros for everything
2) Got rid of the junk in spec from cpan2rpm and replaced it with reasonable clean up code
3) Added %{version} macro to Source0

Comment 5 Carl Thompson 2011-03-03 05:01:10 UTC
Spec URL: http://red-dragon.com/perl-Net-SSH-Expect.spec
SRPM URL: http://red-dragon.com/perl-Net-SSH-Expect-1.09-3.fc13.src.rpm

Fixed a spec error that prevented builds on rhel5/6.

Not pushing to epel 5/6 yet but wanted it to be right for when I do.

Comment 6 Ralf Corsepius 2011-03-03 10:47:38 UTC
MUSTFIXES:

* Please remove this:

%clean
[ "%{buildroot}" != "/" ] && rm -rf %{buildroot}

It's superflous for a long time.


* What is this supposed to do:
%if 0%{?fedora} <= 14
%define pvendorlib %{perl_privlib}
%endif
%if 0%{?fedora} >= 15
%define pvendorlib %{perl_vendorlib}
%endif
%if 0%{?rhel} >= 5
%define pvendorlib %{perl_vendorlib}
%endif

This %pvendorlib does not appear to be used anywhere inside of your spec, nor have I evers seen it in any perl*spec before?

* Please remove this:
%define _use_internal_dependency_generator 1


Pardon, could it be you haven't packaged perl-modules for Fedora, before?

Comment 7 Jeffrey Ness 2011-03-03 14:33:18 UTC
Carl,

Ralf is correct in the %clean portion is not needed for Fedora 13 or above, but as we discussed this will be ported to EPEL 5/6 as well:

   http://fedoraproject.org/wiki/PackagingGuidelines#.25clean

In this perl package your perl_privlib is the same across the board, I would like to see you narrow your top portion down to a single define:

  %define pvendorlib %{perl_vendorlib}

Ralf this variable is used in Carl's %file portion:

  %files
  %defattr(644,root,root)
  %{_mandir}/man3/Net::SSH::Expect.3pm.gz
  %{pvendorlib}/Net/SSH/Expect.pm
  %{pvendorlib}/Net/SSH/Expect.pod

I am also not quite sure why you have '_use_internal_dependency_generator' set to 1, in the documentation below it would seem it is always enabled unless set off by setting to '0':

http://fedoraproject.org/wiki/PackagingDrafts/FilteringAutomaticDependencies

Comment 8 Ralf Corsepius 2011-03-03 14:57:17 UTC
(In reply to comment #7)

> Ralf this variable is used in Carl's %file portion:
> 
>   %files
>   %defattr(644,root,root)
>   %{_mandir}/man3/Net::SSH::Expect.3pm.gz
>   %{pvendorlib}/Net/SSH/Expect.pm
>   %{pvendorlib}/Net/SSH/Expect.pod

We have a standardized macro for this: %{perl_vendorlib}
https://fedoraproject.org/wiki/Packaging:Perl

> I am also not quite sure why you have '_use_internal_dependency_generator' set
> to 1, in the documentation below it would seem it is always enabled unless set
> off by setting to '0':
Switching off rpm's internal_dependency_generator was the last resort to implement filters to filter out bogus deps in the early days of fedora.

Meanwhile things have changed - this kind of manual filters only needed in very rare exceptional cases (I am not aware of any such case - Most specs still using them either try hard to stay compatible to ancient RHELs or simply are outdated themselves).

BTW, @Carl: Are you familiar with cpanspec?

Comment 9 Carl Thompson 2011-03-03 18:58:17 UTC
Spec URL: http://red-dragon.com/perl-Net-SSH-Expect.spec
SRPM URL: http://red-dragon.com/perl-Net-SSH-Expect-1.09-4.fc13.src.rpm

I have removed 
[ "%{buildroot}" != "/" ]
as your correct and it is no longer needed.

I use a custom macro defined based on the fedora/rhel build because those macros are only standard per distro.  Many of us packagers of perl modules found out the hard way that these macros change with F15 when almost all of the specs had to be updated so they would build on F15 due to the macro change.

I prefer to maintain a single spec for all distros instead of a seperate spec for each distro so I use the if statements to define a custom macro based on the distro of build.

As you can see from the macro section:
%if 0%{?fedora} <= 14
%define pvendorlib %{perl_privlib}
%endif
%if 0%{?fedora} >= 15
%define pvendorlib %{perl_vendorlib}
%endif
%if 0%{?rhel} >= 5
%define pvendorlib %{perl_vendorlib}
%endif
the macro from F13 and F14 is perl_privlib while on F15+ as well as rhel its perl_vendorlib.  It gets even more convoluted when they are arch based libraries instead of noarch.

I have removed the legacy internal_dependency_generator

I have added PERL5_CPANPLUS_IS_RUNNING=1 as a standard that I will do with all my perl packages to prevent any current or new packages I build from pulling directly from CPAN

I'm checking out cpanspec because I wasn't familiar with it and will most likely use it on the next package I work on to ease the creation of a spec file for perl modules.

This is my second perl module package for fedora/epel so all input to improve my procedures is greatly appreciated.

Comment 10 Carl Thompson 2011-03-04 19:47:31 UTC
Spec URL: http://red-dragon.com/perl-Net-SSH-Expect.spec
SRPM URL: http://red-dragon.com/perl-Net-SSH-Expect-1.09-5.fc13.src.rpm

Fixed a typo in the spec file

Comment 11 Jeffrey Ness 2011-03-04 21:00:37 UTC
Alright Carl,

Looks like you cleaned up this SPEC quite a bit to make it readable and functional.

I verified it builds in mock under epel-5-x86_64 and the rpmlints are clean:

$ rpmlint /var/lib/mock/epel-5-x86_64/result/*.rpm
perl-Net-SSH-Expect.noarch: I: enchant-dictionary-not-found en_US
2 packages and 0 specfiles checked; 0 errors, 0 warnings.

$ rpmlint SPECS/perl-Net-SSH-Expect.spec 
0 packages and 1 specfiles checked; 0 errors, 0 warnings.

You also successfully built a scratch in Koji:
  http://koji.fedoraproject.org/koji/taskinfo?taskID=2885563

This package has been approved.

Comment 12 Carl Thompson 2011-03-04 21:23:16 UTC
New Package SCM Request
=======================
Package Name: perl-Net-SSH-Expect
Short Description: SSH wrapper to execute remote commands
Owners: redragon
Branches: f13 f14 f15
InitialCC:

Comment 13 Jason Tibbitts 2011-03-04 21:24:45 UTC
Git done (by process-git-requests).

Comment 14 Fedora Update System 2011-03-04 22:05:35 UTC
Package perl-Net-SSH-Expect-1.09-5.fc14:
* should fix your issue,
* was pushed to the Fedora 14 updates-testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing perl-Net-SSH-Expect-1.09-5.fc14'
as soon as you are able to, then reboot.
Please go to the following url:
https://admin.fedoraproject.org/updates/perl-Net-SSH-Expect-1.09-5.fc14
then log in and leave karma (feedback).

Comment 15 Fedora Update System 2011-03-04 22:05:47 UTC
Package perl-Net-SSH-Expect-1.09-5.fc15:
* should fix your issue,
* was pushed to the Fedora 15 updates-testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing perl-Net-SSH-Expect-1.09-5.fc15'
as soon as you are able to, then reboot.
Please go to the following url:
https://admin.fedoraproject.org/updates/perl-Net-SSH-Expect-1.09-5.fc15
then log in and leave karma (feedback).

Comment 16 Fedora Update System 2011-03-04 22:05:58 UTC
Package perl-Net-SSH-Expect-1.09-5.fc13:
* should fix your issue,
* was pushed to the Fedora 13 updates-testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing perl-Net-SSH-Expect-1.09-5.fc13'
as soon as you are able to, then reboot.
Please go to the following url:
https://admin.fedoraproject.org/updates/perl-Net-SSH-Expect-1.09-5.fc13
then log in and leave karma (feedback).

Comment 17 Fedora Update System 2011-03-05 02:26:00 UTC
perl-Net-SSH-Expect-1.09-5.fc15 has been pushed to the Fedora 15 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update perl-Net-SSH-Expect'.  You can provide feedback for this update here: https://admin.fedoraproject.org/updates/perl-Net-SSH-Expect-1.09-5.fc15

Comment 18 Fedora Update System 2011-03-09 03:15:45 UTC
perl-Net-SSH-Expect-1.09-5.fc15 has been pushed to the Fedora 15 stable repository.

Comment 19 Fedora Update System 2011-03-12 22:54:14 UTC
perl-Net-SSH-Expect-1.09-5.fc13 has been pushed to the Fedora 13 stable repository.

Comment 20 Fedora Update System 2011-03-12 22:56:02 UTC
perl-Net-SSH-Expect-1.09-5.fc14 has been pushed to the Fedora 14 stable repository.

Comment 21 Carl Thompson 2011-03-30 16:24:02 UTC
Package Change Request
======================
Package Name: perl-Net-SSH-Expect
New Branches: el5 el6
Owners: redragon

Extending to epel 5/6

Comment 22 Jason Tibbitts 2011-03-30 16:42:47 UTC
Git done (by process-git-requests).

Comment 23 Fedora Update System 2011-03-31 00:04:02 UTC
perl-Net-SSH-Expect-1.09-5.el6 has been submitted as an update for Fedora EPEL 6.
https://admin.fedoraproject.org/updates/perl-Net-SSH-Expect-1.09-5.el6

Comment 24 Fedora Update System 2011-03-31 00:04:10 UTC
perl-Net-SSH-Expect-1.09-5.el5 has been submitted as an update for Fedora EPEL 5.
https://admin.fedoraproject.org/updates/perl-Net-SSH-Expect-1.09-5.el5

Comment 25 Fedora Update System 2011-04-16 18:23:19 UTC
perl-Net-SSH-Expect-1.09-5.el5 has been pushed to the Fedora EPEL 5 stable repository.

Comment 26 Fedora Update System 2011-04-16 18:23:33 UTC
perl-Net-SSH-Expect-1.09-5.el6 has been pushed to the Fedora EPEL 6 stable repository.


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