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

[Need Help]Issue regarding Python version for packages. #2814

Closed
Aniket21mathur opened this issue Jul 2, 2019 · 6 comments
Closed

[Need Help]Issue regarding Python version for packages. #2814

Aniket21mathur opened this issue Jul 2, 2019 · 6 comments
Labels

Comments

@Aniket21mathur
Copy link

Aniket21mathur commented Jul 2, 2019

As per the installation guide, when installing from sources we can select the Python version from which we have to install as per eeeeaba.

But when installing from binaries (Debian/ Ubuntu), unlike sudo apt install python-foo and sudo apt install python3-foo, we simply do

apt-get install syslog-ng

this installs for which version of Python?

Are the binaries only build for a specific version of python?

Thanks!

@Aniket21mathur Aniket21mathur changed the title Issue regarding Python version for packages. [Need Help]Issue regarding Python version for packages. Jul 2, 2019
@alltilla
Copy link
Collaborator

alltilla commented Jul 2, 2019

The syslog-ng package itself does not have python support, you will need to install syslog-ng-mod-python, too. You can see its python dependency by running apt show syslog-ng-mod-python:

[09:46][ ~ ] $ apt show syslog-ng-mod-python
Package: syslog-ng-mod-python
Version: 0.3.3-2ubuntu1
Priority: extra
Section: universe/admin
Source: syslog-ng-incubator
Origin: Ubuntu
Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
Original-Maintainer: syslog-ng maintainers <syslog-ng-maintainers@lists.alioth.debian.org>
Bugs: https://bugs.launchpad.net/ubuntu/+filebug
Installed-Size: 66,6 kB
Depends: libc6 (>= 2.14), libevtlog0 (>= 0.2.3), libglib2.0-0 (>= 2.12.0), libpython2.7 (>= 2.7), syslog-ng-core (>= 3.5.6~), syslog-ng-core (<< 3.5.7~)
...

In my case, on ubuntu-xenial, it depends on libpython2.7, as you can see.

@Aniket21mathur
Copy link
Author

Thanks for explaining.
slog-ng-mod-python package builds for Python 2, right?
Do we have support for Python 3 as well? Can we build it for Python 3?

@Kokan
Copy link
Collaborator

Kokan commented Jul 3, 2019

Yes, there is python 3 support. But the syslog-ng-mod-python either compiles as 2 or 3.

The configure scripts detects python version (looks for python3, python2 and python). You can also force it to use either version via ./configure --with-python=<version number> as --with-python=3.

Also additionally newer version of syslog-ng reports which version it does support via:

> syslog-ng --module-registry|grep -A 10 python
Module: mod-python
Status: ok
Version: 3.22.1.17.g1742b11
Core-Revision: 3.22
Description:
  The python (python3) module provides Python scripted destination support for syslog-ng.
Plugins:
  destination     python
  source          python
  source          python_fetcher
  root            python
  parser          python
  template-func   python

@Aniket21mathur
Copy link
Author

The configure scripts detects python version (looks for python3, python2 and python). You can also force it to use either version via ./configure --with-python=<version number> as --with-python=3.

Thanks. Agreed. We have to follow this when installing from source.
I wanted to ask what if we install through packages. Do we have separate packages for Python 2 and 3, or a multi-version package that installs for both upon specifying like python-foo and python3-foo.

@Kokan
Copy link
Collaborator

Kokan commented Jul 3, 2019

Do we have separate packages for Python 2 and 3, or a multi-version package that installs for both upon specifying like python-foo and python3-foo.

I do not really use either ubuntu/debian, but as far as I am aware there is only one package that is either 2 or 3; so no to both of your question.
On the other hand the option to have both python2 and python3 module available in the same time is not possible from syslog-ng point of view. In short in the configuration there is only python keyword, which should point to one version.

@Aniket21mathur
Copy link
Author

Got your point. Thanks for helping! :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants