Many plugins have a zip file attached but no tgz.
But the configure extension installer cannot use these.
You get
Fetching http://twiki.org/p/pub/Plugins/HolidaylistPlugin/HolidaylistPlugin.tgz...
Error: Sorry, I can't install HolidaylistPlugin because I don't recognise the download as a gzip file. Please follow the published process for manual installation from the command line.
So this limits the use of this feature to plugins uploaded by build contrib.
This is a sad limitation.
--
KJL
The standard file type for TWiki extensions has always been .zip files. Not all packages have a .tgz, but all do have a .zip file. I recommend therefore to look for a pure Perl unzip library we can ship with the TWiki package. Raising this to requirement. (See related
Item3147)
BTW, I sent an e-mail to the maintainer of Archive::Extract asking if there is a pure perl .zip unzip module.
--
PTh
This is nothing to do with the availability of a zip installer; Archive::Zip works just fine. You are unlikely to find a pure perl unzipper, I suspect.
The reason the installer doesn't support .zip is that format does not carry file permissions. You could always reverse-engineer the permissions from the MANIFEST (this is one reason I put the permissions support in there in the first place).
CC
OK, after some detective work I found a pure perl solution to unzip .zip files: Add the libs of CPAN: Archive::Extract,
CPAN:Archive::Zip
,
CPAN:Module::Load
,
CPAN:/Module::Load::Conditional
,
CPAN:Locale::Maketext::Simple
,
CPAN:Params::Check
, and
CPAN:IPC::Cmd
to
twiki/CPAN
and do this:
use Archive::Extract;
my $ae = Archive::Extract->new( archive => $zipFileName );
my $ok = $ae->extract or die $ae->error;
Archive::Extract is a wrapper that supports many other archive formats. It is probably better to take the useful guts of Archive::Extract and remove the dependency on it and a number of other CPAN modules.
On file permissions, how about hardcoding directories to
755
(not
775
because of some hosted sites),
.pm
files to
664
, and
.txt
/
.txt,v
files to the usual permissions? That would actually avoid the permission errors people face (as reported frequently in Support web and #twiki.)
--
PTh
Archive::Zip uses Compress::Zlib which uses zlib. Not pure perl, sorry.
CC
For .tgz yes, afaik not for .zip.
--
PTh
There is a store-only method that does no (de)compression, same as for
Archive::Tar
, but
Compress:Zlib
is always used for (de)compression, as I understand it.
CC
Bouncing this item since
Item3147 has been closed. Not all environments have Archive::Tar installed.
Suggestion:
- Try to use Archive::Extract to unpack the .zip file
- Fall back to shell command
unzip
Think about the customer. Think about reducing "I'm giving up" voices during installation. Think about reducing our support load.
See related
Item3249
--
PTh
I'm getting really, really irritated by the continual suggestions that I
don't think of the customer. Instead of chipping in from the sidelines with obvious suggestions, how about contributing some code?
Code borrowed from
BuildContrib used to improve on this.
CC
Thanks Crawford for fixing this!
I am sorry, it is not my intent to irritate anyone, and I apologize if I did. IMHO, the contention on customer focus is is real, it arises from the unresolved question of adding more CPAN dependencies that result in more difficulties for unexperienced admins to install TWiki.
--
PTh