Bug 201703 - [PATCH] textproc/p5-EBook-Tools: update to 0.5.4, fix tidy usage
Summary: [PATCH] textproc/p5-EBook-Tools: update to 0.5.4, fix tidy usage
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Jason Unovitch
URL:
Keywords: patch
Depends on:
Blocks:
 
Reported: 2015-07-20 02:02 UTC by Jason Unovitch
Modified: 2015-08-11 22:07 UTC (History)
2 users (show)

See Also:
bugzilla: maintainer-feedback? (simond)


Attachments
p5-EBook-Tools-0.5.4.patch -- update and fix tidy usage (2.68 KB, patch)
2015-07-20 02:02 UTC, Jason Unovitch
no flags Details | Diff
p5-EBook-Tools-0.5.4.patch -- update and fix tidy usage (4.64 KB, patch)
2015-07-20 02:21 UTC, Jason Unovitch
no flags Details | Diff
p5-EBook-Tools-0.5.4.patch -- update and fix tidy usage (4.75 KB, patch)
2015-07-20 02:30 UTC, Jason Unovitch
no flags Details | Diff
Poudriere testport log (36.31 KB, text/x-log)
2015-07-20 02:32 UTC, Jason Unovitch
no flags Details
p5-EBook-Tools-0.5.4.patch -- update, reset maintainer, and fix tidy usage (4.90 KB, patch)
2015-07-21 02:14 UTC, Jason Unovitch
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jason Unovitch freebsd_committer freebsd_triage 2015-07-20 02:02:20 UTC
Created attachment 158994 [details]
p5-EBook-Tools-0.5.4.patch -- update and fix tidy usage

Changelog:

- Update to p5-EBook-Tools-0.5.4
- Update tidy dependency to tidy-html5
Comment 1 Jason Unovitch freebsd_committer freebsd_triage 2015-07-20 02:09:41 UTC
Hello maintainer of p5-Ebook-Tools,

I've been looking at updating textproc/p5-Ebook-Tools based on efforts in bug 200631.  This is the only port left that is currently referencing the old www/tidy port that has a security issue that still needs to be fixed.  If we opt to remove it we'll need to adjust this port to use tidy5.

What I found is the current p5-Ebook-Tools is broken with regards to tidy usage.  It tried to use 'tidy' when 'tidy4' is the installed binary.  So while here to make sure tidy5 works, I updated the port.

== Runtime testing ==
== 0.4.9_2 ==

# ebook tidyxml /usr/ports/security/vuxml/vuln.xml 
Can't exec "tidy": No such file or directory at /usr/local/lib/perl5/site_perl/EBook/Tools.pm line 6812.
Tidy did something unexpected (return value=-1).  Check all output. at /usr/local/bin/ebook line 1383.

Once I fix line 92 of /usr/local/bin/ebook to fall back to tidy4, it works.  I ran these two commands to get a baseline of what output to expect before.

# ebook tidyxml /usr/ports/security/vuxml/vuln.xml
# ebook tidyxhtml /usr/local/share/doc/bash/bash.htmldoc/bash/bash.html

== 0.5.4 ==

After the 0.5.4 update, I checked the same two commands.  The different versions of tidy produce different white space padding but aside from that the output appears to be the same.  I visually inspected the resulting HTML with Firefox and it looks fine in both the old and new.

# ebook tidyxml /usr/ports/security/vuxml/vuln.xml
# ebook tidyxhtml /usr/local/share/doc/bash/bash.htmldoc/bash/bash.html
Comment 2 Jason Unovitch freebsd_committer freebsd_triage 2015-07-20 02:21:36 UTC
Created attachment 158995 [details]
p5-EBook-Tools-0.5.4.patch -- update and fix tidy usage

** Updated patch after doing a svn add of patch files **

Changelog:

- Update to p5-EBook-Tools-0.5.4
- Update tidy dependency to tidy-html5
Comment 3 Jason Unovitch freebsd_committer freebsd_triage 2015-07-20 02:30:17 UTC
Created attachment 158996 [details]
p5-EBook-Tools-0.5.4.patch -- update and fix tidy usage

** Update based on QA -- Add NO_ARCH and missing dependency **

Changelog:

- Update to p5-EBook-Tools-0.5.4
- Update tidy dependency to tidy-html5
- Add NO_ARCH
Comment 4 Jason Unovitch freebsd_committer freebsd_triage 2015-07-20 02:32:42 UTC
Created attachment 158997 [details]
Poudriere testport log

== Portlint

% portlint -ac
looks fine.

== Poudriere
Build log from 11 is attached.  I've also built successfully on the following.

8.4-RELEASE-p31      amd64
8.4-RELEASE-p31      i386
9.3-RELEASE-p17      amd64
9.3-RELEASE-p17      i386
10.1-RELEASE-p14     amd64
10.1-RELEASE-p14     i386
11.0-CURRENT r284725 amd64
11.0-CURRENT r284725 i386
Comment 5 simond 2015-07-20 08:15:46 UTC
I can't see a problem committing this change, if you're actually using this port then I wouldn't mind if you wanted to take maintainership as I don't use the module anymore unfortunately.
Comment 6 Jason Unovitch freebsd_committer freebsd_triage 2015-07-20 10:06:24 UTC
(In reply to simond from comment #5)
I am not using it; I was just looking at it in the course of another PR. If that is the case we can reset maintainership based of your request.thank
Comment 7 Jason Unovitch freebsd_committer freebsd_triage 2015-07-21 02:09:36 UTC
Follow up issues:

- EBook/Tools.pm
sub system_tidy_xml() needs to have '-indent' in the system call.  The current patch does this to maintain parity between the tidyxml output between Tidy 4 and Tidy 5.  Tidy 5 left justifies everything by default while Tidy 4 does not.  Tidy 4 output doesn't change at all with the '-indent' flag so I see no harm in upstream adding this.

I submitted the following so we don't have to carry my patch for this in ports on a future port update:
https://rt.cpan.org/Public/Bug/Display.html?id=105990
Comment 8 Jason Unovitch freebsd_committer freebsd_triage 2015-07-21 02:14:11 UTC
Created attachment 159033 [details]
p5-EBook-Tools-0.5.4.patch -- update, reset maintainer, and fix tidy usage

** Updated based on maintainer feedback to pass on maintainership**

Changelog:

- Update to p5-EBook-Tools-0.5.4
- Update tidy dependency to tidy-html5
- Reset maintainer to perl@
- Add NO_ARCH
Comment 9 Jason Unovitch freebsd_committer freebsd_triage 2015-08-10 23:30:07 UTC
Take.  This is pending mentor review in https://reviews.FreeBSD.org/D3348.
Comment 10 commit-hook freebsd_committer freebsd_triage 2015-08-11 22:03:23 UTC
A commit references this bug:

Author: junovitch
Date: Tue Aug 11 22:02:32 UTC 2015
New revision: 393977
URL: https://svnweb.freebsd.org/changeset/ports/393977

Log:
  textproc/p5-EBook-Tools: update 0.4.9_2 -> 0.5.4

  - Update to p5-EBook-Tools-0.5.4
  - Update tidy dependency to tidy-html5
  - Take maintainership
  - Add NO_ARCH

  PR:		201703
  Approved by:	simond@irrelevant.org (outgoing maintainer), feld (mentor)
  Differential Revision:	https://reviews.freebsd.org/D3348

Changes:
  head/textproc/p5-EBook-Tools/Makefile
  head/textproc/p5-EBook-Tools/distinfo
  head/textproc/p5-EBook-Tools/files/
  head/textproc/p5-EBook-Tools/files/patch-lib_EBook_Tools.pm
  head/textproc/p5-EBook-Tools/files/patch-scripts_ebook.pl
  head/textproc/p5-EBook-Tools/pkg-plist
Comment 11 Jason Unovitch freebsd_committer freebsd_triage 2015-08-11 22:07:26 UTC
Simon,
Thanks for your work maintaining this port in the past.  Per your request to take maintainership I've gone ahead and done so in order to ensure that the patches for tidy5 compat get upstreamed.  When I can remove the patches and this port becomes as simple as a version bump to update I will return it to the perl@ pool.