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

debian: python related changes #10322

Merged
merged 4 commits into from Jul 22, 2016
Merged

debian: python related changes #10322

merged 4 commits into from Jul 22, 2016

Conversation

tchaikov
Copy link
Contributor

@dmick could you take a look at this PR also? thanks.

@tchaikov tchaikov force-pushed the wip-debian-python-warnings branch 2 times, most recently from e3ad438 to 42aa32f Compare July 17, 2016 17:37
dh_python2 -O--buildsystem=python_distutils -p python-$$binding; \
done
dh_python2 -p ceph-common
dh_python2 -O--buildsystem=python_distutils -p ceph-base
Copy link
Member

Choose a reason for hiding this comment

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

why --buildsystem=python_distutils? and why not for ceph-common?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@dmick because i thought these packages install the python extension/modules using python distutils, so i passe -O--buildsystem=python_distutils to dh_python2, and ceph-common just copies the python scripts manually without using distutils, so didn't pass this option.

but seems the result is the same. so i am dropping this option.

@dmick
Copy link
Member

dmick commented Jul 18, 2016

the build failure is unconnected, most likely, and can be fixed with a rebase I'm assuming

@tchaikov
Copy link
Contributor Author

@dmick ping.

@@ -134,6 +134,14 @@ override_dh_strip:
override_dh_shlibdeps:
Copy link
Member

Choose a reason for hiding this comment

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

the commit message confuses me; if the warning as about running dh_python2 against python-rbd, the code below explicitly does that; did you mean to have a different package name in the warning above?...

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@dmick sorry for the misleading example, yeah, lemme copy another warning message.

some packages do not package python modules or scripts. so override
dh_python2 to exclude them.

this change silences warnings like:
```
warning: dpkg-gencontrol: package ceph-mon: unused substitution
variable ${python:Provides}
```

Signed-off-by: Kefu Chai <kchai@redhat.com>
* debian/control:
  as we have listed the linked libraries in Depends section, for example,
  python-rados depends on librados. and we don't need `dpkg-shlibdeps` to
  help figure out shared library substvar dependencies for us. by removing
  them, we can silence the warnings of
```
warning: dpkg-shlibdeps: package could avoid a useless dependency if
debian/python-rados/usr/lib/python2.7/dist-packages/rados.x86_64-linux-gnu.so
was not linked against libpthread.so.0 (it uses none of the library's
symbols)
```
  -lpthread is introduced by `python-config --ldflags` but it turns out we
  are not using any symbols from pthread in the extension directly. and
  pthread is included in glibc. so this does not added any extra
  dependency to python-* pacakges. but it's desirable to have less
  warnings.
* debian/rules: exclude python-* packages from dh_shlibdeps, as we will
  not use it to prepare the shlib deps substvars for these packages any
  more.

Signed-off-by: Kefu Chai <kchai@redhat.com>
* debian/control: Build-Depends: s/python-dev/python-all-dev/, per
    https://wiki.debian.org/Python/FAQ#Build_dependencies

Signed-off-by: Kefu Chai <kchai@redhat.com>
* ceph-base: use ${python:Depends} instead of listing the python
  dependencies manually, dh_python2 will scan the requirements
  of ceph-detect-init. and fill the subst var for us.
* ceph-common: add ${python:Depends}, as it packages ceph,
  and ceph-brag client.
* ceph-osd: it packages ceph-disk, so should add ${python:Depends}
  as its dependencies.

dh_python2 will figure them out.

Signed-off-by: Kefu Chai <kchai@redhat.com>
@tchaikov
Copy link
Contributor Author

@dmick thanks for reviewing, fixed the commit message, rebased against master, and repushed.

@dmick dmick merged commit 8c48f87 into master Jul 22, 2016
@dmick dmick deleted the wip-debian-python-warnings branch July 22, 2016 18:31
oprypin added a commit that referenced this pull request Aug 8, 2016
as in #10322

Signed-off-by: Oleh Prypin <oleh@pryp.in>
oprypin added a commit that referenced this pull request Aug 8, 2016
as in #10322

Signed-off-by: Oleh Prypin <oleh@pryp.in>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants