[apparmor] [Question] Apparmor running on Python2.7 only?

Seth Arnold seth.arnold at canonical.com
Thu Nov 12 20:58:16 UTC 2015


On Mon, Nov 09, 2015 at 01:20:38PM +0900, Jae Suk Park wrote:
> Can Apparmor run on python 2.7 environment only?

It should, though there may be bugs that prevent all features
from working. If you don't need aa-logprof, aa-genprof, aa-enforce,
aa-status, etc. in your environments, you don't even need any of the
python tools. What are you going to be doing in the yocto environments? Do
you need the higher-level tools at all?

> 3. but when I try to install apparmor ubuntu package, libpython3 related
> pacakages is installed
> [...]
> 4. I guess Apparmor package is deeply dependent on python3.

The apparmor builds in Ubuntu are dependent on python3 because it seems
most useful for our users. From the wily buildlogs[1]:

| # Build pythons
| for py in python2.7 python3.4 python3.5 ; do \
|         cp -a /«PKGBUILDDIR»/libraries/libapparmor /«PKGBUILDDIR»/libraries/libapparmor.$py && \
|         PYTHON=/usr/bin/$py dh_auto_configure \
|                 -D libraries/libapparmor.$py -- --with-python && \
|         PYTHON=/usr/bin/$py dh_auto_build \
|                 -D libraries/libapparmor.$py; \
| done

When you're building the libraries, try setting the PYTHON environment
variable to the path of your python interpreter, as done above. (Ignore
the rest of the dh_auto_* stuff, the important part is the PYTHON
environment variable before calling configure.)

Thanks

1: https://launchpadlibrarian.net/216283862/buildlog_ubuntu-wily-amd64.apparmor_2.10-0ubuntu6_BUILDING.txt.gz
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 473 bytes
Desc: Digital signature
URL: <https://lists.ubuntu.com/archives/apparmor/attachments/20151112/ab003279/attachment.pgp>


More information about the AppArmor mailing list