Bug 832953

Summary: Review Request: Syntastic - A syntax checker for programming language in vim
Product: [Fedora] Fedora Reporter: MERCIER Jonathan <bioinfornatics>
Component: Package ReviewAssignee: Pavel Raiskup <praiskup>
Status: CLOSED CURRENTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 17CC: misc, notting, package-review, pikachu.2014, praiskup
Target Milestone: ---Flags: praiskup: fedora-review+
gwync: fedora-cvs+
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-10-23 19:33:08 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description MERCIER Jonathan 2012-06-18 09:24:47 UTC
Dear,


I have do a package for a great vim plugin named "Syntastic"

SRPMS: http://bioinfornatics.fedorapeople.org/syntastic-2.3.0-1.20120617git1e94b98.fc17.src.rpm

SPEC: http://bioinfornatics.fedorapeople.org/syntastic.spec

Comment 1 MERCIER Jonathan 2012-06-18 14:22:10 UTC
update spec for easy subpackage maintenance:

http://bioinfornatics.fedorapeople.org/syntastic-2.3.0-2.20120617git1e94b98.fc17.src.rpm

Comment 2 Pavel Raiskup 2012-08-23 10:15:51 UTC
Hi, thanks for packaging this nice plugin!  Here is the first iteration of
review.

this still NEEDSWORK

* license in spec file is BSD but syntastic license is WTFPL

* nitpicks:
    -a lot of trailing white-spaces, use command in vim:

        set list
        set listchars=tab:>-,precedes:>,trail:_
        :%s/[ \t]\+$//ge

    - not necessary empty line at the beginning of spec file
    - multiple empty lines..

* unused definition of 'snapdate' and 'syntastic_rev', probably should be used
  more generically define $alphatag

* Neither package name nor summary (nor description!) reflects that it is vim
  plugin.  This is IMO important when user wants to find vim plugins.  Wouldn't
  it be nice to name this package something like vim-syntastic && subpackages
  like vim-syntastic-checker-* ?

* bad dependencies in sub-packages breaks the install process:

        syntastic-haml - haml
        syntastic-gentoo-metadata - xmllint
        syntastic-java - javac
        syntastic-xslt - xmllint
        syntastic-json - jsonlint
        syntastic-erlang - escript
        syntastic-docbk - xmllint
        syntastic-cucumber - cucumber
        syntastic-xml - xmllint

  as a solution for non-so-easy dependencies (required additional "hand"
  steps) you may add the README.Fedora file - mentioned here
  http://fedoraproject.org/wiki/Packaging/Guidelines#summary

* see this output  (Two packages are owning this file..)

  $ rpm -q -f /usr/share/vim/vimfiles/syntax_checkers/c.vim
  syntastic-2.3.0-2.20120617git1e94b98.fc16.noarch
  syntastic-c-2.3.0-2.20120617git1e94b98.fc16.noarch

  and this (unnecessary long list):

  rpm --query --filesbypkg syntastic

* I'm not sure how important is this but some executables don't have manual
  pages?

  - syntastic-erlang.noarch: W: no-manual-page-for-binary erlang_check_file.erl
  - syntastic-perl.noarch: W: no-manual-page-for-binary efm_perl.pl

* It would be nice to ask upstream for adding LICENSE file into git tree

* install should be called with '-p' option to preserve timestamps


==============================================================================
==== Generic == log from PackageViewer utility                            ====

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

[ ]: MUST Package complies to the Packaging Guidelines

[x]: EXTRA Rpmlint is run on all installed packages.
     Note: No rpmlint messages.
[x]: EXTRA Spec file according to URL is the same as in SRPM.
[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.
[x]: MUST All build dependencies are listed in BuildRequires, except for any
     that are listed in the exceptions section of Packaging Guidelines.
[x]: MUST Package contains no bundled libraries.
[x]: MUST Changelog in prescribed format.
[x]: MUST Sources contain only permissible code or content.
[x]: MUST Each %files section contains %defattr if rpm < 4.4
     Note: Note: defattr macros not found. They would be needed for EPEL5
[x]: MUST Macros in Summary, %description expandable at SRPM build time.
[x]: MUST Package contains desktop file if it is a GUI application.
[x]: MUST Development files must be in a -devel package
[x]: MUST Package requires other packages for directories it uses.
[x]: MUST Package uses nothing in %doc for runtime.
[-]: 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 Fully versioned dependency in subpackages, if present.
[x]: MUST Spec file lacks Packager, Vendor, PreReq tags.
[x]: MUST Package does not run rm -rf %{buildroot} (or $RPM_BUILD_ROOT) at the
     beginning of %install.
     Note: rm -rf would be needed if support for EPEL5 is required
[-]: 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.
[!]: MUST License field in the package spec file matches the actual license.
     Note: Checking patched sources after %prep for licenses. No licenses
     found. Please check the source files for licenses manually.
[-]: MUST License file installed when any subpackage combination is installed.
[x]: MUST Package consistently uses macro is (instead of hard-coded directory
     names).
[x]: MUST Package is named using only allowed ascii characters.
[x]: MUST Package is named according to the Package Naming Guidelines.
[x]: MUST Package does not generate any conflict.
     Note: Package contains no Conflicts: tag(s)
[x]: MUST Package obeys FHS, except libexecdir and /usr/target.
[-]: MUST If the package is a rename of another package, proper Obsoletes and
     Provides are present.
[!]: MUST Package must own all directories that it creates.
[!]: MUST Package does not own files or directories owned by other packages.
[!]: MUST Package installs properly.
     Note: Installation errors (see attachment)
[x]: MUST Package is not relocatable.
[!]: MUST Requires correct, justified where necessary.
[x]: MUST Rpmlint is run on all rpms the build produces.
     Note: There are rpmlint messages (other than no-documentation):

     syntastic-perl.noarch: W: no-manual-page-for-binary efm_perl.pl
     syntastic-erlang.noarch: W: no-manual-page-for-binary erlang_check_file.erl

[x]: MUST Sources used to build the package match the upstream source, as
     provided in the spec URL.
[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 systemd file(s) if in need.
[x]: MUST File names are valid UTF-8.
[!]: SHOULD Reviewer should test that the package builds in mock.
[x]: SHOULD Buildroot is not present
     Note: Unless packager wants to package for EPEL5 this is fine
[x]: SHOULD Package has no %clean section with rm -rf %{buildroot} (or
     $RPM_BUILD_ROOT)
     Note: Clean would be needed if support for EPEL5 is required
[!]: 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.
[x]: SHOULD Final provides and requires are sane (rpm -q --provides and rpm -q
     --requires).
[?]: SHOULD Package functions as described.
     I tried the 'c' plugin and it works fine - but it is not possible for me
     to check all languages.
[x]: SHOULD Latest version is packaged.
[x]: SHOULD Package does not include license text files separate from
     upstream.
[?]: SHOULD Scriptlets must be sane, if used.
[x]: SHOULD SourceX tarball generation or download is documented.
[x]: SHOULD SourceX / PatchY prefixed with %{name}.
[x]: SHOULD SourceX is a working URL.
[x]: 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.
[-]: SHOULD %check is present and all tests pass.
[!]: SHOULD Packages should try to preserve timestamps of original installed
     files.
[x]: SHOULD Spec use %global instead of %define.
     Note: %define add_subpackage(n:) \

Issues:
[!]: MUST Package installs properly.
     Note: Installation errors (see attachment)
See: https://fedoraproject.org/wiki/Packaging:Guidelines
[!]: MUST License field in the package spec file matches the actual license.
     Note: Checking patched sources after %prep for licenses. No licenses
     found. Please check the source files for licenses manually.
See: http://fedoraproject.org/wiki/Packaging/LicensingGuidelines#ValidLicenseShortNames

==============================================================================

Comment 3 MERCIER Jonathan 2012-09-12 22:12:30 UTC
Hi,
sorry for the delay, i got a material problem with my computer. Now i am back abn ready to works on this rpm.

SPEC: http://bioinfornatics.fedorapeople.org/syntastic.spec 
SRPM: http://bioinfornatics.fedorapeople.org/syntastic-2.3.0-3.20120802gite5dfcc3.fc17.src.rpm

Note : 
- some tools are into lib/devel package an rpmlint warn about it ( xmllint/javac )

Comment 4 Pavel Raiskup 2012-09-17 06:38:32 UTC
(In reply to comment #3)

> SPEC: http://bioinfornatics.fedorapeople.org/syntastic.spec 
> SRPM:
> http://bioinfornatics.fedorapeople.org/syntastic-2.3.0-3.20120802gite5dfcc3.
> fc17.src.rpm
> 
> Note : 
> - some tools are into lib/devel package an rpmlint warn about it (
> xmllint/javac )

It does seem like errors - not a warnings.  Rpmlint seems not to be friend with
'#*' comments after the subpackage definition and it should go away.  Would it
be suitable to add another option for add_subpackage macro for these comments?

Pavel

Comment 5 MERCIER Jonathan 2012-09-17 20:58:30 UTC
SPEC: http://bioinfornatics.fedorapeople.org/syntastic.spec 
SRPM: http://bioinfornatics.fedorapeople.org/syntastic-2.3.0-4.20120917git72856e6.fc17.src.rpm


$ rpmlint ~/rpmbuild/RPMS/noarch/syntastic-*
syntastic-c.noarch: W: no-documentation
syntastic-cpp.noarch: W: no-documentation
syntastic-css.noarch: W: no-documentation
syntastic-cucumber.noarch: W: no-documentation
syntastic-d.noarch: W: no-documentation
syntastic-docbk.noarch: E: explicit-lib-dependency libxml2
syntastic-docbk.noarch: W: no-documentation
syntastic-elixir.noarch: W: no-documentation
syntastic-erlang.noarch: W: no-documentation
syntastic-erlang.noarch: W: no-manual-page-for-binary erlang_check_file.erl
syntastic-eruby.noarch: W: no-documentation
syntastic-fortran.noarch: W: no-documentation
syntastic-gentoo-metadata.noarch: E: explicit-lib-dependency libxml2
syntastic-gentoo-metadata.noarch: W: no-documentation
syntastic-haml.noarch: W: no-documentation
syntastic-html.noarch: W: no-documentation
syntastic-java.noarch: E: devel-dependency java-1.7.0-openjdk-devel
syntastic-java.noarch: W: no-documentation
syntastic-javascript.noarch: W: no-documentation
syntastic-json.noarch: W: no-documentation
syntastic-lua.noarch: W: no-documentation
syntastic-nasm.noarch: W: no-documentation
syntastic-ocaml.noarch: W: no-documentation
syntastic-perl.noarch: W: no-documentation
syntastic-perl.noarch: W: no-manual-page-for-binary efm_perl.pl
syntastic-php.noarch: W: no-documentation
syntastic-puppet.noarch: W: no-documentation
syntastic-python.noarch: W: no-documentation
syntastic-rst.noarch: W: no-documentation
syntastic-ruby.noarch: W: no-documentation
syntastic-sass.noarch: W: no-documentation
syntastic-scala.noarch: W: no-documentation
syntastic-sh.noarch: W: no-documentation
syntastic-tcl.noarch: W: no-documentation
syntastic-tex.noarch: W: no-documentation
syntastic-vala.noarch: W: no-documentation
syntastic-xhtml.noarch: W: no-documentation
syntastic-xml.noarch: E: explicit-lib-dependency libxml2
syntastic-xml.noarch: W: no-documentation
syntastic-xslt.noarch: E: explicit-lib-dependency libxml2
syntastic-xslt.noarch: W: no-documentation
35 packages and 0 specfiles checked; 5 errors, 36 warnings.


Current rpmlint error are "False positive"
documentation is need only for the main package

Comment 6 MERCIER Jonathan 2012-09-20 22:17:58 UTC
that is ok or not ?

Comment 7 Pavel Raiskup 2012-09-21 10:20:23 UTC
* file /usr/share/vim/vimfiles/autoload/syntastic/c.vim should go to
  syntastic-c subpackage probably

* some minor trailing white characters are still present

Otherwise it seems ok to me, thanks for your work!

Pavel

Comment 9 Pavel Raiskup 2012-09-26 11:28:59 UTC
The very last think is that the "autoload" directory should be owned by
vim-filesystem only (and with slash):

  rpm -qf /usr/share/vim/vimfiles/autoload/

  diff --git a/srpm/syntastic.spec b/srpm/syntastic.spec
  index 54ffc2d..9207e52 100644
  --- a/srpm/syntastic.spec
  +++ b/srpm/syntastic.spec
  @@ -190,7 +190,7 @@ exit 0

   %files
   %doc _assets/screenshot_1.png README.markdown LICENCE
  -%{vimfiles}/autoload
  +%dir %{vimfiles}/autoload/syntastic/
   %{vimfiles}/plugin/syntastic.vim
   %{vimfiles}/doc/syntastic.txt
   %dir %{vimfiles}/syntax_checkers/

I tried to find the reason why:

   $ rpm -qf rpm -qf /usr/share/vim/vimfiles/autoload/syntastic/c.vim
   syntastic-2.3.0-5.20120917git72856e6.fc17.noarch
   syntastic-c-2.3.0-5.20120917git72856e6.fc17.noarch

Could you repair it before approval or should I give you fedora-review+ flag
now and you will repair it later on?

Pavel

Comment 11 Pavel Raiskup 2012-09-26 23:19:28 UTC
You did little different change I suggested :) there should be done line
substitution, not a removal -> now the directory
%{vimfiles}/autoload/syntastic/ is not assigned to any package:

    $ rpm -qf /usr/share/vim/vimfiles/autoload/syntastic/c.vim
    syntastic-c-2.3.0-6.20120917git72856e6.fc17.noarch

This problem causes that when the "vim-common" package is removed, the whole
path /usr/share/vim/vimfiles/autoload/syntastic is still on the system due to
orphan "syntastic".

It does not break anything (but it should be fixed!) so I'm giving you
review-flag+, ~~> ACCEPT

Pavel

Comment 12 Pavel Raiskup 2012-09-26 23:21:42 UTC
(In reply to comment #11)
> You did little different change I suggested :) there should be done line
> substitution, not a removal -> now the directory
> %{vimfiles}/autoload/syntastic/ is not assigned to any package:
> 
>     $ rpm -qf /usr/share/vim/vimfiles/autoload/syntastic/c.vim
>     syntastic-c-2.3.0-6.20120917git72856e6.fc17.noarch

Sorry, I Cut&Pasted bad rpm's output, the right one:

    $ rpm -qf /usr/share/vim/vimfiles/autoload/syntastic/
    file /usr/share/vim/vimfiles/autoload/syntastic is not owned by any package

Pavel

Comment 13 MERCIER Jonathan 2012-09-27 06:12:25 UTC
SPEC: http://bioinfornatics.fedorapeople.org/syntastic.spec 
SRPM: http://bioinfornatics.fedorapeople.org/syntastic-2.3.0-7.20120917git72856e6.fc17.src.rpm


New Package SCM Request
=======================
Package Name: syntastic
Short Description: A syntax checker for programming language in vim
Owners: bioinfornatics
Branches: f17 f18
InitialCC: bioinfornatics

Comment 14 Gwyn Ciesla 2012-10-03 10:54:20 UTC
Git done (by process-git-requests).