Bug 815511
Summary: | Review Request: python-django-lint - Analyzes Django code looking for bugs and signs of poor quality | ||
---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Matthias Runge <mrunge> |
Component: | Package Review | Assignee: | Michel Lind <michel> |
Status: | CLOSED RAWHIDE | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
Severity: | medium | Docs Contact: | |
Priority: | medium | ||
Version: | rawhide | CC: | david.brown, michel, misc, notting, package-review |
Target Milestone: | --- | Flags: | michel:
fedora-review+
gwync: fedora-cvs+ |
Target Release: | --- | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Bug Fix | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2012-06-06 19:30:26 UTC | Type: | --- |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: | |||
Bug Depends On: | |||
Bug Blocks: | 736776 |
Description
Matthias Runge
2012-04-23 18:29:46 UTC
Hi, - %clean and rm -Rf $RPM_BUILD_ROOT are not needed for newer Fedora, so this would be cleaner to remove them I am starting the formal review. Rpmlint complain about : python-django-lint.noarch: E: non-executable-script /usr/lib/python2.7/site-packages/DjangoLint/script.py 0644L /usr/bin/env Not ure on the best way to correct that. The rm -rf %buildroot in clean is only needed for EPEL. So wrap the %clean in something like this http://fedoraproject.org/wiki/Packaging:Python#Macros. A sed in the %install section would fix the env bit pretty easy. sed -i 's|^#!/usr/bin/env.*|#!/usr/bin/python|' %{python_sitelib}/DjangoLint/script.py Pulling the URL from debian isn't as nice... I thought github.com provides tarball pulling from specified tags. I'd ask the upstream to create some tags so you could pull the tarball directly from github.com at that point. Thanks to both of you for your comments. - clean: yepp, agreed, dropping that - non exec-script: not needed, dropping /usr/bin/env - rebasing to github-checkout Updated SPEC: http://www.matthias-runge.de/fedora/python-django-lint.spec SRPM: http://www.matthias-runge.de/fedora/python-django-lint-0.13-13.20120501git194ce26.fc17.src.rpm [mrunge@sofja SPECS]$ rpmlint ../SRPMS/python-django-lint-0.13-13.20120501git194ce26.fc17.src.rpm ../RPMS/noarch/python-django-lint-0.13-13.20120501git194ce26.fc17.noarch.rpm ./python-django-lint.spec python-django-lint.src: W: spelling-error %description -l en_US py -> pt, p, y python-django-lint.noarch: W: spelling-error %description -l en_US py -> pt, p, y 2 packages and 1 specfiles checked; 0 errors, 2 warnings. [mrunge@sofja SPECS]$ diff -u python-django-lint.spec.2 python-django-lint.spec --- python-django-lint.spec.2 2012-04-23 20:27:16.000000000 +0200 +++ python-django-lint.spec 2012-05-01 21:48:14.226774782 +0200 @@ -1,21 +1,18 @@ %global pkgname django-lint %global obs_ver 0.13-11 +%global commit 194ce26 Name: python-django-lint Version: 0.13 -Release: 12%{?dist} +Release: 13.20120501git%{commit}%{?dist} Summary: Analyzes Django code looking for bugs and signs of poor quality Group: Development/Debuggers License: GPLv3+ URL: https://github.com/lamby/django-lint -# upstream author is debian maintainer, took release from debian page -Source0: http://ftp.de.debian.org/debian/pool/main/p/%{name}/%{name}_%{version}.orig.tar.gz +Source0: https://github.com/lamby/django-lint/tarball/%{commit}/lamby-django-lint-%{commit}.tar.gz BuildArch: noarch -# fix from upstream for iterable-issue -# https://github.com/lamby/django-lint/pull/6 -Patch0: django-lint-type-error-iterable.patch BuildRequires: python2-devel Requires: python-django @@ -38,24 +35,21 @@ %prep -%setup -q -n %{pkgname} -%patch0 -p2 +%setup -q -n lamby-%{pkgname}-%{commit} +# remove unneeded /usr/bin/env-call +sed -i 's|^#!/usr/bin/env.*||' DjangoLint/script.py %build %{__python} setup.py build %install -rm -rf %{buildroot} %{__python} setup.py install -O1 --skip-build --root %{buildroot} %{__mkdir} -pm 755 %{buildroot}%{_mandir}/man1 %{__install} -pm 644 django-lint.1 %{buildroot}%{_mandir}/man1/ -%clean -rm -rf %{buildroot} - %files %doc README.rst COPYING @@ -66,6 +60,10 @@ %changelog +* Mon Apr 30 2012 Matthias Runge <mrunge> - 0.13-13.20120501git194ce26 +- minor spec cleanup +- rebase to latest github snapshot + * Mon Apr 23 2012 Matthias Runge <mrunge> - 0.13-12 - package rename to python-django-lint Personally I like the #!/usr/bin/python in the beginning of every python file. However, I don't see any requirement in the fedora packaging guidelines. Also, the script.py doesn't have any mention of the standard if __name__ == "__main__": do something So I can't make a reasonable argument to have the #!/usr/bin/python as the shebang for this particular package. Otherwise looks good to me. If you include #!/usr/bin/python in the beginning of every python file, it makes rpmlint whine about it (if you don't also set executable flags). Ah, so that makes me sad... but I'd fall on the safe side of what rpmlint doesn't complain about is good enough for me. OK, full review below. you'd need to bump the Obsolete: field as in the python-django-authority I reviewed earlier today. *Note* - I said the wrong thing about being able to use <= %{obs_ver}. This won't work as the package you want to obsolete will have a disttag (or in the case of python-django-lint, some really long VCS tag *plus* disttag. So for both it's better to just use < %{obs_ver} with obs_ver being one higher than the last released version, per the guidelines. Mea culpa! Package Review ============== Key: - = N/A x = Pass ! = Fail ? = Not evaluated ==== Generic ==== [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 Buildroot is not present Note: Unless packager wants to package for EPEL5 this is fine [x]: MUST Package contains no bundled libraries. [x]: MUST Changelog in prescribed format. [x]: MUST Package has no %clean section with rm -rf %{buildroot} (or $RPM_BUILD_ROOT) Note: Clean would be needed if support for EPEL is required [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 requires other packages for directories it uses. [x]: MUST Package uses nothing in %doc for runtime. [x]: 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 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. [x]: 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. [x]: MUST License field in the package spec file matches the actual license. [x]: MUST Package consistently uses macros (instead of hard-coded directory names). [x]: MUST Package is named according to the Package Naming Guidelines. [!]: MUST Package does not generate any conflict. [x]: MUST Package obeys FHS, except libexecdir and /usr/target. [x]: MUST Package must own all directories that it creates. [x]: MUST Package does not own files or directories owned by other packages. [x]: MUST Package installs properly. [x]: MUST Requires correct, justified where necessary. [x]: MUST Rpmlint output is silent. rpmlint python-django-lint-0.13-13.20120501git194ce26.fc17.src.rpm python-django-lint.src: W: spelling-error %description -l en_US py -> pt, p, y 1 packages and 0 specfiles checked; 0 errors, 1 warnings. rpmlint python-django-lint-0.13-13.20120501git194ce26.fc17.noarch.rpm python-django-lint.noarch: W: spelling-error %description -l en_US py -> pt, p, y 1 packages and 0 specfiles checked; 0 errors, 1 warnings. [x]: MUST Sources used to build the package match the upstream source, as provided in the spec URL. /home/michel/sources/fedora/reviews/815511/lamby-django-lint-194ce26.tar.gz : MD5SUM this package : f83f3d02087342bd40bff63906721212 MD5SUM upstream package : f83f3d02087342bd40bff63906721212 [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 a SysV-style init script if in need of one. [x]: MUST File names are valid UTF-8. [-]: MUST Useful -debuginfo package or justification otherwise. [x]: SHOULD Reviewer should test that the package builds in mock. [-]: 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). [x]: SHOULD Package functions as described. [x]: SHOULD Latest version is packaged. [x]: SHOULD Package does not include license text files separate from upstream. [x]: SHOULD SourceX is a working URL. [-]: SHOULD Description and summary sections in the package spec file contains translations for supported Non-English languages, if available. [x]: SHOULD Package should compile and build into binary rpms on all supported architectures. [-]: SHOULD %check is present and all tests pass. Upstream didn't seem to include any test case (tried setup.py check and test) [x]: SHOULD Packages should try to preserve timestamps of original installed files. [x]: SHOULD Spec use %global instead of %define. Issues: [!]: MUST Package does not generate any conflict. It should obsolete packages up to the one next than the release it's obsoleting (I made the wrong suggestion with the other django package earlier, sorry -- I forgot about all the disttag; x < x.fc17 < x+1 Generated by fedora-review 0.1.3 External plugins: Thank you for the review. I'll take another look into obsoletes to make sure, they're correct before committing package. New Package SCM Request ======================= Package Name: python-django-lint Short Description: Analyzes Django code looking for bugs and signs of poor quality Owners: mrunge Branches: devel Git done (by process-git-requests). python-django-lint built, django-lint deprecated and blocked. |