Source: crowdsec
Version: 1.4.6-10.1+b2
Usertags: pidof-without-procps
Dear maintainer(s) of crowdsec,
it appears that crowdsec 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 crowdsec
that use `pidof` at runtime;
* via the `Build-Depends:` field of crowdsec, 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 crowdsec, 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 crowdsec uses `pidof` due to the following
code snippets:
```
path: crowdsec_1.4.6-10.1/tests/ansible/roles/run_func_tests/tasks/main.yml
environment:
# daemonize -> /usr/bin or /usr/local/sbin
# pidof -> /usr/sbin
# bash -> /opt/bash/bin
PATH: "/opt/bash/bin:{{ ansible_env.PATH }}:/usr/sbin:/usr/local/sbin"
path: crowdsec_1.4.6-10.1/tests/ansible/roles/run_func_tests/tasks/main.yml
environment:
# daemonize -> /usr/bin or /usr/local/sbin
# pidof -> /usr/sbin
# bash -> /opt/bash/bin
PATH: "/opt/bash/bin:{{ ansible_env.PATH }}:/usr/sbin:/usr/local/sbin"
path: crowdsec_1.4.6-10.1/tests/ansible/roles/make_fixture/tasks/main.yml
DB_BACKEND: "{{ lookup('ansible.builtin.env', 'DB_BACKEND') }}"
# daemonize -> /usr/bin or /usr/local/sbin
# pidof -> /usr/sbin
# bash -> /opt/bash/bin
PATH: "/opt/bash/bin:{{ ansible_env.PATH }}:{{ golang_install_dir
}}/bin/:/usr/sbin:/usr/local/sbin"
path: crowdsec_1.4.6-10.1/tests/ansible/roles/make_fixture/tasks/main.yml
DB_BACKEND: "{{ lookup('ansible.builtin.env', 'DB_BACKEND') }}"
# daemonize -> /usr/bin or /usr/local/sbin
# pidof -> /usr/sbin
# bash -> /opt/bash/bin
PATH: "/opt/bash/bin:{{ ansible_env.PATH }}:/usr/sbin:/usr/local/sbin"
path: crowdsec_1.4.6-10.1/tests/lib/init/crowdsec-systemd
stop() {
systemctl stop crowdsec # systemd doesn't throw error when stopping already
stopped stuff
while pidof /usr/bin/crowdsec ; do sleep 0.1; done
}
path: crowdsec_1.4.6-10.1/tests/lib/init/crowdsec-systemd
start_pid() {
start
pidof /usr/bin/crowdsec
}
```
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