Item14891: New dependencies in ImagePlugin not listed in DEPENDENCIES

pencil
Priority: Urgent
Current State: No Action Required
Released In: n/a
Target Release:
Applies To: Extension
Component: ImagePlugin
Branches:
Reported By: GeorgeClark
Waiting For:
Last Change By: MichaelDaum
The latest ImagePlugin adds dependencies that knocked my site down. And they are not available in Ubuntu's repository, so they had to be built with cpanm and added to a local lib

  • Digest::SHA1 - Ubuntu provideds Digest::SHA in libdigest-sha-perl, which provides sha1, but not compatibly with Digest::SHA1
  • Cache::FileCache - Also not available on Ubuntu.

This is pretty ugly. After an extension update, some pages began generating errors, but not ones I normally visit, so the problem was not detected. For ex, only some System web topics failed. For some reason CommentPlugin system topic was failing with the missing dependency.

Worse, neither of these new dependencies are listed in the DEPENDENCIES file, so Foswiki configure and dependency reports don't detect the errors.

-- GeorgeClark - 01 Dec 2019

Finally managed to find the package. libcache-cache-perl contains the Cache::FileCache. It still would have been really helpful to have some information about the dependency. I'm not sure about the Digest::SHA since that only showed up as an error after I build Cache::FileCache using cpanm.

-- GeorgeClark - 02 Dec 2019

Hm, cannot see where Digest::SHA1 is used in ImagePlugin. Where did you see its dependency? .... ah found it myself: Cache::FileCache depends on Digest::SHA1

Canonical has patched Cache::Cache by itself:

--- /home/www-data/.plenv/versions/5.30.0/lib/perl5/site_perl/5.30.0/Cache/FileBackend.pm       2015-01-22 16:59:26.000000000 +0100
+++ /usr/share/perl5/Cache/FileBackend.pm       2015-10-24 02:35:11.000000000 +0200
@@ -12,7 +12,7 @@
 
 use strict;
 use Cache::CacheUtils qw( Assert_Defined Build_Path Freeze_Data Thaw_Data );
-use Digest::SHA1 qw( sha1_hex );
+use Digest::SHA qw( sha1_hex );
 use Error;
 use File::Path qw( mkpath );
 use File::Temp qw( tempfile );

The reported issue is roughly 3 years old with no new version of Cache::Cache...

Wasn't aware that Cache::Cache sux so much. Worth a fork and pull request at https://github.com/rjbs/Cache-Cache

-- MichaelDaum - 02 Dec 2019

As an FYI that doesn't help George - Alpine Linux has both packages and they were already included in timlegge/docker-foswiki

-- TimothyLegge - 02 Dec 2019

I know. Problem is that the maintainer of Cache::Cache does not move to Digest::SHA part of perl's core. So distros patch packages for themselves each while those patches don't make it upstream for whatever reason.

-- MichaelDaum - 02 Dec 2019

Lack of support on many older perl modules is the issue. Net::SAML2 has had no active maintainer for a number of years. I have the most recent working code in my Fork and I have been trying to get someone to take over the maintenance for months to get a new CPAN release. Perl has a real problem with the sheer volume of unsupported modules....

-- TimothyLegge - 02 Dec 2019

It would be nice if when new dependencies were added on the fly, they would fail soft instead of delivering the WPoD (white page of death) to the user... Missing dependency pathDigest path path path... Either running with lower functionality or at least disabling itself with an error that would display on InstalledPlugins. My site had broken pages for several weeks.

-- GeorgeClark - 02 Dec 2019

@George, agreed. Everything is better than a WPoD.

-- MichaelDaum - 02 Dec 2019

Just found out about CHI. There are a couple of plugins, including ImagePlugin, that use Cache::Cache. These should all be migrated to CHI. Here is an introduction to CHI. Just to find out it has a couple of issues to with pending pull requests not being addressed such as the famous "Unescaped left brace in regex is illegal" most perlers have been fighting. Argh.

-- MichaelDaum - 06 Jan 2020

Let me hijack this Item: Have a box with ImagePlugin v9 (12 Nov 2019) rendering svg files among others. IMAGE in general works, but svg images a rendered with a red error message "Error: Exception 430: unable to open file `/tmp/magick-10344H9M69pP362x4': ... @ error/constitute.c/ReadImage/600".

On Debian Buster this is solved by installing librsvg2-bin.

-- OliverKrueger - 10 Jan 2020

@Oliver, this is indeed unrelated to the initial report. Could you collect your findings in a separate one, please? Thanks.

-- MichaelDaum - 10 Jan 2020

Caching code is about to be rewritten. So this issue goes away.

-- MichaelDaum - 26 Oct 2020
 

ItemTemplate edit

Summary New dependencies in ImagePlugin not listed in DEPENDENCIES
ReportedBy GeorgeClark
Codebase
SVN Range
AppliesTo Extension
Component ImagePlugin
Priority Urgent
CurrentState No Action Required
WaitingFor
Checkins
ReleasedIn n/a
CheckinsOnBranches
trunkCheckins
masterCheckins
ItemBranchCheckins
Release02x01Checkins
Release02x00Checkins
Release01x01Checkins
I Attachment Action Size Date Who Comment
use-Digest-SHA.patchpatch use-Digest-SHA.patch manage 1 K 02 Dec 2019 - 09:23 MichaelDaum ubuntu patch for Cache::Cache
Topic revision: r12 - 26 Oct 2020, MichaelDaum
The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. See Copyright Statement. Creative Commons License    Legal Imprint    Privacy Policy