Skip to content

Commit

Permalink
Item11267: More README changes
Browse files Browse the repository at this point in the history
  • Loading branch information
gac410 committed Aug 27, 2014
1 parent 9380e6d commit 38893ba
Showing 1 changed file with 27 additions and 27 deletions.
54 changes: 27 additions & 27 deletions README.md
@@ -1,28 +1,28 @@
# Foswiki Installation based on git

You can run a Foswiki instance from this clone simply by pointing Apache at it in the normal way and running =configure=.
You can run a Foswiki instance from this clone simply by pointing Apache at it in the normal way and running `configure`.

*Note: Configure is currently broken in the master branch. We hope to resovle this shortly. We recommend using the Release01x01 branch.*
**Note: Configure is currently broken in the master branch. We hope to resovle this shortly. We recommend using the Release01x01 branch.**

By default the cloned Foswiki core won't have any of the extensions (plugins or contribs) installed. Default extensions are downloaded one level up from the Foswiki core:

To "install" extensions in a checkout area, you should use the =pseudo-install.pl= script to install them. On Unix/Linux this script generates soft-links from the core tree to the extensions, so you can work on your code in situ and see the impact of the changes on your live foswiki without needing to do an install step. Windows doesn't support soft links, so the script can also be run in =-copy= mode (the default on Windows), but in this case you will have to re-run it each time you change your extension. *Remember you have to enable any plugins you want to test* in =configure=. Use:
- =pseudo-install.pl default= to enable the default contribs and plugins (e.g. Extensions.TwistyContrib which is relied on by Extensions.PatternSkin)
- =pseudo-install.pl developer= to install the additional developer extensions. The developer option also installs all the default extensions.
See the header comment of the =pseudo-install.pl= script (core directory of checkout) for options and more information. Note that =pseudo-install.pl= only works with extensions that have a MANIFEST file, as required by the Extensions.BuildContrib.
To "install" extensions in a checkout area, you should use the `pseudo-install.pl` script to install them. On Unix/Linux this script generates soft-links from the core tree to the extensions, so you can work on your code in situ and see the impact of the changes on your live foswiki without needing to do an install step. Windows doesn't support soft links, so the script can also be run in `-copy` mode (the default on Windows), but in this case you will have to re-run it each time you change your extension. *Remember you have to enable any plugins you want to test* in `configure`. Use:
- `pseudo-install.pl default` to enable the default contribs and plugins (e.g. Extensions.TwistyContrib which is relied on by Extensions.PatternSkin)
- `pseudo-install.pl developer` to install the additional developer extensions. The developer option also installs all the default extensions.
See the header comment of the `pseudo-install.pl` script (core directory of checkout) for options and more information. Note that `pseudo-install.pl` only works with extensions that have a MANIFEST file, as required by the Extensions.BuildContrib.

Script examples below are for =bash= shell.
Script examples below are for `bash` shell.
## Example of running pseudo-install

The typical situation is that you want to run a pseudo-installed Foswiki checked out from "master" branch. And if you develop plugins, you want to be able to activate your plugin in this installation. This is the entire sequence for checking out the master branch from git and doing the pseudo-install. We assume that you want to run your git based install in =/var/www/foswiki=
The typical situation is that you want to run a pseudo-installed Foswiki checked out from "master" branch. And if you develop plugins, you want to be able to activate your plugin in this installation. This is the entire sequence for checking out the master branch from git and doing the pseudo-install. We assume that you want to run your git based install in `/var/www/foswiki`

The following commands check out an _absolutely minimal_ Foswiki (the core + default user mapping only). This is the smallest checkout that will run. The steps are:
-1 create the root directory called foswiki
-1 checkout =https://github.com/foswiki/distro.git= using the git master branch
-1 This will check out core and all the default and developer extensions, however they are not installed yet.
-1 pseudo-install default
-1 change the ownership so the entire tree is owned by the user running the Apache. In this example the user name is "apache".
-1 point Apache at the checkout
1. create the root directory called foswiki
1. checkout `https://github.com/foswiki/distro.git` using the git master branch
1. This will check out core and all the default and developer extensions, however they are not installed yet.
1. pseudo-install default
1. change the ownership so the entire tree is owned by the user running the Apache. In this example the user name is "apache".
1. point Apache at the checkout
Change the commands to fit your actual file locations and Apache user. Some commands may have to be run as root.

```
Expand Down Expand Up @@ -72,14 +72,14 @@ chown -R apache:apache foswiki
# Now configure Apache to use the Foswiki in /var/www/foswiki/core
```

-1 Use to generate configuration http://foswiki.org/Support/ApacheConfigGenerator?vhost=example.com&dir=%2Fvar%2Fwww%2Fexample.com%2Ffoswiki&pathurl=%2Ffoswiki&allowconf=&requireconf=&engine=CGI&fastcgimodule=fastcgi&apver=2&shorterurls=enabled&loginmanager=Template&phpinstalled=None&errordocument=UserRegistration
-1 Clipboard copy and save this to core/../foswiki.httpd.conf
1. Use to generate configuration http://foswiki.org/Support/ApacheConfigGenerator?vhost`example.com&dir`%2Fvar%2Fwww%2Fexample.com%2Ffoswiki&pathurl`%2Ffoswiki&allowconf`&requireconf`&engine`CGI&fastcgimodule`fastcgi&apver`2&shorterurls`enabled&loginmanager`Template&phpinstalled`None&errordocument`UserRegistration
1. Clipboard copy and save this to core/../foswiki.httpd.conf
-* cat > foswiki-svn_httpd.conf
-1 Include this httpd.conf from your apache httpd.conf
1. Include this httpd.conf from your apache httpd.conf
-* If you are on a Mac, you can put this file into /etc/apache2/other/ and line "Include /private/etc/apache2/other/*.conf" will pick it up.
-* Otherwise, edit your httpd.conf and add: Include /path/to/foswiki-svn_httpd.conf
-* Ensure your new .conf file has chmod a+r access
%ICON{info}% Note: If the apache error log has lots of =Symbolic link not allowed or link target not accessible= type messages, then you probably need to add =+FollowSymLinks= to the =Options= for the =/var/www/foswiki/dev/core/pub= directory in your apache configuration.
%ICON{info}% Note: If the apache error log has lots of `Symbolic link not allowed or link target not accessible` type messages, then you probably need to add `+FollowSymLinks` to the `Options` for the `/var/www/foswiki/dev/core/pub` directory in your apache configuration.

Now and then you will want to keep your installation in sync with the latest version in the foswiki git repository. The pseudo-install script is not intelligent enough to cope with changes to MANIFESTs, so this is the idiot proof way to update. It first removes all the links (or copied files), git fetch. And finally does a new pseudo-install.
```
Expand All @@ -91,7 +91,7 @@ chown -R apache:apache ..```

Normally just doing the git pull will be enough, unless someone has removed files (and even then you can usually ignore it).

If you are a developer you can also install the kit required to run unit tests, by passing the =developer= parameter to =pseudo-install.pl=
If you are a developer you can also install the kit required to run unit tests, by passing the `developer` parameter to `pseudo-install.pl`
```
cd /var/www/foswiki/core
./pseudo-install.pl developer```
Expand All @@ -101,8 +101,8 @@ This will also install the Extensions.BuildContrib and a number of other compone
## Tips, hints, and useful commands
### Enable ASSERTS for more extensive testing

The unit tests run with ASSERTS enabled, but the live web environment does not. In order to enable ASSERTS, edit =bin/LocalLib.cfg= (If it's not there, create it by copying =bin/LocalLib.cfg.txt=) and un-comment the following line
```$ENV{FOSWIKI_ASSERTS} = 1;```
The unit tests run with ASSERTS enabled, but the live web environment does not. In order to enable ASSERTS, edit `bin/LocalLib.cfg` (If it's not there, create it by copying `bin/LocalLib.cfg.txt`) and un-comment the following line
```$ENV{FOSWIKI_ASSERTS} ` 1;```

This enables additional validation tests that will impact performance, but will catch some issues that might be missed during normal web usage.

Expand All @@ -111,15 +111,15 @@ This enables additional validation tests that will impact performance, but will

Foswiki ships with a number of CPAN modules that are used only when the underlying platform is missing the modules. In order to test using the modules that are shipped with Foswiki, CPAN lib prepending should be enabled in <span>bin/LocalLib.cfg</span>by uncommenting the following line:

```$CPANBASE = ''; # Uncommented: Default path prepended```
```$CPANBASE ` ''; # Uncommented: Default path prepended```

. See the comments in =bin/LocalLib.cfg.txt= for more details.
. See the comments in `bin/LocalLib.cfg.txt` for more details.

It is probably best to test using platform modules as well as the shipped modules.

### Installing non-default extensions

The example commands above describe how to install a _minimalist_ Foswiki. The pseudo-install script knows some additional tricks to use with non-default extensions. If you pseudo-install an extension that is not currently checked out, pseudo-install will automatically clone the extension from github using =https://github.com/foswiki/ExtensionName.git=
The example commands above describe how to install a _minimalist_ Foswiki. The pseudo-install script knows some additional tricks to use with non-default extensions. If you pseudo-install an extension that is not currently checked out, pseudo-install will automatically clone the extension from github using `https://github.com/foswiki/ExtensionName.git`

%T% Note that although we use release managed branches (master, Release01x00, Release01x01) in the Foswiki core distribution ("distro"), non-default extensions typically only have a "master" branch.

Expand Down Expand Up @@ -161,14 +161,14 @@ Linked /var/www/fw/core/tools/develop/githooks/pre-commit as /var/www/fw/core/..

### Delete all broken soft links in a subversion-based install

This is handy if you have changed a lot of MANIFESTS or have manually soft-linked any files, and want to remove any broken soft links. Assume your trunk checkout is at =/var/www/foswiki=
This is handy if you have changed a lot of MANIFESTS or have manually soft-linked any files, and want to remove any broken soft links. Assume your trunk checkout is at `/var/www/foswiki`

```
find -L /var/www/foswiki/core -type l -exec rm \{\} \;```

### Create a new extension

You can quickly and easily create a new extension using the =create_new_extension.pl= script that is installed in =core= when you pseudo-install the Extensions.BuildContrib.
You can quickly and easily create a new extension using the `create_new_extension.pl` script that is installed in `core` when you pseudo-install the Extensions.BuildContrib.

### Set up the unit test framework

Expand All @@ -180,7 +180,7 @@ If you are developing new code you will want to set up the development and test
Then:
```
cd test/unit
export FOSWIKI_LIBS=/var/www/foswiki/core/lib
export FOSWIKI_LIBS`/var/www/foswiki/core/lib
perl ../bin/TestRunner.pl FoswikiSuite```

(or equivalent on Windows)
Expand Down

0 comments on commit 38893ba

Please sign in to comment.