Package: opennebula Version: 3.2.1-1 Severity: normal Tags: patch Dear Maintainer,
I am reporting this from my workstation since reportbug and mail is setup there. When starting oneacct I get: oneadmin@opennebula:~$ /usr/bin/oneacct.orig /usr/bin/oneacct.orig:27: undefined method `+' for nil:NilClass (NoMethodError) (oneacct.orig since I am already using a patched version) This is due to In one 3.2 debian package, the script oneacct use a wrong path to load ruby files: ONE_LOCATION=ENV['ONE_LOCATION'] $: << ONE_LOCATION+'/lib' $: << ONE_LOCATION+'lib/cli' But: 1) if ONE_LOCATION is not set in env, it fails 2) path in system path is wrong: correct path is ONE_LOCATION='/usr/lib/one/ruby/' (+cli) Bug #1106: wrong path in oneacct http://dev.opennebula.org/issues/1106 Also mentioned on: [one-users] oneacct doesn't work (bug) http://lists.opennebula.org/pipermail/users-opennebula.org/2012-January/007548.html The upstream bug report includes an updated oneacct file. I generated a patch from it that I will attach. Pulling new upstream snapshot might be enough to get the fix however. Thanks, Martin -- System Information: Debian Release: wheezy/sid APT prefers testing APT policy: (500, 'testing'), (450, 'unstable'), (110, 'experimental') Architecture: i386 (i686) Kernel: Linux 3.2.0-1-686-pae (SMP w/2 CPU cores) Locale: LANG=de_DE.UTF-8, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/bash Versions of packages opennebula depends on: ii libc6 2.13-26 ii libgcc1 1:4.6.3-1 ii libmysqlclient16 5.1.58-1 ii libsqlite3-0 3.7.10-1 ii libssl1.0.0 1.0.0g-1 ii libstdc++6 4.6.3-1 ii libxml2 2.7.8.dfsg-7 ii libxmlrpc-c++4 <none> ii libxmlrpc-core-c3 <none> ii opennebula-common 3.2.1-1 ii ruby 4.8 ii ruby-password [libpassword-ruby] 0.5.3-3 ii ruby-sequel [libsequel-ruby] 3.33.0-1 ii ruby1.8 [ruby] 1.8.7.352-2 ii rubygems 1.8.15-1 Versions of packages opennebula recommends: ii libmysql-ruby 2.8.2+gem2deb-1 ii ruby-mysql [libmysql-ruby] 2.8.2+gem2deb-1 ii ruby-sqlite3 [libsqlite3-ruby] 1.3.5-1 Versions of packages opennebula suggests: ii mysql-server <none> ii ruby-amazon-ec2 [libamazonec2-ruby] 0.9.17-2
--- /usr/bin/oneacct.orig 2012-02-22 20:34:37.000000000 +0100 +++ /usr/bin/oneacct 2012-03-07 16:21:18.000000000 +0100 @@ -24,6 +24,12 @@ -ONE_LOCATION=ENV['ONE_LOCATION'] +ONE_LOCATION=ENV["ONE_LOCATION"] -$: << ONE_LOCATION+'/lib/ruby' -$: << ONE_LOCATION+'/lib/ruby/cli' +if !ONE_LOCATION + RUBY_LIB_LOCATION="/usr/lib/one/ruby" +else + RUBY_LIB_LOCATION=ONE_LOCATION+"/lib/ruby" +end + +$: << RUBY_LIB_LOCATION +$: << RUBY_LIB_LOCATION+"/cli"