Re: [Fink-devel] Patch for 10.5 Binary Installer

2008-02-04 Thread Martin Costabel
Evan Broder wrote:
 Hi,
 I think I've got a patch that fixes the postflight script on 10.5.
 
 There are two things that I fix: first, ps axww seems to for some reason 
 list lots of processes on 10.5. I will freely admit that I don't 
 understand the options to ps on OS X or any other platform - I just kept 
 pulling arguments one at a time until it seemed to do the right thing.

Good catch. To me this looks like a bug in Leopard's /bin/ps: When the 
-a flag is present, it ignores the -p pid flag. I have immediately 
filed a bug with Apple's bugreporter.

 The other change causes pathsetup.sh to run with the privileges, 
 environment, and shell scripts of the user that is being sudo'd to. 
 Currently, pathsetup.sh will try to write to /var/root/.profile as the 
 normal user, which fails for obvious reasons.

The environment variables (in particular $HOME and $USER) with which the 
installer runs the postflight script keep changing between OS releases, 
sometimes between minor releases. There was a time when the current 
version of postflight did the right thing, but on Leopard your 
suggestion is looks correct, and it looks correct for Tiger, too.

However, I think this needs some more testing: When I try to execute 
this by hand from a root command line prompt, I get weird error messages 
(perhaps due to my using tcsh as login shell):

root# sudo -i -u costabel /sw/bin/pathsetup.sh
Badly placed ()'s.

With another command it gets weirder:

root# sudo -i -u costabel /usr/bin/printenv HOME
\312\376\272\276^B^G^C^PEp^L^R: Command not found.
^QU\211\345WVS\203\354,\213u^H\213]^L\353^E\350\261\377\377\377\307D: 
Event not found.

There is definitely something fishy about this -i flag when used with 
a command. On the other hand, -H seems to work correctly:

root# sudo -H -u costabel /usr/bin/printenv HOME
/Users/costabel

root# sudo -H -u costabel /sw/bin/pathsetup.sh

Setting up your Fink environment


Your environment seems to be correctly
set up for Fink already.

 - Evan Broder
 
 cvs diff: Diffing installer/resources
 Index: installer/resources/postflight
 ===
 RCS file: /cvsroot/fink/scripts/installer/resources/postflight,v
 retrieving revision 1.13
 diff -u -r1.13 postflight
 --- installer/resources/postflight9 Jun 2006 16:59:14 -1.13
 +++ installer/resources/postflight4 Feb 2008 02:32:33 -
 @@ -16,7 +16,7 @@
  # get ps data for a given PID
  sub process_info {
  my($pid) = shift;
 -my $command = ps axww -p$pid -o user,ppid,tty,command | tail 
 -n 1;
 +my $command = ps xww -p$pid -o user,ppid,tty,command | tail -n 1;
  my @info = split(/\s+/, `$command`, 4);
  return (
  user = $info[0],
 @@ -40,7 +40,7 @@
  # Running from Installer.app: have Aqua session, so run pathsetup
  # as user who ran Installer.app.
  my $real_user = $info{user};
 -system sudo -u $real_user /sw/bin/pathsetup.sh;
 +system sudo -i -u $real_user /sw/bin/pathsetup.sh;
  system osascript -e 'tell application \Installer\' -e 'activate' 
 -e 'end tell';
  } else {
  # Running from commandline: not certain to have Aqua session, so

-- 
Martin


-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
Fink-devel mailing list
Fink-devel@lists.sourceforge.net
http://news.gmane.org/gmane.os.apple.fink.devel


Re: [Fink-devel] Patch for 10.5 Binary Installer

2008-02-04 Thread Evan Broder
Martin Costabel wrote:
 Good catch. To me this looks like a bug in Leopard's /bin/ps: When the 
 -a flag is present, it ignores the -p pid flag. I have immediately 
 filed a bug with Apple's bugreporter.
   
 The environment variables (in particular $HOME and $USER) with which the 
 installer runs the postflight script keep changing between OS releases, 
 sometimes between minor releases. There was a time when the current 
 version of postflight did the right thing, but on Leopard your 
 suggestion is looks correct, and it looks correct for Tiger, too.

 However, I think this needs some more testing: When I try to execute 
 this by hand from a root command line prompt, I get weird error messages 
 (perhaps due to my using tcsh as login shell):

 root# sudo -i -u costabel /sw/bin/pathsetup.sh
 Badly placed ()'s.

 With another command it gets weirder:

 root# sudo -i -u costabel /usr/bin/printenv HOME
 \312\376\272\276^B^G^C^PEp^L^R: Command not found.
 ^QU\211\345WVS\203\354,\213u^H\213]^L\353^E\350\261\377\377\377\307D: 
 Event not found.

 There is definitely something fishy about this -i flag when used with 
 a command. On the other hand, -H seems to work correctly:

 root# sudo -H -u costabel /usr/bin/printenv HOME
 /Users/costabel

 root# sudo -H -u costabel /sw/bin/pathsetup.sh
 
 Setting up your Fink environment
 

 Your environment seems to be correctly
 set up for Fink already.
   
Yeah, -H is probably what you want more than -i. In terms of behavior
changing across versions, this isn't something we should run into again
- by using -H you explicitly specify the behavior you want; this is a
flag that is standardized across every sudo I've run into.

- Evan


-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
Fink-devel mailing list
Fink-devel@lists.sourceforge.net
http://news.gmane.org/gmane.os.apple.fink.devel


Re: [Fink-devel] Patch for 10.5 Binary Installer

2008-02-04 Thread Peter O'Gorman
Martin Costabel wrote:

 
 Good catch. To me this looks like a bug in Leopard's /bin/ps: When the 
 -a flag is present, it ignores the -p pid flag. I have immediately 
 filed a bug with Apple's bugreporter.

I imagine that it will be closed as invalid. With -a, you are
essentially asking for all processes with a controlling terminal, with
-p you ask for all processes which match the given process id. ps will
return both all the processes with a controlling terminal and all
processes matching the pid.

$ ps -a | wc -l
   4
$ ps -a -p 1 | wc -l
   5

http://www.opengroup.org/onlinepubs/95399/utilities/ps.html

Peter
-- 
Peter O'Gorman
http://pogma.com

-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
Fink-devel mailing list
Fink-devel@lists.sourceforge.net
http://news.gmane.org/gmane.os.apple.fink.devel


[Fink-devel] Fwd: Fink autossh package

2008-02-04 Thread Sébastien Maret
I am fowarding this to fink-devel because maintainer's email bounces.

Sébastien

Begin forwarded message:

 From: Sébastien Maret [EMAIL PROTECTED]
 Date: February 4, 2008 16:17:31 CEST
 To: [EMAIL PROTECTED]
 Subject: Fink autossh package

 Hi,

 Fink autossh package is a bit outdated. Would you mind updating it  
 (or do you mind if I update it for you)?

 Thanks,
 Sébastien


-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
Fink-devel mailing list
Fink-devel@lists.sourceforge.net
http://news.gmane.org/gmane.os.apple.fink.devel


Re: [Fink-devel] Fwd: Fink autossh package

2008-02-04 Thread Alexander Hansen
Sébastien Maret wrote:
 I am fowarding this to fink-devel because maintainer's email bounces.

 Sébastien

 Begin forwarded message:

   
 From: Sébastien Maret [EMAIL PROTECTED]
 Date: February 4, 2008 16:17:31 CEST
 To: [EMAIL PROTECTED]
 Subject: Fink autossh package

 Hi,

 Fink autossh package is a bit outdated. Would you mind updating it  
 (or do you mind if I update it for you)?

 Thanks,
 Sébastien
 
I guess you might as well do the update and commit it in a few days if 
the maintainer hasn't replied. 

-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
Fink-devel mailing list
Fink-devel@lists.sourceforge.net
http://news.gmane.org/gmane.os.apple.fink.devel


Re: [Fink-devel] Patch for 10.5 Binary Installer

2008-02-04 Thread Martin Costabel
Peter O'Gorman wrote:
[]
 
 I imagine that it will be closed as invalid. With -a, you are
 essentially asking for all processes with a controlling terminal, with
 -p you ask for all processes which match the given process id. ps will
 return both all the processes with a controlling terminal and all
 processes matching the pid.

Argh; I really should know better by now than to read man pages on a 
Leopard machine on which I haven't mucked out personally the 4500 or so 
man pages that remain from Tiger when doing an upgrade install. :-(

I guess the line proposed by Evan - using ps xww -p pid is correct for 
Tiger and Leopard anyway.

-- 
Martin


-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
Fink-devel mailing list
Fink-devel@lists.sourceforge.net
http://news.gmane.org/gmane.os.apple.fink.devel


[Fink-devel] Fwd: Trying to port your package to Fink

2008-02-04 Thread Murali Vadivelu



Begin forwarded message:


From: Murali Vadivelu [EMAIL PROTECTED]
Date: 5 February 2008 02:10:23 GMT
To: pguyot AT kallisys.net
Subject: Trying to port your package to Fink

Dear Developer,

I am trying to port you package to Fink, i386-elf-gcc.

I am not sure how t troubleshoot this error:
ed -e 's/\(UNUSED\)/_GLIBCXX_\1/g' \
-e 's/\(GCC[ABCDEFGHIJKLMNOPQRSTUVWXYZ_]*_H\)/_GLIBCXX_\1/g' \
-e 's/SUPPORTS_WEAK/__GXX_WEAK__/g' \
-e 's/\([ABCDEFGHIJKLMNOPQRSTUVWXYZ_]*USE_WEAK\)/_GLIBCXX_\1/g' \
-e 's,^#include \(.*\),#include bits/\1,g' \
	 /sw/src/fink.build/i386-elf-gcc-3.4.6-1/gcc-3.4.6/libstdc++- 
v3/../gcc/gthr-single.h  i386-elf/bits/gthr-default.h

/bin/sh ./../gcc-3.4.6/mkinstalldirs i386-elf/libiberty ; \
rm -f i386-elf/libiberty/Makefile || : ; \
cp multilib.out i386-elf/libiberty/multilib.out
mkdir i386-elf/libiberty
Configuring in i386-elf/libiberty
configure: creating cache ./config.cache
checking whether to enable maintainer-specific portions of  
Makefiles... no

checking for makeinfo... makeinfo
checking for perl... perl
checking build system type... i686-apple-darwin9.1.0
checking host system type... i386-pc-elf
checking for i386-elf-ar... i386-elf-ar
checking for i386-elf-ranlib... i386-elf-ranlib
checking for i386-elf-gcc...  /sw/src/fink.build/i386-elf- 
gcc-3.4.6-1/build/gcc/xgcc -B/sw/src/fink.build/i386-elf-gcc-3.4.6-1/ 
build/gcc/ -B/sw/share/i386-elf/i386-elf/bin/ -B/sw/share/i386-elf/ 
i386-elf/lib/ -isystem /sw/share/i386-elf/i386-elf/include -isystem / 
sw/share/i386-elf/i386-elf/sys-include

checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether  /sw/src/fink.build/i386-elf-gcc-3.4.6-1/build/gcc/ 
xgcc -B/sw/src/fink.build/i386-elf-gcc-3.4.6-1/build/gcc/ -B/sw/ 
share/i386-elf/i386-elf/bin/ -B/sw/share/i386-elf/i386-elf/lib/ - 
isystem /sw/share/i386-elf/i386-elf/include -isystem /sw/share/i386- 
elf/i386-elf/sys-include accepts -g... yes
checking for  /sw/src/fink.build/i386-elf-gcc-3.4.6-1/build/gcc/xgcc  
-B/sw/src/fink.build/i386-elf-gcc-3.4.6-1/build/gcc/ -B/sw/share/ 
i386-elf/i386-elf/bin/ -B/sw/share/i386-elf/i386-elf/lib/ -isystem / 
sw/share/i386-elf/i386-elf/include -isystem /sw/share/i386-elf/i386- 
elf/sys-include option to accept ANSI C... none needed
checking how to run the C preprocessor...  /sw/src/fink.build/i386- 
elf-gcc-3.4.6-1/build/gcc/xgcc -B/sw/src/fink.build/i386-elf- 
gcc-3.4.6-1/build/gcc/ -B/sw/share/i386-elf/i386-elf/bin/ -B/sw/ 
share/i386-elf/i386-elf/lib/ -isystem /sw/share/i386-elf/i386-elf/ 
include -isystem /sw/share/i386-elf/i386-elf/sys-include -E
checking whether  /sw/src/fink.build/i386-elf-gcc-3.4.6-1/build/gcc/ 
xgcc -B/sw/src/fink.build/i386-elf-gcc-3.4.6-1/build/gcc/ -B/sw/ 
share/i386-elf/i386-elf/bin/ -B/sw/share/i386-elf/i386-elf/lib/ - 
isystem /sw/share/i386-elf/i386-elf/include -isystem /sw/share/i386- 
elf/i386-elf/sys-include and cc understand -c and -o together... yes

checking for an ANSI C-conforming const... yes
checking for inline... inline
checking whether byte ordering is bigendian... cross-compiling...
unknown
checking to probe for byte ordering... /sw/share/i386-elf/i386-elf/ 
bin/ld: crt0.o: No such file: No such file or directory

collect2: ld returned 1 exit status
unknown
configure: error: unknown endianess - sorry
/sw/src/fink.build/i386-elf-gcc-3.4.6-1/gcc-3.4.6/libiberty/ 
configure: line 3289: exit: please: numeric argument required
/sw/src/fink.build/i386-elf-gcc-3.4.6-1/gcc-3.4.6/libiberty/ 
configure: line 3289: exit: please: numeric argument required

make: *** [configure-target-libiberty] Error 1
### execution of /var/tmp/tmp.1.BNrDZG failed, exit code 2

Please help if you could.

With many thanks.

Best,
Murali.


-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/___
Fink-devel mailing list
Fink-devel@lists.sourceforge.net
http://news.gmane.org/gmane.os.apple.fink.devel