Many plugins have a zip file attached but no tgz.
But the configure extension installer cannot use these.
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.
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.
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).
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
, and CPAN:IPC::Cmd
and do this:
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
because of some hosted sites),
files to the usual permissions? That would actually avoid the permission errors people face (as reported frequently in Support web and #twiki.)
Archive::Zip uses Compress::Zlib which uses zlib. Not pure perl, sorry.
For .tgz yes, afaik not for .zip.
There is a store-only method that does no (de)compression, same as for
is always used for (de)compression, as I understand it.
Bouncing this item since Item3147
has been closed. Not all environments have Archive::Tar installed.
- Try to use Archive::Extract to unpack the .zip file
- Fall back to shell command
Think about the customer. Think about reducing "I'm giving up" voices during installation. Think about reducing our support load.
See related Item3249
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.
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.