Bug 617524 - Review Request: tidyp - Clean up and pretty-print HTML/XHTML/XML
Review Request: tidyp - Clean up and pretty-print HTML/XHTML/XML
Status: CLOSED NEXTRELEASE
Product: Fedora
Classification: Fedora
Component: Package Review (Show other bugs)
rawhide
All Linux
medium Severity medium
: ---
: ---
Assigned To: Rex Dieter
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2010-07-23 06:56 EDT by Paul Howarth
Modified: 2010-09-22 08:50 EDT (History)
6 users (show)

See Also:
Fixed In Version: tidyp-1.02-2.fc15
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2010-09-22 08:50:13 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
rdieter: fedora‑review+
kevin: fedora‑cvs+


Attachments (Terms of Use)

  None (edit)
Description Paul Howarth 2010-07-23 06:56:05 EDT
Spec URL: http://subversion.city-fan.org/repos/cfo-repo/tidyp/branches/fedora/tidyp.spec
SRPM URL: http://www.city-fan.org/~paul/extras/tidyp/tidyp-1.02-2.fc14.src.rpm

Description:
tidyp is a fork of tidy on SourceForge. The library name is "tidyp", and the
command-line tool is also "tidyp" but all internal API stays the same.

The fork was made because the upstream "tidy" project simply doesn't make releases and working with VCS snapshots is difficult for downstream consumers. The main consumer of "tidyp" is perl-HTML-Tidy, where the "tidyp" version is required from version 1.50 onwards (it won't work with plain "tidy").

The upstream repository for "tidyp" contains the documentation forked from "tidy" but this isn't yet included in the release tarballs. I've asked upstream to include this in future releases, which will result in the manpage for "tidyp" and API documentation for "libtidyp" being included in the package, which currently is not the case.
Comment 1 Tom Atkinson 2010-07-24 11:12:20 EDT
Informal pre-review:

# MUST: rpmlint must be run on every package. The output should be posted in the review.

libtidyp.x86_64: W: spelling-error Summary(en_US) tidyp -> tidy, tidy p, tidily
The value of this tag appears to be misspelled. Please double-check.

libtidyp.x86_64: W: spelling-error %description -l en_US tidyp -> tidy, tidy p, tidily
The value of this tag appears to be misspelled. Please double-check.

libtidyp.x86_64: W: shared-lib-calls-exit /usr/lib64/libtidyp-1.02.so.0.0.0 exit@GLIBC_2.2.5
This library package calls exit() or _exit(), probably in a non-fork()
context. Doing so from a library is strongly discouraged - when a library
function calls exit(), it prevents the calling program from handling the
error, reporting it to the user, closing files properly, and cleaning up any
state that the program has. It is preferred for the library to return an
actual error code and let the calling program decide how to handle the
situation.

libtidyp.x86_64: W: no-documentation
The package contains no documentation (README, doc, etc). You have to include
documentation files.

libtidyp-devel.x86_64: W: no-documentation
The package contains no documentation (README, doc, etc). You have to include
documentation files.

tidyp.x86_64: W: no-manual-page-for-binary tidyp
Each executable in standard binary directories should have a man page.

4 packages and 0 specfiles checked; 0 errors, 6 warnings.

Spelling issue - can be ignored as it is intentional
Shared libs issue - you should probably check that with upstream
Missing docs - to come in future

# 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

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

OK - W3C

# 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 - Source package does not include the license text

# 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 - md5sum matches

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

OK - successful scratch build on i686 and 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.

OK - no ExcludeArch

# 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 - No BuildRequires listed, no missing build deps encountered.

# 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 - ldconfig called in %post and %postun

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

OK

# 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. Every %files section must include a %defattr(...) line.

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

OK - No large documentation

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

OK

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

OK - -devel package exists

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

OK - no static libs

# 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} = %{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 - Not a GUI application

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

Source package does not include license text as a separate file.

# SHOULD: The description and summary sections in the package spec file should contain translations for supported Non-English languages, if available.

No translations provided or available.

# SHOULD: The reviewer should test that the package builds in mock.

OK

# SHOULD: The package should compile and build into binary rpms on all supported architectures.

OK - successful scratch build on i686 and x86_64

# SHOULD: The reviewer should test that the package functions as described. A package should not segfault instead of running, for example.

OK

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

OK

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

OK

# 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 files

# 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 deps

# 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 - man page to come

Summary:
The shared-lib-calls-exit issue I'm not sure about, the rest looks fine.
Comment 2 Paul Howarth 2010-07-24 15:22:54 EDT
The exit() call is from the default out-of-memory panic handler, though this can be avoided for applications that want to by supplying a custom panic handler callback. This is described in include/tidyp.h.

So, I think that shouldn't be a big issue.
Comment 3 Rex Dieter 2010-07-25 14:28:00 EDT
Being maintainer of tidy, I can agree with the frustrations around lack of releases.  I'd be more than happy with simply replacing tidy with tidyp in the distro, if this indeed fully api compatible, if that's agreeable with you.
Comment 4 Paul Howarth 2010-07-26 12:00:27 EDT
The internal API is the same, but there are (trivial, really) differences in the external API, such as having to include <tidyp.h> rather than <tidy.h> and link with -ltidyp rather than -ltidy.

The library soname includes the library version number, so all users of the library will need rebuilds whenever tidyp has a version bump.

Which packages use libtidy in Fedora? I'm only aware of perl-HTML-Tidy at the moment. It would be interesting to see if they all build successfully against libtidyp with a small patch.
Comment 5 Rex Dieter 2010-07-26 12:11:48 EDT
$ repoquery --repoid=rawhide --alldeps --whatrequires libtidy ...
gurlchecker-0:0.10.1-13.fc12.x86_64
konq-plugins-0:4.4.0-3.fc14.x86_64
libtidy-0:0.99.0-20.20091203.fc13.x86_64
libtidy-devel-0:0.99.0-20.20091203.fc13.x86_64
mulk-0:0.4.1-3.fc12.x86_64
perl-HTML-Tidy-0:1.08-7.fc14.x86_64
php-tidy-0:5.3.3-1.fc14.x86_64
python-tidy-0:0.2-7.fc12.noarch
tidy-0:0.99.0-20.20091203.fc13.x86_64

Of those, the the only ones worth caring about are (probably),
gurlchecker
konq-plugins
mulk
php-tidy
Comment 6 Paul Howarth 2010-08-06 11:01:22 EDT
It wasn't too hard to get these to build with libtidyp. I built the packages with libtidy, tweaked them to use libtidyp instead and put the results here:

http://www.city-fan.org/~paul/extras/tidyp/tidy-dependents/

I didn't do perl-HTML-Tidy as the current upstream version of that *requires* libtidyp and won't work with plain libtidy because it accesses a library version number API that libtidy doesn't have.

I'd describe the tweaks for building with libtidyp as proof-of-concept rather than something that could go upstream as I imagine the upstreams would want to maintain compatibility with libtidy as well as supporting builds with libtidyp.

I've only tested that building works and haven't tested that the packages actually run correctly, except for python-tidy where I first tweaked the package to run its test suite in %check for the original libtidy version and then verified that it still passed after patching to use libtidyp.

I've asked for upstream's opinion on migrating all of these packages over to libtidyp but haven't had a response yet.
Comment 7 Rex Dieter 2010-09-14 19:28:46 EDT
In the meantime, I can help review this too.

(and many thanks for the pre-review done by Tom in comment #1 )
Comment 8 Rex Dieter 2010-09-14 19:45:56 EDT
$ rpmlint *.rpm x86_64/*.rpm
tidyp.src: E: unknown-key GPG#b56a8bac
libtidyp.x86_64: W: spelling-error Summary(en_US) tidyp -> tidy, tidy p, tidily
libtidyp.x86_64: W: spelling-error %description -l en_US tidyp -> tidy, tidy p, tidily
libtidyp.x86_64: W: shared-lib-calls-exit /usr/lib64/libtidyp-1.02.so.0.0.0 exit@GLIBC_2.2.5
libtidyp.x86_64: W: no-documentation
libtidyp-devel.x86_64: W: no-documentation
tidyp.x86_64: W: no-manual-page-for-binary tidyp
5 packages and 0 specfiles checked; 1 errors, 6 warnings.

sources: OK
$ md5sum *.gz
4fc6f0ba8fb1e2ffafbf8f5963f58969  tidyp-1.02.tar.gz

license: ok (copyright notice in tidyp.h)

dependencies: ok

installs, uninstalls cleanly

Looks mm, mm good to me.

APPROVED.
Comment 9 Paul Howarth 2010-09-15 10:30:13 EDT
Thanks Rex.

New Package SCM Request
=======================
Package Name: tidyp
Short Description: Clean up and pretty-print HTML/XHTML/XML
Owners: pghmcfc
Branches: f12 f13 f14 el4 el5 el6
Comment 10 Kevin Fenzi 2010-09-17 12:09:31 EDT
Git done (by process-git-requests).
Comment 11 Paul Howarth 2010-09-22 08:50:13 EDT
Imported and built in Rawhide.

tidyp-1.04 was released recently but is a bit of a brown paper bag release so I'm waiting on there being another upstream release before updating and building for the stable branches.

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