Source: containerd
Version: 2.1.6+ds1-1
Usertags: pidof-without-procps

Dear maintainer(s) of containerd,

it appears that containerd 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 containerd
  that use `pidof` at runtime;
* via the `Build-Depends:` field of containerd, 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 containerd, 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 containerd uses `pidof` due to the following
code snippets:

```
path: containerd_1.7.24~ds1-10/Makefile
        @echo "$(WHALE) $@"
        $(eval containers=$(shell find /run/containerd/runc -mindepth 2 
-maxdepth 3  -type d -exec basename {} \;))
        $(shell pidof containerd containerd-shim runc | xargs -r -n 1 kill -9)
        @( for container in $(containers); do \
            grep $$container /proc/self/mountinfo | while read -r mountpoint; 
do \


path: containerd_1.7.24~ds1-10/integration/main_test.go
// PidOf returns pid of a process by name.
func PidOf(name string) (int, error) {
        b, err := exec.Command("pidof", "-s", name).CombinedOutput()
        output := strings.TrimSpace(string(b))
        if err != nil {
```

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

Reply via email to