Source: debian-edu-config
Version: 2.12.904
Usertags: pidof-without-procps
Dear maintainer(s) of debian-edu-config,
it appears that debian-edu-config 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 debian-edu-config
that use `pidof` at runtime;
* via the `Build-Depends:` field of debian-edu-config, 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 debian-edu-config, 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 debian-edu-config uses `pidof` due to the following
code snippets:
```
path: debian-edu-config_2.12.904/testsuite/ldap-server
fi
if pidof slapd > /dev/null ; then
echo "success: $0: slapd is running."
else
path: debian-edu-config_2.12.904/testsuite/cups
fi
if pidof cups-browsed > /dev/null ; then
echo "success: $0: cups-browsed is running."
else
path: debian-edu-config_2.12.904/testsuite/rdp-server
fi
if pidof xrdp > /dev/null ; then
echo "success: $0: xrdp is running."
else
path: debian-edu-config_2.12.904/testsuite/rdp-server
fi
if pidof xrdp-sesman > /dev/null ; then
echo "success: $0: xrdp-sesman is running."
else
path: debian-edu-config_2.12.904/testsuite/dhcpd
fi
if pidof dhcpd > /dev/null ; then
echo "success: $0: dhcpd is running."
else
path: debian-edu-config_2.12.904/testsuite/webserver
echo "success: $0: apache is running."
else
if pidof apache2 > /dev/null ; then
echo "success: $0: apache2 is running."
else
path: debian-edu-config_2.12.904/testsuite/webserver
unset ftp_proxy || true
if pidof apache > /dev/null ; then
echo "success: $0: apache is running."
else
path: debian-edu-config_2.12.904/testsuite/automount
fi
if pidof automount > /dev/null ; then
success "automount is running."
else
path: debian-edu-config_2.12.904/testsuite/kerberos
for process in krb5kdc kadmind ; do
if pidof $process > /dev/null ; then
echo "success: $0: $process is running."
else
path: debian-edu-config_2.12.904/testsuite/webcache
fi
if pidof squid > /dev/null ; then
echo "success: $0: squid is running."
else
path: debian-edu-config_2.12.904/share/debian-edu-config/tools/kerberos-kdc-init
## check if slapd is running:
PID=`pidof slapd || /bin/true`
if [ -z "$PID" ]; then
echo "The ldap server slapd seems not to be running. Trying to start
slapd." 1>&2
path: debian-edu-config_2.12.904/share/debian-edu-config/tools/kerberos-kdc-init
fi
PID=`pidof slapd || /bin/true`
if [ -z "$PID" ]; then
echo "error: the ldap server is not running. Skipping KDC setup." 1>&2
path: debian-edu-config_2.12.904/testsuite/samba
fi
if pidof smbd > /dev/null ; then
echo "success: $0: samba is running."
else
path: debian-edu-config_2.12.904/sbin/debian-edu-restart-services
;
do
if [ "$(pidof $service)" ] ; then
echo "info: '$service' still running, sending KILL."
pkill -9 $service || /bin/true
path: debian-edu-config_2.12.904/sbin/debian-edu-restart-services
;
do
if [ "$(pidof $service)" ] ; then
echo "info: '$service' still running, sending HUP."
pkill $service || /bin/true
path: debian-edu-config_2.12.904/ldap-tools/ldap-debian-edu-install
# Restart ldap server if we stopped it and it aint already running
SLAPPIDS=$(pidof slapd || /bin/true)
if [ true = "$RESTARTSLAPD" ] && [ -z "$SLAPPIDS" ] ; then
service slapd start
path: debian-edu-config_2.12.904/ldap-tools/ldap-debian-edu-install
LOOP=0
while [ $LOOP -lt 10 ] ; do
SLAPPIDS=$(pidof slapd || /bin/true)
if [ "$SLAPPIDS" ] ; then
LOOP=$(($LOOP + 1))
path: debian-edu-config_2.12.904/ldap-tools/ldap-debian-edu-install
fi
PID=`pidof slapd || /bin/true`
if [ -z "$PID" ]; then
echo "The LDAP server slapd seems not to be running. Trying to start
slapd." 1>&2
path: debian-edu-config_2.12.904/ldap-tools/ldap-debian-edu-install
LOOP=0
while [ $LOOP -lt 10 ] ; do
SLAPPIDS=$(pidof slapd || /bin/true)
if [ "$SLAPPIDS" ] ; then
LOOP=$(($LOOP + 1))
path: debian-edu-config_2.12.904/ldap-tools/ldap-debian-edu-install
# Make sure slapd is really stopped
SLAPPIDS=$(pidof slapd || /bin/true)
if [ "$SLAPPIDS" ] ; then
echo -n "warning: slapd is still running, trying to TERM it"
path: debian-edu-config_2.12.904/ldap-tools/ldap-debian-edu-install
dns_stop() {
# make sure to stop DNS service, to avoid hanging installer.
PID=`pidof named || /bin/true`
if [ -n "$PID" ]; then
echo "info: stopping named with pid $PID"
path: debian-edu-config_2.12.904/share/debian-edu-config/tools/edu-icinga-setup
fi
PID=$(pidof mariadbd || /bin/true)
if [ -z "$PID" ]; then
echo "error: the MariaDB server is not running. Skipping Icinga 2
setup." 1>&2
```
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