Bug 528003 - Review Request: xinha - Javascript library for making textarea's WYSIWYG
Summary: Review Request: xinha - Javascript library for making textarea's WYSIWYG
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: Package Review
Version: rawhide
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
Assignee: Nick Bebout
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2009-10-08 15:11 UTC by Matthew Daniels
Modified: 2010-03-29 15:32 UTC (History)
8 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2010-03-29 15:32:26 UTC
Type: ---
Embargoed:
nb: fedora-review+
a.badger: fedora-cvs+


Attachments (Terms of Use)

Description Matthew Daniels 2009-10-08 15:11:59 UTC
Spec URL: http://danielsmw.fedorapeople.org/xinha.spec
SRPM URL: http://danielsmw.fedorapeople.org/xinha-0.96b2-1.fc11.src.rpm
Description: Xinha is a Javascript component for endowing ordinary <textarea> HTML elements with WYSIWYG features. Xinha can be installed as a standalone Javascript library or used by a larger application such as Zikula's Scribite! module.

Comment 1 David Nalley 2009-10-10 00:13:00 UTC
So I am just now starting this review - I do note there are a ton of bundled libraries from HTMLArea. Xinha is of course the fork/successor to HTMLArea - but I think I'd really like to know that xinha has taken responsibility for those and now acts as their upstream. see the Spellchecker module as an example. 

There are at least bundled PHP libs in the ImageManager plugin - I think most of these libs are already in Fedora - but you need to use the system libs rather than using these. 

Aside from this I don't see any huge blockers, but will finish the review after you take care of the bundled libs issue.

Comment 2 David Nalley 2009-10-10 16:42:02 UTC
There are also some naming problems as you noted in your spec file 

Take a look at: 
https://fedoraproject.org/wiki/Packaging:NamingGuidelines#Package_Release

If you have questions after reading that, let me know.

Comment 3 David Nalley 2009-10-10 17:31:44 UTC
FIX: rpmlint must be run on every package. The output should be posted in the review.
[ke4qqq@nalleyx60 rpmbuild]$ rpmlint SPECS/xinha.spec 
0 packages and 1 specfiles checked; 0 errors, 0 warnings.
[ke4qqq@nalleyx60 rpmbuild]$ rpmlint RPMS/noarch/xinha-0.96b2-1.fc11.noarch.rpm 
xinha.noarch: W: wrong-file-end-of-line-encoding /usr/share/doc/xinha-0.96b2/license.txt
1 packages and 0 specfiles checked; 0 errors, 1 warnings.
[ke4qqq@nalleyx60 rpmbuild]$ rpmlint SRPMS/xinha-0.96b2-1.fc11.src.rpm 
1 packages and 0 specfiles checked; 0 errors, 0 warnings.

FIX: The package must be named according to the Package Naming Guidelines .

You need to include pre-release info in release tag 

OK: The spec file name must match the base package %{name}, in the format %{name}.spec unless your package has an exemption.
SEE ABOVE ITEMS: The package must meet the Packaging Guidelines .
OK: The package must be licensed with a Fedora approved license and meet the Licensing Guidelines .
both CC-BY-SA and BSD licenses are ok - there are also some PHP-licensed libraries and LGPL libraries. 
 

FIX: The License field in the package spec file must match the actual license. 
There are also php-licensed libraries in source with php-licenses. 

FIX: 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.
While you have one license file as %doc, there are a number of others in the source as well and they also must be moved to %doc. 
In addition there are a ton of other doc files that need to move to %doc. 

OK: The spec file must be written in American English.
OK: The spec file for the package MUST be legible. 
FIX: 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. 
Make your conf file another source rather than combining it to the existing tarball. 
Review: http://fedoraproject.org/wiki/Packaging/SourceURL for how to handle your source0 url. 

OK: The package MUST successfully compile and build into binary rpms on at least one primary architecture. 
OK: If the package does not successfully compile, build or work on any arch bug must be filed and/or exclude arch used. 
OK: 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.
FIX: The spec file MUST handle locales properly. This is done by using the %find_lang macro. Using %{_datadir}/locale/ is strictly forbidden.
N/A: 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. 
FIX: Packages must NOT bundle copies of system libraries.
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: 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: A Fedora package must not list a file more than once in the spec file's %files listings.
OK: 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: Each package must have a %clean section, which contains rm -rf %{buildroot} (or $RPM_BUILD_ROOT).
OK: Each package must consistently use macros. 
OK: The package must contain code, or permissable content.
NA: 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). 
OK: 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.
NA: Header files must be in a -devel package.
NA: Static libraries must be in a -static package. 
NA: Packages containing pkgconfig(.pc) files must 'Requires: pkgconfig' (for directory ownership and usability). 
NA: 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.
NA: In the vast majority of cases, devel packages must require the base package using a fully versioned dependency: Requires: %{name} = %{version}-%{release}
NA: Packages must NOT contain any .la libtool archives, these must be removed in the spec if they are built.
NA: Packages containing GUI applications must include a %{name}.desktop file
OK: Packages must not own files or directories already owned by other packages 
OK: At the beginning of %install, each package MUST run rm -rf %{buildroot} (or $RPM_BUILD_ROOT).
OK: All filenames in rpm packages must be valid UTF-8.

Comment 4 Pascal Calarco 2009-10-12 16:51:32 UTC
Thanks David for putting together a list of specifics to remedy xinha for inclusion into rawhide and use by zikula for Fedora Insight.

Matthew, do you know what you timeframe is for being able to do this work?  Fedora Weekly News folks are starting to play around with FI, and we plan on publishing the next issue of FWN on FI, a week from today.  Having this in place by then isn't critical, but it would be useful to let the team know what they can expect to have in place for later this week, next and beyond.  Thanks much!

Comment 5 Matthew Daniels 2009-10-12 22:38:54 UTC
Update:

Fixed:
* Package naming problem
* License field
* Source0, Source1 problem (Source0 matches upstream now)

Questions about:
* %doc that need to be included
* Which system libraries I'm bundling? (Not that I don't believe, you David, I'm just not sure how to figure out what's what)

I don't think is "fixable":
* Locales. %find_lang won't exactly work here, it finds and deals with .mo files. The lang files I've found in the various plugins here are all defined in JSON as .js files. I think the best thing to do is leave them as is until there's a way to deal with this in the spec files (which there isn't right now, I believe).

@Pascal:
With all that said, if I can find someone to sit down with me and deal with those remaining two problems (which don't look too threatening) then I don't think it's unreasonable that this could be finished by week's end.

@David:
I know you're busy, but let me know if you have some time to help me deal with these. Toshio's been helping me with these issues as well, being well versed in the whole JS packaging thing, but the problems now are mostly with sorting out system libraries.

Comment 6 David Nalley 2009-10-13 15:23:59 UTC
WRT %doc :
Essentially any of the readmes, COPYING, license.txt;s etc, there are lots nested in the sub-directories.  In addition, everything under 'examples' should be moved to %doc as well. 

WRT bundled libs - 
the instances that immediately jumped out are under: 
plugins/ImageManager/Classes
at least GD.php, IM.php, NetPBM.php, Transform.php are external to the package. 

Lang stuff is OK.

Comment 7 Matthew Daniels 2009-10-19 22:05:45 UTC
There only seemed to be two supported plugins that relied on bundled php libraries: ImageManager and ExtendedFileManager. Neither is important for normal operation and are only optionally implemented, so I removed them.

I've also removed all 8 unsupported_plugins since they're unsupported and not necessary for normal functionality. I've also removed the contrib folder which deals in a large part with js compression.

All the documentation I could find has been organized and added.

I've tested it and it seems to work as expected, but my system is old and messy and might not be 100% precise as far as testing goes.

SPEC: http://danielsmw.fedorapeople.org/xinha.spec
SRPM: http://danielsmw.fedorapeople.org/xinha-0.96-0.1.b2.src.rpm

Thanks for all the help. Hopefully this'll be done soon.

Comment 8 Nick Bebout 2009-10-22 04:26:07 UTC
I'm taking this review, per discussion on IRC with stickster and ke4qqq.

FIX: rpmlint must be run on every package. The output should be posted in the
review.
[nb@epsilon SPECS]$ rpmlint xinha.spec 
0 packages and 1 specfiles checked; 0 errors, 0 warnings.
[nb@epsilon SRPMS]$ rpmlint xinha-0.96-0.1.b2.src.rpm 
xinha.src: W: invalid-license BSD, PHP, LGPL, CC-BY-SA
1 packages and 0 specfiles checked; 0 errors, 1 warnings.
[nb@epsilon noarch]$ rpmlint xinha-0.96-0.1.b2.noarch.rpm 
xinha.noarch: W: wrong-file-end-of-line-encoding /usr/share/doc/xinha-0.96/inditreuse-skin/README
xinha.noarch: W: wrong-file-end-of-line-encoding /usr/share/doc/xinha-0.96/license.txt
xinha.noarch: W: wrong-file-end-of-line-encoding /usr/share/doc/xinha-0.96/titan-skin/README
1 packages and 0 specfiles checked; 0 errors, 3 warnings.

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

You need to include pre-release info in release tag 

OK: The spec file name must match the base package %{name}, in the format
%{name}.spec unless your package has an exemption.
OK: The package must meet the Packaging Guidelines .
OK: The package must be licensed with a Fedora approved license and meet the
Licensing Guidelines .
both CC-BY-SA and BSD licenses are ok - there are also some PHP-licensed
libraries and LGPL libraries. 


FIX: The License field in the package spec file must match the actual license. 
License tag is incorrect, see below

OK: 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: The spec file must be written in American English.
OK: The spec file for the package MUST be legible. 
OK: 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. 
Make your conf file another source rather than combining it to the existing
tarball. 
OK: The package MUST successfully compile and build into binary rpms on at
least one primary architecture. 
OK: If the package does not successfully compile, build or work on any arch bug
must be filed and/or exclude arch used. 
OK: 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: The spec file MUST handle locales properly. This is done by using the
%find_lang macro. Using %{_datadir}/locale/ is strictly forbidden.
N/A: 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: Packages must NOT bundle copies of system libraries.
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: 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: A Fedora package must not list a file more than once in the spec file's
%files listings.
OK: 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: Each package must have a %clean section, which contains rm -rf %{buildroot}
(or $RPM_BUILD_ROOT).
OK: Each package must consistently use macros. 
OK: The package must contain code, or permissable content.
NA: 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). 
OK: 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.
NA: Header files must be in a -devel package.
NA: Static libraries must be in a -static package. 
NA: Packages containing pkgconfig(.pc) files must 'Requires: pkgconfig' (for
directory ownership and usability). 
NA: 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.
NA: In the vast majority of cases, devel packages must require the base package
using a fully versioned dependency: Requires: %{name} = %{version}-%{release}
NA: Packages must NOT contain any .la libtool archives, these must be removed
in the spec if they are built.
NA: Packages containing GUI applications must include a %{name}.desktop file
OK: Packages must not own files or directories already owned by other packages 
OK: At the beginning of %install, each package MUST run rm -rf %{buildroot} (or
$RPM_BUILD_ROOT).
OK: All filenames in rpm packages must be valid UTF-8.  

License tag should be License:  BSD and PHP and LGPLv2+ and CC-BY-SA

Please fix line ending error and license tag, and this package will be APPROVED.

Comment 9 Matthew Daniels 2009-10-22 05:05:01 UTC
These errors have been fixed and rpmlint returns clean:


[makerpm@Artemis noarch]$ rpmlint xinha-0.96-0.1.b2.noarch.rpm 
1 packages and 0 specfiles checked; 0 errors, 0 warnings.
[makerpm@Artemis noarch]$ rpmlint ../../SRPMS/xinha-0.96-0.1.b2.src.rpm 
1 packages and 0 specfiles checked; 0 errors, 0 warnings.

The new SRPM and Spec file have been re-uploaded to the same URLs.

Comment 10 Nick Bebout 2009-10-22 20:05:32 UTC
rpmlint is clean now.

This package is APPROVED.

Comment 11 Nick Bebout 2009-11-01 04:34:03 UTC
FYI, Matthew, don't forget your CVS request in here.

Comment 13 eric 2009-11-03 15:46:01 UTC
New Package CVS Request
=======================
Package Name: Xinha
Short Description: A WYSIWIG HTML editor component in Javascript
Owners: danielsmw sparks
Branches: F-11 F-12 EL-5
InitialCC: ke4qqq

Comment 14 Kevin Fenzi 2009-11-03 19:19:49 UTC
Should the name here be 'xinha' (ie, lower case) as that seems to be what the package name is per the src.rpm?

Comment 15 Matthew Daniels 2009-11-03 19:31:19 UTC
I suppose so; I've already starting working in CVS and I've been using 'xinha', so someone might have caught that along the way already.

Comment 16 Toshio Ernie Kuratomi 2009-11-03 20:17:08 UTC
cvs done.

Sorry for not marking this when I did that.


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