Bug#600134: boinc-client: Init script : renice usage error

2010-10-13 Thread Stéphane Rosi
Package: boinc-client
Version: 6.10.58+dfsg-3
Severity: normal
Tags: patch

Hi!

When I start boinc-client with the init script, I get the following error 
message :

 r...@razor:~# /etc/init.d/boinc-client start
 Starting BOINC core client: boinc.
 Setting up scheduling for BOINC core client and children: idle,usage: renice 
 priority [ [ -p ] pids ] [ [ -g ] pgrps ] [ [ -u ] users ]
 usage: renice priority [ [ -p ] pids ] [ [ -g ] pgrps ] [ [ -u ] users ]
 usage: renice priority [ [ -p ] pids ] [ [ -g ] pgrps ] [ [ -u ] users ]
 chrt failed.

This is caused by minor argument error in the init script (renice -n 
$NICELEVEL -p $PID instead renice $NICELEVEL -p $PID).
The attached patch solves the problem.

Cheers,
-- 
Steph

-- Package-specific info:
-- Contents of /etc/default/boinc-client:
# This file is /etc/default/boinc-client, it is a configuration file for the
# /etc/init.d/boinc-client init script.

# Set this to 1 to enable and to 0 to disable the init script.
ENABLED=1

# Set this to 1 to enable advanced scheduling of the BOINC core client and
# all its sub-processes (reduces the impact of BOINC on the system's
# performance).
SCHEDULE=1

# The BOINC core client will be started with the permissions of this user.
BOINC_USER=boinc

# This is the data directory of the BOINC core client.
BOINC_DIR=/var/lib/boinc-client

# This is the location of the BOINC core client, that the init script uses.
# If you do not want to use the client program provided by the boinc-client
# package, you can specify here an alternative client program.
#BOINC_CLIENT=/usr/local/bin/boinc
BOINC_CLIENT=/usr/bin/boinc

# Here you can specify additional options to pass to the BOINC core client.
# Type 'boinc --help' or 'man boinc' for a full summary of allowed options.
#BOINC_OPTS=--allow_remote_gui_rpc
BOINC_OPTS=

-- System Information:
Debian Release: 5.0.6
Architecture: i386 (i586)

Kernel: Linux 2.6.32-5-486
Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages boinc-client depends on:
ii  adduser3.110 add and remove users and groups
ii  ca-certificates20090814+nmu2 Common CA certificates
ii  debconf [debconf-2.0]  1.5.24Debian configuration management sy
ii  libc6  2.11.2-6  Embedded GNU C Library: Shared lib
ii  libcurl3   7.18.2-8lenny4Multi-protocol file transfer libra
ii  libgcc11:4.3.2-1.1   GCC support library
ii  libssl0.9.80.9.8o-2  SSL shared libraries
ii  libstdc++6 4.4.5-2   The GNU Standard C++ Library v3
ii  lsb-base   3.2-20Linux Standard Base 3.2 init scrip
ii  python 2.5.2-3   An interactive high-level object-o
ii  zlib1g 1:1.2.3.3.dfsg-12 compression library - runtime

boinc-client recommends no packages.

Versions of packages boinc-client suggests:
pn  boinc-app-setinone (no description available)
pn  boinc-manager none (no description available)

-- debconf information:
  boinc-client/remove_boinc_dir: false
--- boinc-client.old2010-10-13 21:02:46.0 +0200
+++ /etc/init.d/boinc-client2010-10-13 21:24:17.0 +0200
@@ -139,7 +139,7 @@
shift 3
for i in $@; do
  chrt -p $POLICY $PRIO $i || return
- renice -n $NICE -p $i
+ renice $NICE -p $i
done
 }
 


Bug#600134: boinc-client: Init script : renice usage error

2010-10-13 Thread René Mayorga
severity 600134 whishlist
thanks

On Wed, Oct 13, 2010 at 11:04:05PM +0200, Stéphane Rosi wrote:
 Hi!

Hi Stéphane, and thanks for your bug report!

  r...@razor:~# /etc/init.d/boinc-client start
  Starting BOINC core client: boinc.
  Setting up scheduling for BOINC core client and children: idle,usage: 
  renice priority [ [ -p ] pids ] [ [ -g ] pgrps ] [ [ -u ] users ]
  usage: renice priority [ [ -p ] pids ] [ [ -g ] pgrps ] [ [ -u ] users ]
  usage: renice priority [ [ -p ] pids ] [ [ -g ] pgrps ] [ [ -u ] users ]
  chrt failed.
 
 This is caused by minor argument error in the init script (renice -n 
 $NICELEVEL -p $PID instead renice $NICELEVEL -p $PID).

This is caused because renice has added the -n option, from bsdutils changelog:

  * renice: add -n option for compatibility with POSIX

this option have being added since util-linux 2.15~rc1-1 on  Mon, 23 Mar 2009,
so the only way you can find this bug is using stable (leeny has the 2.13.1.1-1
version) along with boinc from testing/unstable.

I think that applying the patch and asking a release exception for this will not
be a good idea right now, since squeeze already provides the new version from
bsdutils that adds -n.

Cheers

--
René


signature.asc
Description: Digital signature