[Openstack-devel] Bug#726304: websockify: rebind.so not found by rebind
Philipp Hahn
hahn at univention.de
Mon Oct 14 11:27:52 UTC 2013
Package: websockify
Version: 0.5.1+dfsg1-2
Severity: normal
Dear Maintainer,
1. /usr/bin/rebind fails similar to Bug #719889, because the shared
library is not found by the shell wrapper.
2. usage is never printed; suppot for "--help" is still missing in my
version below.
3. It was never checked, if the required parameters were given
4. Missing quotes.
5. You should use "exec" to get rid of the intermediate shell process.
6. bash is overkill.
7. The name "rebind" is IMHO to generic: "websockify-rebind" perhaps?
8. Multi-arch-support is missing.
9. The only architecture dependent files are the two "rebind.*o" files.
Perhaps split them with the shell wrapper into their own package and
make the websockify package "Architecture: all"?
#!/bin/sh
mydir="$(readlink -f "$(dirname "${0}")")"
mylib="${mydir}/../lib/websockify/rebind.so"
[ -e "${mylib}" ] || { echo "${mylib} not found" >&2; exit 1; }
usage () {
echo "Usage: $(basename "$0") OLD_PORT NEW_PORT COMMAND_LINE"
echo
echo "Launch COMMAND_LINE, but intercept system calls to bind"
echo "to OLD_PORT and instead bind them to localhost:NEW_PORT"
exit 2
}
[ $# -ge 3 ] || usage
# Parameter defaults
export REBIND_PORT_OLD="${1}"
export REBIND_PORT_NEW="${2}"
shift 2
LD_PRELOAD="${mylib}" exec "${@}"
-- System Information:
Debian Release: 7.1
APT prefers stable
APT policy: (900, 'stable')
Architecture: amd64 (x86_64)
Kernel: Linux 3.2.0-4-amd64 (SMP w/2 CPU cores)
Locale: LANG=de_DE.UTF-8, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
More information about the Openstack-devel
mailing list