Bug 617524 - Review Request: tidyp - Clean up and pretty-print HTML/XHTML/XML
Summary: Review Request: tidyp - Clean up and pretty-print HTML/XHTML/XML
Alias: None
Product: Fedora
Classification: Fedora
Component: Package Review   
(Show other bugs)
Version: rawhide
Hardware: All Linux
Target Milestone: ---
Assignee: Rex Dieter
QA Contact: Fedora Extras Quality Assurance
Depends On:
TreeView+ depends on / blocked
Reported: 2010-07-23 10:56 UTC by Paul Howarth
Modified: 2010-09-22 12:50 UTC (History)
6 users (show)

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

Attachments (Terms of Use)

Description Paul Howarth 2010-07-23 10:56:05 UTC
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

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 15:12:20 UTC
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

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 .


# MUST: The spec file name must match the base package %{name}, in the format %{name}.spec unless your package has an exemption.


# MUST: The package must meet the Packaging Guidelines .


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


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


# MUST: The spec file for the package MUST be legible.


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


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


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


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


# MUST: Each package must consistently use macros.


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


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


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


# MUST: In the vast majority of cases, devel packages must require the base package using a fully versioned dependency: Requires: %{name} = %{version}-%{release}


# MUST: Packages must NOT contain any .la libtool archives, these must be removed in the spec if they are built.


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


# MUST: All filenames in rpm packages must be valid UTF-8


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


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


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


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


# 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

The shared-lib-calls-exit issue I'm not sure about, the rest looks fine.

Comment 2 Paul Howarth 2010-07-24 19:22:54 UTC
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 18:28:00 UTC
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 16:00:27 UTC
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 16:11:48 UTC
$ repoquery --repoid=rawhide --alldeps --whatrequires libtidy ...

Of those, the the only ones worth caring about are (probably),

Comment 6 Paul Howarth 2010-08-06 15:01:22 UTC
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:


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 23:28:46 UTC
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 23:45:56 UTC
$ 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.


Comment 9 Paul Howarth 2010-09-15 14:30:13 UTC
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 16:09:31 UTC
Git done (by process-git-requests).

Comment 11 Paul Howarth 2010-09-22 12:50:13 UTC
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.