Switch utils to python3

As discussed a while ago, switch the utils (including their tests) to
use python3 by default. While on it, drop usage of "env" to always get
the system python3 instead of a random one that happens to live
somewhere in $PATH.

In practise, this patch doesn't change much - AFAIK openSUSE, Debian and
Ubuntu already patch aa-* to use python3.

Also add a note to README to officially deprecate Python 2.x.
(I won't break Python 2.x support intentionally - unless some future
change gives me a very good reason to finally drop Python 2.x support.)



Acked-by: Seth Arnold <seth.arnold@canonical.com>
(since 2016-08-23, but the commit had to wait for the FileRule series
 because it touches test-file.py)
This commit is contained in:
Christian Boltz 2016-10-01 20:57:09 +02:00
parent ac6fe7f2e4
commit 1c4a885e27
38 changed files with 39 additions and 38 deletions

3
README
View file

@ -232,7 +232,8 @@ The AppArmor userspace utilities are written with some assumptions about
installed and available versions of other tools. This is a (possibly
incomplete) list of known version dependencies:
The Python utilities require a minimum of Python 2.7 or Python 3.3.
The Python utilities require a minimum of Python 2.7 (deprecated) or Python 3.3.
Python 3.x is recommended. Python 2.x support is deprecated since AppArmor 2.11.
Some utilities (aa-exec, aa-notify and aa-decode) require Perl 5.10.1 or newer.

View file

@ -1,4 +1,4 @@
#! /usr/bin/env python
#! /usr/bin/python3
# ----------------------------------------------------------------------
# Copyright (C) 2013 Kshitij Gupta <kgupta8592@gmail.com>
#

View file

@ -1,4 +1,4 @@
#! /usr/bin/env python
#! /usr/bin/python3
# ----------------------------------------------------------------------
# Copyright (C) 2013 Kshitij Gupta <kgupta8592@gmail.com>
#

View file

@ -1,4 +1,4 @@
#! /usr/bin/env python
#! /usr/bin/python3
# ----------------------------------------------------------------------
# Copyright (C) 2013 Kshitij Gupta <kgupta8592@gmail.com>
#

View file

@ -1,4 +1,4 @@
#! /usr/bin/env python
#! /usr/bin/python3
# ----------------------------------------------------------------------
# Copyright (C) 2013 Kshitij Gupta <kgupta8592@gmail.com>
#

View file

@ -1,4 +1,4 @@
#! /usr/bin/env python
#! /usr/bin/python3
# ----------------------------------------------------------------------
# Copyright (C) 2013 Kshitij Gupta <kgupta8592@gmail.com>
#

View file

@ -1,4 +1,4 @@
#! /usr/bin/env python
#! /usr/bin/python3
# ------------------------------------------------------------------
#
# Copyright (C) 2011-2015 Canonical Ltd.

View file

@ -1,4 +1,4 @@
#! /usr/bin/env python
#! /usr/bin/python3
# ----------------------------------------------------------------------
# Copyright (C) 2013 Kshitij Gupta <kgupta8592@gmail.com>
#

View file

@ -1,4 +1,4 @@
#! /usr/bin/env python
#! /usr/bin/python3
# ----------------------------------------------------------------------
# Copyright (C) 2013 Kshitij Gupta <kgupta8592@gmail.com>
#

View file

@ -1,4 +1,4 @@
#! /usr/bin/env python
#! /usr/bin/python3
# ----------------------------------------------------------------------
# Copyright (C) 2013 Kshitij Gupta <kgupta8592@gmail.com>
#

View file

@ -1,4 +1,4 @@
#! /usr/bin/env python
#! /usr/bin/python3
# ----------------------------------------------------------------------
# Copyright (C) 2013 Kshitij Gupta <kgupta8592@gmail.com>
# Copyright (C) 2014-2016 Christian Boltz <apparmor@cboltz.de>

View file

@ -1,4 +1,4 @@
#! /usr/bin/env python
#! /usr/bin/python3
# ------------------------------------------------------------------
#
# Copyright (C) 2012 Canonical Ltd.

View file

@ -1,4 +1,4 @@
#! /usr/bin/env python
#! /usr/bin/python3
# ------------------------------------------------------------------
#
# Copyright (C) 2005-2006 Novell/SUSE

View file

@ -1,4 +1,4 @@
#! /usr/bin/env python
#! /usr/bin/python3
# ----------------------------------------------------------------------
# Copyright (C) 2013 Kshitij Gupta <kgupta8592@gmail.com>
#

View file

@ -1,4 +1,4 @@
#! /usr/bin/env python
#! /usr/bin/python3
# ------------------------------------------------------------------
#
# Copyright (C) 2011-2012 Canonical Ltd.

View file

@ -1,4 +1,4 @@
#! /usr/bin/env python
#! /usr/bin/python3
# ------------------------------------------------------------------
#
# Copyright (C) 2011-2015 Canonical Ltd.

View file

@ -1,4 +1,4 @@
#! /usr/bin/env python
#! /usr/bin/python3
# ------------------------------------------------------------------
#
# Copyright (C) 2014-2015 Christian Boltz

View file

@ -1,4 +1,4 @@
#! /usr/bin/env python
#! /usr/bin/python3
# ------------------------------------------------------------------
#
# Copyright (C) 2014 Christian Boltz

View file

@ -1,4 +1,4 @@
#! /usr/bin/env python
#! /usr/bin/python3
# ------------------------------------------------------------------
#
# Copyright (C) 2013 Kshitij Gupta <kgupta8592@gmail.com>

View file

@ -1,4 +1,4 @@
#! /usr/bin/env python
#! /usr/bin/python3
# ------------------------------------------------------------------
#
# Copyright (C) 2015 Christian Boltz <apparmor@cboltz.de>

View file

@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/python3
# ----------------------------------------------------------------------
# Copyright (C) 2014 Christian Boltz <apparmor@cboltz.de>
#

View file

@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/python3
# ----------------------------------------------------------------------
# Copyright (C) 2015 Christian Boltz <apparmor@cboltz.de>
#

View file

@ -1,4 +1,4 @@
#! /usr/bin/env python
#! /usr/bin/python3
# ------------------------------------------------------------------
#
# Copyright (C) 2015 Christian Boltz <apparmor@cboltz.de>

View file

@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/python3
# ----------------------------------------------------------------------
# Copyright (C) 2015 Christian Boltz <apparmor@cboltz.de>
#

View file

@ -1,4 +1,4 @@
#! /usr/bin/env python
#! /usr/bin/python3
# ------------------------------------------------------------------
#
# Copyright (C) 2015 Christian Boltz <apparmor@cboltz.de>

View file

@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/python3
# ----------------------------------------------------------------------
# Copyright (C) 2015 Christian Boltz <apparmor@cboltz.de>
#

View file

@ -1,4 +1,4 @@
#! /usr/bin/env python
#! /usr/bin/python3
# ------------------------------------------------------------------
#
# Copyright (C) 2015 Christian Boltz <apparmor@cboltz.de>

View file

@ -1,4 +1,4 @@
#! /usr/bin/env python
#! /usr/bin/python3
# ------------------------------------------------------------------
#
# Copyright (C) 2014 Canonical Ltd.

View file

@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/python3
# ----------------------------------------------------------------------
# Copyright (C) 2015 Christian Boltz <apparmor@cboltz.de>
#

View file

@ -1,4 +1,4 @@
#! /usr/bin/env python
#! /usr/bin/python3
# ------------------------------------------------------------------
#
# Copyright (C) 2015 Christian Boltz <apparmor@cboltz.de>

View file

@ -1,4 +1,4 @@
#! /usr/bin/env python
#! /usr/bin/python3
# ------------------------------------------------------------------
#
# Copyright (C) 2014 Canonical Ltd.

View file

@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/python3
# ----------------------------------------------------------------------
# Copyright (C) 2015 Christian Boltz <apparmor@cboltz.de>
#

View file

@ -1,4 +1,4 @@
#! /usr/bin/env python
#! /usr/bin/python3
# ------------------------------------------------------------------
#
# Copyright (C) 2014 Canonical Ltd.

View file

@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/python3
# ----------------------------------------------------------------------
# Copyright (C) 2015 Christian Boltz <apparmor@cboltz.de>
#

View file

@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/python3
# ----------------------------------------------------------------------
# Copyright (C) 2013 Kshitij Gupta <kgupta8592@gmail.com>
# Copyright (C) 2014 Canonical, Ltd.

View file

@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/python3
# ----------------------------------------------------------------------
# Copyright (C) 2015 Christian Boltz <apparmor@cboltz.de>
#

View file

@ -1,4 +1,4 @@
#! /usr/bin/env python
#! /usr/bin/python3
# ------------------------------------------------------------------
#
# Copyright (C) 2016 Christian Boltz <apparmor@cboltz.de>

View file

@ -1,4 +1,4 @@
#! /usr/bin/env python
#! /usr/bin/python3
# ------------------------------------------------------------------
#
# Copyright (C) 2014 Canonical Ltd.