Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 770765 - Review Request: python3-modgrammar - Modular grammar-parsing engine
Summary: Review Request: python3-modgrammar - Modular grammar-parsing engine
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: Package Review
Version: rawhide
Hardware: All
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Nobody's working on this, feel free to take it
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: FE-DEADREVIEW
TreeView+ depends on / blocked
 
Reported: 2011-12-29 02:27 UTC by Pavel Šimerda (pavlix)
Modified: 2015-12-11 16:14 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-12-11 16:14:40 UTC


Attachments (Terms of Use)
This is a specfile I'm currently using for testing... (deleted)
2012-07-04 22:55 UTC, Pavel Šimerda (pavlix)
no flags Details

Description Pavel Šimerda (pavlix) 2011-12-29 02:27:30 UTC
Spec URL: http://data.pavlix.net/fedora/python3-modgrammar.spec
SRPM URL: http://data.pavlix.net/fedora/python3-modgrammar-0.8-2.fc16.src.rpm
Description: 

Modgrammar is a general-purpose library for constructing language parsers and
interpreters using context-free grammar definitions in Python. Language parsing
rules (grammars) can be defined using standard Python syntax, and then used to
parse and validate input strings or files into meaningful data structures.
Possible applications range from simple input validation, to complex expression
evaluation, to full-fledged programming language parsing for compilers or
interpreters.

Comment 1 Spencer Jackson 2011-12-30 04:44:33 UTC
I'm not able to give you a formal review, but I was able to look over your package and go over the checklist. I hope this helps!

MUST: rpmlint must be run on the source rpm and all binary rpms the build produces. The output should be posted in the review.

[makerpm@khezef rpmbuild]$ rpmlint SPECS/python3-modgrammar.spec RPMS/noarch/python3-modgrammar-0.8-2.fc16.noarch.rpm SRPMS/python3-modgrammar-0.8-2.fc16.src.rpm python3-modgrammar
python3-modgrammar.noarch: W: spelling-error %description -l en_US parsers -> parser, parses, parers
python3-modgrammar.src: W: spelling-error %description -l en_US parsers -> parser, parses, parers
python3-modgrammar.noarch: W: spelling-error %description -l en_US parsers -> parser, parses, parers
3 packages and 1 specfiles checked; 0 errors, 3 warnings.

MUST: The package must be named according to the Package Naming Guidelines .
OK. Name contains only ASCII characters. Name 'modgrammar' matches with upstream project, python3 prefix correctly attached. Specfile correctly named. Version is numeric, so version and release tags are trivially correct. There does exist a doc subdirectory full of rst files in the source tarball. Consider packaging it? There's ~70K of unprocessed documentation so maybe consider a doc subpackage?

MUST: The spec file name must match the base package %{name}, in the format %{name}.spec unless your package has an exemption.
OK.

MUST: The package must meet the Packaging Guidelines .
FIXME. BSD is a valid license. No external components, or included 3rd party components. Spec is legible. Built successfully on x86_64. Doesn't install anything outside of %{python3_sitelib}, thus adhering to the LHS. Tags used correctly. No Requires are used. egg-info is installed as documentation. Google indicates this folder is used for pkg_resources? It probably shouldn't be documentation... http://fedoraproject.org/wiki/Packaging:Python_Eggs has an example of it... Also looks like you have a few unowned directories. %{python3_sitelib}/modgrammar-0.8-py3.2.egg-info/, %{python3_sitelib}/modgrammar/__pycache__/,  and %{python3_sitelib}/modgrammar/ don't belong to your package, and they should. Maybe use a wildcard in %{python3_sitelib} to grab everything? The patch should have a comment describing its upstream status. Test suite should be invoked in a %check section.

MUST: The package must be licensed with a Fedora approved license and meet the Licensing Guidelines .
FIXME. BSD is an approved license. Source package does not contain the text of the license. Contact upstream and ask for this to be corrected. Note that the license is not contained in the source files.

MUST: The License field in the package spec file must match the actual license.
Unknown. setup.py says 'BSD' but that doesn't tell us what kind of BSD...

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 must be included in %doc.
It doesn't.

MUST: The spec file must be written in American English.
OK.

MUST: The spec file for the package MUST be legible.
OK.

MUST: The sources used to build the package must match the upstream source, as provided in the spec URL. Reviewers should use md5sum for this task. If no upstream URL can be specified for this package, please see the Source URL Guidelines for how to deal with this.
OK. Sources and upstream source have md5sum 74c8db3b4276bb49a2c11934ada33762.

MUST: The package MUST successfully compile and build into binary rpms on at least one primary architecture.
OK. Built on x86_64

MUST: If the package does not successfully compile, build or work on an architecture, then those architectures should be listed in the spec in ExcludeArch. Each architecture listed in ExcludeArch MUST have a bug filed in bugzilla, describing the reason that the package does not compile/build/work on that architecture. The bug number MUST be placed in a comment, next to the corresponding ExcludeArch line.
NA I do not have access to any other architectures. But it's noarch, so that should be alright.

MUST: If the package does not successfully compile, build or work on an architecture, then those architectures should be listed in the spec in ExcludeArch. Each architecture listed in ExcludeArch MUST have a bug filed in bugzilla, describing the reason that the package does not compile/build/work on that architecture. The bug number MUST be placed in a comment, next to the corresponding ExcludeArch line.
OK.

MUST: The spec file MUST handle locales properly. This is done by using the %find_lang macro. Using %{_datadir}/locale/* is strictly forbidden.
OK. No locales

MUST: Every binary RPM package (or subpackage) which stores shared library files (not just symlinks) in any of the dynamic linker's default paths, must call ldconfig in %post and %postun.
OK. No shared libraries.

MUST: Packages must NOT bundle copies of system libraries.
OK.

MUST: If the package is designed to be relocatable, the packager must state this fact in the request for review, along with the rationalization for relocation of that specific package. Without this, use of Prefix: /usr is considered a blocker.
OK. Not designed to be relocatable.

MUST: A package must own all directories that it creates. If it does not create a directory that it uses, then it should require a package which does create that directory.
FIXME. See above.

MUST: A Fedora package must not list a file more than once in the spec file's %files listings. (Notable exception: license texts in specific situations)
OK.

MUST: Permissions on files must be set properly. Executables should be set with executable permissions, for example.
OK.

MUST: Each package must consistently use macros.
OK.

MUST: The package must contain code, or permissable content.
OK.

MUST: Large documentation files must go in a -doc subpackage. (The definition of large is left up to the packager's best judgement, but is not restricted to size. Large can refer to either size or quantity).
OPTIONAL. See above.

MUST: If a package includes something as %doc, it must not affect the runtime of the application. To summarize: If it is in %doc, the program must run properly if it is not present.
FIXME: See above.

MUST: Header files must be in a -devel package.
OK.

MUST: Static libraries must be in a -static package.
OK.

MUST: If a package contains library files with a suffix (e.g. libfoo.so.1.1), then library files that end in .so (without suffix) must go in a -devel package.
OK.

MUST: In the vast majority of cases, devel packages must require the base package using a fully versioned dependency: Requires: %{name}%{?_isa} = %{version}-%{release}
OK.

MUST: Packages must NOT contain any .la libtool archives, these must be removed in the spec if they are built.
OK

MUST: Packages containing GUI applications must include a %{name}.desktop file, and that file must be properly installed with desktop-file-install in the %install section. If you feel that your packaged GUI application does not need a .desktop file, you must put a comment in the spec file with your explanation.
OK.

MUST: Packages must not own files or directories already owned by other packages. The rule of thumb here is that the first package to be installed should own the files or directories that other packages may rely upon. This means, for example, that no package in Fedora should ever share ownership with any of the files or directories owned by the filesystem or man package. If you feel that you have a good reason to own a file or directory that another package owns, then please present that at package review time.
OK.

MUST: All filenames in rpm packages must be valid UTF-8.
OK.

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.
Please do this.

SHOULD: The description and summary sections in the package spec file should contain translations for supported Non-English languages, if available.
Should be fine. There aren't any available translations.

SHOULD: The reviewer should test that the package builds in mock.
FIXME. Mock fails. Looking at the logs, I see the following output as it died:

Processing files: python3-modgrammar-0.8-2.fc16.noarch
error: File not found: /builddir/build/BUILDROOT/python3-modgrammar-0.8-2.fc16.x86_64/usr/lib/python3.2/site-packages/modgrammar/__pycache__/__init__.cpython-32.pyc
error: File not found: /builddir/build/BUILDROOT/python3-modgrammar-0.8-2.fc16.x86_64/usr/lib/python3.2/site-packages/modgrammar/__pycache__/__init__.cpython-32.pyo
RPM build errors:
error: File not found: /builddir/build/BUILDROOT/python3-modgrammar-0.8-2.fc16.x86_64/usr/lib/python3.2/site-packages/modgrammar/__pycache__/extras.cpython-32.pyc
error: File not found: /builddir/build/BUILDROOT/python3-modgrammar-0.8-2.fc16.x86_64/usr/lib/python3.2/site-packages/modgrammar/__pycache__/extras.cpython-32.pyo
error: File not found: /builddir/build/BUILDROOT/python3-modgrammar-0.8-2.fc16.x86_64/usr/lib/python3.2/site-packages/modgrammar/__pycache__/util.cpython-32.pyc
error: File not found: /builddir/build/BUILDROOT/python3-modgrammar-0.8-2.fc16.x86_64/usr/lib/python3.2/site-packages/modgrammar/__pycache__/util.cpython-32.pyo
    File not found: /builddir/build/BUILDROOT/python3-modgrammar-0.8-2.fc16.x86_64/usr/lib/python3.2/site-packages/modgrammar/__pycache__/__init__.cpython-32.pyc
    File not found: /builddir/build/BUILDROOT/python3-modgrammar-0.8-2.fc16.x86_64/usr/lib/python3.2/site-packages/modgrammar/__pycache__/__init__.cpython-32.pyo
    File not found: /builddir/build/BUILDROOT/python3-modgrammar-0.8-2.fc16.x86_64/usr/lib/python3.2/site-packages/modgrammar/__pycache__/extras.cpython-32.pyc
    File not found: /builddir/build/BUILDROOT/python3-modgrammar-0.8-2.fc16.x86_64/usr/lib/python3.2/site-packages/modgrammar/__pycache__/extras.cpython-32.pyo
    File not found: /builddir/build/BUILDROOT/python3-modgrammar-0.8-2.fc16.x86_64/usr/lib/python3.2/site-packages/modgrammar/__pycache__/util.cpython-32.pyc
    File not found: /builddir/build/BUILDROOT/python3-modgrammar-0.8-2.fc16.x86_64/usr/lib/python3.2/site-packages/modgrammar/__pycache__/util.cpython-32.pyo
Child returncode was: 1
EXCEPTION: Command failed. See logs for output.

That's kind of strange. I don't understand why Python doesn't bytecompile in mock, and ONLY in mock... I'm looking in to it... It shouldn't be this kind of showstopper if you glob the install paths though, as per above.

SHOULD: The package should compile and build into binary rpms on all supported architectures.
It's noarch.

SHOULD: The reviewer should test that the package functions as described. A package should not segfault instead of running, for example.
The literal HelloWorld in the tutorial works.

SHOULD: If scriptlets are used, those scriptlets must be sane. This is vague, and left up to the reviewers judgement to determine sanity.
OK. No scriptlets.

SHOULD: Usually, subpackages other than devel should require the base package using a fully versioned dependency.
OK. No subpackages.

SHOULD: The placement of pkgconfig(.pc) files depends on their usecase, and this is usually for development purposes, so should be placed in a -devel pkg. A reasonable exception is that the main pkg itself is a devel tool not installed in a user runtime, e.g. gcc or gdb.
OK. No pkgconfig

SHOULD: If the package has file dependencies outside of /etc, /bin, /sbin, /usr/bin, or /usr/sbin consider requiring the package which provides the file instead of the file itself.
OK. No file dependencies.

SHOULD: your package should contain man pages for binaries/scripts. If it doesn't, work with upstream to add them where they make sense.
OK. I don't think it makes sense for a python module to have man page.

Comment 2 Spencer Jackson 2011-12-30 05:25:30 UTC
Alright, I think I figured it out. The python bytecode compilation scripts checks for existence of python2, and silently dies if it doesn't find it. Your package has no dependency on python2, runtime or otherwise, so it never pulls it into the mock environment. I opened up https://bugzilla.redhat.com/show_bug.cgi?id=770909

Comment 3 Spencer Jackson 2011-12-30 17:10:24 UTC
I stand corrected. Add this: %global __python %{__python3} to your spec. That ought to resolve the bytecode issue.

Comment 4 Jiri Popelka 2012-01-19 16:09:22 UTC
I'm adding Dan to CC as he promised to sponsor Pavel.
Spencer, are you able to do a formal review once Pavel has a sponsor ?
If not I can do that once Pavel fixes the problems you mentioned in you informal review.

Comment 5 Spencer Jackson 2012-01-19 19:45:56 UTC
Sorry Jiri, I haven't been sponsored yet either, so I can't do a formal review.

Comment 6 Jason Tibbitts 2012-07-03 21:21:54 UTC
Did anything ever happen here?  I note that there's been no comment from the original submitter and the spec does have a few problems.  I'm not sure if it's worth spending the time doing a proper review if Pavel's no longer interested in submitting this.

However, I did see that he was sponsored at some point, so I'll clear out the NEEDSPONSOR status.

Comment 7 Pavel Šimerda (pavlix) 2012-07-04 22:53:07 UTC
Thank you, Jason.

Several days ago I tried once again using this library but it doesn't have any real error handling which makes it pretty unusable for real usecases. It would probably need some debugging code to be actually usable.

I'm not sure if I can at these in the near future but I would appreciate any help if someone other is interested in this particular package. My interest in this package pretty much depends on its real world usability.

Cheers,

Pavel

Comment 8 Pavel Šimerda (pavlix) 2012-07-04 22:55:03 UTC
Created attachment 596291 [details]
This is a specfile I'm currently using for testing...

Please don't spend time with reviews, but feel free to test if you're interested.

Comment 9 James Hogarth 2015-12-04 03:42:28 UTC
Pavel are you intending to progress this?

If not it's worth closing so that other interested parties can see that the review is not in process.

Comment 10 James Hogarth 2015-12-11 16:14:40 UTC
It's been over a week with no response from the requestor to the NeedsInfo flag.

Closing as per policy.


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