Index: trunk/wikiation/installer/settings.py.example |
— | — | @@ -1,51 +0,0 @@ |
2 | | -# This software, copyright (C) 2008-2009 by Wikiation. |
3 | | -# This software is developed by Kim Bruning. |
4 | | -# |
5 | | -# Distributed under the terms of the MIT license. |
6 | | - |
7 | | -#Example settings file. |
8 | | - |
9 | | -import os |
10 | | - |
11 | | -# "You Are Here" |
12 | | -installerdir=os.path.dirname(os.path.abspath(__file__)) |
13 | | - |
14 | | -# where to find .install directories and the files contained therein |
15 | | -installfiles=os.path.join(installerdir,'installfiles') |
16 | | - |
17 | | - |
18 | | -# where to find mediawiki tags and trunk on svn |
19 | | -tagsdir="http://svn.wikimedia.org/svnroot/mediawiki/tags" |
20 | | -trunkdir="http://svn.wikimedia.org/svnroot/mediawiki/trunk" |
21 | | -# we could alternately/additionally take a tag version for extensions. (future) |
22 | | -extensionsdir=trunkdir+"/extensions" |
23 | | - |
24 | | -# where to install diverse revisions |
25 | | -revisionsdir='/var/www/revisions' |
26 | | - |
27 | | - |
28 | | -# base scriptpath for every installation (ie, where to reach the above over the web) |
29 | | -base_scriptpath="/revisions/" |
30 | | - |
31 | | -# where to install the toolkit |
32 | | -toolkit_dir='/usr/local/wikiation' |
33 | | - |
34 | | - |
35 | | -#where wikiation_check_isolation can be found |
36 | | -isolation_create=toolkit_dir+'/wikiation_check_isolation/create_and_ul.sh' |
37 | | -isolation_test=toolkit_dir+'/wikiation_check_isolation/dl_and_check.sh' |
38 | | - |
39 | | -# what mysql command should be used. (Who us? Use horrible hacks?) |
40 | | - |
41 | | -mysql_command="mysql -uroot" |
42 | | - |
43 | | -# run automated tests during installation |
44 | | -# this is useful if you are in a testing environment. |
45 | | -# If you are running production, you might want to leave |
46 | | -# this set to False. |
47 | | -run_automated_tests=False |
48 | | - |
49 | | - |
50 | | -# Print debugging messages when executing insatller scripts |
51 | | -# (off by default) |
52 | | -debug=False |
Index: trunk/wikiation/installer/isolation.py |
— | — | @@ -6,10 +6,10 @@ |
7 | 7 | import sys,os, os.path |
8 | 8 | import settings_handler as settings |
9 | 9 | |
10 | | -#support for wikiation_check_isolation |
| 10 | +#support for check_isolation |
11 | 11 | |
12 | 12 | def _check_isolation(args): |
13 | | - """wikiation_check_isolation: check diffs now""" |
| 13 | + """check_isolation: check diffs now""" |
14 | 14 | difftest=settings.isolation_test |
15 | 15 | command=difftest+" "+" ".join(args) |
16 | 16 | exit_status=os.system(command)>>8 |
— | — | @@ -30,7 +30,7 @@ |
31 | 31 | |
32 | 32 | |
33 | 33 | def difftests(target): |
34 | | - """wikiation_check_isolation: store diffs, ready for testing later""" |
| 34 | + """check_isolation: store diffs, ready for testing later""" |
35 | 35 | |
36 | 36 | difftest=settings.isolation_create |
37 | 37 | command=difftest+" "+target |
Index: trunk/wikiation/installer/toolkit_installer.py |
— | — | @@ -5,7 +5,7 @@ |
6 | 6 | from installation_system import Installation_System |
7 | 7 | |
8 | 8 | class Toolkit_Installer(Installation_System): |
9 | | - system_name='wikiation_toolkit' |
| 9 | + system_name='toolkit' |
10 | 10 | def __init__(self,instance=None): |
11 | 11 | Installation_System.__init__(self, instance) |
12 | 12 | self.destination_dir=settings.toolkit_dir |
Index: trunk/wikiation/installer/installation_system.py |
— | — | @@ -17,7 +17,7 @@ |
18 | 18 | An installation system understands how to install and uninstall |
19 | 19 | 'things' (instances). An instance might be a particular wiki |
20 | 20 | (in the case of the mediawiki installer) or a particular extension |
21 | | - in that wiki (extension installer), or perhaps a tool from the wikiation |
| 21 | + in that wiki (extension installer), or perhaps a tool from the |
22 | 22 | toolkit. |
23 | 23 | Next to installing and uninstalling, an installer can also determine |
24 | 24 | the status of an instance (installed or uninstalled), and can provide |
— | — | @@ -126,7 +126,7 @@ |
127 | 127 | def installdir_name(self, installer_name): |
128 | 128 | """returns the location of the .install directory for the given installer_name. |
129 | 129 | An installer directory is where we store all the scripts to install one particular |
130 | | - extension, tool from the wikiation_toolkit, or etc. """ |
| 130 | + extension, tool from the toolkit, or etc. """ |
131 | 131 | return os.path.join(self.subsystemdir, installer_name+".install") |
132 | 132 | |
133 | 133 | |
Index: trunk/wikiation/installer/mediawiki_installer.py |
— | — | @@ -279,7 +279,7 @@ |
280 | 280 | uniquesettings=settings.instancesdir+"/"+target+"/InstallerUniqueSettings.php" |
281 | 281 | unique=file(uniquesettings,"w") |
282 | 282 | unique.write('<?php\n') |
283 | | - unique.write('$wgSitename = "Wikiation_'+target+'";\n') |
| 283 | + unique.write('$wgSitename = "'+target+'";\n') |
284 | 284 | unique.write('$wgScriptPath = "'+settings.base_scriptpath+target+'";\n') |
285 | 285 | unique.write('$wgDBname = "'+target+'";\n') |
286 | 286 | unique.write('?>\n') |
Index: trunk/wikiation/installer/installers.py |
— | — | @@ -249,7 +249,7 @@ |
250 | 250 | return value |
251 | 251 | |
252 | 252 | def parse_path(path,defaults=None): |
253 | | - ai=None # available, installed (and now revisions and tags too) |
| 253 | + ai=None # available, installed (and now revisions and tags and test too) |
254 | 254 | system=None # installation system |
255 | 255 | installer=None # installer from that installation system |
256 | 256 | in_installer=None # in which instance should we install? |
— | — | @@ -369,7 +369,7 @@ |
370 | 370 | |
371 | 371 | # Constants |
372 | 372 | |
373 | | -systems={'wikiation_toolkit':Toolkit_Installer,'scripted': Scripted_Installer, 'mediawiki':Mediawiki_Installer,'naive': Naive_Installer, 'download':Download_Installer, 'extension':extension_installer2} |
| 373 | +systems={'toolkit':Toolkit_Installer,'scripted': Scripted_Installer, 'mediawiki':Mediawiki_Installer,'naive': Naive_Installer, 'download':Download_Installer, 'extension':extension_installer2} |
374 | 374 | |
375 | 375 | |
376 | 376 | if __name__=="__main__": |
— | — | @@ -382,28 +382,28 @@ |
383 | 383 | # print "ls available" |
384 | 384 | # ls2(["ls","available"]) |
385 | 385 | # print |
386 | | -# print "ls available/wikiation_toolkit" |
387 | | -# ls2(["ls","available/wikiation_toolkit"]) |
| 386 | +# print "ls available/toolkit" |
| 387 | +# ls2(["ls","available/toolkit"]) |
388 | 388 | # print |
389 | | -# print "ls installed/wikiation_toolkit" |
390 | | -# ls2(["ls","installed/wikiation_toolkit"]) |
| 389 | +# print "ls installed/toolkit" |
| 390 | +# ls2(["ls","installed/toolkit"]) |
391 | 391 | # print |
392 | 392 | # print "get info" |
393 | | -# system=get_system("wikiation_toolkit") |
| 393 | +# system=get_system("toolkit") |
394 | 394 | # system.get_info("pywikipedia") |
395 | 395 | # |
396 | 396 | # print "install" |
397 | 397 | # print "pywiki",repr(system.install("pywikipedia")) |
398 | | -# print "exttest", repr(system.install("wikiation_exttest")) |
399 | | -# print "isolation", repr(system.install("wikiation_check_isolation")) |
| 398 | +# print "exttest", repr(system.install("exttest")) |
| 399 | +# print "isolation", repr(system.install("check_isolation")) |
400 | 400 | # print "ls", os.listdir('..') |
401 | 401 | # |
402 | 402 | # print "uninstall" |
403 | 403 | # print "pywiki", repr(system.uninstall("pywikipedia")) |
404 | | -# print "exttest", repr(system.uninstall("wikiation_exttest")) |
405 | | -# print "isolation", repr(system.uninstall("wikiation_check_isolation")) |
| 404 | +# print "exttest", repr(system.uninstall("exttest")) |
| 405 | +# print "isolation", repr(system.uninstall("check_isolation")) |
406 | 406 | # |
407 | | -# print "wikiation_extension (assumes existing wiki)" |
| 407 | +# print "extension (assumes existing wiki)" |
408 | 408 | # extension_installer=Scripted_Installer("REL1_13_3") |
409 | 409 | # |
410 | 410 | # print " \ uninstall " , repr (extension_installer.uninstall("ImageMap")) |
— | — | @@ -447,7 +447,7 @@ |
448 | 448 | # qls('installed.extension:in REL1_13_2') |
449 | 449 | # qls('installed.extension:in FOO') |
450 | 450 | # qls('installed.mediawiki:in FOO') |
451 | | -# qls('available.wikiation') |
452 | | -# qls('available.wikiation:in BAR as BAZ') |
453 | | -# qls('available.wikiation:in BOG as BOT') |
454 | | -# qls('available.wikiation:in BOG as BOT murp morp bla bla bla') |
| 451 | +# qls('available.toolkit') |
| 452 | +# qls('available.toolkit:in BAR as BAZ') |
| 453 | +# qls('available.toolkit:in BOG as BOT') |
| 454 | +# qls('available.toolkit:in BOG as BOT murp morp bla bla bla') |
Index: trunk/wikiation/installer/util/allnaive.py |
— | — | @@ -6,7 +6,7 @@ |
7 | 7 | from naive_installer import Naive_Installer |
8 | 8 | |
9 | 9 | |
10 | | -from wikiation_exttest import settings |
| 10 | +from exttest import settings |
11 | 11 | |
12 | 12 | # settings |
13 | 13 | target_wiki='test' |
Index: trunk/wikiation/installer/installer_util.py |
— | — | @@ -1,6 +1,6 @@ |
2 | 2 | # This software, copyright (C) 2008-2009 by Wikiation. |
3 | | -# This software is developed by Kim Bruning. |
4 | | -# |
| 3 | +# Copyright (C) 2009 Kim Bruning |
| 4 | + |
5 | 5 | # Distributed under the terms of the MIT license. |
6 | 6 | |
7 | 7 | import sys, os |
— | — | @@ -30,7 +30,7 @@ |
31 | 31 | print subhelp[args[1]] |
32 | 32 | elif len(args)<=1: |
33 | 33 | print |
34 | | - print "wikiation installer, interactive mode" |
| 34 | + print "installer, interactive mode" |
35 | 35 | print "help: get help" |
36 | 36 | print "quit, exit: quit" |
37 | 37 | print "ls <path>: list information on available versions " |
— | — | @@ -44,14 +44,14 @@ |
45 | 45 | print "TODO: Implement help path , for now, see documentation for info on how to specify <path>" |
46 | 46 | print |
47 | 47 | print "instead of interactive mode, you can also access commands directly from the shell:" |
48 | | - print "wikiation_installer command [args]..." |
| 48 | + print "installer command [args]..." |
49 | 49 | else: |
50 | 50 | print 'no detailed help available' |
51 | 51 | |
52 | 52 | |
53 | 53 | |
54 | 54 | def revision(): |
55 | | - """obtain revision number for wikiation_installer itself""" |
| 55 | + """obtain revision number for installer itself""" |
56 | 56 | |
57 | 57 | revision_string=None |
58 | 58 | os.chdir(settings.installerdir) |
— | — | @@ -71,7 +71,7 @@ |
72 | 72 | def intro(): |
73 | 73 | """a nice banner/intro text for interactive mode""" |
74 | 74 | |
75 | | - print "=== Wikiation installer (v. "+revision()+") ===" |
| 75 | + print "=== Installer (v. "+revision()+") ===" |
76 | 76 | print |
77 | 77 | print "(last known safe version: 48528)" |
78 | 78 | print "Interactive mode.", |
Index: trunk/wikiation/installer/LICENSE |
— | — | @@ -1,4 +1,6 @@ |
2 | | -This software, copyright (C) 2008-2009 by Wikiation. This software is developed by Kim Bruning. |
| 2 | +This software, |
| 3 | +Copyright (C) 2008-2009 by Wikiation. (Developed by Kim Bruning) |
| 4 | +Copyright (C) 2009 by Kim Bruning |
3 | 5 | |
4 | 6 | Permission is hereby granted, free of charge, to any person obtaining a copy |
5 | 7 | of this software and associated documentation files (the "Software"), to deal |
— | — | @@ -17,5 +19,3 @@ |
18 | 20 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, |
19 | 21 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE |
20 | 22 | SOFTWARE. |
21 | | - |
22 | | -Logo.png itself is a wikiation trademark and is (C) wikiation, all rights reserved (same as the wikimedia or wikipedia logos) |
Index: trunk/wikiation/installer/settings_handler.py |
— | — | @@ -17,6 +17,7 @@ |
18 | 18 | |
19 | 19 | # where to find .install directories and the files contained therein |
20 | 20 | installfiles=os.path.join(installerdir,'installfiles') |
| 21 | +testfiles=os.path.join(installerdir,'testfiles') |
21 | 22 | |
22 | 23 | # where do we store the _tagcache file |
23 | 24 | tagcache=os.path.join(installerdir,"_tagcache") |
— | — | @@ -36,12 +37,12 @@ |
37 | 38 | base_scriptpath="/revisions/" |
38 | 39 | |
39 | 40 | # where to install the toolkit |
40 | | -toolkit_dir='/usr/local/wikiation' |
| 41 | +toolkit_dir='/usr/local/testing' |
41 | 42 | |
42 | 43 | |
43 | | -#where wikiation_check_isolation can be found |
44 | | -isolation_create=toolkit_dir+'/wikiation_check_isolation/create_and_ul.sh' |
45 | | -isolation_test=toolkit_dir+'/wikiation_check_isolation/dl_and_check.sh' |
| 44 | +#where check_isolation can be found |
| 45 | +isolation_create=toolkit_dir+'/check_isolation/create_and_ul.sh' |
| 46 | +isolation_test=toolkit_dir+'/check_isolation/dl_and_check.sh' |
46 | 47 | # run automated tests during installation |
47 | 48 | # this is useful if you are in a testing environment. |
48 | 49 | # If you are running production, you might want to leave |
Index: trunk/wikiation/installer/installer.py |
— | — | @@ -64,7 +64,7 @@ |
65 | 65 | if len(args)<=1: |
66 | 66 | print \ |
67 | 67 | """available.mediawiki: installed.mediawiki: |
68 | | -available.wikiation_toolkit: installed.wikiation_toolkit: |
| 68 | +available.toolkit: installed.toolkit: |
69 | 69 | available.scripted: installed.scripted: } |
70 | 70 | available.naive: installed.naive: } extensions |
71 | 71 | available.download: installer.download: } |
— | — | @@ -80,6 +80,11 @@ |
81 | 81 | """install something""" |
82 | 82 | installers.install(args) |
83 | 83 | |
| 84 | +def test(args): |
| 85 | + """test something""" |
| 86 | + installers.test(args) |
| 87 | + |
| 88 | + |
84 | 89 | def duplicate(args): |
85 | 90 | """duplicate an instance""" |
86 | 91 | if len(args)!=3: |
— | — | @@ -93,7 +98,7 @@ |
94 | 99 | def update_self(args): |
95 | 100 | """update self to newest revision, (and switch to interactive mode)""" |
96 | 101 | |
97 | | - print "This could cause the wikiation_installer to break. Are you sure? Y/N" |
| 102 | + print "This could cause the installer to break. Are you sure? Y/N" |
98 | 103 | answer=getch() |
99 | 104 | if answer.upper()=="Y": |
100 | 105 | print "Continuing..." |
— | — | @@ -110,7 +115,7 @@ |
111 | 116 | print "I'm not sure what to do with "+ (" ".join(args[1:])) |
112 | 117 | |
113 | 118 | print "\n\n" |
114 | | - print "wikiation_installer update attempted/completed. Restarting" |
| 119 | + print "installer update attempted/completed. Restarting" |
115 | 120 | print "----------------------------------------------------------" |
116 | 121 | print "\n\n" |
117 | 122 | os.execl("/usr/bin/python","/usr/bin/python",__file__) |
— | — | @@ -160,7 +165,8 @@ |
161 | 166 | "check_isolation":check_isolation, |
162 | 167 | "update_self":update_self, |
163 | 168 | "update_tags":update_tags, |
164 | | - "duplicate":duplicate |
| 169 | + "duplicate":duplicate, |
| 170 | + "test":test |
165 | 171 | } |
166 | 172 | |
167 | 173 | # additional help texts for some commands. |