-
Notifications
You must be signed in to change notification settings - Fork 39
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ISLANDORA-2053: Update travis.yml to force PHP 5.3.3 to run under Ubuntu Precise #137
Conversation
@DiegoPino this one is failing, not sure why. Perhaps because of the new The problem seems to be Ghostscript. |
@whikloj yeah, new Ghostscript release maybe, deprecated arguments? Will give it a look. The Charm and elegance of release times 😆 |
We were just talking about GS versions on the Security interest group - see also Islandora-Labs/islandora_vagrant#127 and https://jira.duraspace.org/browse/ISLANDORA-2035 |
Cool! (Well un cool that it is failing) probably can target a specific
version on travis but new install will have this issue if they go fir a
default so better to also fix it on code. We have a version detection in
php code that is also not serving its purpose
|
9.10~dfsg-0ubuntu10 is the original (2014) =9.10~dfsg-0ubuntu10.10 is the security patch (aug 2017) Maybe there is an issue there. Let's see!
Testing regression to the original Trusty 9.10
I'm doing a test. |
If not done this way you get he following packages have unmet dependencies: ghostscript : Depends: libgs9 (= 9.10~dfsg-0ubuntu10) but 9.10~dfsg-0ubuntu10.10 is to be installed
Again, just a test. Seems like the issue is with a “,” really and previous versions where less concerned about argument validity
After N+1 trial and errors solution seems to be (as always) to stay calm, apply flexibility and keep testing. Issues were: So the solution is: PLEASE: squash if merging. There is a lot of trial and error (late night) on this. Travis is actually passing now |
includes/utilities.inc
Outdated
// Both are 16bits per channel. No compression possible. | ||
// Was fixed in: | ||
// http://git.ghostscript.com/?p=ghostpdl.git;a=commitdiff;h=f8e77523. | ||
$base_command = '!gs_path -q -dNOPAUSE -dBATCH -sDEVICE=!device -sCompression=none -sOutputFile=!output_file -r!resolution -dFirstPage=!offset -dLastPage=!offset !pdf_uri'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems like a bigger problem? Can we not compress Tiffs using GS in versions >= 9.10?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can, but only if using tiff32nc
or tiff16nc
or tiffsep
, etc. The issue is that compression actually never ever worked with tiff64nc, it was ignored but it did not fail. 9.10 introduced the issue that running tiff64nc is almost impossible (impossible!) because compression is set to lzw
and 16bits per channel simply don´t compress according to tiff 6.0 specs. So that is actually a bug. Same reason we need to document that. If people need to use tiff64nc (you can get the same results using tiffsep
and using the don't generate separations flag actually) we need an alternative. One of my previous pulls added actually that alternative to the drop box, but i was afraid i was going to far.
See https://www.ghostscript.com/doc/current/Devices.htm#TIFF
(https://www.ghostscript.com/doc/9.10/Devices.htm#TIFF is actually the same)
The first ones should generate "uncompressed output:" and
-sCompression= is part of tiffsep
In reality, their docs are complex to follow
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also GS in versions 9.10 to 9.15 seems? the rest should work. Anyone willing to test every version?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, that seems like overkill. It appears that the fix was first included in the 9.19 release. Should we add that to the note here or just in whatever documentation we do for this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah. Go ahead and add a note(comment) in the main conversation (these ones get obscured by changes) and then we can make sure that goes into release as a documentation task. @whikloj++
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perhaps we should remove the mention of "9.10" in the code note? Based on the git commit date and the various release notes it appears that this bug would affect GS versions 9.10 -> 9.18 inclusive.
Bringing this up a level and suggesting that GhostScript 9.19 is the first version with the fix in their code. That should probably be documented for our users. |
Ok will do ( walking dogs 🐶) 9.10 is the only packaged version for ubuntu
trusty Only reason i made that reference
El El jue, 7 de sep. de 2017 a las 16:08, Jared Whiklo <
notifications@github.com> escribió:
***@***.**** commented on this pull request.
------------------------------
In includes/utilities.inc
<#137 (comment)>
:
> @@ -1178,13 +1178,23 @@ function islandora_paged_content_extract_tiff_from_pdf($uri, $offset, $device, $
$output_file = drupal_tempnam('temporary://', "page{$offset}.tif");
// Need to link the file because of UTF-8 encoding.
$copy = islandora_paged_content_create_clean_link($uri, 'pdfforgs');
- $base_command = '!gs_path -q -dNOPAUSE -dBATCH -sDEVICE=!device -sCompression=lzw -sOutputFile=!output_file -r!resolution, -dFirstPage=!offset -dLastPage=!offset !pdf_uri';
+ // For all arguments see https://ghostscript.com/doc/current/Devices.htm#TIFF.
+ if ($device == 'tiff64nc' || $device == 'tiff48nc') {
+ // Will fail anyway in gs 9.10
+ // Both are 16bits per channel. No compression possible.
+ // Was fixed in:
+ // http://git.ghostscript.com/?p=ghostpdl.git;a=commitdiff;h=f8e77523.
+ $base_command = '!gs_path -q -dNOPAUSE -dBATCH -sDEVICE=!device -sCompression=none -sOutputFile=!output_file -r!resolution -dFirstPage=!offset -dLastPage=!offset !pdf_uri';
Perhaps we should remove the mention of "9.10" in the code note? Based on
the git commit date and the various release notes it appears that this bug
would affect GS versions 9.10 -> 9.18 inclusive.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#137 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AGn857BvDLVaElgc1D5TCT4T180tBylpks5sgE0igaJpZM4POlhi>
.
--
Diego Pino Navarro
Digital Repositories Developer
Metropolitan New York Library Council (METRO)
|
Right, but as that change is in the main code it could be run on other distributions and is outside the scope of testing only. |
@whikloj last question: do I remove all comments there or do I leave to mention to the bug? Seems like a way of avoiding to have an open ticket about the same issue in 6 months? |
I'd leave the note in and just remove the broken versions or expand it to say
or something like that. |
ISLANDORA-2053: (https://jira.duraspace.org/browse/ISLANDORA-2053)
and
ISLANDORA-2035: (https://jira.duraspace.org/browse/ISLANDORA-2035)
http://irclogs.islandora.ca/2017-09-05.html
travis-ci/travis-ci#2963
Islandora/islandora#683
As of September 2017, Travis-CI has removed support for PHP 5.3 (and 5.2) for their Ubuntu Trusty Images, forcing us, in order to keep Drupal's compatibility matrix tested, to run Travis-CI test for 5.3 on Ubuntu Precise
What does this Pull Request do?
This pull Fixes our failing Travis-CI tests:
Should allow PHP 5.3.3 to run under Ubuntu Precise and Higher versions under Ubuntu Trusty.
Changes the way we define which PHP versions and Fedora ones run in Travis.
Also, happens that to be able to fix this under Trusty some of our code fails when using
gs
to output a TIFF. That is an actual result of newer versions of Ghostscript being more strict about passing invalid combinations of arguments. Likehttps://www.ghostscript.com/doc/current/Use.htm#Output_resolution (no ",")
and
https://ghostscript.com/doc/current/Devices.htm#TIFF (no compression for tiff32,64,etc devices)
So had to fix that. That issue was reported in ISLANDORA-2035.
What's new?
We moved PHP 5.3.3 version and the corresponding Fedora versions into the matrix section of the Travis YAML file. Also TIFF generation from PDF should work here and in Vagrant under Trusty again.
How should this be tested?
Travis-CI should pass and everything single PHP/FEDORA version combination should look good and very green.
Interested parties
@Islandora/7-x-1-x-committers