Spec URL: http://www.matthias-runge.de/fedora/django-lint.spec SRPM URL: http://www.matthias-runge.de/fedora/django-lint-0.11-1.fc12.src.rpm Description: Django Lint is a static analysis tool that checks (or "lints") projects and applications that use the Django web development framework. It reports on common programming errors and bad code smells, including checking for nullable CharField field types, the use of brittle or deprecated Django features (such as auto_now_add) as well as the absence of recommended options in settings.py. It aims to encourage the development of high-quality re-usable Django applications. Django Lint is currently implemented as a wrapper around PyLint. Project homepage can be found here: http://chris-lamb.co.uk/projects/django-lint/ Attention: This is my first package, so I will need a sponsor. Any help is appreciated! Thanks!
new SRPM: http://www.matthias-runge.de/fedora/django-lint-0.11-3.fc12.src.rpm Build in koji: http://koji.fedoraproject.org/koji/taskinfo?taskID=1826767
Having a quick build and running rpmlint over the spec, SRPM, and RPM produce the following errors warnings. $ rpmlint django-lint-0.11-3.fc12.noarch.rpm django-lint.noarch: E: description-line-too-long Django Lint is a static analysis tool that checks (or "lints") projects and applications that use the Django web development framework. django-lint.noarch: E: description-line-too-long It reports on common programming errors and bad code smells, including checking for nullable CharField field types, the use of brittle or deprecated Django features (such as auto_now_add) as well as the absence of recommended options in settings.py. It aims to encourage the development of high-quality re-usable Django applications. django-lint.noarch: W: no-version-in-last-changelog django-lint.noarch: E: non-executable-script /usr/lib/python2.6/site-packages/DjangoLint/script.py 0644 /usr/bin/env 1 packages and 0 specfiles checked; 3 errors, 1 warnings. $ rpmlint django-lint-0.11-3.fc12.src.rpm django-lint.src: E: description-line-too-long Django Lint is a static analysis tool that checks (or "lints") projects and applications that use the Django web development framework. django-lint.src: E: description-line-too-long It reports on common programming errors and bad code smells, including checking for nullable CharField field types, the use of brittle or deprecated Django features (such as auto_now_add) as well as the absence of recommended options in settings.py. It aims to encourage the development of high-quality re-usable Django applications. django-lint.src: W: no-version-in-last-changelog 1 packages and 0 specfiles checked; 2 errors, 1 warnings. These should be relatively trivial to fix (wrap the lines containing description and change permissions on script.py)
Graeme, thank you for your review. I've corrected those issues: http://www.matthias-runge.de/fedora/django-lint-0.11-4.fc12.src.rpm and http://www.matthias-runge.de/fedora/django-lint.spec [mrunge@sofja SPECS]$ rpmlint django-lint.spec 0 packages and 1 specfiles checked; 0 errors, 0 warnings. [mrunge@sofja SPECS]$ rpmlint ../SRPMS/django-lint-0.11-4.fc12.src.rpm 1 packages and 0 specfiles checked; 0 errors, 0 warnings. [mrunge@sofja SPECS]$ rpmlint ../RPMS/noarch/django-lint-0.11-4.fc12.noarch.rpm 1 packages and 0 specfiles checked; 0 errors, 0 warnings. Should be fine now.
Looks like now your package won't build in mock with the following error RPM build errors: File not found by glob: /builddir/build/BUILDROOT/django-lint-0.11-4.fc12.i386/usr/lib/python2.6/site-packages/django_lint-0.0.0-py2.6.egg-info/* Looks like /usr/lib/python2.6/site-packages/django_lint-0.0.0-py2.6.egg-info is a regular file not a directory as specified by this glob in the spec file %{_python_sitelib}/django_lint-0.0.0-py2.6.egg-info/*
http://www.matthias-runge.de/fedora/django-lint.spec resp. http://www.matthias-runge.de/fedora/django-lint-0.11-5.fc12.src.rpm fixes this ugly thing. (last lines froom mock build log): ----- Requires(rpmlib): rpmlib(CompressedFileNames) <= 3.0.4-1 rpmlib(FileDigests) <= 4.6.0-1 rpmlib(PartialHardlinkSets) <= 4.0.4-1 rpmlib(PayloadFilesHavePrefix) <= 4.0-1 Requires: /usr/bin/env /usr/bin/python python(abi) = 2.6 Checking for unpackaged file(s): /usr/lib/rpm/check-files /builddir/build/BUILDROOT/django-lint-0.11-5.fc12.i386 warning: Could not canonicalize hostname: sofja.berg.ol Wrote: /builddir/build/RPMS/django-lint-0.11-5.fc12.noarch.rpm Executing(%clean): /bin/sh -e /var/tmp/rpm-tmp.BPvphJ + umask 022 + cd /builddir/build/BUILD + cd django-lint + rm -rf /builddir/build/BUILDROOT/django-lint-0.11-5.fc12.i386 + exit 0 Child returncode was: 0 LEAVE do --> ----- No error means good news, right? What else to check?
Version Bump 0.12 scratch build: https://koji.fedoraproject.org/koji/taskinfo?taskID=1899449 spec: http://www.matthias-runge.de/fedora/django-lint.spec srpm: http://www.matthias-runge.de/fedora/django-lint-0.12-1.fc12.src.rpm
New Version 0.13 SPEC: http://www.matthias-runge.de/fedora/django-lint.spec SRPM: http://www.matthias-runge.de/fedora/django-lint-0.13-1.fc12.src.rpm
Did you perform some unofficial reviews on other packages? This is usually done by new people seeking sponsorship to show, that they know the packaging guidelines.
Thank you for your reply. I just did an unofficial review on django-debug-toolbar https://bugzilla.redhat.com/show_bug.cgi?id=526682 I took one or another look esp. on spec-files of other packages, without anouncing it in bugzilla. If it's required, I'll do some more and review unofficially some packages.
(In reply to comment #9) > Thank you for your reply. I just did an unofficial review on > django-debug-toolbar https://bugzilla.redhat.com/show_bug.cgi?id=526682 > > I took one or another look esp. on spec-files of other packages, without > anouncing it in bugzilla. If it's required, I'll do some more and review > unofficially some packages. Yes, please perform some package reviews, where you try to address at least each item on this list: https://fedoraproject.org/wiki/Packaging/ReviewGuidelines If you only write that rpmlint is ok and mock builds, there is not much information to decide, how familiar you are with the Fedora packaging guidelines.
Till, as you may have seen (on the mailing list), I'm currently doing some (unofficial) reviews (mostly on django or python packages). I took the package review guidelines https://fedoraproject.org/wiki/Packaging:ReviewGuidelines as guide for the reviews. Do you need a list of reviews?
(In reply to comment #11) > I took the package review guidelines > https://fedoraproject.org/wiki/Packaging:ReviewGuidelines as guide for the > reviews. Did you take a look at other completed reviews? Usually a template like https://fedoraproject.org/wiki/PackagingDrafts/ReviewTemplate or http://fedoraproject.org/wiki/User:Tibbs/Review_Template or http://fedoraproject.org/wiki/BernardJohnson/ReviewTemplate is used to show, what has been checked and to help not to forget to check something. Doing this is not required, but it might help you. > Do you need a list of reviews? Thanks, but I guess they are all included in this query: https://bugzilla.redhat.com/buglist.cgi?bug_status=NEW&bug_status=ASSIGNED&bug_status=MODIFIED&bug_status=ON_DEV&bug_status=ON_QA&bug_status=VERIFIED&bug_status=RELEASE_PENDING&bug_status=POST&bug_status=CLOSED&component=Package%20Review&email1=mrunge%40fedoraproject.org&emailcc1=1&emaillongdesc1=1&emailreporter1=1&emailtype1=exact&product=Fedora&query_format=advanced I will try to look through these and review this package soon, but you would be the first person I sponsor, and therefore I might be a little to careful.
(In reply to comment #12) > Did you take a look at other completed reviews? Usually a template like yes, of course I did. Looking at my first 'reviews' I must say, they don't meet neither the form nor the coverage of those review templates. But my reviews are getting better. > I will try to look through these and review this package soon, but you would be > the first person I sponsor, and therefore I might be a little to careful. I really feel honored! As I'm learning, how to build Packages the fedora way, being careful or little fussy is fine to me.
I started to get familiar with the python review guidelines again. So here are some minor issues: - %{python_sitelib} is defined in Fedora 13 and newer, so please use this: %if ! (0%{?fedora} > 12 || 0%{?rhel} > 5) %{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")} %endif https://fedoraproject.org/wiki/Packaging:Python#Macros - Instead of BuildRequires: python-devel please use BuildRequires: python2-devel https://fedoraproject.org/wiki/Packaging:Python#BuildRequires - Please use %{version} in Source0: Source0: http://chris-lamb.co.uk/releases/django-lint/django-lint-%{version}/django-lint-%{version}.tar.bz2 This makes it easier to update the spec, because then you maybe only need to adjust the version and can use spectool -g -R to download the matching source file
A bigger issue: you are using/defining %{_python_sitelib} instead of %{python_sitelib} and you are using %define instead of %global
Till, thanks for your comments. Of course, you're correct, I must have been blind. New spec and srpm (fixing all issues from comments 14 and 15) SPEC: http://www.matthias-runge.de/fedora/django-lint.spec SRPM: http://wiki.matthias-runge.de/fedora/django-lint-0.13-2.fc12.src.rpm
I think python2-devel is not needed for building noarch python package.
(In reply to comment #17) > I think python2-devel is not needed for building noarch python package. I think, python2-devel is needed for python setup-tools rpmbuild -ba django-lint.spec + /usr/bin/python setup.py install -O1 --skip-build --root /home/mrunge/rpmbuild/BUILDROOT/django-lint-0.13-2.fc12.i386 running install error: invalid Python installation: unable to open /usr/lib/python2.6/config/Makefile (No such file or directory) yum provides "/usr/lib/python2.6/config/Makefile" Loaded plugins: allowdowngrade, changelog, dellsysidplugin2, fastestmirror, : merge-conf, refresh-packagekit python-devel-2.6.2-2.fc12.i686 : The libraries and header files needed for : Python development. Repo : fedora Matched from: Filename : /usr/lib/python2.6/config/Makefile Any suggestions?
(In reply to comment #18) > (In reply to comment #17) > > I think python2-devel is not needed for building noarch python package. > I think, python2-devel is needed for python setup-tools > rpmbuild -ba django-lint.spec > + /usr/bin/python setup.py install -O1 --skip-build --root > /home/mrunge/rpmbuild/BUILDROOT/django-lint-0.13-2.fc12.i386 > running install > error: invalid Python installation: unable to open > /usr/lib/python2.6/config/Makefile (No such file or directory) > yum provides "/usr/lib/python2.6/config/Makefile" > Loaded plugins: allowdowngrade, changelog, dellsysidplugin2, fastestmirror, > : merge-conf, refresh-packagekit > python-devel-2.6.2-2.fc12.i686 : The libraries and header files needed for > : Python development. > Repo : fedora > Matched from: > Filename : /usr/lib/python2.6/config/Makefile > Any suggestions? I am wrong, I mixed python module and perl module guideline. This spec file are fine.
(In reply to comment #19) > I am wrong, I mixed python module and perl module guideline. This spec file are > fine. Nevermind and thanks for clarification.
The license tag is wrong, it says GPLv2+ but it is GPLv3+: # django-lint -- Static analysis tool for Django projects and applications # Copyright (C) 2008-2009 Chris Lamb <chris.uk> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version.
[UNCLEAR] rpmlint output: django-lint.src: W: spelling-error %description -l en_US nullable -> null able, null-able, tillable django-lint.src: W: spelling-error %description -l en_US py -> pt, p, y 2 packages and 0 specfiles checked; 0 errors, 4 warnings. Maybe change nullable, probably to null-able. [OK] Spec in %{name}.spec format [OK] license allowed: GPLv3+ [NOT OK] license matches shortname in License: tag [OK] license in tarball and included in %doc: COPYING [OK] package is code or permissive content: {N/A} patches sent to upstream and commented [OK] Source0 is a working URL {N/A} Sourceforge URL is Source0: http://downloads.sourceforge.net/%{name}/%{name}-%{version}.tar.gz <OK> SourceX / PatchY prefixed with %{name} [OK] Source0 matches Upstream: 374a639fd34c41b29d3a80156ea42b3d django-lint-0.13.tar.bz2 [OK] Package builds on all primary architectures: http://koji.fedoraproject.org/koji/taskinfo?taskID=2078651 [N/A] ExcludeArch bugs are filed and commented: [OK] BuildRequires are complete (mock builds) (OK) No file dependencies outside of /etc /bin /sbin /usr/bin /usr/sbin [N/A] %find_lang used for locales [N/A] Every (sub)package containing libraries runs ldconfig [N/A] .h (header) files are in -devel subpackage [N/A] .a (static libraries) are in -static subpackage [N/A] contains .pc (pkgconfig) files and has Requires: pkgconfig (N/A) .pc files are in -devel subpackage [N/A] contains .so.X(.Y) files and .so is in -devel [N/A] -devel subpackage has Requires: %{name} = %{version}-%{release} [N/A] .la files (libtool) are not included [OK] does not bundle copies of system libraries [N/A] Has GUI and includes %{name}.desktop [N/A] Follows desktop entry spec [N/A] Valid .desktop Name [N/A] Valid .desktop GenericName [N/A] Valid .desktop Categories [N/A] Valid .desktop StartupNotify [N/A] .desktop file installed with desktop-file-install in %install [OK] Prefix: /usr not used (not relocatable) [OK] Owns all created directories [OK] no duplicates in %files [OK] %defattr(-,root,root,-) is in every %files section [OK] Does not own files or dirs from other packages [OK] included filenames are in UTF-8 [OK] %clean is rm -rf %{buildroot} or $RPM_BUILD_ROOT [OK] %install starts with rm -rf %{buildroot} or $RPM_BUILD_ROOT [OK] Consistent macro usage [N/A] large documentation is -doc subpackage [OK] %doc does not affect runtime (NOT OK) Contains manpage for every executable The source contains django-lint.1, but it is not installed in %{_mandir}/man1/ {OK} no pre-built binaries (.a, .so*, executable) {OK} well known BuildRoot %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX) {OK} PreReq not used https://fedoraproject.org/wiki/Packaging/Guidelines#PreReq {N/A} RPM_OPT_FLAGS honoured https://fedoraproject.org/wiki/Packaging/Guidelines#Compiler_flags {N/A} Useful debuginfo generated https://fedoraproject.org/wiki/Packaging/Guidelines#Debuginfo_packages {OK} no duplication of system libraries https://fedoraproject.org/wiki/Packaging/Guidelines#Duplication_of_system_libraries {OK} no rpath https://fedoraproject.org/wiki/Packaging/Guidelines#Beware_of_Rpath {CHECKLATER} Timestamps preserved with cp and install Don't forget to use -p with install to install the manpage {N/A} Uses parallel make (%{?_smp_mflags}) https://fedoraproject.org/wiki/Packaging/Guidelines#Parallel_make {OK} Requires(pre,post) style notation not used https://fedoraproject.org/wiki/Packaging/Guidelines#Scriptlets_requirements {OK} only writes to tmp /var/tmp $TMPDIR %{_tmppath} %{_builddir} (and %{buildroot} on %install and %clean) https://fedoraproject.org/wiki/Packaging/Guidelines#Scriplets_are_only_allowed_to_write_in_certain_directories {OK} no Conflicts https://fedoraproject.org/wiki/Packaging/Conflicts {OK} nothing installed in /srv https://fedoraproject.org/wiki/Packaging/Guidelines#No_Files_or_Directories_under_.2Fsrv {OK} Changelog in allowed format {OK} does not use Scriptlets <OK> Architecture independent packages have: BuildArch: noarch <OK> Sane Provides: and Requires: {OK} Follows Naming Guidelines Python https://fedoraproject.org/wiki/Packaging:Python {OK} Has BuildRequires: python2-devel and/or python3-devel https://fedoraproject.org/wiki/Packaging:Python#BuildRequires {OK} Defines and uses %{python_sitelib} or %{python_sitearch}: %if ! (0%{?fedora} > 12 || 0%{?rhel} > 5) %{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")} %endif https://fedoraproject.org/wiki/Packaging:Python#Macros [OK] Python eggs must be built from source. They cannot simply drop an egg from upstream into the proper directory. [OK] Python eggs must not download any dependencies during the build process. [OK] If egg-info files are generated by the modules build scripts they must be included in the package. [N/A] When building a compat package, it must install using easy_install -m so it won't conflict with the main package. [N/A] When building multiple versions (for a compat package) one of the packages must contain a default version that is usable via "import MODULE" with no prior setup. (N/A) A package which is used by another package via an egg interface should provide egg info.
Thank you for your review. Rpmlint complains about the ending .py at the word settings.py. in the description. IMHO, that's a false negative and safely be ignored. What do you mean with [NOT OK] license matches shortname in License: tag I see, the license was incorrect. That's fixed in the new version SPEC: http://www.matthias-runge.de/fedora/django-lint.spec SRPM: http://www.matthias-runge.de/fedora/django-lint-0.13-3.fc12.src.rpm
Sorry, I did not meant to already send the comment, because it was not ready. You are right about the rpmlint warning wrt. to py. rpmlint and the licence are ok now. The problem was, that it said GPLv2+ but it is GPLv3+, but you figured this already out. There is one issue left: (NOT OK) Contains manpage for every executable The source contains django-lint.1, but it is not installed in %{_mandir}/man1/ {CHECKLATER} Timestamps preserved with cp and install Don't forget to use -p with install to install the manpage
The following version also installs the man-page, I had missed. The following scriptlet comes from %install-section: %{__mkdir} -pm 755 %{buildroot}%{_mandir}/man1 %{__install} -pm 644 django-lint.1 %{buildroot}%{_mandir}/man1/ SPEC: http://www.matthias-runge.de/fedora/django-lint.spec SRPM: http://www.matthias-runge.de/fedora/django-lint-0.13-4.fc12.src.rpm
[OK] rpmlint output: django-lint.noarch: W: spelling-error %description -l en_US py -> pt, p, y {OK} Timestamps preserved with cp and install (OK) Contains manpage for every executable [OK] license matches shortname in License: tag This is all ok now, but I have one hopefully final question, why do you make /usr/lib/python2.6/site-packages/DjangoLint/script.py executable?
You are right. That does not make sense at all. Fixed in Version -5 SPEC: http://www.matthias-runge.de/fedora/django-lint.spec SRPM: http://www.matthias-runge.de/fedora/django-lint-0.13-5.fc12.src.rpm
This looks good, the package is now APPROVED and I added you to the packager group. Your next task is to add a new package CVS request here: https://fedoraproject.org/wiki/CVS_admin_requests If you have other review requests open, please remove the FE-NEEDSPONSOR blocker from them. For further questions, feel free to contact me or ask on the devel mailinglist.
Thank you! I'll set up a CVS request as soon as I can. Since I'm now newly sponsored, I guess I have to wait until the cvs-flag is accessable.
New Package CVS Request ======================= Package Name: django-lint Short Description: summary of package Owners: mrunge Branches: F-12 F-13 EL-5 InitialCC:
You need to use your @matthias-runge.de e-mail address here in Bugzilla to get your bugzilla privileges and then set the fedora-cvs flag to "?". Or you need to request at https://fedorahosted.org/fedora-infrastructure/ to use your @fedoraproject.org to sync the Bugzilla privs from FAS to Bugzilla.
(In reply to comment #31) > You need to use your @matthias-runge.de e-mail address here in Bugzilla to get > your bugzilla privileges and then set the fedora-cvs flag to "?". Or you need > to request at https://fedorahosted.org/fedora-infrastructure/ to use your > @fedoraproject.org to sync the Bugzilla privs from FAS to Bugzilla. Till, thanks again. Your hint solved my problem.
Would it be possible to get a better short description than "summary of package"?
Off course, here comes the corrected CVS Request: New Package CVS Request ======================= Package Name: django-lint Short Description: Django Lint is a static analysis tool that checks (or "lints") projects and applications that use the Django web development framework. Owners: mrunge Branches: F-12 F-13 EL-5 InitialCC:
CVS done (by process-cvs-requests.py).
django-lint-0.13-5.fc13 has been submitted as an update for Fedora 13. http://admin.fedoraproject.org/updates/django-lint-0.13-5.fc13
django-lint-0.13-5.fc12 has been submitted as an update for Fedora 12. http://admin.fedoraproject.org/updates/django-lint-0.13-5.fc12
django-lint-0.13-5.fc13 has been pushed to the Fedora 13 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 'yum --enablerepo=updates-testing update django-lint'. You can provide feedback for this update here: http://admin.fedoraproject.org/updates/django-lint-0.13-5.fc13
django-lint-0.13-5.fc12 has been pushed to the Fedora 12 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 'yum --enablerepo=updates-testing update django-lint'. You can provide feedback for this update here: http://admin.fedoraproject.org/updates/django-lint-0.13-5.fc12
django-lint-0.13-5.fc13 has been pushed to the Fedora 13 stable repository. If problems still persist, please make note of it in this bug report.
django-lint-0.13-5.fc12 has been pushed to the Fedora 12 stable repository. If problems still persist, please make note of it in this bug report.
Package Change Request ====================== Package Name: django-lint New Branches: EL-6 Owners: mrunge I've been asked to include it in EL-6.
There's already an EL-6 branch for this package, verified by pkgdb and a CVS checkout. If there's something I'm missing, please set the fedora-cvs flag back to '?' and let me know what it is.
Matthias: You need to run "cvs up -dP" in the django-lint dir to get the EL-6 dir afaik.
Thank you, both of you. I've checked and did not get the EL-6 path using purely cvs up. fedora-cvs ... got it for me.
(In reply to comment #46) > I've checked and did not get the EL-6 path using purely cvs up. Yes, you need to use "cvs up -dP" or at least one of both arguments, but both are recommended afaik. To have them always used, you can add them to the ~/.cvsrc, these are the values that have been recommended to me: $ cat .cvsrc log -N diff -u update -dP co -P