owncloud-ansible / redis

Ansible role for Redis
https://owncloud-ansible.github.io
Apache License 2.0
0 stars 2 forks source link

FR: CentOS/RHEL symlink redis-cli binary in $PATH #4 #8

Open enbrnz opened 4 years ago

enbrnz commented 4 years ago

On CentOS/RHEL we install redis-tools from Software Collections. These packages don't make redis-cli universally executable by symlinking the installed binary from a $PATH directory

xoxys commented 4 years ago

Thats expected behavior because scl tools are designed to be installed isolated beside the OS packages.

xoxys commented 4 years ago

See https://developers.redhat.com/blog/2017/10/18/use-software-collections-without-bothering-alternative-path/

xoxys commented 4 years ago

Mixing scl with OS packages/PATH could cause issues on user systems

enbrnz commented 4 years ago

Nice, thanks for the tip. So I guess we can close this issue and just tell anybody who asks to install the {redis,php,mariadb}-syspaths package in the future. Do you agree?

enbrnz commented 4 years ago
yum search *-syspaths
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: mirror.ratiokontakt.de
 * centos-sclo-rh: mirror.plustech.de
 * centos-sclo-sclo: mirror.ratiokontakt.de
 * epel: mirror.23media.com
 * extras: mirror.ratiokontakt.de
 * updates: centosmirror.netcup.net
============================================================================================================================= Matched: *-syspaths =============================================================================================================================
rh-mariadb102-syspaths.x86_64 : System-wide wrappers for the rh-mariadb102 Software Collection
rh-mariadb103-syspaths.x86_64 : System-wide wrappers for the rh-mariadb103 Software Collection
rh-mongodb34-syspaths.x86_64 : System-wide wrappers for the rh-mongodb34 Software Collection
rh-mongodb36-syspaths.x86_64 : System-wide wrappers for the rh-mongodb36 Software Collection
rh-mysql80-syspaths.x86_64 : System-wide wrappers for the rh-mysql80 Software Collection
rh-postgresql10-syspaths.x86_64 : System-wide wrappers for the rh-postgresql10 Software Collection
rh-postgresql12-syspaths.x86_64 : System-wide wrappers for the rh-postgresql12 Software Collection
rh-postgresql96-syspaths.x86_64 : System-wide wrappers for the rh-postgresql96 Software Collection

There are no syspath packages for redis or php

enbrnz commented 3 years ago

TODO: Check what syspath does, other options are symlinks, or simple wrapper scripts:

#!/usr/bin/env sh 

set -eo pipefail  
exec /path/to/rh/binary "$@"
xoxys commented 3 years ago

I've checked the MongoDB syspath package. No real magic, it also just creates wrapper scripts for the binaries and symlinks for everything else e.g. manpages or systemd unit files. I'll prepare a PR to add similar behavior.