Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create "redis" symlinks for the binaries in make install #147

Closed
Tracked by #25
zuiderkwast opened this issue Apr 2, 2024 · 4 comments · Fixed by #193
Closed
Tracked by #25

Create "redis" symlinks for the binaries in make install #147

zuiderkwast opened this issue Apr 2, 2024 · 4 comments · Fixed by #193
Assignees

Comments

@zuiderkwast
Copy link
Contributor

zuiderkwast commented Apr 2, 2024

The binaries redis-server, redis-cli, etc. have already been renamed to valkey-*.

For compatibility, we want to create symlinks with the old names (redis-cli, etc.) to these in make install. These are located at the same place as the installed binarues, e.g. under /usr/local/bin/ or similar.

@zuiderkwast zuiderkwast mentioned this issue Apr 2, 2024
18 tasks
@lipzhu
Copy link
Contributor

lipzhu commented Apr 3, 2024

If use already have redis-* binaries installed in local, the new created link will overwrite the binary, is it expected?

@vitahlin
Copy link
Contributor

vitahlin commented Apr 3, 2024

Maybe we could do it by checking if there existredis-server and redis-cli and they are symlinks?

If they are symlinks, then we can create redis-* symlinks in make install and remove them in make uninstatll.
We do not do anything if they are not symlinks.

@zuiderkwast
Copy link
Contributor Author

If you install one version of Redis on top of another version of Redis, you overwrite the binaries, right?

I don't think we shall skip creating the symlinks, because then users may have an old version of Redis which they didn't expect. We can have a makefile variable to disable creating the symlinks instead. Of course we need to mention this very clearly in the release notes.

@vitahlin
Copy link
Contributor

vitahlin commented Apr 3, 2024

Thanks I will finish it

zuiderkwast pushed a commit that referenced this issue Apr 6, 2024
Adds a new make variable called `USE_REDIS_SYMLINKS`, with default value
`yes`. If yes, then `make install` creates additional symlinks to the
installed binaries:

* `valkey-server`
* `valkey-cli`
* `valkey-benchmark`
* `valkey-check-rdb`
* `valkey-check-aof`
* `valkey-sentinel`

The names of the symlinks are the legacy redis binary names
(`redis-server`, etc.). The purpose is to provide backward compatibility
for scripts expecting the these filenames. The symlinks are installed in
the same directory as the binaries (typically `/usr/local/bin/` or
similar).

Similarly, `make uninstall` removes these symlinks if
`USE_REDIS_SYMLINKS` is `yes`.

This is described in a note in README.md.

Fixes #147

---------

Signed-off-by: Vitah Lin <vitahlin@gmail.com>
Co-authored-by: Madelyn Olson <34459052+madolson@users.noreply.github.com>
madolson added a commit to madolson/valkey that referenced this issue Apr 7, 2024
…y-io#193)

Adds a new make variable called `USE_REDIS_SYMLINKS`, with default value
`yes`. If yes, then `make install` creates additional symlinks to the
installed binaries:

* `valkey-server`
* `valkey-cli`
* `valkey-benchmark`
* `valkey-check-rdb`
* `valkey-check-aof`
* `valkey-sentinel`

The names of the symlinks are the legacy redis binary names
(`redis-server`, etc.). The purpose is to provide backward compatibility
for scripts expecting the these filenames. The symlinks are installed in
the same directory as the binaries (typically `/usr/local/bin/` or
similar).

Similarly, `make uninstall` removes these symlinks if
`USE_REDIS_SYMLINKS` is `yes`.

This is described in a note in README.md.

Fixes valkey-io#147

---------

Signed-off-by: Vitah Lin <vitahlin@gmail.com>
Co-authored-by: Madelyn Olson <34459052+madolson@users.noreply.github.com>
PatrickJS pushed a commit to PatrickJS/placeholderkv that referenced this issue Apr 24, 2024
…y-io#193)

Adds a new make variable called `USE_REDIS_SYMLINKS`, with default value
`yes`. If yes, then `make install` creates additional symlinks to the
installed binaries:

* `valkey-server`
* `valkey-cli`
* `valkey-benchmark`
* `valkey-check-rdb`
* `valkey-check-aof`
* `valkey-sentinel`

The names of the symlinks are the legacy redis binary names
(`redis-server`, etc.). The purpose is to provide backward compatibility
for scripts expecting the these filenames. The symlinks are installed in
the same directory as the binaries (typically `/usr/local/bin/` or
similar).

Similarly, `make uninstall` removes these symlinks if
`USE_REDIS_SYMLINKS` is `yes`.

This is described in a note in README.md.

Fixes valkey-io#147

---------

Signed-off-by: Vitah Lin <vitahlin@gmail.com>
Co-authored-by: Madelyn Olson <34459052+madolson@users.noreply.github.com>
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants