• last updated 11 hours ago
Constraints
Constraints: committers
 
Constraints: files
Constraints: dates
download-archive reform

File-Storage used to generate downloaded archives in tgz format, to then switch to zip, more user-friendly, in particular outside the Linux world (See https://openacs.org/forums/message-view?message_id=557561). To ease the transition, a couple of parameters and relative API were introduced that would allow to choose the preferred command one should use. During this reform however, default parameter values in the tcl code became inconsistent with those in the info file. Furthermore, the chosen defaults were set as absolute paths to the executable, which is not friendly to non-linux environments, or other scenarios where the "typical" Linux filesystem structure cannot be assumed (e.g. containers, MacOS...).

The only usage of this parameters/api was in fact in the download-archive vuh. In upstream codebase, no package references this file, not even the file-storage itself. Upon review, one could see that the file would also allow to specify a custom download filename via the path, which could be considered questionable. It would also execute the command in a way that once again assumes some form of Linux environment (e.g. invoking bash).

Save for the ability to customize the archive format and the anti-feature of being able to manipulate the archive filename via the path, the script largely relplicates www/download-zip, in a better shape after a few reforms hinted by e.g. penetration tools.

Given the aformentioned considerations, I have decided to make download-archive a simple redirect to download-zip. Specifying the object_id via the path will keep working, while URLs out there expecting the name to change will not fail, but the name will not be modified. The archive format will from now on be assumed to be zip.

  1. … 4 more files in changeset.
Deprecate trivial fs::get_archive_extension and inline its only upstream occurrence

  1. … 1 more file in changeset.
Make use of new API "ad_mktmpdir" and "ad_opentmpfile" instead of "ad_tmpnam"

  1. … 2 more files in changeset.
Deprecate with_finally and with_catch, superseded by e.g. try idioms in tcl 8.6

They would also not comply with OpenACS naming convention

  1. … 4 more files in changeset.
merged changes from the oacs-5-9 branch and resolved conflicts

  1. … 7834 more files in changeset.
- add editor hints to .vuh files

  1. … 30 more files in changeset.
Merging back to HEAD all changes that happened in branch oacs-5-8 between tags: vg-merge-oacs-5-8-from-20141027 and vg-merge-oacs-5-8-from-20150427

  1. … 520 more files in changeset.
- improve robustness of download-archive

  1. … 2 more files in changeset.
- replace deprecated ad_require_permission by permission::require_permission in index.vuh files

- replace deprecated ns_tmpnam by ad_tmpname in index.vuh files

  1. … 3 more files in changeset.
Merging back to HEAD branch oacs-5-8 (using tag vg-merge-oacs-5-8-from-20141027).

  1. … 2547 more files in changeset.
- use consistently "naturalnum" instead of "integer" when accepting just positive values

  1. … 33 more files in changeset.
- modernize tcl

  1. … 8 more files in changeset.
Added callbacks for integration with PM. Made sure the package_id is set correctly

  1. … 61 more files in changeset.
Accidentally committed debugging statement

Fixed bug #929:

- Added a hint that if you're uploading internally linked files, you should leave title blank

- Verified fix for bug #1051 to allow renaming of files

- Changed link for latest revision on file detail page to use view/... URL instead of download/...

- Verified that you can indeed change the tar command to e.g. gtar, however you must do this on each file-storage instance individually

  1. … 8 more files in changeset.
made download-archive and the publish_object_to_file_system api file system

safe, that is, removed file system special characters according to the

'filename' tcl api.

@see http://dev.scriptics.com/man/tcl8.3/TclCmd/filename.htm#M29

  1. … 1 more file in changeset.
use bash instead of sh

adding a safety check

  1. … 2 more files in changeset.
adding "download archive" code; moved some stuff around in publish_to_file_system procs

  1. … 8 more files in changeset.