Editing from a Hostile Environment - commoncriteria/pp-template GitHub Wiki

Editing in a Hostile Environment

Many users are known to have severely restricted, almost completely unusable environments. Modifying documents in this scenario is tough, but not impossible thanks to Cloud IDEs. There are many Cloud IDE providers. Two that have been found to offer decent support is goorm and codenvy.

Both provide free accounts that come with about 10 Gigs of temporary space which should work just fine for editing PPs.

Goorm's environment does not come preloaded with with libxslt, but they allow you to install it using the following commands (I think):

apt-get update
apt-get install libxslt1-dev

For codenvy, you need a RedHat account, which is free. The "Java Gradle" workspace has [barely] enough tools to make this work.

Initial Setup

To build PP projects (which is really the point of using codenvy, otherwise you'd just edit in the editor GitHub provides), clone the codenvy-tools project:

git clone https://github.com/commoncriteria/codenvy-tools

From time to time, you should update the project to see if improvements have been made.

git pull

Each Session

Everytime you start the workspace, source the codenvy-tools' setup.sh file:

. /path/to/codenvy-tools/setup.sh

After this, you're ready to begin editing projects.

Starting a project

To edit a project, clone it in the "/projects/" directory. codenvy's workspaces are ephemeral---they'll remember which projects you've checked out, but that's it. If you've downloaded tools or cloned projects with submodules (e.g. almost all CC projects), codenvy will forget about them. You'll have your cloned project, but not the submodule. codenvy tools will rediscover all 'transforms' submodules if the project is in the to level '/projects' directory. It also downloads and extracts the 'jing' project to do RelaxNG validations. To build PP projects, run

build-pp /path/to/input/file.xml

To build modules, run

build-module /path/to/input/file.xml

One last nightmare, downloading the output files doesn't seem to work right now. Right clicking on files in the file explorer will allow you to 'preview' them, at least some file types. For other file types that you cannot preview, a workaround is to base64 encode the files to a file with a markdown extension

base64 /some/file > /some/other/file.md

and then preview that file and then copy and paste it to an editor on your personal workstation, where it will have to be base64 decoded.