Bug 457219

Summary: Review Request: python-twisted-web2 - Next generation Twisted Web Server Framework
Product: [Fedora] Fedora Reporter: Matthias Saou <matthias>
Component: Package ReviewAssignee: Michal Schmidt <mschmidt>
Status: CLOSED NEXTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: medium    
Version: rawhideCC: fedora-package-review, michel, mschmidt, notting, paul, thomas
Target Milestone: ---Flags: mschmidt: fedora‑review+
kevin: 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: 2009-01-01 06:22:33 EST Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
Bug Depends On: 450227    
Bug Blocks: 438609    

Description Matthias Saou 2008-07-30 06:16:24 EDT
Spec and SRPM URL: http://thias.fedorapeople.org/review/python-twisted-web2/
Description:
Twisted.Web2 is the next generation Web Server Framework built with Twisted.
Web2 is under active development and it's APIs should not be considered
stable at this point.  It is not a version of Twisted.Web and with that in
mind compatibility is not of the highest concern, though the compatibility
layer does support many but not all twisted.web resources.
Comment 1 Michal Schmidt 2008-08-19 05:46:05 EDT
I'm interested in python-twisted-web2 because a new version of Jabbim will need it. I'll do the review...
Comment 2 Matthias Saou 2008-08-19 05:56:55 EDT
Great. Note though that I've had a report that seemed to indicate that some parts of web2 8 don't work with the version of Twisted currently in Fedora, so it might be required to update all other Twisted components to version 8 too first.
Comment 3 Michal Schmidt 2008-08-19 08:18:58 EDT
If there really are known bugs when used with old Twisted core, consider adding a versioned dependency on python-twisted-core in Requires and BuildRequires and make BZ450227 'Updated Twisted packages please' block this bug.

You can use '--install-purelib %{python_sitearch}' like python-twisted-web does it instead of moving the files. Then you won't need to define python_sitelib.

python-twisted-web calls %{_libexecdir}/twisted-dropin-cache in %post and %postun. Are they needed in this package too?

Checking ReviewGuidelines MUST Items:

- MUST: rpmlint must be run on every package. The output should be posted in the review.
The package built successfully in mock.
  $ rpmlint -vi *.rpm
  python-twisted-web2.src: I: checking
  python-twisted-web2.x86_64: I: checking
  python-twisted-web2.x86_64: E: no-binary
  The package should be of the noarch architecture because it doesn't contain
  any binaries.

  2 packages and 0 specfiles checked; 1 errors, 0 warnings.

There is a valid reason why the package is arch-specific. This rpmlint error should be ignored.
OK.

- MUST: The package must be named according to the Package Naming Guidelines .
The name is consistent with the names of other Twisted components in Fedora.
OK.

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

- MUST: The package must meet the Packaging Guidelines .
The Guidelines specify that any relevant documentation should be included in the package. The upstream tarball contains a doc/ directory which is not included in the package.
PLEASE FIX.

- MUST: The package must be licensed with a Fedora approved license and meet the Licensing Guidelines .
MIT license.
OK.

- MUST: The License field in the package spec file must match the actual license.
OK.

- 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.
OK.

- MUST: The spec file must be written in American English.
I see just one little error in Description: s/it's APIs/its APIs/

- 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.
sha1sum matches: 4a03e62453037b009ee5f0e1396be792249b9e2f
OK.

- MUST: The package must successfully compile and build into binary rpms on at least one supported architecture.
OK.

- 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.
N/A

- MUST: All build dependencies must be listed in BuildRequires, except for any that are listed in the exceptions section of the Packaging Guidelines ; inclusion of those as BuildRequires is optional.
OK.

- MUST: The spec file MUST handle locales properly.
N/A

- MUST: Every binary RPM package which stores shared library files (not just symlinks) in any of the dynamic linker's default paths, must call ldconfig in %post and %postun.
N/A

- 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.
N/A

- 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.
OK.

- MUST: A package must not contain any duplicate files in the %files listing.
OK.

- MUST: Permissions on files must be set properly. Executables should be set with executable permissions, for example. Every %files section must include a %defattr(...) line.
OK.

- MUST: Each package must have a %clean section, which contains rm -rf %{buildroot} ( or $RPM_BUILD_ROOT ).
OK.

- MUST: Each package must consistently use macros, as described in the macros section of Packaging Guidelines .
OK.

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

- MUST: Large documentation files should go in a -doc subpackage.
N/A

- MUST: If a package includes something as %doc, it must not affect the runtime of the application.
OK.

- MUST: Header files must be in a -devel package.
N/A

- MUST: Static libraries must be in a -static package.
N/A

- MUST: Packages containing pkgconfig(.pc) files must 'Requires: pkgconfig' (for directory ownership and usability).
N/A

- 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.
N/A

- MUST: In the vast majority of cases, devel packages must require the base package using a fully versioned dependency.
N/A

- MUST: Packages must NOT contain any .la libtool archives, these should be removed in the spec.
OK.

- MUST: Packages containing GUI applications must include a %{name}.desktop file
N/A

- MUST: Packages must not own files or directories already owned by other packages.
OK

- MUST: At the beginning of %install, each package MUST run rm -rf %{buildroot} ( or $RPM_BUILD_ROOT ).
OK.

- MUST: All filenames in rpm packages must be valid UTF-8.
OK.
Comment 4 Matthias Saou 2008-08-19 09:07:59 EDT
Thanks! About the Twisted compatibility, the parts that I have looked at do seem to work (with "elisa"), so I'd be interested in knowing if this package, with the older other Twisted packages currently found in Fedora, work for the application that you need it for.

Find updated files in the same location :

* Tue Aug 19 2008 Matthias Saou <http://freshrpms.net/> 8.1.0-3
- Use --install-purelib option instead of manually moving the installed files.
- Fix description.
- Include doc/ directory, although it would fit best in a "devel" package.
Comment 5 Matthias Saou 2008-08-19 09:18:09 EDT
Oh, about the call to twisted-dropin-cache. It might be needed, but having tried it now, I can see that web2 definitely needs some newer Twisted components, as it gives the following error on the current Fedora 9 :

exceptions.ImportError: cannot import name ServiceMaker

So I'm adding a dependency on bug #450227 and will add the proper runtime requirements to the package.
Comment 6 Michel Alexandre Salim 2008-08-26 14:44:43 EDT
Do you have an updated python-twisted-core package one can test this with? I need it to review elisa-plugins-bad
Comment 7 Matthias Saou 2008-08-27 05:59:50 EDT
(In reply to comment #6)
> Do you have an updated python-twisted-core package one can test this with? I
> need it to review elisa-plugins-bad

I don't, but I was planning on working on it if ThomasVS (the twisted package maintainer) didn't have time for it.
Comment 8 Paul Howarth 2008-08-27 07:56:38 EDT
I have some twisted packages you could use for testing here:

http://mirror.city-fan.org/ftp/contrib/bittorrent/Twisted/

They're fairly close to the Fedora packages but updated to 8.x versions.
Comment 9 Michel Alexandre Salim 2008-08-27 12:40:20 EDT
Thanks for that. Has the topic of Twisted been brought up in -devel? From Paul's page it looks like almost nothing depend on the old version anymore, so we can even avoid having to do a compatibility package.
Comment 10 Paul Howarth 2008-08-27 20:13:16 EDT
I asked Thomas about his upgrade plans for Twisted when he bumped it from 2.4 to 2.5 in May when 8.0 was already out. He said:

  I'm doing it staged - apparently for some code mixing python 2.5
  and twisted-core 2.4 is not a good idea, so I wanted to fix this
  upgrade path first.

  Then next I will check the new twisted release and verify it works
  with current twisted-using projects.

So I think Thomas is aware of some pitfalls that we don't know about. The twisted-using packages I see in Fedora currently (apart from the python-twisted-* packages themselves) are:

buildbot-0:0.7.7-2.fc9.noarch
elisa-0:0.3.2-1.fc8.noarch
flumotion-0:0.4.2-5.fc9.x86_64
londonlaw-0:0.2.1-3.fc9.noarch
postr-0:0.10-2.fc9.noarch
pyicq-t-0:0.8-5.b.fc9.noarch
python-nevow-0:0.9.29-2.fc9.noarch
python-Coherence-0:0.5.0-1.fc9.noarch
supybot-0:0.83.3-7.fc9.noarch

(this is from "repoquery --enablerepo=development --whatrequires python-twisted-core --alldeps")
Comment 11 Michel Alexandre Salim 2008-08-28 13:45:12 EDT
The elisa update requires python-twisted-web2 which requires python-twisted-core 8, so we can remove that from the list.

Elisa requires python-nevow and python-Coherence as well, so presumably they work with the new Twisted. londonlaw is more or less dead upstream; Flumotion comes from the same people as Elisa so is probably safe too.

So the list is narrowed down to buildbot, postr, pyicq and supybot. Yay.

Should we Cc: Thomas on this?
Comment 12 Paul Howarth 2008-08-28 15:40:20 EDT
Yes, I think Thomas certainly needs to be Cc:-ed, especially since it'll be up to him to update Twisted Core. I think he's upstream for flumotion too.
Comment 13 Matthias Saou 2008-08-29 06:53:14 EDT
Note that Elisa seems to be tested primarily on Ubuntu, where the web2 version is a 0.2.x snapshot IIRC. The compatibility of Elisa with twisted 8 is something that seems to be worked on. See : https://bugs.launchpad.net/elisa/+bug/214227

CC'ing Thomas from now on too.
Comment 14 Matthias Saou 2008-12-23 17:44:57 EST
Since we're still early in the Fedora 11 release cycle, and since I think the impact will be minor (and even possibly positive), I've pushed twisted 8 packages to devel (see bug #450227). I've also slightly updated my web2 package, which can be found at the same location. So it should now be possible to fully test things on devel.

Michal : Could you have another look at my latest package?
http://thias.fedorapeople.org/review/python-twisted-web2/
Comment 15 Michal Schmidt 2008-12-29 07:37:26 EST
Matthias,
excellent, now that you updated Twisted to 8.1.0 in Rawhide, we can hopefully get web2 in too. I'll re-review your latest package today. There's one thing I noticed immediately on the first line of the spec file:

%{?!python:%define python python}

Looks like switched order: ?! -> !?
Comment 16 Michal Schmidt 2008-12-29 10:18:55 EST
Please fix the !?/?! confusion.

I suggest adjusting Summary and %description. Upstream no longer calls Web2 the "next generation" framework, they now call it "experimental". According to http://twistedmatrix.com/trac/wiki/TwistedWeb2 they are merging its functionality into Twisted-Web. When they're done, Web2 will be obsoleted.


Everything else looks OK. Details:

# MUST: rpmlint must be run on every package. The output should be posted in the review.
  python-twisted-web2.src: I: checking
  python-twisted-web2.x86_64: I: checking
  python-twisted-web2.x86_64: E: no-binary
  2 packages and 0 specfiles checked; 1 errors, 0 warnings.
OK. This error is expected here and should be ignored.

# MUST: The package must be named according to the Package Naming Guidelines .
OK.

# 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 .
OK.
Checked: Naming, Legal, No pre-built binaries, Spec legibility, Arch support, Filesystem layout, Rpmlint, Changelogs, BuildRoot (it's not the most preferred form, but it's one of the allowed ones, and RPM 4.6 ignores it anyway), Requires, BuildRequires, Summary and description, Encoding, Documentation, Debuginfo packages, Duplication of system libraries, Macros, Timestamps, Scriptlets requirements, File and Directory Ownership, Conflicts, No External Kernel Modules, No Files or Directories under /srv, Bundling of multiple projects  
N/A: Compiler flags, Shared Libraries, Exclusion of Static Libraries, Beware of Rpath, Configuration files, Initscripts, Desktop files, Handling Locale Files, Parallel make, Conditional dependencies, Relocatable packages, Code Vs Content, Users and Groups, Web Applications,

# MUST: The package must be licensed with a Fedora approved license and meet the Licensing Guidelines .
OK. MIT license.

# MUST: The License field in the package spec file must match the actual license.
OK.

# 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.
OK.

# 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. 4a03e62453037b009ee5f0e1396be792249b9e2f  TwistedWeb2-8.1.0.tar.bz2

# MUST: The package MUST successfully compile and build into binary rpms on at least one primary architecture.
OK. Builds in Koji on all archs: http://koji.fedoraproject.org/koji/taskinfo?taskID=1024731

# 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.
N/A.

# MUST: All build dependencies must be listed in BuildRequires, except for any that are listed in the exceptions section of the Packaging Guidelines ; inclusion of those as BuildRequires is optional. Apply common sense.
OK.

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

# 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.
N/A.

# 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.
N/A.

# 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.
OK.

# MUST: A package must not contain any duplicate files in the %files listing.
OK.

# MUST: Permissions on files must be set properly. Executables should be set with executable permissions, for example. Every %files section must include a %defattr(...) line.
OK.

# MUST: Each package must have a %clean section, which contains rm -rf %{buildroot} ( or $RPM_BUILD_ROOT ).
OK.

# MUST: Each package must consistently use macros, as described in the macros section of Packaging Guidelines .
OK.

# MUST: The package must contain code, or permissable content. This is described in detail in the code vs. content section of Packaging Guidelines .
OK.

# MUST: Large documentation files should 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)
OK. The main package includes documentation files, the documentation is not too large, split is not necessary.

# MUST: If a package includes something as %doc, it must not affect the runtime of the application.
OK.

# MUST: Header files must be in a -devel package.
N/A.

# MUST: Static libraries must be in a -static package.
N/A.

# MUST: Packages containing pkgconfig(.pc) files must 'Requires: pkgconfig' (for directory ownership and usability).
N/A.

# 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.
N/A.

# MUST: In the vast majority of cases, devel packages must require the base package using a fully versioned dependency.
N/A.

# MUST: Packages must NOT contain any .la libtool archives, these should be removed in the spec.
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.
N/A.

# MUST: Packages must not own files or directories already owned by other packages.
OK.

# MUST: At the beginning of %install, each package MUST run rm -rf %{buildroot} ( or $RPM_BUILD_ROOT ).
OK.

# MUST: All filenames in rpm packages must be valid UTF-8.
OK.
Comment 17 Matthias Saou 2008-12-29 15:02:40 EST
Thanks for the review! The switched !? comes from a copy/paste from the other twisted packages, where it was reversed. I had fixed them, but missed web2. I've now fixed it and updated the description and summary. I didn't bother bumping the release for such minor changes, though.
Comment 18 Michal Schmidt 2008-12-29 16:13:07 EST
OK, the latest spec file is fine. Setting flag fedora-review+. You can request CVS branches for the package.
Comment 19 Matthias Saou 2008-12-29 17:20:10 EST
Great, thanks! I'm being optimistic by requesting extra branches, but I really hope we get Twisted updated on them at some point.

New Package CVS Request
=======================
Package Name: python-twisted-web2
Short Description: Experimental Twisted Web Server Framework
Owners: thias
Branches: F-10 F-9 EL-5
InitialCC:
Comment 20 Kevin Fenzi 2008-12-31 00:50:51 EST
cvs done.
Comment 21 Matthias Saou 2009-01-01 06:22:33 EST
Thanks Michal and Kevin!

I've rebuilt 8.1.0 for devel, but pushed an older 0.2.0 + patch on F-9, F-10 and EL-5 since those don't have Twisted 8 yet.