You are here: Foswiki>Tasks Web>Item13743 (10 Oct 2015, GeorgeClark)Edit Attach

Item13743: Configure expects any MANIFEST entry in a dir called "data" as a .txt file,

pencil
Priority: Normal
Current State: Closed
Released In: 2.0.2
Target Release: patch
Applies To: Engine
Component: Configure
Branches: master
Reported By: MaikGlatki
Waiting For:
Last Change By: GeorgeClark
An extensions that has data/mime.types in its MANIFEST fails installation (e.g. with tools/configure) with the following message:

Use of uninitialized value $web in concatenation (.) or string at /var/www/foswiki/lib/Foswiki/Configure/Package.pm line 958.
Use of uninitialized value $topic in concatenation (.) or string at /var/www/foswiki/lib/Foswiki/Configure/Package.pm line 958.
Use of uninitialized value $tweb in concatenation (.) or string at /var/www/foswiki/lib/Foswiki/Configure/Package.pm line 958.
Use of uninitialized value $ttopic in concatenation (.) or string at /var/www/foswiki/lib/Foswiki/Configure/Package.pm line 958.
Use of uninitialized value in string eq at /var/www/foswiki/lib/Foswiki/Meta.pm line 2077.
Use of uninitialized value in concatenation (.) or string at /var/www/foswiki/lib/Foswiki/Meta.pm line 2077.
Use of uninitialized value in concatenation (.) or string at /var/www/foswiki/lib/Foswiki/Meta.pm line 2077.
Unable to save topic  - web  does not exist at /var/www/foswiki/lib/Foswiki/Meta.pm line 2077.

This fails because _getMappedWebTopic gets called for anything in data, but not anything in data is a wiki topic. This worked in Foswiki 1.1.9.

Patch included, see also: https://github.com/foswiki/distro/pull/5

This fixes an error occuring during installation when an extension tries to install data/mime.types. The Package.pm probably needs some additional work, as the data directory is hardcoded and there are quite a lot of corner cases to be dealt with (e.g. we probably do not want an extension to overwrite .htpasswd, but a .changes file might be valid).

-- MaikGlatki - 23 Sep 2015

Thanks for the suggested fix and for opening a task. I've adjusted your fix a bit to allow for any filename in the pub or data directories. If a Web/Topic cannot be identified, then the file is simply copied. I also addressed the .htpasswd exposure, and also added in a check for .htaccess files. And in thinking further about .changes, that file also should never be modified directly by the package installer. Adding an exclusion for that as well.

-- Main.GeorgeClark - 25 Sep 2015 - 02:24

ItemTemplate edit

Summary Configure expects any MANIFEST entry in a dir called "data" as a .txt file,
ReportedBy MaikGlatki
Codebase 2.0.1, 2.0.0
SVN Range
AppliesTo Engine
Component Configure
Priority Normal
CurrentState Closed
WaitingFor
Checkins distro:38831ba1759f distro:9114d1370e7f
TargetRelease patch
ReleasedIn 2.0.2
CheckinsOnBranches master
trunkCheckins
masterCheckins distro:38831ba1759f distro:9114d1370e7f
ItemBranchCheckins
Release01x01Checkins
Topic revision: r4 - 10 Oct 2015, GeorgeClark
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