Bug 1033961 - Review Request: powerline - The ultimate statusline/prompt utility
Review Request: powerline - The ultimate statusline/prompt utility
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: Package Review (Show other bugs)
rawhide
All Linux
medium Severity medium
: ---
: ---
Assigned To: Antonio Trande
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-11-24 14:29 EST by Andreas Schneider
Modified: 2013-12-13 22:07 EST (History)
7 users (show)

See Also:
Fixed In Version: powerline-0.0.1-6.20131123gitdb80fc.fc20
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-12-11 21:55:14 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
anto.trande: fedora‑review+
limburgher: fedora‑cvs+


Attachments (Terms of Use)

  None (edit)
Description Andreas Schneider 2013-11-24 14:29:10 EST
Spec URL: http://xor.cryptomilk.org/rpm/powerline/powerline.spec
SRPM URL: http://xor.cryptomilk.org/rpm/powerline/powerline-0.0.1.20131123gitdb80fc-1.fc19.src.rpm

Description: Powerline is a statusline plugin for vim, and provides statuslines and prompts for several other applications, including zsh, bash, tmux, IPython, Awesome and Qtile.

https://github.com/Lokaltog/powerline

Fedora Account System Username: asn
Comment 1 Simo Sorce 2013-11-24 15:28:42 EST
rpmlint complaints
| powerline.src: W: spelling-error %description -l en_US zsh -> sh, ssh, ash
| powerline.src: W: invalid-url Source0: powerline-0.0.1.20131123gitdb80fc.tar.gz
| 1 packages and 0 specfiles checked; 0 errors, 2 warnings.

1 is obviously bogus
however 2 indicates some errors:
- Source0 is supposed to be the URL where to find the package, I suppose the git tree when it is a checkout ?
- you should use %{checkout} in Version and set Checkout: 20131123gitdb80fc,
  see https://fedoraproject.org/wiki/Packaging:NamingGuidelines#Snapshot_packages
Comment 2 Andreas Schneider 2013-11-24 15:44:51 EST
* Sun Nov 24 2013 - Andreas Schneider <asn@redhat.com> - 0.0.1.20131123gitdb80fc-2
- Set checkout.
- Set source url
- Fix default configuration path.


The spelling error is no error.
Comment 3 Michele Baldessari 2013-11-24 16:07:47 EST
Thanks for this package ;)

Just a drive-by comment as a happy powerline user. You need to add
python2-devel or python3-devel in the BuildRequires:
http://fedoraproject.org/wiki/Packaging:Python#BuildRequires
Comment 4 Andreas Schneider 2013-11-24 16:24:59 EST
I don't see why python-devel is needed.
Comment 5 Jakub Hrozek 2013-11-24 16:36:01 EST
Here is a koji build with latest Andreas' package:
http://koji.fedoraproject.org/koji/taskinfo?taskID=6220268

The only thing in the specfile that might need changing is that subpackages (vim-plugin-powerline and tmux-powerline) should require the main package with full NVR.
Comment 6 Jakub Hrozek 2013-11-24 16:37:26 EST
python-devel is not needed, powerline is written entirely in Python, python-devel is normally needed for python bindings.
Comment 7 Michele Baldessari 2013-11-24 17:00:17 EST
Well I guess the Python guidelines need an update or fedora-review needs fixing 
then
Comment 8 Christopher Meng 2013-11-24 23:37:54 EST
1. Please sort your spec for readability:

Move:

BuildRequires:  python-setuptools python-sphinx fdupes fontconfig tmux vim-minimal
BuildArch: noarch

after

Url:            https://github.com/Lokaltog/powerline

2. 
%define checkout 20131123gitdb80fc

-->


%global checkout 20131123gitdb80fc

And ask upstream to tag the project.

3. %build

Add a note like 

#nothing to build.

4. install with -p option to preserve the timestamp.

5. %fdupes %{buildroot}%{python_sitelib}

What's this crap?

6. Just one line in %files:

%{_datadir}/%{name}

No need to 

%dir %{_datadir}/%{name}
%{_datadir}/%{name}/fontpatcher-symbols.sfd

7. python setup.py install --prefix=%{_prefix} --root=%{buildroot} --optimize=1

Use:

%{__python2} setup.py install --prefix=%{_prefix} --root=%{buildroot} --optimize=1
Comment 9 Andreas Schneider 2013-11-25 02:11:37 EST
Thanks for your comment.

1. Moved BuildArch, prefer BuildRequires on top!
2. done
3. done
4. -a now
5. no crap (man fdupes)
6. wont change, I prefer two or more
7. done
Comment 10 Antonio Trande 2013-11-26 14:47:27 EST
- .spec file and src rpm are not contiguous.

- %{_datadir}/vim/site|plugin directories are not owned

- Why not using %{name} instead of powerline in the Require tags ? 

- You can use the commit direct download link for Source0
https://github.com/Lokaltog/powerline/archive/db80fc95ed01d2c559c4bdc7da8514ed3cc7fcd9.zip

- Please, leave a comment or an upstream link about the patches

> I see a BuildRoot tag so if your package must be built in EPEL5 too:

- Buildroot is not like those proposed by EPEL packaging guidelines for EPEL5 and below
(https://fedoraproject.org/wiki/EPEL:Packaging#BuildRoot_tag) and
- BuildRoot cleanings are missing

- 'fdupes' is not in EPEL* 

- Consider that %{__python2} macro could not work

- In RHEL 5 and older, python2 packages that install python modules need to define python_sitelib/python_sitearch macros
  See https://fedoraproject.org/wiki/Packaging:Python#Macros

> else

- Remove Buildroot tag


Package Review
==============

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


Issues:
=======
- Package contains BR: python2-devel or python3-devel


===== 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]: License field in the package spec file matches the actual license.
     Note: Checking patched sources after %prep for licenses. Licenses found:
     "Unknown or generated". 85 files have unknown license. Detailed output of
     licensecheck in /home/sagitter/1033961-powerline/licensecheck.txt
[x]: License file installed when any subpackage combination is installed.
[!]: Package requires other packages for directories it uses.
     Note: No known owner of /usr/share/vim/site/plugin, /usr/share/vim/site
[!]: Package must own all directories that it creates.
     Note: Directories without known owners: /usr/share/vim/site,
     /usr/share/vim/site/plugin
[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
[x]: 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.
[-]: 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.
[x]: Package is not known to require an ExcludeArch tag.
[x]: Large documentation must go in a -doc subpackage. Large could be size
     (~1MB) or number of files.
     Note: Documentation size is 860160 bytes in 81 files.
[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]: 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]: 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
[!]: Package does not run rm -rf %{buildroot} (or $RPM_BUILD_ROOT) at the
     beginning of %install.
[x]: %config files are marked noreplace or the reason is justified.
[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]: No %config files under /usr.
[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]: Packages must not store files under /srv, /opt or /usr/local

Python:
[x]: Python eggs must not download any dependencies during the build process.
[x]: A package which is used by another package via an egg interface should
     provide egg info.
[x]: Package meets the Packaging Guidelines::Python
[x]: Binary eggs must be removed in %prep

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

Generic:
[!]: Sources can be downloaded from URI in Source: tag
     Note: Could not download Source0
     See: http://fedoraproject.org/wiki/Packaging:Guidelines#Tags
[!]: Buildroot is not present
     Note: Invalid buildroot found: %{_tmppath}/%{name}-%{version}-build
     See: http://fedoraproject.org/wiki/Packaging/Guidelines#BuildRoot_tag
[x]: Avoid bundling fonts in non-fonts packages.
     Note: Package contains font files
[-]: 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]: Fully versioned dependency in subpackages if applicable.
     Note: No Requires: %{name}%{?_isa} = %{version}-%{release} in powerline-
     docs , vim-plugin-powerline , tmux-powerline
[ ]: Package functions as described.
[x]: Latest version is packaged.
[x]: Package does not include license text files separate from upstream.
[x]: Patches link to upstream bugs/comments/lists or are otherwise justified.
[!]: SourceX tarball generation or download is documented.
     Note: Package contains tarball without URL, check comments
[-]: 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]: Reviewer should test that the package builds in mock.
[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]: SourceX is a working URL.
[x]: Spec use %global instead of %define unless justified.

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

Generic:
[!]: Spec file according to URL is the same as in SRPM.
     Note: Spec file as given by url is not the same as in SRPM (see attached
     diff).
     See: (this test has no URL)
[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: powerline-0.0.1.20131123gitdb80fc-1.fc21.noarch.rpm
          powerline-docs-0.0.1.20131123gitdb80fc-1.fc21.noarch.rpm
          vim-plugin-powerline-0.0.1.20131123gitdb80fc-1.fc21.noarch.rpm
          tmux-powerline-0.0.1.20131123gitdb80fc-1.fc21.noarch.rpm
          powerline-0.0.1.20131123gitdb80fc-1.fc21.src.rpm
powerline.noarch: W: cross-directory-hard-link /usr/lib/python2.7/site-packages/powerline/segments/plugin/__init__.py /usr/lib/python2.7/site-packages/powerline/matchers/plugin/__init__.py
powerline.noarch: W: cross-directory-hard-link /usr/lib/python2.7/site-packages/powerline/segments/__init__.py /usr/lib/python2.7/site-packages/powerline/segments/plugin/__init__.py
powerline.noarch: W: cross-directory-hard-link /usr/lib/python2.7/site-packages/powerline/matchers/__init__.py /usr/lib/python2.7/site-packages/powerline/segments/__init__.py
powerline.noarch: W: no-manual-page-for-binary powerline
powerline.noarch: W: no-manual-page-for-binary powerline-fontpatcher
powerline.noarch: W: no-manual-page-for-binary powerline-lint
tmux-powerline.noarch: W: spelling-error %description -l en_US conf -> con, cone, cons
powerline.src: W: spelling-error %description -l en_US zsh -> sh, ssh, ash
powerline.src: W: invalid-url Source0: powerline-0.0.1.20131123gitdb80fc.tar.gz
5 packages and 0 specfiles checked; 0 errors, 9 warnings.




Rpmlint (installed packages)
----------------------------
# rpmlint powerline powerline-docs vim-plugin-powerline tmux-powerline
powerline.noarch: W: cross-directory-hard-link /usr/lib/python2.7/site-packages/powerline/segments/plugin/__init__.py /usr/lib/python2.7/site-packages/powerline/matchers/plugin/__init__.py
powerline.noarch: W: cross-directory-hard-link /usr/lib/python2.7/site-packages/powerline/segments/__init__.py /usr/lib/python2.7/site-packages/powerline/segments/plugin/__init__.py
powerline.noarch: W: cross-directory-hard-link /usr/lib/python2.7/site-packages/powerline/matchers/__init__.py /usr/lib/python2.7/site-packages/powerline/segments/__init__.py
powerline.noarch: W: no-manual-page-for-binary powerline
powerline.noarch: W: no-manual-page-for-binary powerline-fontpatcher
powerline.noarch: W: no-manual-page-for-binary powerline-lint
tmux-powerline.noarch: W: spelling-error %description -l en_US conf -> con, cone, cons
4 packages and 0 specfiles checked; 0 errors, 7 warnings.
# echo 'rpmlint-done:'



Requires
--------
powerline (rpmlib, GLIBC filtered):
    /usr/bin/env
    /usr/bin/python
    config(powerline)
    fontconfig
    python
    python(abi)

powerline-docs (rpmlib, GLIBC filtered):

vim-plugin-powerline (rpmlib, GLIBC filtered):
    powerline
    vim

tmux-powerline (rpmlib, GLIBC filtered):
    powerline
    tmux



Provides
--------
powerline:
    config(powerline)
    font(powerlinesymbols)
    powerline

powerline-docs:
    powerline-docs

vim-plugin-powerline:
    vim-plugin-powerline

tmux-powerline:
    tmux-powerline



Diff spec file in url and in SRPM
---------------------------------
--- /home/sagitter/1033961-powerline/srpm/powerline.spec	2013-11-26 18:16:28.846746684 +0100
+++ /home/sagitter/1033961-powerline/srpm-unpacked/powerline.spec	2013-11-24 21:33:24.000000000 +0100
@@ -1,9 +1,8 @@
 BuildRequires:  python-setuptools python-sphinx fdupes fontconfig tmux vim-minimal
-
-%global checkout 20131123gitdb80fc
+BuildArch: noarch
 
 Name:           powerline
-Version:        0.0.1.%{checkout}
-Release:        3%{?dist}
+Version:        0.0.1.20131123gitdb80fc
+Release:        1%{?dist}
 
 Summary:        The ultimate status-line/prompt utility
@@ -12,10 +11,8 @@
 Url:            https://github.com/Lokaltog/powerline
 
-BuildArch: noarch
-
 Requires:       python
 Requires:       fontconfig
 
-Source0:        https://github.com/Lokaltog/powerline/%{name}-%{version}.tar.gz
+Source0:        %{name}-%{version}.tar.gz
 
 Patch0:         fontpatcher.py.patch
@@ -38,5 +35,5 @@
 Summary: Powerline VIM plugin
 Requires: vim
-Requires: powerline = %{version}-%{release}
+Requires: powerline
 
 %description -n vim-plugin-powerline
@@ -47,5 +44,5 @@
 Summary: Powerline for tmux
 Requires: tmux
-Requires: powerline = %{version}-%{release}
+Requires: powerline
 
 %description -n tmux-powerline
@@ -64,9 +61,8 @@
 
 %build
-# nothing to build
 
 %install
 sed -i -e "/DEFAULT_SYSTEM_CONFIG_DIR/ s@None@'/etc/xdg'@" powerline/__init__.py
-%{__python2} setup.py install --prefix=%{_prefix} --root=%{buildroot} --optimize=1
+python setup.py install --prefix=%{_prefix} --root=%{buildroot} --optimize=1
 
 # build docs
@@ -84,5 +80,5 @@
 # config
 install -d -m0755 %{buildroot}%{_sysconfdir}/xdg/%{name}
-cp -a powerline/config_files/* %{buildroot}%{_sysconfdir}/xdg/%{name}/
+cp -r powerline/config_files/* %{buildroot}%{_sysconfdir}/xdg/%{name}/
 
 # fonts
@@ -133,13 +129,4 @@
 
 %changelog
-* Mon Nov 25 2013 - Andreas Schneider <asn@redhat.com> - 0.0.1.20131123gitdb80fc-3
-- Changed define to global
-- Moved BuildArch
-
-* Sun Nov 24 2013 - Andreas Schneider <asn@redhat.com> - 0.0.1.20131123gitdb80fc-2
-- Set checkout.
-- Set source URL.
-- Fix default configuration path.
-
 * Sun Nov 24 2013 - Andreas Schneider <asn@redhat.com> - 0.0.1.20131123gitdb80fc-1
 - Initial package.


Generated by fedora-review 0.5.0 (920221d) last change: 2013-08-30
Command line :/usr/bin/fedora-review -m fedora-rawhide-x86_64 -b 1033961
Buildroot used: fedora-rawhide-x86_64
Active plugins: Python, Generic, Shell-api
Disabled plugins: Java, C/C++, SugarActivity, Perl, R, PHP, Ruby
Disabled flags: EPEL5, EXARCH, DISTTAG
Comment 11 Andreas Schneider 2013-11-27 04:09:01 EST
* Wed Nov 27 2013 - Andreas Schneider <asn@redhat.com> - 0.0.1.20131123gitdb80fc-4
- Added missing vim directories.
- Fixed BuildRoot.
- Use fdupes only on Fedora.
- Use name tag in Requires.
Comment 12 Antonio Trande 2013-11-27 10:30:33 EST
Above all, please, when you change your src package then post the new links to .spec/src.rpm. Reviewer needs them for using 'fedora-review' tool (in fact, note my previous comment ".spec file and src rpm are not contiguous.").

- Why BuildRequires tag is so much high in the file ?  

- I do still not see any comment for the patches. ;)  

- %{checkout} goes in the Release tag.
See http://fedoraproject.org/wiki/Packaging:NamingGuidelines#Release_Tag

- Your package cannot be built in EPEL yet. I advice you to check it in koji when it's ready ... and to post the links. :)
Comment 13 Andreas Schneider 2013-11-27 12:58:27 EST
Spec URL: http://xor.cryptomilk.org/rpm/powerline/powerline.spec
SRPM URL: http://xor.cryptomilk.org/rpm/powerline/powerline-0.0.1-5.20131123gitdb80fc.fc19.src.rpm

* Wed Nov 27 2013 - Andreas Schneider <asn@redhat.com> - 0.0.1-5.20131123gitdb80fc
- Remove fontpatcher.py.patch
- Moved BuildReqruies.
- Try to fix build on EPEL5.

a) There is only one patch and the comment would be the same as the filename, so I don't really see why to add a comment.
b) Why does it need to work on EPEL5. Is this a requirement for Fedora? If yes, since when?
Comment 14 Antonio Trande 2013-11-27 13:30:35 EST
(In reply to Andreas Schneider from comment #13)
> Spec URL: http://xor.cryptomilk.org/rpm/powerline/powerline.spec
> SRPM URL:
> http://xor.cryptomilk.org/rpm/powerline/powerline-0.0.1-5.20131123gitdb80fc.
> fc19.src.rpm
> b) Why does it need to work on EPEL5. Is this a requirement for Fedora? If
> yes, since when?

In comment#10, I written:

> ... if your package must be built in EPEL5 too:

It's up to you! It's not a requirement for Fedora and I didn't say that it was.
Comment 15 Andreas Schneider 2013-11-27 17:05:21 EST
Ah ok, cause on EPEL5 python fails in the setup and on EPEL6 it fails compiling the documentation.

So I would prefer not to have them on EPEL.
Comment 16 Antonio Trande 2013-11-27 17:33:20 EST
(In reply to Andreas Schneider from comment #15)
> So I would prefer not to have them on EPEL.

You don't need BuildRoot and

%if 0%{?rhel} && 0%{?rhel} <= 5
%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")}
%{!?python_sitearch: %global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")}
%endif

anymore.
Not even of the '%if 0%{?fedora}' conditional line for fdupes and %{buildroot} cleaning in %install section.
Comment 17 Andreas Schneider 2013-11-28 04:05:19 EST
* Thu Nov 28 2013 - Andreas Schneider <asn@redhat.com> - 0.0.1-6.20131123gitdb80fc
- Remove EPEL support.

Spec URL: http://xor.cryptomilk.org/rpm/powerline/powerline.spec
SRPM URL: http://xor.cryptomilk.org/rpm/powerline/powerline-0.0.1-6.20131123gitdb80fc.fc19.src.rpm
Comment 18 Antonio Trande 2013-11-28 09:21:24 EST
Remove BuildRoot line.

Package approved !
Comment 19 Andreas Schneider 2013-11-29 05:52:45 EST
New Package SCM Request
=======================
Package Name: powerline
Short Description: The ultimate status-line/prompt utility
Owners: asn
Branches: f19 f20
InitialCC:
Comment 20 Gwyn Ciesla 2013-12-01 16:48:28 EST
Git done (by process-git-requests).
Comment 21 Fedora Update System 2013-12-02 11:25:32 EST
powerline-0.0.1-6.20131123gitdb80fc.fc20 has been submitted as an update for Fedora 20.
https://admin.fedoraproject.org/updates/powerline-0.0.1-6.20131123gitdb80fc.fc20
Comment 22 Fedora Update System 2013-12-02 11:36:17 EST
powerline-0.0.1-6.20131123gitdb80fc.fc19 has been submitted as an update for Fedora 19.
https://admin.fedoraproject.org/updates/powerline-0.0.1-6.20131123gitdb80fc.fc19
Comment 23 Fedora Update System 2013-12-02 18:52:26 EST
powerline-0.0.1-6.20131123gitdb80fc.fc20 has been pushed to the Fedora 20 testing repository.
Comment 24 Fedora Update System 2013-12-11 21:55:14 EST
powerline-0.0.1-6.20131123gitdb80fc.fc19 has been pushed to the Fedora 19 stable repository.
Comment 25 Fedora Update System 2013-12-13 22:07:13 EST
powerline-0.0.1-6.20131123gitdb80fc.fc20 has been pushed to the Fedora 20 stable repository.

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