Hello. As it has now become my itch, I've started working on separating out installation of the OpenGuides modules from setup of an Open Guide. I'm basing it on the way that CGI::Wiki::Kwiki works[0].
If you have a better way to do it, and either:
a) your way is less hassle (for me) than my way, or b) you are willing to do the work your way, and plan to do so within the next few months,
then please let me know. Otherwise I'll carry on with this. For the time being, I won't be committing this to OpenGuides svn trunk. I can commit it in a branch if someone would like to send me absolutely idiot-proof instructions for doing so.
Kake [0] CGI::Wiki::Kwiki can be found on search.cpan.org - it's almost certainly quicker for you to go and have a look at it yourself than for me to try to summarise how it works.
On Fri, Apr 11, 2008 at 06:20:16PM +0100, Kake L Pugh wrote:
Hello. As it has now become my itch, I've started working on separating out installation of the OpenGuides modules from setup of an Open Guide. I'm basing it on the way that CGI::Wiki::Kwiki works[0].
If I understand correctly the essence of this is http://search.cpan.org/src/KAKE/CGI-Wiki-Kwiki-0.59/bin/cgi-wiki-kwiki-insta...
To my mind, this is copying too much - the templates and CGI scripts oughtn't be copied for each guide. The templates and CGI scripts can just live in a standard place (the Debian packages put them in /usr/share/openguides/templates and /usr/lib/cgi-bin respectively) and if needed, the "install directory" for the guide can contain symlinks to the CGI scripts. Otherwise you still end up having to upgrade each guide individually (and worse, when the modules change, you have to make sure that the CGI scripts and templates get upgraded at the same point to avoid breakage.
This was a large part of the point of the custom template path.
The Debian packages don't do the automatic symlinking bit yet (if the user wants to set up additional guides they need to do that themselves based on the instructions in the README.Debian file.
I did write a trivial openguides-setup-db script which is certainly part of the story for any general purpose guide setup script, but that assumes an existing config file so probably isn't that useful on its own.
You can fetch the source for the Debian package either with 'apt-get source openguides' or downloading the patch from http://packages.debian.org/source/sid/openguides if it's any use for inspiration.
If you have a better way to do it, and either:
a) your way is less hassle (for me) than my way, or b) you are willing to do the work your way, and plan to do so within the next few months,
then please let me know. Otherwise I'll carry on with this. For the time being, I won't be committing this to OpenGuides svn trunk. I can commit it in a branch if someone would like to send me absolutely idiot-proof instructions for doing so.
svn cp https://urchin.earth.li/svn/openguides/trunk \ https://urchin.earth.li/svn/openguides/branches/<your-branch-name>
svn co https://urchin.earth.li/svn/openguides/branches/<your-branch-name> \ <branch-working-dir-name>
cd <branch-working-dir-name> [hack hack hack] svn commit
Dominic.
On Sat 12 Apr 2008, Dominic Hargreaves dom@earth.li wrote:
If I understand correctly the essence of this is http://search.cpan.org/src/KAKE/CGI-Wiki-Kwiki-0.59/bin/cgi-wiki-kwiki-insta...
Kind of. I was mostly thinking of the CGI::Wiki::Kwiki install itself - i.e. installation of the CGI::Wiki::Kwiki modules. The way that works is that it installs the cgi-wiki-kwiki-install script and the CGI scripts in the normal bin directory, and it installs the templates under the normal Perl module hierarchy. That way, you have your install script in your path, and perl knows where to find the templates when the install script asks it for them (in the same way as it knows where to find the modules). I've got this working to the point where the OpenGuides modules will install with no manual intervention.
To my mind, this is copying too much - the templates and CGI scripts oughtn't be copied for each guide. The templates and CGI scripts can just live in a standard place (the Debian packages put them in /usr/share/openguides/templates and /usr/lib/cgi-bin respectively) and if needed, the "install directory" for the guide can contain symlinks to the CGI scripts.
Yes, this can be an option in the openguides-install script.
For the time being, I won't be committing this to OpenGuides svn trunk. I can commit it in a branch if someone would like to send me absolutely idiot-proof instructions for doing so.
svn cp https://urchin.earth.li/svn/openguides/trunk \ https://urchin.earth.li/svn/openguides/branches/<your-branch-name>
svn co https://urchin.earth.li/svn/openguides/branches/<your-branch-name> \
<branch-working-dir-name>
cd <branch-working-dir-name> [hack hack hack] svn commit
Thank you!
Kake
On Sat 12 Apr 2008, Dominic Hargreaves dom@earth.li wrote:
svn cp https://urchin.earth.li/svn/openguides/trunk \ https://urchin.earth.li/svn/openguides/branches/<your-branch-name>
svn co https://urchin.earth.li/svn/openguides/branches/<your-branch-name> \
<branch-working-dir-name>
OK, there is now a first pass at this in a branch named new-install-process.
It mostly works. As of now, you can perl Build.PL, Build, Build test, and Build install without having to answer a single question. Once you've done that, you can run openguides-install, answer the questions there, and have it set up a guide for you.
Things that remain to be looked at include:
- custom lib paths; haven't done this part yet - proper defaults wherever possible - installation of basic stylesheet - thorough checking that upgrades work properly (I think they mostly do) - Dom's request for an extra option to use symlinks for templates/scripts - ExtUtils::MakeMaker throws spurious warnings when we fix the shebang line (caused by our shebang lines not having options - not sure why we didn't get these warnings with Module::Build) - the code in openguides-install could probably be a lot neater - Debian stuff
Incidentally re basic stylesheet installation, does anyone mind if we switch the default for "content above navbar in HTML" to "yes", and make the stylesheet on this basis?
Kake
On Fri, 11 Apr 2008, Kake L Pugh wrote:
Hello. As it has now become my itch, I've started working on separating out installation of the OpenGuides modules from setup of an Open Guide. I'm basing it on the way that CGI::Wiki::Kwiki works[0].
for another example look at how SVN::Web does it.
On Sat 12 Apr 2008, Bob Walker bob@randomness.org.uk wrote:
for another example look at how SVN::Web does it.
Looks fairly similar to me, unless I'm misunderstanding?
Kake
On Sun, 13 Apr 2008, Kake L Pugh wrote:
On Sat 12 Apr 2008, Bob Walker bob@randomness.org.uk wrote:
for another example look at how SVN::Web does it.
Looks fairly similar to me, unless I'm misunderstanding?
indeed it is. it was an example of someone else doing mostly the same thing. just to show you arnt several stops past barking. :)
openguides-dev@lists.openguides.org