Pending PDF::Reuse Release And Koha
I have rolled a pending PDF::Reuse release which incorporates several methods which I wrote to accommodate the label and patroncard tools in Koha back in 2009. I had hoped these would be included in PDF::Reuse before now; however, they were not. The module appears to have been abandoned by the original author, and I was able to be listed as a co-maintainer. I have tested these changes on Koha's current head, and they appear to work fine. This is an official call for testing these changes prior to my releasing the new version of PDF::Reuse. Since these changes directly affect Koha, they have the potential to affect current and future stable installs. Below is a link to a dev release of PDF::Reuse which contains the proposed changes. Attached is a patch formatted against the head current at the time of this email. Please do the following: 1. Upgrade PDF::Reuse to 0.35_01. 2. Run Koha's non-DB dependent test suite. You should notice some non-fatal warnings about the redefinition of one or two subs in PDF::Reuse. This should not affect the functionality of the tools for the end user. 3. Verify the functionality of the related tools. 4. Apply the attached patch. 5. Re-run Koha's non-DB dependent test suite. You should note no warnings related to PDF::Reuse. 6. Re-verify the functionality of the related tools. 7. Reply to the list with any issue which arise. After we're happy with the changes, I will submit the attached patch to Koha via normal channels for QA, etc. This conversation will serve as QA for the proposed PDF::Reuse release. There are many things which could be different about the code in PDF::Reuse. This release is not the time to deal with these, so please keep it to show-stopping problems. There will be plenty of time to "fix" other things later. (That said, feel free to send along any thoughts directly to me.) Kind Regards, Chris http://backpan.perl.org/authors/id/C/CN/CNIGHS/PDF-Reuse-0.35_01.tar.gz
Greetings, mtompset@ubuntu:~$ dpkg -s libpdf-reuse-perl Package: libpdf-reuse-perl Status: install ok installed Priority: optional Section: perl Installed-Size: 608 Maintainer: Ubuntu MOTU Developers <ubuntu-motu@lists.ubuntu.com> Architecture: all Version: 0.35-2 Depends: perl (>= 5.6.0-16), libcompress-zlib-perl Recommends: libfont-ttf-perl, libtext-pdf-perl Description: Reuse and mass produce PDF documents PDF::Reuse could be used when you want to mass produce similar (but not identical) PDF documents and reuse templates, JavaScripts and some other components. It is functional to be fast, and to give your programs capacit produce many pages per second and very big PDF documents if necessary. . The module produces PDF-1.4 files. Some features of PDF-1.5, like "object streams" and "cross reference streams", are supported, but only at an experimental level. More testing is needed. (If you get problems with a ne document from Acrobat 6 or 7, try to save it or recreate it as a PDF-1.4 document first, before using it together with this module.) Original-Maintainer: Debian Perl Group <pkg-perl-maintainers@lists.alioth.d.org> Homepage: http://search.cpan.org/dist/PDF-Reuse/ I tried to cpan2deb PDF::Reuse to grab the latest, and that’s when I discovered weird numbering (this is –2, but the cpan2deb grabs –1). Suggestions? GPML, Mark Tompsett
Mark Tompsett schreef op wo 03-12-2014 om 13:18 [-0500]:
I tried to cpan2deb PDF::Reuse to grab the latest, and that’s when I discovered weird numbering (this is –2, but the cpan2deb grabs –1). Suggestions?
Don't do it that way. The -1 and -2 are Debian revision parts of the version number and have absolutely nothing to do with the module version. Also, this version of the module is not yet in CPAN (which is at 0.35) which is why cpan2deb won't work anyway. You need to build it from the package that Chris linked to. Some reading: http://www.fifi.org/doc/debian-policy/policy.html/ch-versions.html http://pkg-perl.alioth.debian.org/ Chris (and others testing), here's a .deb to get started: http://www.kallisti.net.nz/~robin/libpdf-reuse-perl_0.36-01-1_all.deb remove it when you're done as this will probably get in the way of a real version. This version is just a quick one. Chris, here's the bits from lintian I'd like you to care about before doing a proper release that I can pass up to Debian: This probably won't be in the final release to CPAN anyway, but best to check: P: libpdf-reuse-perl source: source-contains-git-control-dir .git N: N: The upstream source contains a .git directory. It was most likely N: included by accident since git version control directories usually don't N: belong in releases and may contain a complete copy of the repository. If N: an upstream release tarball contains .git directories, you should N: usually report this as a bug upstream. N: N: Severity: pedantic, Certainty: certain N: N: Check: cruft, Type: source I: libpdf-reuse-perl: spelling-error-in-manpage usr/share/man/man3/PDF::Reuse.3pm.gz An other Another N: N: Lintian found a spelling error in the manpage. Lintian has a list of N: common misspellings that it looks for. It does not have a dictionary N: like a spelling checker does. N: N: If the string containing the spelling error is translated with the help N: of gettext (with the help of po4a, for example) or a similar tool, N: please fix the error in the translations as well as the English text to N: avoid making the translations fuzzy. With gettext, for example, this N: means you should also fix the spelling mistake in the corresponding N: msgids in the *.po files. N: N: Severity: minor, Certainty: possible N: N: Check: manpages, Type: binary -- Robin Sheat Catalyst IT Ltd. ✆ +64 4 803 2204 GPG: 5FA7 4B49 1E4D CAA4 4C38 8505 77F5 B724 F871 3BDF
Hi Robin, Thanks very much for the help and the deb file. I've uploaded a new version which addresses the issues lintian pointed out. It also has a "fix" which someone upstream apparently added at some point. Mark pointed this out. New version: http://www.cpan.org/authors/id/C/CN/CNIGHS/PDF-Reuse-0.35_02.tar.gz Please ignore the 0.35_03 file which was an attempt to address the problem Mark was having. Kind Regards, Chris On Wed, Dec 3, 2014 at 4:57 PM, Robin Sheat <robin@catalyst.net.nz> wrote:
Mark Tompsett schreef op wo 03-12-2014 om 13:18 [-0500]:
I tried to cpan2deb PDF::Reuse to grab the latest, and that’s when I discovered weird numbering (this is –2, but the cpan2deb grabs –1). Suggestions?
Don't do it that way.
The -1 and -2 are Debian revision parts of the version number and have absolutely nothing to do with the module version. Also, this version of the module is not yet in CPAN (which is at 0.35) which is why cpan2deb won't work anyway. You need to build it from the package that Chris linked to.
Some reading: http://www.fifi.org/doc/debian-policy/policy.html/ch-versions.html http://pkg-perl.alioth.debian.org/
Chris (and others testing), here's a .deb to get started: http://www.kallisti.net.nz/~robin/libpdf-reuse-perl_0.36-01-1_all.deb remove it when you're done as this will probably get in the way of a real version. This version is just a quick one.
Chris, here's the bits from lintian I'd like you to care about before doing a proper release that I can pass up to Debian:
This probably won't be in the final release to CPAN anyway, but best to check:
P: libpdf-reuse-perl source: source-contains-git-control-dir .git N: N: The upstream source contains a .git directory. It was most likely N: included by accident since git version control directories usually don't N: belong in releases and may contain a complete copy of the repository. If N: an upstream release tarball contains .git directories, you should N: usually report this as a bug upstream. N: N: Severity: pedantic, Certainty: certain N: N: Check: cruft, Type: source
I: libpdf-reuse-perl: spelling-error-in-manpage usr/share/man/man3/PDF::Reuse.3pm.gz An other Another N: N: Lintian found a spelling error in the manpage. Lintian has a list of N: common misspellings that it looks for. It does not have a dictionary N: like a spelling checker does. N: N: If the string containing the spelling error is translated with the help N: of gettext (with the help of po4a, for example) or a similar tool, N: please fix the error in the translations as well as the English text to N: avoid making the translations fuzzy. With gettext, for example, this N: means you should also fix the spelling mistake in the corresponding N: msgids in the *.po files. N: N: Severity: minor, Certainty: possible N: N: Check: manpages, Type: binary
-- Robin Sheat Catalyst IT Ltd. ✆ +64 4 803 2204 GPG: 5FA7 4B49 1E4D CAA4 4C38 8505 77F5 B724 F871 3BDF
_______________________________________________ Koha-devel mailing list Koha-devel@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
Ok. I've pushed up PDF::Reuse 0.36 to CPAN, and opened bug 13407 to take care of the related code in Koha. Hopefully this brings about 5 years of waiting to a successful conclusion. Thanks to everyone who helped with the testing. Kind Regards, Chris http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13407 On Wed, Dec 3, 2014 at 12:53 PM, Chris Nighswonger <cnighswonger@foundations.edu> wrote:
I have rolled a pending PDF::Reuse release which incorporates several methods which I wrote to accommodate the label and patroncard tools in Koha back in 2009. I had hoped these would be included in PDF::Reuse before now; however, they were not. The module appears to have been abandoned by the original author, and I was able to be listed as a co-maintainer.
I have tested these changes on Koha's current head, and they appear to work fine. This is an official call for testing these changes prior to my releasing the new version of PDF::Reuse.
Since these changes directly affect Koha, they have the potential to affect current and future stable installs. Below is a link to a dev release of PDF::Reuse which contains the proposed changes. Attached is a patch formatted against the head current at the time of this email. Please do the following:
1. Upgrade PDF::Reuse to 0.35_01. 2. Run Koha's non-DB dependent test suite. You should notice some non-fatal warnings about the redefinition of one or two subs in PDF::Reuse. This should not affect the functionality of the tools for the end user. 3. Verify the functionality of the related tools. 4. Apply the attached patch. 5. Re-run Koha's non-DB dependent test suite. You should note no warnings related to PDF::Reuse. 6. Re-verify the functionality of the related tools. 7. Reply to the list with any issue which arise.
After we're happy with the changes, I will submit the attached patch to Koha via normal channels for QA, etc.
This conversation will serve as QA for the proposed PDF::Reuse release. There are many things which could be different about the code in PDF::Reuse. This release is not the time to deal with these, so please keep it to show-stopping problems. There will be plenty of time to "fix" other things later. (That said, feel free to send along any thoughts directly to me.)
Kind Regards, Chris
http://backpan.perl.org/authors/id/C/CN/CNIGHS/PDF-Reuse-0.35_01.tar.gz
_______________________________________________ Koha-devel mailing list Koha-devel@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
Christopher Nighswonger schreef op wo 10-12-2014 om 16:08 [-0500]:
Ok. I've pushed up PDF::Reuse 0.36 to CPAN, and opened bug 13407 to take care of the related code in Koha. Hopefully this brings about 5 years of waiting to a successful conclusion.
Hi Chris, I had a look at this and it looks like this patch: Author: Patrick Matth<E4>i <patrick.matthaei@web.de> Description: avoid warnings about "Use of uninitialized value $string in unpack ..." Bug: #506214 --- a/Reuse.pm +++ b/Reuse.pm @@ -1281,8 +1281,10 @@ if (ref($PDF::Reuse::Util::font_widths{$Font}) eq 'ARRAY') { my @font_table = @{ $PDF::Reuse::Util::font_widths{$Font} }; - for (unpack ("C*", $string)) - { $w += $font_table[$_]; + if (defined $string) { + for (unpack ("C*", $string)) + { $w += $font_table[$_]; + } } } else didn't go in. Was that by design? It doesn't actually apply cleanly: patching file Reuse.pm Hunk #1 FAILED at 1281 (different line endings). 1 out of 1 hunk FAILED dpkg-source: info: the patch has fuzz which is not allowed, or is malformed dpkg-source: info: if patch 'uninitialized_warning.patch' is correctly applied by quilt, use 'quilt refresh' to update it though I can probably fix that myself. But it's probably a good thing to have upstream, assuming it works as claimed. It'd also be good to sort this, though I expect not urgent: W: libpdf-reuse-perl: manpage-has-bad-whatis-entry usr/share/man/man3/PDF::Reuse::Util.3pm.gz N: N: Each manual page should start with a "NAME" section, which lists the N: name and a brief description of the page separated by "\-". The "NAME" N: section is parsed by lexgrog and used to generate a database that's N: queried by commands like apropos and whatis. This tag indicates that N: lexgrog was unable to parse the NAME section of this manual page. N: N: For manual pages that document multiple programs, functions, files, or N: other things, the part before "\-" should list each separated by a comma N: and a space. Each thing listed must not contain spaces; a man page for a N: two-part command like "fs listacl" must use something like "fs_listacl" N: in the "NAME" section so that it can be parsed by lexgrog. N: N: Refer to the lexgrog(1) manual page, the groff_man(7) manual page, and N: the groff_mdoc(7) manual page for details. N: N: Severity: normal, Certainty: certain N: N: Check: manpages, Type: binary N: Not sure why that didn't show up on the previous run, maybe I overlooked it. -- Robin Sheat Catalyst IT Ltd. ✆ +64 4 803 2204 GPG: 5FA7 4B49 1E4D CAA4 4C38 8505 77F5 B724 F871 3BDF
On Tue, Dec 16, 2014 at 12:00 AM, Robin Sheat <robin@catalyst.net.nz> wrote:
Hi Chris, I had a look at this and it looks like this patch:
Author: Patrick Matth<E4>i <patrick.matthaei@web.de> Description: avoid warnings about "Use of uninitialized value $string in unpack ..." Bug: #506214
didn't go in. Was that by design?
though I can probably fix that myself. But it's probably a good thing to have upstream, assuming it works as claimed.
This is fixed in this commit: https://github.com/cnighswonger/PDF-Reuse/commit/67d699560c08cac8a1cda15a527... Passing in an empty string in that case makes no sense, so the solution in the commit seemed a better fix in this case.
It'd also be good to sort this, though I expect not urgent:
W: libpdf-reuse-perl: manpage-has-bad-whatis-entry usr/share/man/man3/PDF::Reuse::Util.3pm.gz N: N: Each manual page should start with a "NAME" section, which lists the N: name and a brief description of the page separated by "\-". The "NAME" N: section is parsed by lexgrog and used to generate a database that's N: queried by commands like apropos and whatis. This tag indicates that N: lexgrog was unable to parse the NAME section of this manual page.
So what are the man pages generated from? I'm not sure where to apply the fix. Kind Regards, Chris
Christopher Nighswonger schreef op di 16-12-2014 om 11:58 [-0500]:
Passing in an empty string in that case makes no sense, so the solution in the commit seemed a better fix in this case.
Oh, excellent.
So what are the man pages generated from? I'm not sure where to apply the fix.
I think it's just pod2man. Basically, it's just missing the standard POD doc that modules should have, though I guess as it does have some POD, it ends up with a weird looking man page. It's been pushed into debian's git repo, just waiting for someone to review it for me. -- Robin Sheat Catalyst IT Ltd. ✆ +64 4 803 2204 GPG: 5FA7 4B49 1E4D CAA4 4C38 8505 77F5 B724 F871 3BDF
participants (4)
-
Chris Nighswonger -
Christopher Nighswonger -
Mark Tompsett -
Robin Sheat