Bug 977638 - Review Request: python-espeak - Python bindings for espeak
Review Request: python-espeak - Python bindings for espeak
Product: Fedora
Classification: Fedora
Component: Package Review (Show other bugs)
All Linux
unspecified Severity medium
: ---
: ---
Assigned To: Eduardo Echeverria
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2013-06-24 23:21 EDT by Eduardo Mayorga
Modified: 2014-04-17 15:41 EDT (History)
4 users (show)

See Also:
Fixed In Version: python-espeak-0.5-7.el6
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2014-03-23 00:39:40 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
echevemaster: fedora‑review+
limburgher: fedora‑cvs+

Attachments (Terms of Use)

  None (edit)
Description Eduardo Mayorga 2013-06-24 23:21:16 EDT
Spec URL: https://dl.dropboxusercontent.com/u/29661704/python-espeak.spec
SRPM URL: https://dl.dropboxusercontent.com/u/29661704/python-espeak-0.4-1.fc18.src.rpm
Description: Simple to use yet complete Python bindings for the eSpeak speech synthesizer.
Fedora Account System Username: mayorgalinux
Koji build task: http://koji.fedoraproject.org/koji/taskinfo?taskID=5538107

This is my first package and I'm looking for sponsor.
Comment 1 Eduardo Echeverria 2013-06-24 23:25:37 EDT
Hi namesake :)
Please put the blocks FE-NEEDSPONSOR.
see => https://fedoraproject.org/wiki/Package_Review_Process#Contributor
Comment 2 marcindulak 2013-06-25 09:54:24 EDT

some informal comments:

- spec file from URL and SRPM differ

- URL contains spurious characters: URL:            https://launchpad.net/python-espeak‎

- use correct abbreviation: License:        GPLv3
  For a list see https://fedoraproject.org/wiki/Licensing:Main?rd=Licensing#Good_Licenses
  Project website states: GNU GPL v3
- i don't think BR:  python-setuptools is needed?

- R: espeak is needed. I don't see espeak on EPEL for el5, but i see it here: http://repos.jethrocarr.com/pub/amberdms/linux/centos/5/amberdms-os/SRPMS/ Maybe drop el5?

- if we drop el5, so not needed anymore:
  BuildRoot:		%{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
Comment 3 marcindulak 2013-06-27 08:41:13 EDT
Just want to add - i'm not a sponsor - cannot review this request formally
(the rules at http://fedoraproject.org/wiki/Package_Review_Process#Reviewer)
Comment 5 Eduardo Echeverria 2013-06-30 02:15:28 EDT
Hi @Eduardo
about this lines.
%{!?python_sitearch: %global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")}
are used only for el5 packages, since Fedora 13 or greater this macro can be defined for you, so as you has used it in your spec.

You can test with that, open a terminal and invoke the python interpreter,
$ python

Python 2.7.5 (default, May 16 2013, 13:44:12) 
[GCC 4.8.0 20130412 (Red Hat 4.8.0-2)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from distutils.sysconfig import get_python_lib; print(get_python_lib(1))

now, check the out of this rpm macro 
 rpm -E %{python_sitearch}

do you see that why don't is necessary repeat it?

for more information, please see: https://fedoraproject.org/wiki/Packaging:Python#Macros

Buildroot isn't necessary for fedora packages, only for el5 packages, also you could want to test the package against python2.4 in el5(the default version installed). if this package is relatively new maybe don't works in that version.

Obviously you can ship the package for el6, in this moment the el6's packaging guidelines not differ from Fedora

BuildRequires:  gcc-c++
this BR is implicit, are considered part of the minimum build environment
see: http://fedoraproject.org/wiki/Packaging:Guidelines#Exceptions_2

%defattr(-,root,root) isn't needed

rpmlint output: 
python-espeak.x86_64: E: non-standard-executable-perm /usr/lib64/python2.7/site-packages/espeak/core.so 0775L
please fix it

A question, What is the need of using fdupe?

Cheers -
Comment 6 Eduardo Echeverria 2013-06-30 02:32:56 EDT
I can sponsor it you, but first I like see you involved in the review of other packagers
Comment 8 Christopher Meng 2013-07-19 00:13:20 EDT
Please remove buildroot tag.

I think you copied the spec for opensuse, as Fedora seldom has packages using %fdupes.
Comment 10 Christopher Meng 2013-07-20 22:51:18 EDT
What about the fdupes? There is no macro %fdupes in the RPM building environment. 

Hey man, are you serious?
Comment 11 Eduardo Echeverria 2013-07-20 23:38:01 EDT
@cicku, take it easy, ...if you want really give help, try of give support at the new packager rather than harass, @Eduardo, if a packager does a question, your duty is to answer, is the only way that you demonstrate sufficient knowledge to be packager.

So, I ask again; What is the need of using fdupe?
Comment 12 Eduardo Mayorga 2013-07-21 00:03:49 EDT
It's no needed, but I used it in order to reduce package size by making hardlinks to duplicated files. I realized there are no duplicated files, so I removed it.
Comment 14 Eduardo Echeverria 2014-01-10 21:43:42 EST
Please update the source https://launchpad.net/python-espeak/trunk/0.5/+download/python-espeak-0.5.tar.gz and use %{_python2} macro http://fedoraproject.org/wiki/Packaging:Python#Macros %{__python} is deprecated just now
Comment 15 Eduardo Echeverria 2014-01-10 22:02:21 EST
rpmlint -v python-espeak-0.4-5.fc21.src.rpm 
python-espeak.src: I: checking
python-espeak.src: I: checking-url https://launchpad.net/python-espeak‎ (timeout 10 seconds)
python-espeak.src: W: invalid-url URL: https://launchpad.net/python-espeak‎ HTTP Error 404: Not Found
python-espeak.src:34: W: macro-in-%changelog %fdupes
python-espeak.src:35: W: macro-in-%changelog %{name}
python-espeak.src:41: W: macro-in-%changelog %{python_sitearch}
python-espeak.src:44: W: macro-in-%changelog %defattr
python-espeak.src:48: W: macro-in-%changelog %{__python}
python-espeak.src:48: W: macro-in-%changelog %build
python-espeak.src: I: checking-url http://launchpad.net/python-espeak/trunk/0.4/+download/python-espeak-0.4.tar.gz (timeout 10 seconds)
1 packages and 0 specfiles checked; 0 errors, 7 warnings.

Please escape macros and fix permissions and url, and remove bundle egg in %prep
Comment 16 Volker Fröhlich 2014-01-14 08:44:43 EST
License is GPLv3+, according to the files. Use the licensecheck utility to find that out comfortably. Will it work for Python 3 too?
Comment 17 Eduardo Mayorga 2014-01-14 14:41:01 EST
%{python_sitearch}/python_espeak-%{version}-py%{python_version}.egg-info is metadata generated by setuptools. It's deleted at %clean time.

More fixes:
Comment 18 Christopher Meng 2014-01-14 19:59:25 EST
Why not use python2 macro in %install?

Plus, %python_sitearch need to be %python2_sitearch. %python_version need to be %python2_version.
Comment 19 Eduardo Echeverria 2014-01-14 22:15:13 EST
Hi @eduardo.
- take into account that macros in comments and changelogs must be escaped- use two '%'s to escape them. i.e. 
* Sat Jul 20 2013 Eduardo Mayorga Téllez <mayorga@fedoraproject.org> - 0.4-5
- Remove %%fdupes macro
- Use %%{name} macro in Source tag 
- I don't see any removed egg-file on %prep- i.e
%setup -q -n %{pkgname}-%{version}
# Remove bundled egg-info
rm -rf python-espeak.egg-info

- Please fix the permissions of /usr/lib64/python2.7/site-packages/espeak/core.so
chmod 755 probably can be fix the problem

- @ciku i can't see any reference to use %python2_sitearch in http://fedoraproject.org/wiki/Packaging:Python#Macros. just advised the use of %{_python2}

- please delete the Ctrl+R ('LEFT-TO-RIGHT MARK' (U+200E)) of the url, because that you are obtaining a wrong url in rpmlint

- the spec that you paste on the review must be the same of you have in SRPM, please fix.

Diff spec file in url and in SRPM
--- /home/echevemaster/test-packages-fedora/977638-python-espeak/srpm/python-espeak.spec        2014-01-14 22:01:33.793797415 -0430
+++ /home/echevemaster/test-packages-fedora/977638-python-espeak/srpm-unpacked/python-espeak.spec       2014-01-14 14:41:16.000000000 -0430
@@ -5,5 +5,5 @@
 License:        GPLv3+
-URL:            https://launchpad.net/python-espeak
+URL:            https://launchpad.net/python-espeak<U+200E>
 Source0:        http://launchpad.net/%{name}/trunk/%{version}/+download/%{name}-%{version}.tar.gz
Comment 20 Christopher Meng 2014-01-15 19:14:41 EST
Oh? Guidelines doesn't mention it, so is it the best currently? 

No, when we move to python3 stack entirely, I don't know if the python macros without version will be set to python3 also or not. So it's better to replace all python2 unversioned macros to explicit versioned ones.
Comment 21 Eduardo Mayorga 2014-01-20 19:41:17 EST
This package works well with Python 3, so now the spec includes a subpackage. Fixed all rpmlint warnings.

Spec URL: https://dl.dropboxusercontent.com/u/29661704/0/2/python-espeak.spec
SRPM URL: https://dl.dropboxusercontent.com/u/29661704/0/2/python-espeak-0.5-2.fc20.src.rpm
Comment 22 Volker Fröhlich 2014-01-21 03:12:08 EST
Drop "-n %{name}-%{version}" because that's the default.

%global with_python3 0 -- Why didn't you set that to 1?

I think you missed the changes to the prep section: http://fedoraproject.org/wiki/Packaging:Python#Building_more_than_once
Comment 23 Michael Schwendt 2014-01-21 06:40:47 EST
> Drop "-n %{name}-%{version}" because that's the default.

It's the default, but several packagers want to keep it in the spec file nevertheless, because for the next snapshot or pre-release it may be necessary to specify the -n path.
Comment 24 Eduardo Echeverria 2014-01-21 17:42:35 EST
Hi Eduardo 
has seen if the subpackage are built?
if you put with_python3 1 without to do the changes on %prep, py3 directory doesn't will be found.

so add on %prep

%if 0%{?with_python3}
rm -rf %{py3dir}
cp -a . %{py3dir}
find %{py3dir} -name '*.py' | xargs sed -i '1s|^#!python|#!%{__python3}|'
%endif # with_python3

are in both packages 
you need set permissions for both

if you will build for epel you should take into acount that python2 macro doesn't exist in epel.
here you go a workaround
%{!?__python2: %global __python2 %{__python}}
Comment 25 Eduardo Mayorga 2014-02-08 20:03:41 EST
Spec: https://dl.dropboxusercontent.com/u/29661704/0/3/python-espeak.spec
SRPM: https://dl.dropboxusercontent.com/u/29661704/0/3/python-espeak.spec

Now it buils. The source code does not provide a test suite.
Comment 26 Eduardo Mayorga 2014-02-10 18:32:13 EST
Sorry for copying the same link above. Here is the right one:
Spec: https://dl.dropboxusercontent.com/u/29661704/0/3/python-espeak-0.5-3.fc20.src.rpm
SRPM: https://dl.dropboxusercontent.com/u/29661704/0/3/python-espeak-0.5-3.fc20.src.rpm
Comment 27 Christopher Meng 2014-02-10 19:14:33 EST
(In reply to Eduardo Mayorga from comment #26)
> Sorry for copying the same link above. Here is the right one:
> Spec:
> https://dl.dropboxusercontent.com/u/29661704/0/3/python-espeak-0.5-3.fc20.
> src.rpm
> https://dl.dropboxusercontent.com/u/29661704/0/3/python-espeak-0.5-3.fc20.
> src.rpm

Comment 28 Eduardo Echeverria 2014-02-10 19:20:26 EST
I think you did it again ;) also, the links are in 404 status
Comment 30 Christopher Meng 2014-02-10 20:37:19 EST
Still has problems:

1. Missing Requires:	espeak in python3 package.

2. No matter python3 package enabled or not, please do this at first:

# Remove bundled egg-info
rm -rf python-espeak.egg-info

3. Summaries/descriptions need improvement:

%if 0%{?with_python3}
%package -n python3-espeak
Summary:	Python bindings for espeak


%if 0%{?with_python3}
%package -n python3-espeak
Summary:	Python 3 bindings for espeak

Same to the main python2 version.

4. %{buildroot}/%{python3_sitearch}



Apply to others.

Comment 31 Eduardo Mayorga 2014-02-11 19:00:02 EST
(IMHO) someone should enable a Bugzilla feature for comment editing.
New Spec: http://mayorga.fedorapeople.org/python-espeak.spec
New SRPM: http://mayorga.fedorapeople.org/python-espeak-0.5-4.fc20.src.rpm
Comment 32 Christopher Meng 2014-02-13 22:59:05 EST
I don't quite understand the logic here:

%setup -q -n %{name}-%{version}

%if 0%{?with_python3}
# Remove bundled egg-info
rm -rf python-espeak.egg-info

rm -rf %{py3dir}
cp -a . %{py3dir}
find %{py3dir} -name '*.py' | xargs sed -i '1s|^#!python|#!%{__python3}|'
%endif # with_python3

# Remove bundled egg-info
rm -rf python-espeak.egg-info

Why not:

%setup -q -n %{name}-%{version}
rm -rf python-espeak.egg-info

%if 0%{?with_python3}
rm -rf %{py3dir}
cp -a . %{py3dir}
find %{py3dir} -name '*.py' | xargs sed -i '1s|^#!python|#!%{__python3}|'
%endif # with_python3

Eggs need to be erased without any conditions.

I will leave the rest to the E.E.
Comment 33 Eduardo Echeverria 2014-02-17 22:35:25 EST
Yes, if you erase the egg before of the conditional, it is logical that you will obtain a source for both (py2 and py3) without the eggs, so, this is just to redound.

Other thing, isn't needed use wildcards when you listed the directories. %{python2_sitearch}/espeak/*

I hope your changes. 

@cicku many thanks for your comments.
Comment 36 Eduardo Echeverria 2014-03-08 01:10:31 EST
Sorry for delay, i was a bit offline due to some work things
Let's go with the review. 

Package Review

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

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

[x]: Package does not contain kernel modules.
[x]: Package contains no static executables.
[-]: Development (unversioned) .so files in -devel subpackage, if present.
     Note: Unversioned so-files in private %_libdir subdirectory (see
     attachment). Verify they are not in ld path.
[x]: Package does not contain any libtool archives (.la)
[x]: Rpath absent or only used for internal libs.

[x]: Package is licensed with an open-source compatible license and meets
     other legal requirements as defined in the legal section of Packaging
[x]: License field in the package spec file matches the actual license.
     Note: Checking patched sources after %prep for licenses. Licenses found:
     "GPL (v3 or later)", "Unknown or generated". 2 files have unknown
     license. Detailed output of licensecheck in /home/echevemaster/test-
[x]: License file installed when any subpackage combination is installed.
[x]: %build honors applicable compiler flags or justifies otherwise.
[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]: Useful -debuginfo package or justification otherwise.
[x]: Package is not known to require an ExcludeArch tag.
[-]: Large documentation must go in a -doc subpackage. Large could be size
     (~1MB) or number of files.
     Note: Documentation size is 81920 bytes in 4 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 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]: 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
[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
[x]: File names are valid UTF-8.
[x]: Packages must not store files under /srv, /opt or /usr/local

[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]: Package contains BR: python2-devel or python3-devel
[x]: Binary eggs must be removed in %prep

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

[-]: 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
[?]: Package functions as described.
[x]: Latest version is packaged.
[x]: Package does not include license text files separate from upstream.
[-]: 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
[-]: %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
[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 =====

[x]: Rpmlint is run on all installed packages.
     Note: No rpmlint messages.
[x]: Large data in /usr/share should live in a noarch subpackage if package is
[x]: Spec file according to URL is the same as in SRPM.

Checking: python-espeak-0.5-6.fc21.x86_64.rpm
python-espeak.src: W: strange-permission python-espeak.spec 0666L
python-espeak.src: W: strange-permission python-espeak-0.5.tar.gz 0666L
3 packages and 0 specfiles checked; 0 errors, 2 warnings.

Rpmlint (installed packages)
# rpmlint python3-espeak python-espeak
2 packages and 0 specfiles checked; 0 errors, 0 warnings.
# echo 'rpmlint-done:'

python3-espeak (rpmlib, GLIBC filtered):

python-espeak (rpmlib, GLIBC filtered):



Unversioned so-files
python-espeak: /usr/lib64/python2.7/site-packages/espeak/core.so
python3-espeak: /usr/lib64/python3.3/site-packages/espeak/core.cpython-33m.so

Source checksums
http://launchpad.net/python-espeak/trunk/0.5/+download/python-espeak-0.5.tar.gz :
  CHECKSUM(SHA256) this package     : bf471ecd7b1a08a32b1b01e8f2453f817bebbeeb45734d566378dc20a90295bb
  CHECKSUM(SHA256) upstream package : bf471ecd7b1a08a32b1b01e8f2453f817bebbeeb45734d566378dc20a90295bb

Generated by fedora-review 0.5.1 (bb9bf27) last change: 2013-12-13
Command line :/usr/bin/fedora-review -b 977638 -m fedora-rawhide-x86_64
Buildroot used: fedora-rawhide-x86_64
Active plugins: Python, Generic, Shell-api, C/C++
Disabled plugins: Java, SugarActivity, fonts, Haskell, Ocaml, Perl, R, PHP, Ruby




Follow the process from: 

If you have any questions , feel free to contact me through my email or in the irc channel #fedora-devel, my nick is echevemaster
Comment 37 Eduardo Echeverria 2014-03-08 01:25:52 EST
Eduardo, your provided username mayorgalinux is inactive do you have another username named mayorga.so at this I applied your new packager status. Based in your bugzilla email and matching it with your account in FAS accounts
Comment 38 Eduardo Mayorga 2014-03-08 10:47:46 EST
New Package SCM Request
Package Name: python-espeak
Short Description: Python bindings for espeak
Owners: mayorga
Branches: f19 f20 el6
Comment 39 Gwyn Ciesla 2014-03-10 07:54:55 EDT
Git done (by process-git-requests).
Comment 40 Fedora Update System 2014-03-10 16:06:08 EDT
python-espeak-0.5-6.fc20 has been submitted as an update for Fedora 20.
Comment 41 Fedora Update System 2014-03-10 16:07:15 EDT
python-espeak-0.5-6.fc19 has been submitted as an update for Fedora 19.
Comment 42 Fedora Update System 2014-03-12 08:23:34 EDT
python-espeak-0.5-6.fc19 has been pushed to the Fedora 19 testing repository.
Comment 43 Fedora Update System 2014-03-23 00:39:40 EDT
python-espeak-0.5-6.fc19 has been pushed to the Fedora 19 stable repository.
Comment 44 Fedora Update System 2014-03-23 00:47:28 EDT
python-espeak-0.5-6.fc20 has been pushed to the Fedora 20 stable repository.
Comment 45 Fedora Update System 2014-03-29 16:45:08 EDT
python-espeak-0.5-7.el6 has been submitted as an update for Fedora EPEL 6.
Comment 46 Fedora Update System 2014-04-17 15:41:35 EDT
python-espeak-0.5-7.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.