Source: postgresql-common
Version: 290
Usertags: pidof-without-procps
Dear maintainer(s) of postgresql-common,
it appears that postgresql-common 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 postgresql-common
that use `pidof` at runtime;
* via the `Build-Depends:` field of postgresql-common, 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 postgresql-common, 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 postgresql-common uses `pidof` due to the following
code snippets:
```
path: postgresql-common_290/t/020_create_sql_remove.t
# verify that exactly one postgres master is running
my @pm_pids = pidof ('postgres');
is $#pm_pids, 0, 'Exactly one postgres master process running';
path: postgresql-common_290/t/020_create_sql_remove.t
'cluster restarts with new environment file';
@pm_pids = pidof ('postgres');
is $#pm_pids, 0, 'Exactly one postgres master process running';
%env = pid_env 'postgres', $pm_pids[0];
path: postgresql-common_290/t/TestLib.pm
# Return array of pids that match the given command name (we require a leading
# slash so the postgres children are filtered out)
sub pidof {
my $prg = shift;
open F, '-|', 'ps', 'h', '-C', $prg, '-o', 'pid,cmd' or die "open: $!";
path: postgresql-common_290/t/TestLib.pm
our @EXPORT = qw/os_release ps ok_dir exec_as deb_installed rpm_installed
package_version
version_ge program_ok is_program_out like_program_out unlike_program_out
pidof pid_env check_clean
@ALL_MAJORS @MAJORS $delay/;
```
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