• Do not register here on develop.twiki.org, login with your twiki.org account.
• Use View topic Item7848 for generic doc work for TWiki-6.1.1. Use View topic Item7851 for doc work on extensions that are not part of a release. More... Close
• Anything you create or change in standard webs (Main, TWiki, Sandbox etc) will be automatically reverted on every SVN update.
Does this site look broken?. Use the LitterTray web for test cases.

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).


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.


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.


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 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.


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

Summary configure extension installer cannot install if there is only a zip and no tgz
ReportedBy TWiki:Main.KennethLavrsen
Codebase ~twiki4
SVN Range TWiki-4.1, Thu, 09 Nov 2006, build 11947
AppliesTo Engine

Priority Urgent
CurrentState Closed

Checkins 12203
TargetRelease n/a
Edit | Attach | Watch | Print version | History: r12 < r11 < r10 < r9 < r8 | Backlinks | Raw View |  Raw edit | More topic actions
Topic revision: r12 - 2006-12-11 - PeterThoeny
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2022 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback