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

ceph-volume: use console_scripts #24773

Merged
merged 1 commit into from Oct 30, 2018

Conversation

Projects
None yet
5 participants
@sileht
Copy link
Contributor

commented Oct 26, 2018

Using "#!/usr/bin/env python" is not recommended as it's not portable.

setuptools provides an console_scripts entry_point that generates
scripts that always have the good sheban whatever the target operating
system and python version/distribution.

http://tracker.ceph.com/issues/36601

Signed-off-by: Mehdi Abaakouk sileht@sileht.net

@wjwithagen

This comment has been minimized.

Copy link
Contributor

commented Oct 26, 2018

@sileht
And you are sure thi is going to work for FreeBSD as well?
Have not tried it, but different paths is always a mess.
And then it also has to go thru FreeBSD packaging, which plays another round of tricks on shebang lines....

@alfredodeza

This comment has been minimized.

Copy link
Contributor

commented Oct 26, 2018

Could you please create a ticket in the tracker so that we can associate this PR with it?

@sileht

This comment has been minimized.

Copy link
Contributor Author

commented Oct 26, 2018

The current script run on python2 only while we support python3 too. packager (like for fedora 29) have edit our script to replace python by python3
Using setuptools is the only sane way to support all python versions and operating system. setuptools is python community standard since many years now. freebsd support it since the beginning.

ceph-volume: use console_scripts
Using "#!/usr/bin/env python" is not recommended as it's not portable.

setuptools provides an console_scripts entry_point that generates
scripts that always have the good sheban whatever the target operating
system and python version/distribution.

http://tracker.ceph.com/issues/36601

Signed-off-by: Mehdi Abaakouk <sileht@sileht.net>

@sileht sileht force-pushed the sileht:no-scripts branch from c2e7714 to 6a2ed6c Oct 26, 2018

@alfredodeza

This comment has been minimized.

Copy link
Contributor

commented Oct 29, 2018

Since this changes part of the packaging scheme, we will need to create packages and see if those succeed (the functional tests aren't creating the packages for us in PRs).

I believe that these changes will require some packaging or CMakeList changes. Builds been tracked here: https://shaman.ceph.com/builds/ceph/no-scripts/

@alfredodeza alfredodeza requested review from alfredodeza and andrewschoen Oct 29, 2018

@alfredodeza alfredodeza merged commit 2ebec91 into ceph:master Oct 30, 2018

25 checks passed

Docs: build check OK - docs built
Details
Signed-off-by all commits in this PR are signed
Details
Unmodified Submodules submodules for project are unmodified
Details
ceph-volume batch testing centos7-bluestore-mixed_type OK
Details
ceph-volume batch testing centos7-bluestore-mixed_type_dmcrypt OK
Details
ceph-volume batch testing centos7-bluestore-single_type OK
Details
ceph-volume batch testing centos7-bluestore-single_type_dmcrypt OK
Details
ceph-volume batch testing centos7-filestore-mixed_type OK
Details
ceph-volume batch testing centos7-filestore-mixed_type_dmcrypt OK
Details
ceph-volume batch testing centos7-filestore-single_type OK
Details
ceph-volume batch testing centos7-filestore-single_type_dmcrypt OK
Details
ceph-volume batch testing xenial-bluestore-single_type OK
Details
ceph-volume batch testing xenial-bluestore-single_type_dmcrypt OK
Details
ceph-volume batch testing xenial-filestore-single_type OK
Details
ceph-volume batch testing xenial-filestore-single_type_dmcrypt OK
Details
ceph-volume lvm testing centos7-bluestore-create OK
Details
ceph-volume lvm testing centos7-bluestore-dmcrypt OK
Details
ceph-volume lvm testing centos7-filestore-create OK
Details
ceph-volume lvm testing xenial-bluestore-create OK
Details
ceph-volume lvm testing xenial-bluestore-dmcrypt OK
Details
ceph-volume lvm testing xenial-filestore-create OK
Details
ceph-volume lvm testing xenial-filestore-dmcrypt OK
Details
ceph-volume tox tests OK
Details
make check make check succeeded
Details
make check (arm64) make check succeeded
Details
@alfredodeza

This comment has been minimized.

Copy link
Contributor

commented Oct 30, 2018

Breakage reported at http://tracker.ceph.com/issues/36648

Unsure why our tests didn't pick this one up

@alfredodeza

This comment has been minimized.

Copy link
Contributor

commented Oct 30, 2018

The problem can be solved by doing:

from .main import main

In ceph_volume/systemd/init.py

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.