Source: sanlock
Version: 4.2.0-1+b1
Usertags: pidof-without-procps
Dear maintainer(s) of sanlock,
it appears that sanlock uses `pidof` in its testsuite, or that
at least one of its binary packages uses `pidof` at runtime.
Historically, `pidof` was provided by the Essential package
`sysvinit-tools`, making an explicit dependency unnecessary. However
`pidof` will soon be moved to `procps` and will no longer be part of
the Essential set.
Please add an explicit dependency on `procps`:
* via the `Depends:` field of all binary packages of sanlock
that use `pidof` at runtime;
* via the `Build-Depends:` field of sanlock, if `pidof` is
used in tests run at build-time;
* via the `Depends:` field of `debian/control/tests`, if `pidof` is
used in autopkgtests.
To prevent any disruption for users of sanlock, please add
this dependency now, before `pidof` is moved from `sysvinit-utils` to
`procps`. Alternatively, you could remove all uses of `pidof`.
It is believed that sanlock uses `pidof` due to the following
code snippets:
```
path: sanlock_4.2.0-1/init.d/fence_sanlockd
fi
PID=$(pidofproc -p $runfile $prog)
# We have to use SIGHUP to mean stop because sanlock
path: sanlock_4.2.0-1/fence_sanlock/fence_sanlock.in
# make sure fence_sanlockd is alive
[ -z "$(pidof fence_sanlockd)" ] && {
logger -t $prog "on fence_sanlockd stopped running"
return 1
path: sanlock_4.2.0-1/fence_sanlock/fence_sanlock.in
read_leader || return 1
[ -z "$(pidof fence_sanlockd)" ] && {
logger -t $prog "on fence_sanlockd is not running"
return 1
path: sanlock_4.2.0-1/fence_sanlock/fence_sanlock.in
loop=$(($loop+1))
tmp_pid="$(pidof fence_sanlockd)"
[ -z "$tmp_pid" ] && {
logger -t $prog "fence_sanlockd not running"
path: sanlock_4.2.0-1/fence_sanlock/fence_sanlock.in
}
pid="$(pidof fence_sanlockd)"
[ -z "$pid" ] && {
logger -t $prog "Unable to determine fence_sanlockd pid"
path: sanlock_4.2.0-1/init.d/sanlock
stop() {
PID=$(pidofproc -p $runfile $prog)
echo -n $"Sending stop signal $prog ($PID): "
```
Feel free to close this issue if this is a false positive (for example
if this code is in an unreachable code path).
Regards,
--
Gioele Barabucci