Bug 1274645 - Review Request: python-faker - Faker is a Python package that generates fake data for you
Review Request: python-faker - Faker is a Python package that generates fake ...
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: Package Review (Show other bugs)
rawhide
All Linux
medium Severity medium
: ---
: ---
Assigned To: William Moreno
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2015-10-23 05:00 EDT by Juan Orti
Modified: 2015-11-14 21:19 EST (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2015-11-14 19:23:18 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
williamjmorenor: fedora‑review+


Attachments (Terms of Use)

  None (edit)
Description Juan Orti 2015-10-23 05:00:47 EDT
Spec URL: https://jorti.fedorapeople.org/python-faker/python-faker.spec
SRPM URL: https://jorti.fedorapeople.org/python-faker/python-faker-0.5.3-1.fc23.src.rpm
Description: Faker is a Python package that generates fake data for you. Whether you need to bootstrap your database, create good-looking XML documents, fill-in your persistence to stress test it, or anonymize data taken from a production service, Faker is for you.

Faker is heavily inspired by PHP's Faker, Perl's Data::Faker, and by ruby's Faker.

Fedora Account System Username: jorti
Comment 1 William Moreno 2015-10-28 17:59:05 EDT
Package Review
==============
1- Are you going to Fedora 22 or Epel6? if not you do not need the python3 conditionals, Epel7 have python3 supports

2- Good job in avoiding the colision in but i will recommeds to call the python3 executable a just "faker" and the python2 executable "faker-py2"

3- There is not more python-%{name} packages, python libs than support both python version must provide pythn2-{name} and python3-{name} subpackages and use the python-provides macro, see:

https://fedoraproject.org/wiki/Packaging:Python#The_.25python_provide_macro

I will recomend to se python spec sample:
https://fedoraproject.org/wiki/Packaging:Python#Example_common_spec_file

4- You can make a unix manpage and push it to uptream using manedit available in Fedora repos with this info:
https://github.com/joke2k/faker#command-line-usage

Test Builds:
http://s390.koji.fedoraproject.org/koji/taskinfo?taskID=1973563
http://ppc.koji.fedoraproject.org/koji/taskinfo?taskID=2843183
http://arm.koji.fedoraproject.org/koji/taskinfo?taskID=3256187
http://koji.fedoraproject.org/koji/taskinfo?taskID=11617474

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

Python:
[Pass]: Python eggs must not download any dependencies during the build
        process.
[Pass]: A package which is used by another package via an egg interface should
        provide egg info.
[Fail]: Package meets the Packaging Guidelines::Python
[Pass]: Package contains BR: python2-devel or python3-devel
[Pass]: Binary eggs must be removed in %prep

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

===== EXTRA items =====
Generic:
[Pass]: Rpmlint is run on all installed packages.
        Note: There are rpmlint messages (see attachment).
[Pass]: Spec file according to URL is the same as in SRPM.

Rpmlint
-------
Checking: python-faker-0.5.3-1.fc24.noarch.rpm
          python3-faker-0.5.3-1.fc24.noarch.rpm
          python-faker-0.5.3-1.fc24.src.rpm
python-faker.noarch: W: spelling-error %description -l en_US anonymize -> anonymity
python-faker.noarch: W: no-manual-page-for-binary python-faker
python3-faker.noarch: W: spelling-error %description -l en_US anonymize -> anonymity
python3-faker.noarch: W: no-manual-page-for-binary python3-faker
python-faker.src: W: spelling-error %description -l en_US anonymize -> anonymity
3 packages and 0 specfiles checked; 0 errors, 5 warnings.

Rpmlint (installed packages)
----------------------------
python-faker.noarch: W: no-manual-page-for-binary python-faker
python3-faker.noarch: W: no-manual-page-for-binary python3-faker
2 packages and 0 specfiles checked; 0 errors, 2 warnings.

Requires
--------
python-faker (rpmlib, GLIBC filtered):
    /usr/bin/python2
    python(abi)

python3-faker (rpmlib, GLIBC filtered):
    /usr/bin/python3
    python(abi)

Provides
--------
python-faker:
    python-faker

python3-faker:
    python3-faker

Source checksums
----------------
https://github.com/joke2k/faker/archive/v0.5.3.tar.gz :
  CHECKSUM(SHA256) this package     : 4573bb51f30f0dcec905561099aacd5f8baea2be01c020b8055dc0ebfca3d7b3
  CHECKSUM(SHA256) upstream package : 4573bb51f30f0dcec905561099aacd5f8baea2be01c020b8055dc0ebfca3d7b3
Comment 2 Upstream Release Monitoring 2015-10-28 18:00:30 EDT
williamjmorenor's scratch build of python-faker-0.5.3-1.fc23.src.rpm for rawhide completed http://koji.fedoraproject.org/koji/taskinfo?taskID=11617474
Comment 3 Juan Orti 2015-10-29 04:45:58 EDT
Hi, thanks for taking this review.

I've updated the spec according your suggestions, I have also opened a bug to ask upstream about the documentation problem:
https://github.com/joke2k/faker/issues/291

Spec URL: https://jorti.fedorapeople.org/python-faker/python-faker.spec
SRPM URL: https://jorti.fedorapeople.org/python-faker/python-faker-0.5.3-2.fc23.src.rpm
Comment 4 William Moreno 2015-10-29 15:30:16 EDT
Looks good

Consider to build the documentation files your selft and include it as Source1 and then just copy it in the BuildRoot, also this documentation must be in a -docs subpackage.

Upstream provides some test in the tarball, after %%install run this check in the spec.
Comment 5 Juan Orti 2015-10-30 09:31:02 EDT
I was able to build the documentation changing the PYTHONPATH variable, but the tests are failing. I have asked upstream for help in the issue 292: https://github.com/joke2k/faker/issues/292

Spec URL: https://jorti.fedorapeople.org/python-faker/python-faker.spec
SRPM URL: https://jorti.fedorapeople.org/python-faker/python-faker-0.5.3-3.fc23.src.rpm
Comment 6 William Moreno 2015-10-30 11:28:16 EDT
Good job building the doc, please note:

The man page must be in the same package of the executable under %{_bindir}, the idea is to have the manpage available to get info about a command without the need of install aditional packages.

Move the docs/_build/html and docs/_build/text directoriies to the top of your BuildRoot with mv.

pushd docs
PYTHONPATH='..' %make_build html
PYTHONPATH='..' %make_build text
PYTHONPATH='..' %make_build man
find . -type f -name '.buildinfo' -delete
mv _build/html ../
mv _build/text ../
popd

You are duplicanting files this files: README.rst CHANGELOG.rst CONTRIBUTING.rst

You can leave the doc subpackage with just:

%files doc
%doc html text

The license file with be instaled with the python2 or python3 rpm so the doc subpackage do not need to ship the license file.

With have weak depencies in Fedora, in booth python2 and python3 packages include:

Enhances: %{name}-doc%{?_isa} = %{version}-%{release}

Will be nice to run the test in the packaging process but I will no block this review for that, just inclue the %%check section in the spec with a link to the issue in github.

Remember than if you change the source from github to pypi you will need to remove the blunded egg.info in prep.
Comment 7 Juan Orti 2015-11-04 03:43:32 EST
(In reply to William Moreno from comment #6)
> Good job building the doc, please note:
> 
> The man page must be in the same package of the executable under %{_bindir},
> the idea is to have the manpage available to get info about a command
> without the need of install aditional packages.

Now I install the man page for both executables.

> Move the docs/_build/html and docs/_build/text directoriies to the top of
> your BuildRoot with mv.
> 
> pushd docs
> PYTHONPATH='..' %make_build html
> PYTHONPATH='..' %make_build text
> PYTHONPATH='..' %make_build man
> find . -type f -name '.buildinfo' -delete
> mv _build/html ../
> mv _build/text ../
> popd

I don't think this is necessary, as %doc copies the content to the %_docdir with the same result as your suggestion:

$ rpmls python-faker-doc-0.5.3-4.fc23.noarch.rpm | head
drwxr-xr-x  /usr/share/doc/python-faker-doc
-rw-r--r--  /usr/share/doc/python-faker-doc/CHANGELOG.rst
-rw-r--r--  /usr/share/doc/python-faker-doc/CONTRIBUTING.rst
-rw-r--r--  /usr/share/doc/python-faker-doc/README.rst
drwxr-xr-x  /usr/share/doc/python-faker-doc/html
drwxr-xr-x  /usr/share/doc/python-faker-doc/html/_sources
-rw-r--r--  /usr/share/doc/python-faker-doc/html/_sources/coding_style.txt
-rw-r--r--  /usr/share/doc/python-faker-doc/html/_sources/index.txt
drwxr-xr-x  /usr/share/doc/python-faker-doc/html/_sources/locales
-rw-r--r--  /usr/share/doc/python-faker-doc/html/_sources/locales.txt


> You are duplicanting files this files: README.rst CHANGELOG.rst
> CONTRIBUTING.rst

Moved to the doc package.


> With have weak depencies in Fedora, in booth python2 and python3 packages
> include:
> 
> Enhances: %{name}-doc%{?_isa} = %{version}-%{release}

Enhances should be in the doc package, right? Anyway, I have chosen to use the Suggests tag.

> Will be nice to run the test in the packaging process but I will no block
> this review for that, just inclue the %%check section in the spec with a
> link to the issue in github.

Ok, I have left it commented.

> 
> Remember than if you change the source from github to pypi you will need to
> remove the blunded egg.info in prep.

Ok.


Spec URL: https://jorti.fedorapeople.org/python-faker/python-faker.spec
SRPM URL: https://jorti.fedorapeople.org/python-faker/python-faker-0.5.3-4.fc23.src.rpm
Comment 8 William Moreno 2015-11-04 09:48:30 EST
Package Aproved
===============

Test Builds:
http://copr.fedoraproject.org/coprs/williamjmorenor/fedora-review-test/build/132602/

Note than the CSM Request have been deprecated, you must login in the pkgdb and request a new package from the main page:

https://admin.fedoraproject.org/pkgdb/request/package/
Comment 9 Gwyn Ciesla 2015-11-04 19:59:14 EST
Package request has been approved: https://admin.fedoraproject.org/pkgdb/package/python-faker
Comment 10 Fedora Update System 2015-11-05 03:53:36 EST
python-faker-0.5.3-4.fc23 has been submitted as an update to Fedora 23. https://bodhi.fedoraproject.org/updates/FEDORA-2015-132b971842
Comment 11 Fedora Update System 2015-11-05 03:56:14 EST
python-faker-0.5.3-4.fc22 has been submitted as an update to Fedora 22. https://bodhi.fedoraproject.org/updates/FEDORA-2015-801ccb446d
Comment 12 Fedora Update System 2015-11-05 19:51:09 EST
python-faker-0.5.3-4.fc22 has been pushed to the Fedora 22 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 'dnf --enablerepo=updates-testing update python-faker'
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2015-801ccb446d
Comment 13 Fedora Update System 2015-11-05 21:35:20 EST
python-faker-0.5.3-4.fc23 has been pushed to the Fedora 23 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 'dnf --enablerepo=updates-testing update python-faker'
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2015-132b971842
Comment 14 Fedora Update System 2015-11-14 19:23:16 EST
python-faker-0.5.3-4.fc23 has been pushed to the Fedora 23 stable repository. If problems still persist, please make note of it in this bug report.
Comment 15 Fedora Update System 2015-11-14 21:19:47 EST
python-faker-0.5.3-4.fc22 has been pushed to the Fedora 22 stable repository. If problems still persist, please make note of it in this bug report.

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