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

[teleport-update] Move teleport binaries to new path {deb,rpm} #49110

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

vapopov
Copy link
Contributor

@vapopov vapopov commented Nov 16, 2024

@vapopov vapopov added the no-changelog Indicates that a PR does not require a changelog entry label Nov 16, 2024
set -eu

case "$1" in
configure)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can use teleport-update link to accomplish this instead. It will create links from /usr/local/teleport-system/bin to /usr/local/bin without overriding auto-update-managed links.

NEW_PATH="$NEW_BASE_DIR/$BASENAME"

if [ -e "$FILE" ] && [ ! -L "$FILE" ]; then
echo "Removing old binary at $FILE..."
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Curious why we'd want to remove binaries here? teleport-update link will fail in this case. Should we change that behavior?

echo "Removing symlinks from old paths..."

for FILE in "${OLD_PATHS[@]}"; do
if [ -L "$FILE" ]; then
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will remove updater-managed symlinks when the package is removed. We only want to remove symlinks into /usr/local/teleport-system. I think we should add a teleport-update unlink command for this.


echo "Post-upgrade cleanup and symlink creation completed."
;;
remove|deconfigure)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we run this on deconfigure, or just remove? Seems like we'd want these symlinks to stay around until the package is fully removed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
no-changelog Indicates that a PR does not require a changelog entry
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants