FS#50746 - [audit] Please install python2 binding, which is used by community/perf
Attached to Project:
Community Packages
Opened by Alain Kalker (ackalker) - Monday, 12 September 2016, 00:21 GMT
Last edited by Christian Rebischke (Shibumi) - Wednesday, 17 May 2017, 20:17 GMT
Opened by Alain Kalker (ackalker) - Monday, 12 September 2016, 00:21 GMT
Last edited by Christian Rebischke (Shibumi) - Wednesday, 17 May 2017, 20:17 GMT
|
Details
Description:
Several scripts in community/perf want to use the python2 binding for audit, for example, running: # perf script syscall-counts [sudo] password for miki: Install the audit-libs-python package to get syscall names. For example: # apt-get install python-audit (Ubuntu) # yum install audit-libs-python (Fedora) etc. Press control+C to stop and show the summary ^C syscall events: [...] Syscalls show as numbers, not very convenient. I've verified that the following patch to PKGBUILD will install both python2 _and_ python3 bindings: diff --git a/audit/repos/community-x86_64/PKGBUILD b/audit/repos/community-x86_64/PKGBUILD index cc8a3eb..f1b2a0c 100644 --- a/audit/repos/community-x86_64/PKGBUILD +++ b/audit/repos/community-x86_64/PKGBUILD @@ -12,7 +12,7 @@ pkgdesc='Userspace components of the audit framework' url='https://people.redhat.com/sgrubb/audit' arch=(i686 x86_64) depends=(krb5 libcap-ng) -makedepends=(libldap swig linux-headers python) +makedepends=(libldap swig linux-headers python python2) license=(GPL) options=(emptydirs) backup=( @@ -33,13 +33,12 @@ install=$pkgname.install build() { cd $pkgname-$pkgver - export PYTHON=/usr/bin/python3 + export PYTHON=/usr/bin/python2 ./configure \ --prefix=/usr \ --sbindir=/usr/bin \ --sysconfdir=/etc \ --libexecdir=/usr/lib/audit \ - --with-python=yes \ --enable-gssapi-krb5=yes \ --enable-systemd=yes \ --with-libcap-ng=yes Yes, the configure arguments may look a bit strange, but they do work (I've studied the logic in both the configure script and the generated Makefiles). Additional info: * package version(s) perf 4.7-2 audit 2.6.6-1 * config and/or log files etc. [with patch applied] checking for python version... 2.7 checking for python platform... linux2 checking for python script directory... ${prefix}/lib/python2.7/site-packages checking for python extension module directory... ${exec_prefix}/lib/python2.7/site-packages configure: Python bindings will be built checking whether to create python3 bindings... investigating checking for python3-config... /usr/bin/python3-config Python3 bindings WILL be built checking for python3... /usr/bin/python3 Steps to reproduce: |
This task depends upon
Closed by Christian Rebischke (Shibumi)
Wednesday, 17 May 2017, 20:17 GMT
Reason for closing: Fixed
Additional comments about closing: fixed with 2.7.5-2
Wednesday, 17 May 2017, 20:17 GMT
Reason for closing: Fixed
Additional comments about closing: fixed with 2.7.5-2
I am the new maintainer.
You are right your PKGBUILD patch looks weird..
You have just changed the python3 part to python2 and removed the --with-python-option.
So for me it looks like the key is removing the --with-python-option because then the configure-script
will automatically check for python versions.
But I would add python2 AND python3 to makedepends to make sure that the configure-script will find both.
I will have a look at this and move a version to testing. It would be nice if you could test afterwards if it works like expected.
Please checkout audit-2.7.5-2 in testing. Thanks