Re: psync

2002-02-01 Thread Dan Kogai

Ulrich,

  Hi.

On 2002.02.01, at 21:02, Ulrich auf dem Keller wrote:
 thanks for providing information on the useful psync command. I already 
 tried it successfully for backups of entire partitions with a firewire 
 drive as target directory. Since I would like to use it routinely on 
 our institute MacOS X server I tried to include it into the root 
 crontab file. Therefore I wrote a small script that only includes the 
 path to psync and the psync command itself (I am a quite UNIX newbie).

   The problem was simple after all.  See below.

 When I run the script as root from the command line being logged in as 
 administrator and using sudo everything goes fine except that the 
 finder is not able to display the icons before I logout and login again 
 (this is no problem for me since I see everything correctly when 
 browsing in the terminal). But when the cron job runs while nobody is 
 logged in some files and directories are missing in the backup. Do you 
 have any idea what is going wrong ?

   As for the icons psync does not backup Desktop (DB|DF) so simple 
desktop rebuilding will fix it (I deliberately did so but this can be 
altered very easily.  Future version may include commandline switch to 
control which files/directories to ignore).
   And now for the cron

 Here is the little script for running psnyc:

 #!/bin/sh -
 #
 PATH=/bin:/usr/bin:/sbin:/usr/sbin:/usr/local/bin

 sudo psync /Volumes/Data /Volumes/d-backup

   No.  the trick is that you can't use sudo in cron.  Remember you have 
to type in your password before you 'initialize' sudo?  Anything that 
demands tty (that is, Terminal or any interactive commandline interface) 
will fail in cron.  So here is what you should do in the script.  And 
since you are already running as root via cron, there is no point 
sudoing;

#!/bin/sh

PATH=/bin:/usr/bin:/sbin:/usr/sbin:/usr/local/bin ; export PATH

psync  /Volumes/Data /Volumes/d-backup  /var/tmp/psync.out 21

# put all output to /var/tmp/psync.out
#end

 and here my crontab entry:

 15  1  *   *   *   rootsh /etc/backuptest

This can stay as is.

Dan




Question about ProjectBuilder compilation of perl

2002-02-01 Thread Gaou

Hi all,

 I am not experienced with MacOS X, but I would like to develop GUI application
using wxPerl on MacOS X. I have looked through the archive, and was not able to
find an answer, so I would like to ask for an information.

 As reported in the archive with ToolBox and Tk, wxPerl also shows the Bus error.
According to wxPython-mac ML which succeeded to make wxPython work, this problem
is because of the .app form of Python. (i.e., Perl for wxPerl, I guess.)
http://lists.wxwindows.org/pipermail/wxpython-mac/2001-November/02.html

questions:
 1. Is there plans to build .app version of Perl?
 2. Is it very difficult? (I can write Perl, but very little C) 
 3. Is there any word from apple about use AppKit yet?

 I have been contacting the wxperl developer but I believe I need your help for 
this matter. 

Thanks in advance.

 Gaou ([EMAIL PROTECTED])




Re: Apache::args vs Apache::Request speed

2002-02-01 Thread Rick Frankel

On Fri, Feb 01, 2002 at 03:23:19PM -0500, Joe Schaefer wrote:
 Ian Ragsdale [EMAIL PROTECTED] writes:
 
   I hope a new release will be just around the corner, but if you want
   to test out some of the latest stuff, have a look at
   
   http://www.apache.org/~joes/
 
 
 Would someone PLEASE volunteer to try to compile and test
 apache+mod_perl  libapreq on OS/X using the experimental
 code I posted there?  Even if you can't get it working,
 ANY feedback about what happened when you tried would be 
 VERY helpful.

Compiling as i write this :^}. If anyone else would like to send me a
small handler which demonstrates the problem, it would be appreciated.

BTW, does anyone know if the expat conflict is (no-longer) a problem
on osx? just in case I'm using --disable-rule=EXPAT.

rick



MacOSX Requests and Cookies

2002-02-01 Thread Rick Frankel

Ok.

Here's the output of localhost/perl-status?inc (elided)

Embedded Perl version v5.6.1 for Apache/1.3.23 (Darwin) mod_perl/1.26 
process 2729,
running since Fri Feb 1 19:25:53 2002
Package Version Modified File
Apache 1.27 Tue May 1 13:11:20 2001 
/usr/local/apache/perl/darwin/Apache.pm
snip/
Apache::Cookie 1.0 Sun Jan 20 12:19:24 2002 
/usr/local/apache/perl/darwin/Apache/Cookie.pm
Apache::Request 1.0 Sun Jan 20 12:19:02 2002 
/usr/local/apache/perl/darwin/Apache/Request.pm

This is with a statically linked mod_perl. It doesn't crash, but in my 
(minimal) testing, it seems that Apache::Cookie is a no-op. I can't seem 
to get it to set or retrieve any cookies, it fails silently.

Joe- ApacheCookie_* was not being boostrapped into the executable, so it 
was being optimized of the linkage.

The following patch, while probably not correct (and probably the cause 
of the silent failure), covers it.

--- http_main.c Fri Feb  1 19:22:51 2002
+++ http_main.c~Mon Jan 28 04:07:46 2002
@@ -7805,12 +7805,5 @@
  {
  return ApacheRequest_new(r);
  }
-/*RAF*/
-#include apache_cookie.h
-ApacheCookie *suck_in_apcookie(request_rec *r);
-ApacheCookie *suck_in_apcookie(request_rec *r)
-{
-return ApacheCookie_new(r);
-}
  #endif /* USE_APREQ */


-END PATCH

Also, the all-in-one compile method doesn't setup apache correctly, so 
the steps taken were:

unpack everthing in the same root directory

mod_perl:

$ perl Makefile.PL APACHE_PREFIX=/usr/local/apache DO_HTTP=1 \
PREP_HTTP=1 USE_APACI=1 EVERYTHING=1
$ make
$ make install

http_apreq:

$ perl Makefile.PL
$ make
$ make install

apache:

$ CFLAGS='-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64' ./configure 
--prefix=local/apache  \
  --enable-shared=max --disable-rule=EXPAT --with-layout=Apache \
--activate-module=src/modules/perl/libperl.a --disable-shared=perl

$ make
$ make install

rick




Re: MacOSX Requests and Cookies

2002-02-01 Thread Rick Frankel

On Fri, Feb 01, 2002 at 10:39:02PM -0500, Joe Schaefer wrote:

 Great -  thanks a ton!
Not so great. I'm half asleep. You need to do patch -r or, apply the
forward patch included below...

rick

--- http_main.c~   Mon Jan 28 04:07:46 2002
+++ http_main.cFri Feb  1 19:22:51 2002
@@ -7805,5 +7805,12 @@
 {
 return ApacheRequest_new(r);
 }
+/*RAF*/
+#include apache_cookie.h
+ApacheCookie *suck_in_apcookie(request_rec *r);
+ApacheCookie *suck_in_apcookie(request_rec *r)
+{
+return ApacheCookie_new(r);
+}
 #endif /* USE_APREQ */