Next: , Previous: , Up: Automated FTP Uploads   [Contents][Index]

11.6.7 FTP Upload Standalone Directives

The previous sections describe how to upload a file to be publicly released. It’s also possible to upload a directive file by itself to perform a few operations on the upload directory. The supported directives are:


creates a symlink.


removes a symlink.


takes a file or directory offline.

As for the directives described above, the directory and version directives are still required, the comment directive remains optional, and the filename directive is not allowed.

When uploaded by itself, the name of the directive file is not important. But it must be still be signed, using ‘gpg --clearsign’; the resulting .asc file is what should be uploaded.

Here’s an example of the full directive file to create a foo-latest.tar.gz symlink:

version: 1.2
directory: foo
symlink: foo-1.1.tar.gz foo-latest.tar.gz
comment: create a symlink

If you include more than one directive in a standalone upload, the directives are executed in the sequence they are specified in. If a directive results in an error, further execution of the upload is aborted.

Removing a symbolic link (with rmsymlink) which does not exist results in an error. On the other hand, attempting to create a symbolic link that already exists (with symlink) is not an error. In this case symlink behaves like the command ln -s -f: any existing symlink is removed before creating the link. (But an existing regular file or directory is not replaced.)

Here’s an example of removing a symlink, e.g., if you decide not to maintain a foo-latest link any more:

version: 1.2
directory: foo
rmsymlink: foo-latest.tar.gz
comment: remove a symlink

And here’s an example of archiving a file, e.g., an unintended upload:

version: 1.2
directory: foo
archive: foo-1.1x.tar.gz
comment: archive an old file; it will not be
comment: publicly available any more.

The archive directive causes the specified items to become inaccessible. This should only be used when it is actively bad for them to be available, e.g., you uploaded something by mistake.

If all you want to do is reduce how much stuff is in your release directory, an alternative is to email and ask them to move old items to the directory; then they will still be available. In general, however, we recommend leaving all official releases in the main release directory.

Next: , Previous: , Up: Automated FTP Uploads   [Contents][Index]