On Wed, 2003-11-26 at 07:03, Benjamin Judas wrote: > Hi folks, > > I withdrawed from my original idea in using Apache itself as the > CGI-Platform for WebPortage and implemented a small webserver in Python. > It simply does nothing as calling index.html in the actual directory and > handle all traffic. > > I did this since: > > 1. > The CGI'fied portage scripts have to run as a privileged user - this can > be realized by making one little change to CGIHTTPServer.py (included in > the Python-Distribution) > > 2. > There would be no need to install Apache. WebPortage only needs Python > which is needed by Portage and thus installed on every Gentoo-System. > > If you want to try it, simply decompress the .tar.bz2-File and run the > server with: python server.py. The server will listen on Port 8001 (see > source-code of server.py) on localhost. > > Remember, there's no authentification at the moment. If you start it > everybody can access your lokal portage using a simple web-browser. > Please be careful when trying it. > > In this version you can do only two things : searching for packages and > syncing portage tree. The output of emerge sync still needs to be > beautified and there is no output until wpsync.py (the CGI-script > responsible for syncing) is completely done, so it's possible that your > browser is saying "Transferring data from localhost..." for 10 Minutes > ;) This will be fixed somewhere in the future.
I started something like this, but life got in the way of me learning enough python and enough CGI/http to completely finish it. My initial efforts are at http://sourceforge.net/projects/webportage. Thoughts for the future include making a mod_python (to run under apache) version as well as a standalone version. To overcome your "Transfering data from localhost ..." problem you should look at chunked encoding, form memory it's part of HTTP/1.1 (rather than just 1.0) If you have the time to devote to something like this contact me off list. -- Troy Dack http://linux.tkdack.com <[EMAIL PROTECTED]> http://webportage.sf.net Public Key: http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x4D90BE3C Key fingerprint = 1F3D 6C15 16AA 09D5 0C96 92E5 FD89 16F9 4D90 BE3C -- [EMAIL PROTECTED] mailing list
