# HG changeset patch # User ethanzonca # Date 2009-07-05 20:00:55 # Node ID 21c31a64b0b3db2c9b1e253e92e1e49fabf058e6 # Parent 387c6b396ee576c12a6b427718f77b11e0b4a4d0 Merge with previous commit, document FIXIT's in todo for matt mostly, fixed some minor errors. Let me know if the merge went foul. diff --git a/INSTALL b/INSTALL --- a/INSTALL +++ b/INSTALL @@ -2,7 +2,7 @@ Installation Instructions ************************* Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005, -2006, 2007, 2008 Free Software Foundation, Inc. +2006, 2007, 2008, 2009 Free Software Foundation, Inc. This file is free documentation; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. @@ -159,7 +159,7 @@ Particular systems CC is not installed, it is recommended to use the following options in order to use an ANSI C compiler: - ./configure CC="cc -Ae" + ./configure CC="cc -Ae -D_XOPEN_SOURCE=500" and if that doesn't work, install pre-built binaries of GCC for HP-UX. @@ -174,6 +174,16 @@ and if that doesn't work, try ./configure CC="cc -nodtk" + On Solaris, don't put `/usr/ucb' early in your `PATH'. This +directory contains several dysfunctional programs; working variants of +these programs are available in `/usr/bin'. So, if you need `/usr/ucb' +in your `PATH', put it _after_ `/usr/bin'. + + On Haiku, software installed for all users goes in `/boot/common', +not `/usr/local'. It is recommended to use the following options: + + ./configure --prefix=/boot/common + Specifying the System Type ========================== @@ -189,7 +199,8 @@ type, such as `sun4', or a canonical nam where SYSTEM can have one of these forms: - OS KERNEL-OS + OS + KERNEL-OS See the file `config.sub' for the possible values of each field. If `config.sub' isn't included in this package, then this package doesn't diff --git a/TODO b/TODO --- a/TODO +++ b/TODO @@ -1,3 +1,10 @@ +Distrend.c FIXIT's, mostly for matt: + +1. Struct issues in frameset[frame_count]: frame_count isn't in scope, and defining obviously won't work. This is pretty crucial to the whole thing functioning. fixme! +2. In the frame_finder, ya can't declare variables in for() loops. Unless we're in C99 mode. Which we arent. + Also, sframe, eframe, x, and frame_status are undeclared in the function. Or, rather, they aren't in the scope of the function. Make 'em args? +3. status_report_generator has conflicting types. + 1. Create a CLI interface for distren X command: distren X args: -i infile.tar.bz2 -o outfile.tar.bz2 diff --git a/src/server/distrend.c b/src/server/distrend.c --- a/src/server/distrend.c +++ b/src/server/distrend.c @@ -91,6 +91,35 @@ struct { int main(int argc, char *argv[]) { +// I'm assuming this is a non-working framework :) + int distrend_do_config(int argc, char *argv[], struct distrend_config *config) + { + cfg_opt_t myopts = + { + CFG_SEC("listen", /* this must be imported into struct listens (which must still be declared) */ + { + CFG_SIMPLE_STR("type", NULL), + CFG_SIMPLE_STR("path", NULL), + CFG_SIMPLE_INT("port", NULL) + }, + CFGF_MULTI), + CFG_END + }; + + config = malloc(sizeof(struct distrend_config)); + options_init(argc, argv, &config->mycfg, &myopts, "server", &config->options); + + return 0; + } + int distrend_config_free(struct distrend_config *config) + { + options_free(config->options); + free(config); + + return 0; + } + + /* !!!!!!! Important notes !!!!!!!!!!!! So, we need a common key. Maybe. Or we need to generate a key in registeruser() and get it to the client somehow. @@ -131,33 +160,6 @@ struct distrend_config } -int distrend_do_config(int argc, char *argv[], struct distrend_config *config) -{ - cfg_opt_t myopts = - { - CFG_SEC("listen", /* this must be imported into struct listens (which must still be declared) */ - { - CFG_SIMPLE_STR("type", NULL), - CFG_SIMPLE_STR("path", NULL), - CFG_SIMPLE_INT("port", NULL) - }, - CFGF_MULTI), - CFG_END - }; - - config = malloc(sizeof(struct distrend_config)); - options_init(argc, argv, &config->mycfg, &myopts, "server", &config->options); - - return 0; -} -int distrend_config_free(struct distrend_config *config) -{ - options_free(config->options); - free(config); - - return 0; -} - // Registration on server. Needs attention. (e.g., people could make tons of accounts with the key we give them... // Set up distrend -c username email@example.com @@ -210,7 +212,7 @@ void registeruser(char *username, char * void loginuser(char *username, int secret){ - // Logs into sandboxed user on zserver2 and registers a user + // Logs into sandboxed user on zserver2 as a client, but really does nothing now. char buf[10]; struct execio *testrem; char *execargv[] = @@ -221,15 +223,8 @@ void loginuser(char *username, int secre "setup.rsa", // We gotta figure out how we're going to do the whole keys thing... maybe grab this key via http? But have a secret password compiled in distren to prevent fraud? "-p", "23", - "sudo /usr/sbin/useradd", - "-M", - "-c", - email, - "-d", - "/home/distren", - "--gid", - "541", - username, + "echo", + "hello", (char *)NULL }; size_t readlen; @@ -288,7 +283,7 @@ void frame_num_struct_builder(int sframe // matches your computer up with a lovely frame to render int frame_finder(){ - int your_frame = null; // your_frame is an interger value that will be given to the client as the frame number to render + int your_frame = NULL; // your_frame is an interger value that will be given to the client as the frame number to render int finder_jobnum = 0; int frameset_count = 0; // the frameset number, because frames in an animation don't start at zero short int done = 0;