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

Packaging migration #2270

Merged
merged 8 commits into from
Aug 11, 2023
Merged

Packaging migration #2270

merged 8 commits into from
Aug 11, 2023

Conversation

grossmj
Copy link
Member

@grossmj grossmj commented Aug 10, 2023

No description provided.

Comment on lines 69 to 77
for busybox_exec in ("busybox-static", "busybox.static", "busybox"):
busybox_path = shutil.which(busybox_exec)
if busybox_path:
log.info(f"Installing busybox from '{busybox_path}'")
try:
shutil.copy2(busybox_path, dst_busybox, follow_symlinks=True)
return
except OSError as e:
raise DockerError(f"Could not install busybox: {e}")
Copy link
Member Author

Choose a reason for hiding this comment

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

@b-ehlers

I have migrated the code found in setup.py however why did you need to call the ldd command?

https://github.com/GNS3/gns3-server/blob/3.0/setup.py#L34L39

Thanks.

Copy link

Choose a reason for hiding this comment

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

The ldd command returns a non-zero return code, if its argument is not dynamically linked. So I used it as a quick way to detect if a program is statically linked. For docker a statically linked busybox is needed, a dynamically linked busybox program won't help us.

Copy link
Member Author

Choose a reason for hiding this comment

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

Oh yes I remember now. Thanks for reminding me.

@grossmj grossmj merged commit 96ce5ea into 3.0 Aug 11, 2023
6 checks passed
@grossmj grossmj deleted the packaging-migration branch August 11, 2023 08:09
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 this pull request may close these issues.

1 participant