Protoplex Installation Documentation - IRC Logs Channel: #esp on irc.freenode.net Date: 19th May 2005 Author: Jeffry Archembeault From: http://www.openideaproject.org/Projects/OIPeople/KollabSetup Archived: 14th July 2006 Ancillary: WTF... thanks to Tav for this puzzle, sbp for getting us this far Download the Protoplex: http://p-pack.de:8080/kollab/code/trunk-2005-05-19.tar.bz2y *** Protoplex: Round 2! *** tar -jxvfing this could take as long as the download :) there archiving the old patched file, for reference... * jeffarch tries to follow along on motleybox KALATI_HOME=/var/kalati/trunk from that I presume that we have to move this to /var/kalati/trunk, *not* /var/kalati source $KALATI_HOME/source/shell/kalati.sh $ find trunk -name kalati.sh trunk/source/shell/kalati.sh yep * sbp rm -rf's kalati $ mkdir /var/kalati && mv trunk /var/kalati $ cd /var/kalati/trunk okay, now I think I'll just bung these instructions into the source rather than my bash profile as tav advises... ++ $ source $KALATI_HOME/source/shell/kalati.sh /var/kalati/trunk/source/shell/kalati.sh:[:50: unrecognized condition: `2' good start probably a zsh/bash difference. running bash okay, now for: same here $ pyutil test /var/kalati/trunk/application/core/python.recent: 1: Syntax error: "(" unexpected usual thing $ which pyutil /var/kalati/trunk/application/core/pyutil * bone_idol gets 'proto>' prompt oh, awesome but whats it all mean ! :-) heh, heh in: /var/kalati/trunk/application/core $ ln -s python.recent $(which python) hmm [root@motleybox kalati]# pyutil test Traceback (most recent call last): File "/var/kalati/trunk/application/core/pyutil", line 3, in ? from pyutil.tool import runner ImportError: No module named pyutil.tool * sbp learns how to use teh ln I get: File "/var/kalati/trunk/source/python/pyutil/functional/__init__.py", line 8, in ? from _functional import partial ImportError: No module named _functional did you do all of the lines that tav advises, jeffarch? looks like you're missing the PYTHONPATH one rechecking source $KALATI_HOME/source/shell/kalati.sh export PATH=$KALATI_HOME/application/core:$KALATI_HOME/application/executable:$PATH export PYTHONPATH=$KALATI_HOME/source/python:$PYTHONPATH $ find -name '_functional*' ./trunk/source/python/pyutil/functional/_functional.so ./trunk/source/python/pyutil/functional/_functional.c from my SET: KALATI_HOME=/var/kalati/trunk PATH=/var/kalati/trunk/application/core:/var/kalati/trunk/application/executable :/usr/local/bin:/bin:/usr/bin:/usr/X11R6/bin:/home/jja/bin source $KALATI_HOME/source/shell/kalati.sh ran clean what about the PYTHONPATH? PYTHONPATH=/var/kalati/trunk/source/python:/var/kalati/trunk/source/python: hm...a bit redundant there double source well, I'm screwed. can't use the shared object 47% local xfer i got an errorr about libreadline.so.4.1 so i libreadline.so.4.1 -> /lib/libreadline.so.5.0 and it wnet away so .. at this proto prompt .. what happens next? proto>help ? ;) i tried that proto> help Traceback (most recent call last): File "/home/aland/plex/trunk/source/python/proto/shell.py", line 18, in run_infinite_loop debug_print(sys.stdout, 'Output:', pal.parse_and_call(input)) NameError: global name 'pal' is not defined proto>anal milking hmm .. not sure my sphincters up to it yep still undefined did you link to /var/kalati, or does it run okay in place by modifying the variables? with stuff like "home = '/var/kalati/trunk/home/'" hardwired into trunk/home/@default_system/configuration/kalati.config I'm presuming a link... bone_idol? hmm...I'm still failing at ImportError: No module named pyutil.tool sbp: yes .. i changed on line in /home/aland/plex/trunk/source/python/proto/config.py plex/trunk/source/python/proto/config.py jeffarch: $ find -name 'tool' ./trunk/source/python/pyutil/tool which is a dir, presumably with a __init__.py in it sure does even has it's .pyc, so it should have been touched weird nm...same datetime stamp 15 more minutes on local xfer rebooting server * sOIPe has quit (Remote closed the connection) * hcraffej has quit ("server restart") * Jenkz has quit () 100%[====================================>] 15,734,082 511.07K/s ETA 00:00 * sbp tries it on a decent server... ugh...local xfer is stalled d'oh phew...timed out, retry ok 74% ;) $ grep -r 'var/kalati' * | grep -v Binary | wc -l grep: trunk/source/python/src: No such file or directory 50 looks like you had a lot more to change, bone_idol OTOH, not many of them appear serious missing stubs? just these ones, to me: trunk/home/@default_system/configuration/kalati.config:home = '/var/kalati/trunk/home/' trunk/source/python/proto/pod.py:default_fs = '/var/kalati/trunk/home/@default_system/datastore/index/main.pod' trunk/source/python/proto/config.py: '/var/kalati/trunk/home/@default_system/configuration/kalati.config' trunk/source/python/pyutil/serialiser/experimental/examples/mtd.py:sys.path.insert(0, '/var/kalati/trunk/source/python/pyutil/parser/yaml') trunk/source/python/pyutil/speedup/_speedups.c: "/var/kalati/trunk/source/python/pyutil/speedup/_speedups.pyx", the others are comments etc. you changed anything in kalati.config? just doing all the changes now er, the path changes will look at the other kalati.config variables in a mo made the path changes the config file seems fine to me the only thing that you might need to change are the ports, if something else is already running on them. I think 8080 is clear for me disco.worker 10 of 35 ------ FAILED that's expected all the rest passed. and at least pyutil test ran this time... cool! oh yeah, so I see from the readme.txt awesome indeed! :-O ("835 TOTAL") okay. proto --help ImportError: libreadline.so.4.1: cannot open shared object file: No such file or directory same problem as bone_idol yup * jeffarch steps out for the few minutes it'll take for the local xfer (smoke) well I just guessed and linked it to another version of libreadline you made that link in /lib I presume? /usr/lib ls -al libreadline.* -rw-r--r-- 1 root root 600598 Oct 2 2004 libreadline.a lrwxrwxrwx 2 root root 23 Jan 5 21:14 libreadline.so -> /lib/libreadline.so.5.0 lrwxrwxrwx 2 root root 23 Jan 5 21:14 libreadline.so.4.1 -> /lib/libreadline.so.5.0 * jhb|offline has quit (leguin.freenode.net irc.freenode.net) * urgen has quit (leguin.freenode.net irc.freenode.net) * phenny has quit (leguin.freenode.net irc.freenode.net) * sbp pings the server owner... * ChanServ removes voice from sbp deltab * ChanServ removes voice from sbp deltab * ChanServ removes voice from sbp deltab * ChanServ removes voice from sbp deltab * ChanServ removes voice from sbp deltab * ChanServ removes voice from sbp deltab heh @ server kaboomination bone_idol: thanks * jhb|offline (~joerg@yes.mediathek.de) has joined #esp looks like 8080 is already in use * sbp edits the config ~/kalati$ proto proto> help that was an odd paste [[[ ~/kalati$ proto proto> help [program exits] ~/kalati$ proto proto> help (%"^"£ ]]] sorry, kinda tired * hcraffej (~jja@64.151.80.196) has joined #esp bah, it's hcraffej again * Scum-Person has quit ("Read error: Connection reset by wigan pier") ~/kalati$ proto -s [...] File "/home/sbp/kalati/trunk/source/python/proto/shell.py", line 11, in run_infinite_loop readline.read_history_file() IOError: [Errno 2] No such file or directory Monty is still here? weird heh heh! * hcraffej gropes Monty /usr/lib I pasted that in another channel and... [01:08] [01:08] Monty is still here? [01:08] [01:08] weird [01:08] proto> help me something [01:08] ptrace(2) is never fix it back to exist Please go on. on Paul???s archiving the Windows level, cheese-grater's fanatics holds Welsh Lasagne? * urgen (urgy@c-67-188-71-51.hsd1.ca.comcast.net) has joined #esp hi urgen :) ~/kalati$ touch ~/.history ~/kalati$ proto -s proto> proto> help debug_print(sys.stdout, 'Output:', pal.parse_and_call(input)) NameError: global name 'pal' is not defined hmm not too sure what he was thinking in the code he uses pal elsewhere in that file too, without it being bound def time(*args, **kwargs): start = clock() output = pal.call(*args, **kwargs) print fancy_print("Time taken:", "%.2f msecs" % (clock()-start)) return output perhaps I could look for parse_and_call... ~/kalati$ find -name '*.py' -exec grep -H 'def parse_and_call' {} \; ./trunk/source/python/proto/pal.py:def parse_and_call(command): * sbp adds import pal, and... whoo! proto> help Output: 'unknown.command : help' :-) "commands", "hmz", and "nutella" don't work either exit does though. time to look through the source for interesting commands actually, proto -l might be good allrighty...locally, pyutil ran right thru nope, just seems to be a reiteration of --help jeffarch: neato hmm, need to find where pal.register_command is called now nothing for exactly "pal.register_command", trying "register_command"... yay, lots of commands get, put, del, has, info, read, genentity, quit, exit, time, repeat, refresh, index, webserver, forked-webserver these all make direct calls to the registered functions... so I'm a little cautious about randomly bunging arguments in without knowing exactly what they do. oh, hey, I wonder if time does tavtime bleh output = pal.call(*args, **kwargs) TypeError: call() takes at least 1 argument (0 given) even that takes an arg 01:15 < sbp> ./trunk/source/python/proto/pal.py:def parse_and_call(command): 01:16 * sbp adds import pal, and... ..where did you put import pal ??? was just gonna ask about ^^ in trunk/source/python/proto/shell.py since there's a pal.parse_and_call in there, but no pal bound cool :) 'index' does...something hmm all of these are bound in trunk/source/python/proto/core.py oh yeah. I like the "deleting" at the end * sbp reads the source... oOo...pretty! 'webserver' w00t! does apparently nothing here http://127.0.0.1:8080/ dunt work either what's it show? xnet logo, login bar and stuff at the top ooh! yeah, I see it now. 'twas just slow * Module proto.identity, line 108, in create_entity entity,name = username ValueError: too many values to unpack in trying to create a username * sbp tries /login_help got an invalid login attempt /login_help is not helpful Traceback (innermost last): * Module proto.networking, line 46, in handle_data self.parse_proto_request() * Module proto.networking, line 130, in parse_proto_request output = proto.globals.service_map[method](request) * Module proto.service, line 62, in html_login_screen info = create_entity(username, passphrase)[-1] * Module proto.identity, line 47, in create_entity key = gen_entity_key(username, passphrase) * Module proto.identity, line 26, in gen_entity_key raise ShitPassphraseError( ShitPassphraseError: Please choose a passphrase that is not the same as your name. that's what I get with 'signup' supply username+password+sign-up returns Traceback (innermost last): * Module proto.networking, line 46, in handle_data self.parse_proto_request() * Module proto.networking, line 130, in parse_proto_request output = proto.globals.service_map[method](request) * Module proto.service, line 62, in html_login_screen info = create_entity(username, passphrase)[-1] * Module proto.identity, line 84, in create_entity mkdir(home) OSError: [Errno 17] File exists: '/var/kalati/trunk/home/jeffarch' hahaha ShitPassphraseError... hilarious yeah I got: * Module proto.identity, line 84, in create_entity mkdir(home) OSError: [Errno 17] File exists: '/home/sbp/kalati/trunk/home/sbp' that's with password "" up yup hmm. might be able to wrap a try/except around that * sbp edits trunk/source/python/proto/identity.py hmm, will os.makedirs return the ... wait a moment if the profile's already created, why can't we login? whoo! logged in Firefox: "sbp.xnet.plex could not be found. Please check the name and try again." super :) hmm, tried the same path but with the actual server as its base nothing there though put it in your hosts file well, does that work? not my server, don't forget, so it'd be a bit of work to add it I dunno...I'm a step behind you...how'd you login? ah well I just put in my username and password and clicked login even though the creation process said "BZZT" I just used an empty password invalid login attempt the login help works when you've logged in No 'login_help' object found.Would like to create it? and with a create button doesn't for me * raise ShitPassphraseError( ShitPassphraseError: Please choose a passphrase that is not the same as your name. arch...invalid logins hehe argh hmm $ ls /var/kalati/trunk/home/ default_player/ @default_system/ jeff/ jeffarch/ jja/ getting all kinds of neat stuff trying username= 'a' and 'aa' no password + signup but still can't login looking at the other commands they're mainly storage oriented storage = FSStorage(config.repository) from proto.storage import FSStorage then the methods are, e.g. register_command('has', storage.has) register_command('info', storage.info) storage is trunk/source/python/proto/storage.py def put(self, data, capability=None, hasher=sha256, encryption_key=None): if isinstance(data, basestring): data = file(data, 'rb') looks like it can store files then return the sha256 digest proto> put /home/sbp/kalati/trunk/source/python/proto/storage.py Making /home/sbp/kalati/trunk/home/@default_system/repository/main/8 Making /home/sbp/kalati/trunk/home/@default_system/repository/main/8/3 [etc.] Output: 'Writing data to 8/3/d/7/c/83d7cbf695ab1d50c10fc67f578f7ca5b310801f6fc6705828fcb099b7f3d69d' proto> info 83d7cbf695ab1d50c10fc67f578f7ca5b310801f6fc6705828fcb099b7f3d69d Output: { 'compressed': True, 'sha256': '83d7cbf695ab1d50c10fc67f578f7ca5b310801f6fc6705828fcb099b7f3d69d', 'size': 1634L} well, it's a start proto> get 83d7cbf695ab1d50c10fc67f578f7ca5b310801f6fc6705828fcb099b7f3d69d Output: (StringI?!) nite all 'night bone_idol gnite bone_idol proto> has 83d7cbf695ab1d50c10fc67f578f7ca5b310801f6fc6705828fcb099b7f3d69d Output: True looks like it tests whether something is present (by analogy to dict.has_key, I guess) read reads the file and spits it all out so don't do that :-) :) those are all the storage functions, apart from del which is also obvious others: register_command('genentity', create_entity) register_command('time', time) register_command('repeat', repeat) from proto.identity import create_entity time isn't found; I'll bet it wants the one there was in shell.py repeat too * sbp chases up create_entity oh, that's the thing I already patched def create_entity(username, passphrase): proto> genentity pqr abc [...] File "/home/sbp/kalati/trunk/source/python/proto/identity.py", line 109, in create_entity entity,name = username ValueError: too many values to unpack ought to fix that I've seen that yeah, same problem as in the webserver I just thought that doing it directly might fix it ah! it's a typo for entity.name fixed wherat? * sbp tries the webserver again in /home/sbp/kalati/trunk/source/python/proto/identity.py line 109 d'oh...see above :) should be "entity.name", not "entity,name" yeah * sbp runs the webserver again whoo! "successfully created", giving lots of details UUIDs, algorithms, keys then I get "Successfully Logged in." at /:login but that's literally the source of the HTML page; no links, no formatting, no nothing trying the root again... now at the root, I get "/home/sbp/kalati/trunk/home/@default_system/datastore/root/home" aha /lalala:create gives "No 'lalala' object found.Would like to create it?" so same level as bone_idol again allrighty...I'm at where I need to edit hosts clicking the create button I didn't bother editing the hosts watcha do? just used 127.0.0.1 and the same paths gotcha so if you have jeffarch.plex.net:8080/pathname, do... right yup ok creating hmm Firefox is wedged at creating the lalala resource on the console, no POST is noted, either
that might be the problem. heh ? come on tav... OTOH, it looks like a pure POST will create it so trying... still creating curl's just hanging, for me hmm I tried proto> genentity login jeffarch no change at /login got sbp now at the root, I get "/home/sbp/kalati/trunk/home/@default_system/datastore/root/home" after restarting * lilo has quit ("bbiab") * ixx has quit (Read error: 131 (Connection reset by peer)) ...pardon? you got "/home/sbp/kalati/trunk/home/@default_system/datastore/root/home"? that's kinda weird, isn't it? :-) still stuck on the POST thing sorry...didn't edit the paste :) hmm, now I think about it... this POST function may be a thin veneer for the put function in the shell * sbp tries putting a non-empty string * ixx (foobar@cpe-70-113-47-137.austin.res.rr.com) has joined #esp doesn't seem to work whatever I do ixx? ah, that's odd lots of 200 responses for the POSTs in the proto shell * lilo (lilo@levin-pdpc.staff.freenode) has joined #esp but curl certainly didn't get anything back it just hung entirely hmm might look at the webserver code from proto.networking import run_webserver, run_forked_webserver proto.globals.service_map[method](request) if 'proto.globals' not in sys.modules: globals = MockModule('proto.globals', __doc__) heh ~/kalati$ find -name '*.py' -exec grep -H service_map {} \; * Maur (maur@d154-20-213-71.bchsia.telus.net) has joined #ESP ./trunk/source/python/proto/service.py: proto.globals.service_map[name or service.__name__] = service amongst other stuff woohoo new baby vps account works eek, decorators cool! urgen: new tarball does stuff! okay, there's the login code and such (in service.py) * urgen checks what version python he has now this comes with all you need that's interesting services: default, upper, login-screen, login, logout, define, save-definition, create it's got 2.3.4 not a 'red_pill' for nuthin ;) create we already know about from lalala:create Fedora Core 3 although we haven't touched that default is presumably what / maps to right login we know about too ooh, I should fix the broken it's in service.py, def create(context) if anyone wants to follow along though I have a feeling that the form actually isn't the problem might be that I need to create a metatype first how big it tar? $ du -cks . 96256 . 96M untarred, 15 tar.bz2ed :define to create a metatype and expando'd? 96, as I said oops :-) tar -x dyslexia heh, heh heh...matter of habit :) /lalala:define gives "Define None" as its title, which is a bit worrying "Definition for 'None' saved!" uhm-hum that was at /:save-definition,None I guess that might be easily fixable, but I think I might try posting using curl to /:save-definition,lalala first (doing a GET gives: * Module proto.service, line 153, in save_metatype definition = context.form['definition'][0] KeyError: 'definition' at /:save-definition,lalala) that's the only key required, apparently, so curl -d "definition-whatever" URI should do it er, definition=whatever and use single quotes on non-interpolated strings! [nag, nag] hangs. am I using curl right? oh, needed to bg now I get KeyError: 'username' sigh. posting the username and password returns a login page * sbp grudgingly tries to fix def create(context) shouldn't have to fix it though... I can't quite work out how there can be so many tiny errors in the code without tav noticing /save-definition:jeffarch it's not like the comma to period problem could at all go unnnoticed returned Error code 501. Message: Unsupported method (jeffarch). Error code explanation: 501 = Server does not support this operation. ic what u mean about returnng a login page * lilo has quit ("bbiab") yeah. it's pretty weird I wonder where the pretty login went # output += '

Define %r

' % metatype that's weird, since I'm pretty sure I got the h1 line... yep, definitely did still definitely getting it... oh, wrong bit of code okay: metatype = context.object_methods['define'] output += '

Define %r

' % metatype * lilo (lilo@levin-pdpc.staff.freenode) has joined #esp changed the top line to: # metatype = context.object_methods['define'] metatype = context.object_methods.get('define', 'lalala') ah...just got rid of the cookie for now * jeffarch stands back still gives None! GpmrgpamrGMh lemme try using or instead... metatype = context.object_methods['define'] or 'lalala' (he may've implemented a naive get, but it's worrying) ah, that got it "Definition for 'lalala' saved!" - /:save-definition,lalala now when I go to /something:create, lalala is in the list of metatypes created it now I get: "lalala" - /something:create heh. and when I refresh the page I get "No 'something' object found.Would like to create it?" again, so it hasn't persisted trying the other services names :upper gives nothing jeffarch: if you're logged in and want to see the login screen again, it's at /:login-screen http://127.0.0.1:8080/home:create,foo nice... what did that do? :-) returned 'foo' :-) * phenny (sbp@66.9.179.68) has joined #esp it's phenny! heh, heh 'home' was created the same way 'lalala' was so there's something pathy going on methinks hmm but home isn't a metatype perhaps it's meant to be returning file content instead of these pathnames but it's using pathnames as debug * sbp checks the source... nope seems to be returning the path by design and it only does it for directories * sbp looks in /home/sbp/kalati/trunk/home/@default_system/datastore/root $ find . ./template ./template/default ./home ./home/__object.Document I found 'http://127.0.0.1:8080/jeffarch:logout' ;) heh, heh oh, check it out: /something:create:upper you can chain commands :upper must've been a test for that not sure that it does much else it's obviously still quite broken in places so if it was all fixed and there was some specific demo to run through, it might be impressive * ChanServ gives voice to phenny :) multiple edits of /:define,foo persist jeffarch: may I have the log URI again please? http://www.openideaproject.org/irclogs/render_log?logdate=19May2005&channel=esp many thanks * jeffarch nods * jeffarch apologizes for it being a pita it's better than nothing thtat it is * sbp bookmarks it jeffarch: why is there nothing after 16:40:18? buffered saving? d'oh * sOIPe (~sOIPe@64.151.80.196) has joined #esp * ChanServ gives voice to sOIPe that's why * sbp smacks head # [EOF]