Forum OpenACS Development: Re: New util::zip_file command

Collapse
Posted by Gustaf Neumann on
thanks, antonio. The code looks fine! Do you know, what are the version dependencies are (does it need a minimal version version of zip or unzip to function?).

You are mentioning "windows and linux". i guess, you did not want to imply that it only works on these two and not on e.g. Mac OS X or Solaris. If this is part of the core, it is supposed to work everywhere, so it is necessary to include zip/unzip to the dependencies in the installer scripts.

We are using on our production platform mostly nx::zip [1], which allows e.g. to stream zip-files (e.g. from the content repository) without copying. Without that we had the problem with the direct use of zip that voluminous file-system operations could bring the fastest server to a crawl.

[1] https://github.com/gustafn/nsf/blob/master/library/lib/nx-zip.tcl

Collapse
Posted by Antonio Pisano on
Well, the utility actually implies the presence of the bash shell on every platform different from Windows... Mac OS should not be a problem, but I cannot speak about Solaris...

I haven't checked throughly about zip command compatibility, because I assumed the options I've used would be there in every current zip tool one could download.

This said, your concerns are legit. The main problem is that we are wrapping a command here, and that this command lacks a feature so basic we have to build a little script every time... very unconvenient.

Didn't know about nx::zip. It would be far better of course! Maybe I could use the same trick we did on util::http and check for the platform: if Naviserver -> nx::zip, otherwise the command hack.

Collapse
Posted by Gustaf Neumann on
i was more concerned about (a) the availability of the zip+unzip programs on various systems (who cares, it get installed) and (b) about the version dependencies (are the sematics and flgs of zip / unzip identical over all versions)) and (c) for the further consequences (installer scripts, debian). Such things then to become forgotten.