#2881 Don't assume /bin -> /usr/bin symlink exists
Closed: fixed Opened by tjaalton.

There are various places where a binary is called with a path that's not common between distros, like /usr/bin/ln which doesn't exist in Debian, or the other way like /bin/openssl while it's /usr/bin/openssl on Debian.


Metadata Update from @mharmsen:
- Custom field component adjusted to None
- Custom field feature adjusted to None
- Custom field origin adjusted to None
- Custom field proposedmilestone adjusted to None
- Custom field proposedpriority adjusted to None
- Custom field reviewer adjusted to None
- Custom field type adjusted to None
- Custom field version adjusted to None
- Issue set to the milestone: 0.0 NEEDS_TRIAGE

I compiled a list of all absolute paths to commands in bin and sbin. Some are bogus, e.g. /bin/tomcat-jni.jar, please ignore them.

Which paths do not work on Debian?

$ grep -RE '(/usr)?/(s)?bin/[[:alnum:]_.-]+' -ho . | sort | uniq 
/bin/apachectl
/bin/awk
/bin/bash
/bin/bootstrap.jar
/bin/catalina.sh
/bin/cert
/bin/certutil
/bin/cp
/bin/date
/bin/java
/bin/ldapmodify
/bin/ls
/bin/man
/bin/nuxwdog
/bin/openssl
/bin/pk12util
/bin/pki
/bin/pwd
/bin/rm
/bin/rpm
/bin/setup_tps
/bin/sh
/bin/systemctl
/bin/tomcat-jni.jar
/bin/tomcat-juli.jar
/bin/tpsclient
/bin/uninstall_tps
/sbin/alternatives
/sbin/httpd
/sbin/init.d-ncipher
/sbin/nologin
/sbin/pkidestroy
/sbin/pki-server
/sbin/pki-server-upgrade
/sbin/pkispawn
/sbin/pki-upgrade
/sbin/service
/usr/bin/abrt-action-generate-backtrace
/usr/bin/abrt-action-install-debuginfo
/usr/bin/abrt-cli
/usr/bin/AtoB
/usr/bin/authbind
/usr/bin/certutil
/usr/bin/cp
/usr/bin/createrepo
/usr/bin/diff
/usr/bin/env
/usr/bin/expect
/usr/bin/id
/usr/bin/java
/usr/bin/ldapmodify
/usr/bin/ldapsearch
/usr/bin/ldd
/usr/bin/ln
/usr/bin/mkrequest
/usr/bin/openssl
/usr/bin/perl
/usr/bin/PKCS10Client
/usr/bin/pki
/usr/bin/pkiconsole
/usr/bin/pkicontrol
/usr/bin/pkicreate
/usr/bin/pkidaemon
/usr/bin/python
/usr/bin/python2
/usr/bin/python3
/usr/bin/reporter-mailx
/usr/bin/rhts-environment.sh
/usr/bin/rhts-submit-log
/usr/bin/sparcv9
/usr/bin/sscep
/usr/bin/sslget
/usr/bin/sudo
/usr/bin/systemctl
/usr/bin/tkstool
/usr/bin/tpsclient
/usr/bin/tr
/usr/bin/yum
/usr/sbin/alternatives
/usr/sbin/groupadd
/usr/sbin/httpd.worker
/usr/sbin/pkidestroy
/usr/sbin/pki-server
/usr/sbin/pki-server-upgrade
/usr/sbin/pkispawn
/usr/sbin/pki-upgrade
/usr/sbin/semanage
/usr/sbin/setup-ds.pl
/usr/sbin/setupssl2.sh
/usr/sbin/tomcat
/usr/sbin/tomcat6
/usr/sbin/useradd

here's the list, with obsolete stuff removed:

~~~~
/bin/certutil
/bin/man
/bin/nuxwdog
/bin/openssl
/bin/pk12util
/bin/pki
/sbin/nologin
/sbin/service
/usr/bin/cp
/usr/bin/ln
/usr/bin/systemctl
~~~~

Per PKI Team Meeting of 20180109: 10.6

Metadata Update from @mharmsen:
- Issue set to the milestone: 10.6 (was: 0.0 NEEDS_TRIAGE)

looks like the path prefix can be dropped from CMakeLists at least, maybe elsewhere too.

master:

commit 77ec93daa222a437f88a8d2892f44ce96a622a93
Author: Timo Aaltonen <tjaalton@debian.org>
Date:   Tue Nov 21 17:20:18 2017 +0200
    Don't assume /bin -> /usr/bin symlink exists
    Be more consistent with hardcoding paths, and use paths that work on
    other distros too which don't have a /bin -> /usr/bin symlink.
    Change-Id: Ic2c85f074b6703367b882a9e5eb67fce47eff5ab

Metadata Update from @vakwetu:
- Issue close_status updated to: fixed
- Issue status updated to: Closed (was: Open)

[20180221] - confirmed with tjaalton that this was the only patch for this issue

Metadata Update from @mharmsen:
- Issue set to the milestone: 10.6.0 (was: 10.6)

Dogtag PKI is moving from Pagure issues to GitHub issues. This means that existing or new
issues will be reported and tracked through Dogtag PKI's GitHub Issue tracker.

This issue has been cloned to GitHub and is available here:
https://github.com/dogtagpki/pki/issues/3337

If you want to receive further updates on the issue, please navigate to the
GitHub issue and click on Subscribe button.

Thank you for understanding, and we apologize for any inconvenience.

Metadata