Bug 1002324 - Review Request: kpcli - KeePass Command Line Interface (CLI) / interactive shell
Summary: Review Request: kpcli - KeePass Command Line Interface (CLI) / interactive shell
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: Package Review
Version: rawhide
Hardware: All
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Christopher Meng
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On: 1002319 1002321
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-08-28 22:03 UTC by Matias Kreder
Modified: 2014-03-03 15:43 UTC (History)
4 users (show)

Fixed In Version: kpcli-2.3-3.fc19
Clone Of:
Environment:
Last Closed: 2013-11-02 04:59:00 UTC
Type: ---
Embargoed:
i: fedora-review+
gwync: fedora-cvs+


Attachments (Terms of Use)

Description Matias Kreder 2013-08-28 22:03:35 UTC
Spec URL: http://fedorapeople.org/~delete/kpcli/kpcli.spec
SRPM URL: http://fedorapeople.org/~delete/kpcli/kpcli-2.3-1.fc20.src.rpm
Description: 
KeePass Command Line Interface (CLI) / interactive shell.
Use this program to access and manage your KeePass 1.x or
 2.x databases from a Unix-like command line

Fedora Account System Username: delete 

This is one of my first packages. There are 2 rpm dependencies that are required by this package. I also submitted them:

https://bugzilla.redhat.com/show_bug.cgi?id=1002319
https://bugzilla.redhat.com/show_bug.cgi?id=1002321

I need Sponsorship to become a Fedora Packager.

[makerpm@builder ~]$ koji build --scratch f19 rpmbuild/SRPMS/kpcli-2.3-1.fc20.src.rpm 
Uploading srpm: rpmbuild/SRPMS/kpcli-2.3-1.fc20.src.rpm
[====================================] 100% 00:00:03  30.45 KiB   7.81 KiB/sec
Created task: 5866992
Task info: http://koji.fedoraproject.org/koji/taskinfo?taskID=5866992
Watching tasks (this may be safely interrupted)...
5866992 build (f19, kpcli-2.3-1.fc20.src.rpm): open (buildvm-12.phx2.fedoraproject.org)
  5866993 buildArch (kpcli-2.3-1.fc20.src.rpm, noarch): open (buildvm-15.phx2.fedoraproject.org)
  5866993 buildArch (kpcli-2.3-1.fc20.src.rpm, noarch): open (buildvm-15.phx2.fedoraproject.org) -> closed
  0 free  1 open  1 done  0 failed
5866992 build (f19, kpcli-2.3-1.fc20.src.rpm): open (buildvm-12.phx2.fedoraproject.org) -> closed
  0 free  0 open  2 done  0 failed

5866992 build (f19, kpcli-2.3-1.fc20.src.rpm) completed successfully

Comment 1 Christopher Meng 2013-08-29 02:16:49 UTC
SPEC invalid.

1. Let's see the perl file itself:

Quoted:

use strict;                                   # core
use version;                                  # core
use FileHandle;                               # core
use Getopt::Long;                             # core
use File::Basename;                           # core
use Digest::file;                             # core
use Digest::SHA qw(sha256);                   # core
use Data::Dumper qw(Dumper);                  # core
use Term::ReadLine;                           # core
use Term::ANSIColor;                          # core
use Carp qw(longmess);                        # core
use Time::HiRes qw(gettimeofday tv_interval); # core
use POSIX;                   # core, required for unsafe signal handling
use Crypt::Rijndael;         # non-core, libcrypt-rijndael-perl on Ubuntu
use Sort::Naturally;         # non-core, libsort-naturally-perl on Ubuntu
use Term::ReadKey;           # non-core, libterm-readkey-perl on Ubuntu
use Term::ShellUI;           # non-core, libterm-shellui-perl on Ubuntu
                             #  - add Term::ReadLine::Gnu for cli history
use File::KeePass 0.03;      # non-core, libfile-keepass-perl on Ubuntu
                             #  - >=v0.03 needed due critical bug fixes

So, it needs a lot of dependencies. And you may ask, should I write it in the spec?

Then let's see back to your another spec:

http://fedorapeople.org/~delete/kpcli/perl-Term-ShellUI.spec

We can see a line:

Requires:       perl(:MODULE_COMPAT_%(eval "`perl -V:version`"; echo $version))

So this is the magic, when you add this as "Requires", RPM dependencies generator will look into the perl file and then automatically add requires when installing it. But sometimes it also ca make mistakes, so if RPM can't cover all dependencies during deps check, then you should add missing ones to the SPEC.

ALSO, Requires: perl-Term-ReadLine-Gnu should be corrected.

2. %description:

KeePass Command Line Interface (CLI) / interactive shell. 
Use this program to access and manage your KeePass 1.x or
 2.x databases from a Unix-like command line

You should add a dot at the end of these texts, and you shouldn't leave a space:

 2.x databases from a Unix-like command line

should be:

2.x databases from a Unix-like command line 

3. %install:

install -d %{buildroot}/%{_bindir}/
install -m 0755 %{name}-%{version}.pl %{buildroot}/%{_bindir}/%{name}

You didn't preserve the timestamp.

Suggestion:

mkdir %{buildroot}%{_bindir}/
install -pm0755 %{name}-%{version}.pl %{buildroot}%{_bindir}/%{name}

And, you can remove the common slash when writing such paths:

%{buildroot}%{_bindir}

As %{_bindir} eq /usr/bin, it already has it.

4. Hope you can add a %build section and write:

%build
# Nothing to build.

5. We have standard of Source0 URL, you can find a direct link when counting 5 in the download page:

http://downloads.sourceforge.net/project/kpcli/kpcli-2.3.pl?r=http%3A%2F%2Fsourceforge.net%2Fprojects%2Fkpcli%2Ffiles%2F%3Fsource%3Dnavbar&ts=1377742463&use_mirror=superb-dca2

So it should be:

http://downloads.sourceforge.net/project/%{name}/%{name}-%{version}.pl

6. Keep your spec beautiful by reordering:

Name:      kpcli	
Version:   2.3
Release:   1%{?dist}
Summary:   KeePass Command Line Interface (CLI) / interactive shell
License:   (GPL+ or Artistic) and (GPLv2+ or Artistic) and MIT and Public Domain and UCD	
BuildArch: noarch
URL:       http://kpcli.sourceforge.net/	
Source0:   http://downloads.sourceforge.net/project/%{name}/%{name}-%{version}.pl

Comment 2 Matias Kreder 2013-08-29 20:52:57 UTC
I updated the .spec file according to your suggestions. Let me know if you see something else wrong. 

SPEC: http://fedorapeople.org/~delete/kpcli/kpcli.spec
SRPM: http://fedorapeople.org/~delete/kpcli/kpcli-2.3-2.fc20.src.rpm

Thank you!

Comment 3 Matias Kreder 2013-09-02 16:54:04 UTC
I updated the .spec file again, to fix a license problem described on BZ#1002321

SPEC: http://delete.fedorapeople.org/kpcli/kpcli.spec
SRPM: http://delete.fedorapeople.org/kpcli/kpcli-2.3-3.fc21.src.rpm

Comment 4 Christopher Meng 2013-10-23 03:48:30 UTC
Taken.

Comment 5 Christopher Meng 2013-10-23 04:17:28 UTC
Package Review
==============

Legend:
[x] = Pass, [!] = Fail, [-] = Not applicable, [?] = Not evaluated
[ ] = Manual review needed



===== MUST items =====

Generic:
[x]: Package is licensed with an open-source compatible license and meets
     other legal requirements as defined in the legal section of Packaging
     Guidelines.
[x]: 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]: License field in the package spec file matches the actual license.
     Note: Checking patched sources after %prep for licenses. Licenses found:
     "Unknown or generated". 1 files have unknown license. Detailed output of
     licensecheck in /home/rpmaker/Desktop/kpcli/licensecheck.txt
[x]: If the package is under multiple licenses, the licensing breakdown must
     be documented in the spec.
[x]: Package contains no bundled libraries without FPC exception.
[x]: Changelog in prescribed format.
[x]: Sources contain only permissible code or content.
[-]: Package contains desktop file if it is a GUI application.
[-]: Development files must be in a -devel package
[-]: Package uses nothing in %doc for runtime.
[x]: Package consistently uses macros (instead of hard-coded directory names).
[x]: Package is named according to the Package Naming Guidelines.
[x]: Package does not generate any conflict.
[x]: Package obeys FHS, except libexecdir and /usr/target.
[x]: If the package is a rename of another package, proper Obsoletes and
     Provides are present.
[x]: Requires correct, justified where necessary.
[x]: Spec file is legible and written in American English.
[-]: Package contains systemd file(s) if in need.
[-]: Package is not known to require an ExcludeArch tag.
[x]: Package complies to the Packaging Guidelines
[x]: Package successfully compiles and builds into binary rpms on at least one
     supported primary architecture.
[x]: Package installs properly.
[x]: Rpmlint is run on all rpms the build produces.
     Note: There are rpmlint messages (see attachment).
[x]: Package requires other packages for directories it uses.
[x]: Package must own all directories that it creates.
[x]: Package does not own files or directories owned by other packages.
[x]: All build dependencies are listed in BuildRequires, except for any that
     are listed in the exceptions section of Packaging Guidelines.
[x]: Package uses either %{buildroot} or $RPM_BUILD_ROOT
[x]: Package does not run rm -rf %{buildroot} (or $RPM_BUILD_ROOT) at the
     beginning of %install.
[x]: Each %files section contains %defattr if rpm < 4.4
[x]: Macros in Summary, %description expandable at SRPM build time.
[x]: Package does not contain duplicates in %files.
[x]: Permissions on files are set properly.
[x]: Package use %makeinstall only when make install' ' DESTDIR=... doesn't
     work.
[x]: Package is named using only allowed ASCII characters.
[x]: Package do not use a name that already exist
[x]: Package is not relocatable.
[x]: Sources used to build the package match the upstream source, as provided
     in the spec URL.
[x]: Spec file name must match the spec package %{name}, in the format
     %{name}.spec.
[x]: File names are valid UTF-8.
[x]: Large documentation must go in a -doc subpackage. Large could be size
     (~1MB) or number of files.
     Note: Documentation size is 0 bytes in 0 files.
[x]: Packages must not store files under /srv, /opt or /usr/local

===== SHOULD items =====

Generic:
[x]: 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]: Final provides and requires are sane (see attachments).
[x]: Package functions as described.
[x]: Latest version is packaged.
[x]: Package does not include license text files separate from upstream.
[x]: Description and summary sections in the package spec file contains
     translations for supported Non-English languages, if available.
[x]: Package should compile and build into binary rpms on all supported
     architectures.
[-]: %check is present and all tests pass.
[x]: Packages should try to preserve timestamps of original installed files.
[x]: Packager, Vendor, PreReq, Copyright tags should not be in spec file
[x]: Sources can be downloaded from URI in Source: tag
[x]: Reviewer should test that the package builds in mock.
[x]: Buildroot is not present
[x]: Package has no %clean section with rm -rf %{buildroot} (or
     $RPM_BUILD_ROOT)
[x]: Dist tag is present (not strictly required in GL).
[x]: No file requires outside of /etc, /bin, /sbin, /usr/bin, /usr/sbin.
[x]: Fully versioned dependency in subpackages if applicable.
[x]: SourceX tarball generation or download is documented.
[x]: SourceX is a working URL.
[x]: Spec use %global instead of %define unless justified.

===== EXTRA items =====

Generic:
[x]: Rpmlint is run on all installed packages.
     Note: There are rpmlint messages (see attachment).
[x]: Large data in /usr/share should live in a noarch subpackage if package is
     arched.


Rpmlint
-------
Checking: kpcli-2.3-3.fc21.noarch.rpm
          kpcli-2.3-3.fc21.src.rpm
kpcli.noarch: W: invalid-url URL: http://kpcli.sourceforge.net/ <urlopen error timed out>
kpcli.noarch: W: no-documentation
kpcli.noarch: W: no-manual-page-for-binary kpcli
kpcli.src: W: invalid-url URL: http://kpcli.sourceforge.net/ <urlopen error timed out>
kpcli.src: W: invalid-url Source0: http://downloads.sourceforge.net/project/kpcli/kpcli-2.3.pl timed out
2 packages and 0 specfiles checked; 0 errors, 5 warnings.




Rpmlint (installed packages)
----------------------------
# rpmlint kpcli
kpcli.noarch: W: invalid-url URL: http://kpcli.sourceforge.net/ <urlopen error timed out>
kpcli.noarch: W: no-documentation
kpcli.noarch: W: no-manual-page-for-binary kpcli
1 packages and 0 specfiles checked; 0 errors, 3 warnings.
# echo 'rpmlint-done:'



Requires
--------
kpcli (rpmlib, GLIBC filtered):
    /usr/bin/perl
    perl(:MODULE_COMPAT_5.18.1)
    perl(Carp)
    perl(Crypt::Rijndael)
    perl(Data::Dumper)
    perl(Digest::SHA)
    perl(Digest::file)
    perl(File::Basename)
    perl(File::KeePass)
    perl(FileHandle)
    perl(Getopt::Long)
    perl(POSIX)
    perl(Sort::Naturally)
    perl(Term::ANSIColor)
    perl(Term::ReadKey)
    perl(Term::ReadLine)
    perl(Term::ShellUI)
    perl(Time::HiRes)
    perl(strict)
    perl(version)



Provides
--------
kpcli:
    kpcli



Source checksums
----------------
http://downloads.sourceforge.net/project/kpcli/kpcli-2.3.pl :
  CHECKSUM(SHA256) this package     : a536f01c7db2460d4b31e83fa59dd1200e5194f9a8a626eb8cf429e5a6d4329c
  CHECKSUM(SHA256) upstream package : a536f01c7db2460d4b31e83fa59dd1200e5194f9a8a626eb8cf429e5a6d4329c


Generated by fedora-review 0.5.0 (920221d) last change: 2013-08-30
Command line :/usr/bin/fedora-review -rvn kpcli-2.3-3.fc21.src.rpm
Buildroot used: fedora-rawhide-i386
Active plugins: Generic, Shell-api
Disabled plugins: Java, C/C++, Python, SugarActivity, Perl, R, PHP, Ruby
Disabled flags: EPEL5, EXARCH, DISTTAG

----------------

PACKAGE APPROVED.

Comment 6 Matías Kreder 2013-10-23 18:34:27 UTC
New Package SCM Request
=======================
Package Name: kpcli
Short Description: KeePass Command Line Interface (CLI) / interactive shell
Owners: delete echevemaster
Branches: f18 f19 f20 el5 el6
InitialCC:

Comment 7 Gwyn Ciesla 2013-10-23 19:52:53 UTC
Git done (by process-git-requests).

Comment 8 Fedora Update System 2013-10-23 20:22:11 UTC
kpcli-2.3-3.fc18 has been submitted as an update for Fedora 18.
https://admin.fedoraproject.org/updates/kpcli-2.3-3.fc18

Comment 9 Fedora Update System 2013-10-23 20:30:00 UTC
kpcli-2.3-3.fc19 has been submitted as an update for Fedora 19.
https://admin.fedoraproject.org/updates/kpcli-2.3-3.fc19

Comment 10 Fedora Update System 2013-10-23 20:40:34 UTC
kpcli-2.3-3.fc20 has been submitted as an update for Fedora 20.
https://admin.fedoraproject.org/updates/kpcli-2.3-3.fc20

Comment 11 Fedora Update System 2013-10-23 20:46:36 UTC
kpcli-2.3-3.el6 has been submitted as an update for Fedora EPEL 6.
https://admin.fedoraproject.org/updates/kpcli-2.3-3.el6

Comment 12 Fedora Update System 2013-10-25 01:54:02 UTC
kpcli-2.3-3.fc19 has been pushed to the Fedora 19 testing repository.

Comment 13 Fedora Update System 2013-11-02 04:57:33 UTC
kpcli-2.3-3.fc18 has been pushed to the Fedora 18 stable repository.

Comment 14 Fedora Update System 2013-11-02 04:59:00 UTC
kpcli-2.3-3.fc19 has been pushed to the Fedora 19 stable repository.

Comment 15 Fedora Update System 2013-11-10 07:03:22 UTC
kpcli-2.3-3.fc20 has been pushed to the Fedora 20 stable repository.

Comment 16 Fedora Update System 2014-02-16 11:21:59 UTC
kpcli-2.3-3.el6 has been pushed to the Fedora EPEL 6 stable repository.

Comment 17 Matías Kreder 2014-03-03 03:00:03 UTC
New Package SCM Request
=======================
Package Name: kpcli
Short Description: KeePass Command Line Interface (CLI) / interactive shell
Owners: delete 
Branches: epel7
InitialCC:

Please add epel7 branch

Comment 18 Gwyn Ciesla 2014-03-03 13:18:52 UTC
Please use a Package Change request for new branches.

Comment 19 Matías Kreder 2014-03-03 15:04:16 UTC
Package Change Request
======================
Package Name: kpcli
New Branches: epel7
Owners: delete

Comment 20 Gwyn Ciesla 2014-03-03 15:43:46 UTC
Git done (by process-git-requests).


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