Subject: [sup-talk] startup crash

From: [email-masked] (Jean-Hadrien CHABRAN)
Date: Sun, 9 Mar 2008 14:28:21 +0100

Hello,

I just discovered sup, and I wanted to give it a try, but sup-config /
sup crash on startup, without any useful informations ( for me )  to
discover why.

Some informations :

uname -a : Linux Gradius 2.6.24-gentoo-r2 #3 SMP Wed Feb 20 17:39:36
CET 2008 i686 Intel(R) Pentium(R) 4 CPU 2.60GHz GenuineIntel GNU/Linux

ruby : ruby 1.8.6 (2007-12-03 patchlevel 113) [i686-linux]

using sup v0.4, installed with "gem i sup"

backtrace :

jh at gradius $ sup-config
/usr/lib/ruby/gems/1.8/gems/sup-0.4/lib/sup/account.rb:7:in
`initialize': no name for account (ArgumentError)
        from /usr/lib/ruby/gems/1.8/gems/sup-0.4/lib/sup/account.rb:44:in `new'
        from /usr/lib/ruby/gems/1.8/gems/sup-0.4/lib/sup/account.rb:44:in
`add_account'
        from /usr/lib/ruby/gems/1.8/gems/sup-0.4/lib/sup/account.rb:26:in
`initialize'
        from /usr/lib/ruby/gems/1.8/gems/sup-0.4/lib/sup.rb:98:in `new'
        from /usr/lib/ruby/gems/1.8/gems/sup-0.4/lib/sup.rb:98:in `start'
        from /usr/lib/ruby/gems/1.8/gems/sup-0.4/bin/sup-config:153
        from /usr/bin/sup-config:16:in `load'
        from /usr/bin/sup-config:16

tested on my three gentoo boxes, got same results :(

-- 
Jean-Hadrien Chabran

---

From: [email-masked] (Jean-Hadrien CHABRAN)
Date: Sun, 9 Mar 2008 15:45:34 +0100

I just solved the problem on my FreeBSD 6.3, by installing
ruby18-iconv-1.8.6.111,1.

On my gentoo boxes, iconv seems to be correctly installed
/usr/lib64/ruby/1.8/x86_64-linux/iconv.so, but this is now a
distribution issue.

But I'm still curious, why this dependency problem is showing itself
in a such odd way ?

>  sup crash on startup, without any useful informations ( for me )  to
---- 8< --- 8< -------------------------------------------------------------------

-- 
Jean-Hadrien Chabran
Maitre-Oeuvre SEP EFREI
Reponsable Tutorat-L

---

From: [email-masked] (William Morgan)
Date: Sun, 09 Mar 2008 10:44:07 -0700

> But I'm still curious, why this dependency problem is showing itself

Not sure. Sup generates the default name value using:

  require 'etc'
  Etc.getpwnam(ENV["USER"]).gecos.split(/,/).first

What does that evaluate to on your system?

Now that actually could evaluate to nil for a variety of reasons, so
I've fixed the logic to avoid the crash if so. But I'm not sure why it
would be nil due to iconv not being installed.

-- 
William <wmorgan-sup at masanjin.net>