On 08/23/2016 03:09 PM, Seth Arnold wrote: > On Tue, Aug 23, 2016 at 07:37:03PM +0200, Christian Boltz wrote: >> Hello, >> >> 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.) >> >> >> Note: This patch changes test-file.py. Therefore I'll commit it after >> the FileRule series. Nevertheless, feel free to review it now ;-) >> >> >> [ utils-switch-to-py3.diff ] > > Looks good to me; I don't know what this means for the dh_python end of > the Debian packaging secret handshake, but this looks like it makes sense > as an upstream project to do.
We already carry a patch that does this (minus the test files) since Saucy. See debian/patches/aa-utils_are_bilingual.patch. dh_python should be fine. Tyler > > Thanks > > Acked-by: Seth Arnold <[email protected]> > >> >> === modified file ./'README' >> --- README 2016-01-27 21:47:09 +0000 >> +++ README 2016-08-23 17:24:29 +0000 >> @@ -232,7 +232,8 @@ >> 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. >> >> === modified file ./utils/aa-audit >> --- utils/aa-audit 2015-06-25 21:32:37.364834615 +0200 >> +++ utils/aa-audit 2016-08-23 19:14:37.330118936 +0200 >> @@ -1,4 +1,4 @@ >> -#! /usr/bin/env python >> +#! /usr/bin/python3 >> # ---------------------------------------------------------------------- >> # Copyright (C) 2013 Kshitij Gupta <[email protected]> >> # >> === modified file ./utils/aa-autodep >> --- utils/aa-autodep 2015-07-14 01:02:25.036758528 +0200 >> +++ utils/aa-autodep 2016-08-23 19:15:38.257849167 +0200 >> @@ -1,4 +1,4 @@ >> -#! /usr/bin/env python >> +#! /usr/bin/python3 >> # ---------------------------------------------------------------------- >> # Copyright (C) 2013 Kshitij Gupta <[email protected]> >> # >> === modified file ./utils/aa-cleanprof >> --- utils/aa-cleanprof 2015-06-25 21:32:37.412831806 +0200 >> +++ utils/aa-cleanprof 2016-08-23 19:15:38.337848809 +0200 >> @@ -1,4 +1,4 @@ >> -#! /usr/bin/env python >> +#! /usr/bin/python3 >> # ---------------------------------------------------------------------- >> # Copyright (C) 2013 Kshitij Gupta <[email protected]> >> # >> === modified file ./utils/aa-complain >> --- utils/aa-complain 2015-06-25 21:32:37.412831806 +0200 >> +++ utils/aa-complain 2016-08-23 19:15:38.417848448 +0200 >> @@ -1,4 +1,4 @@ >> -#! /usr/bin/env python >> +#! /usr/bin/python3 >> # ---------------------------------------------------------------------- >> # Copyright (C) 2013 Kshitij Gupta <[email protected]> >> # >> === modified file ./utils/aa-disable >> --- utils/aa-disable 2015-06-25 21:32:37.412831806 +0200 >> +++ utils/aa-disable 2016-08-23 19:15:38.497848089 +0200 >> @@ -1,4 +1,4 @@ >> -#! /usr/bin/env python >> +#! /usr/bin/python3 >> # ---------------------------------------------------------------------- >> # Copyright (C) 2013 Kshitij Gupta <[email protected]> >> # >> === modified file ./utils/aa-easyprof >> --- utils/aa-easyprof 2015-12-16 23:51:34.326448000 +0100 >> +++ utils/aa-easyprof 2016-08-23 19:15:55.909769423 +0200 >> @@ -1,4 +1,4 @@ >> -#! /usr/bin/env python >> +#! /usr/bin/python3 >> # ------------------------------------------------------------------ >> # >> # Copyright (C) 2011-2015 Canonical Ltd. >> === modified file ./utils/aa-enforce >> --- utils/aa-enforce 2015-06-25 21:32:37.419831397 +0200 >> +++ utils/aa-enforce 2016-08-23 19:17:08.381435245 +0200 >> @@ -1,4 +1,4 @@ >> -#! /usr/bin/env python >> +#! /usr/bin/python3 >> # ---------------------------------------------------------------------- >> # Copyright (C) 2013 Kshitij Gupta <[email protected]> >> # >> === modified file ./utils/aa-genprof >> --- utils/aa-genprof 2015-10-20 20:25:44.250781273 +0200 >> +++ utils/aa-genprof 2016-08-23 19:15:38.665847332 +0200 >> @@ -1,4 +1,4 @@ >> -#! /usr/bin/env python >> +#! /usr/bin/python3 >> # ---------------------------------------------------------------------- >> # Copyright (C) 2013 Kshitij Gupta <[email protected]> >> # >> === modified file ./utils/aa-logprof >> --- utils/aa-logprof 2015-06-25 21:32:37.420831338 +0200 >> +++ utils/aa-logprof 2016-08-23 19:17:15.073403872 +0200 >> @@ -1,4 +1,4 @@ >> -#! /usr/bin/env python >> +#! /usr/bin/python3 >> # ---------------------------------------------------------------------- >> # Copyright (C) 2013 Kshitij Gupta <[email protected]> >> # >> === modified file ./utils/aa-mergeprof >> --- utils/aa-mergeprof 2016-08-14 22:03:16.913725020 +0200 >> +++ utils/aa-mergeprof 2016-08-23 19:15:38.749846955 +0200 >> @@ -1,4 +1,4 @@ >> -#! /usr/bin/env python >> +#! /usr/bin/python3 >> # ---------------------------------------------------------------------- >> # Copyright (C) 2013 Kshitij Gupta <[email protected]> >> # Copyright (C) 2014-2016 Christian Boltz <[email protected]> >> === modified file ./utils/aa-sandbox >> --- utils/aa-sandbox 2015-06-25 21:32:37.421831280 +0200 >> +++ utils/aa-sandbox 2016-08-23 19:16:00.361749204 +0200 >> @@ -1,4 +1,4 @@ >> -#! /usr/bin/env python >> +#! /usr/bin/python3 >> # ------------------------------------------------------------------ >> # >> # Copyright (C) 2012 Canonical Ltd. >> === modified file ./utils/aa-status >> --- utils/aa-status 2016-03-28 17:32:47.935216000 +0200 >> +++ utils/aa-status 2016-08-23 19:16:09.633706959 +0200 >> @@ -1,4 +1,4 @@ >> -#! /usr/bin/env python >> +#! /usr/bin/python3 >> # ------------------------------------------------------------------ >> # >> # Copyright (C) 2005-2006 Novell/SUSE >> === modified file ./utils/aa-unconfined >> --- utils/aa-unconfined 2015-06-25 21:32:37.421831280 +0200 >> +++ utils/aa-unconfined 2016-08-23 19:15:38.993845857 +0200 >> @@ -1,4 +1,4 @@ >> -#! /usr/bin/env python >> +#! /usr/bin/python3 >> # ---------------------------------------------------------------------- >> # Copyright (C) 2013 Kshitij Gupta <[email protected]> >> # >> === modified file ./utils/test/test-aa-decode.py >> --- utils/test/test-aa-decode.py 2014-09-10 22:00:36.616976000 +0200 >> +++ utils/test/test-aa-decode.py 2016-08-23 19:18:59.528904124 +0200 >> @@ -1,4 +1,4 @@ >> -#! /usr/bin/env python >> +#! /usr/bin/python3 >> # ------------------------------------------------------------------ >> # >> # Copyright (C) 2011-2012 Canonical Ltd. >> === modified file ./utils/test/test-aa-easyprof.py >> --- utils/test/test-aa-easyprof.py 2015-04-02 11:44:42.194482000 +0200 >> +++ utils/test/test-aa-easyprof.py 2016-08-23 19:18:59.616903696 +0200 >> @@ -1,4 +1,4 @@ >> -#! /usr/bin/env python >> +#! /usr/bin/python3 >> # ------------------------------------------------------------------ >> # >> # Copyright (C) 2011-2015 Canonical Ltd. >> === modified file ./utils/test/test-aamode.py >> --- utils/test/test-aamode.py 2015-02-03 13:30:54.697891000 +0100 >> +++ utils/test/test-aamode.py 2016-08-23 19:18:59.700903287 +0200 >> @@ -1,4 +1,4 @@ >> -#! /usr/bin/env python >> +#! /usr/bin/python3 >> # ------------------------------------------------------------------ >> # >> # Copyright (C) 2014 Christian Boltz >> === modified file ./utils/test/test-aa.py >> --- utils/test/test-aa.py 2016-08-14 22:03:16.901725079 +0200 >> +++ utils/test/test-aa.py 2016-08-23 19:18:59.784902877 +0200 >> @@ -1,4 +1,4 @@ >> -#! /usr/bin/env python >> +#! /usr/bin/python3 >> # ------------------------------------------------------------------ >> # >> # Copyright (C) 2014-2015 Christian Boltz >> === modified file ./utils/test/test-aare.py >> --- utils/test/test-aare.py 2016-08-14 22:03:16.905725059 +0200 >> +++ utils/test/test-aare.py 2016-08-23 19:18:59.868902468 +0200 >> @@ -1,4 +1,4 @@ >> -#! /usr/bin/env python >> +#! /usr/bin/python3 >> # ------------------------------------------------------------------ >> # >> # Copyright (C) 2013 Kshitij Gupta <[email protected]> >> === modified file ./utils/test/test-baserule.py >> --- utils/test/test-baserule.py 2016-08-14 22:03:16.893725117 +0200 >> +++ utils/test/test-baserule.py 2016-08-23 19:18:59.952902060 +0200 >> @@ -1,4 +1,4 @@ >> -#! /usr/bin/env python >> +#! /usr/bin/python3 >> # ------------------------------------------------------------------ >> # >> # Copyright (C) 2015 Christian Boltz <[email protected]> >> === modified file ./utils/test/test-capability.py >> --- utils/test/test-capability.py 2016-08-07 16:41:28.917110393 +0200 >> +++ utils/test/test-capability.py 2016-08-23 19:19:52.520644107 +0200 >> @@ -1,4 +1,4 @@ >> -#!/usr/bin/env python >> +#!/usr/bin/python3 >> # ---------------------------------------------------------------------- >> # Copyright (C) 2014 Christian Boltz <[email protected]> >> # >> === modified file ./utils/test/test-change_profile.py >> --- utils/test/test-change_profile.py 2016-07-31 12:20:48.951450000 +0200 >> +++ utils/test/test-change_profile.py 2016-08-23 19:19:52.520644107 +0200 >> @@ -1,4 +1,4 @@ >> -#!/usr/bin/env python >> +#!/usr/bin/python3 >> # ---------------------------------------------------------------------- >> # Copyright (C) 2015 Christian Boltz <[email protected]> >> # >> === modified file ./utils/test/test-common.py >> --- utils/test/test-common.py 2015-12-17 23:56:43.663194000 +0100 >> +++ utils/test/test-common.py 2016-08-23 19:18:40.604995978 +0200 >> @@ -1,4 +1,4 @@ >> -#! /usr/bin/env python >> +#! /usr/bin/python3 >> # ------------------------------------------------------------------ >> # >> # Copyright (C) 2015 Christian Boltz <[email protected]> >> === modified file ./utils/test/test-dbus.py >> --- utils/test/test-dbus.py 2016-05-23 23:29:58.042114000 +0200 >> +++ utils/test/test-dbus.py 2016-08-23 19:19:52.524644087 +0200 >> @@ -1,4 +1,4 @@ >> -#!/usr/bin/env python >> +#!/usr/bin/python3 >> # ---------------------------------------------------------------------- >> # Copyright (C) 2015 Christian Boltz <[email protected]> >> # >> === modified file ./utils/test/test-example.py >> --- utils/test/test-example.py 2015-05-29 12:59:05.056330000 +0200 >> +++ utils/test/test-example.py 2016-08-23 19:19:06.032872429 +0200 >> @@ -1,4 +1,4 @@ >> -#! /usr/bin/env python >> +#! /usr/bin/python3 >> # ------------------------------------------------------------------ >> # >> # Copyright (C) 2015 Christian Boltz <[email protected]> >> === modified file ./utils/test/test-file.py >> --- utils/test/test-file.py 2016-08-14 22:03:16.909725040 +0200 >> +++ utils/test/test-file.py 2016-08-23 19:19:52.524644087 +0200 >> @@ -1,4 +1,4 @@ >> -#!/usr/bin/env python >> +#!/usr/bin/python3 >> # ---------------------------------------------------------------------- >> # Copyright (C) 2015 Christian Boltz <[email protected]> >> # >> === modified file ./utils/test/test-libapparmor-test_multi.py >> --- utils/test/test-libapparmor-test_multi.py 2015-10-03 >> 17:18:12.740213942 +0200 >> +++ utils/test/test-libapparmor-test_multi.py 2016-08-23 >> 19:19:06.204871590 +0200 >> @@ -1,4 +1,4 @@ >> -#! /usr/bin/env python >> +#! /usr/bin/python3 >> # ------------------------------------------------------------------ >> # >> # Copyright (C) 2015 Christian Boltz <[email protected]> >> === modified file ./utils/test/test-mount_parse.py >> --- utils/test/test-mount_parse.py 2014-10-15 20:19:34.705810000 +0200 >> +++ utils/test/test-mount_parse.py 2016-08-23 19:19:06.464870322 +0200 >> @@ -1,4 +1,4 @@ >> -#! /usr/bin/env python >> +#! /usr/bin/python3 >> # ------------------------------------------------------------------ >> # >> # Copyright (C) 2014 Canonical Ltd. >> === modified file ./utils/test/test-network.py >> --- utils/test/test-network.py 2015-11-19 17:42:26.325879118 +0100 >> +++ utils/test/test-network.py 2016-08-23 19:19:52.532644047 +0200 >> @@ -1,4 +1,4 @@ >> -#!/usr/bin/env python >> +#!/usr/bin/python3 >> # ---------------------------------------------------------------------- >> # Copyright (C) 2015 Christian Boltz <[email protected]> >> # >> === modified file ./utils/test/test-parser-simple-tests.py >> --- utils/test/test-parser-simple-tests.py 2016-08-14 >> 22:03:16.885725156 +0200 >> +++ utils/test/test-parser-simple-tests.py 2016-08-23 >> 19:19:06.636869482 +0200 >> @@ -1,4 +1,4 @@ >> -#! /usr/bin/env python >> +#! /usr/bin/python3 >> # ------------------------------------------------------------------ >> # >> # Copyright (C) 2015 Christian Boltz <[email protected]> >> === modified file ./utils/test/test-pivot_root_parse.py >> --- utils/test/test-pivot_root_parse.py 2014-10-15 20:19:34.705810000 +0200 >> +++ utils/test/test-pivot_root_parse.py 2016-08-23 19:19:06.720869073 +0200 >> @@ -1,4 +1,4 @@ >> -#! /usr/bin/env python >> +#! /usr/bin/python3 >> # ------------------------------------------------------------------ >> # >> # Copyright (C) 2014 Canonical Ltd. >> === modified file ./utils/test/test-ptrace.py >> --- utils/test/test-ptrace.py 2016-02-12 22:11:11.067679000 +0100 >> +++ utils/test/test-ptrace.py 2016-08-23 19:19:28.292763483 +0200 >> @@ -1,4 +1,4 @@ >> -#!/usr/bin/env python >> +#!/usr/bin/python3 >> # ---------------------------------------------------------------------- >> # Copyright (C) 2015 Christian Boltz <[email protected]> >> # >> === modified file ./utils/test/test-regex_matches.py >> --- utils/test/test-regex_matches.py 2016-08-14 22:03:16.917725001 +0200 >> +++ utils/test/test-regex_matches.py 2016-08-23 19:19:06.888868253 +0200 >> @@ -1,4 +1,4 @@ >> -#! /usr/bin/env python >> +#! /usr/bin/python3 >> # ------------------------------------------------------------------ >> # >> # Copyright (C) 2014 Canonical Ltd. >> === modified file ./utils/test/test-rlimit.py >> --- utils/test/test-rlimit.py 2015-11-19 17:42:26.325879118 +0100 >> +++ utils/test/test-rlimit.py 2016-08-23 19:19:56.368625073 +0200 >> @@ -1,4 +1,4 @@ >> -#!/usr/bin/env python >> +#!/usr/bin/python3 >> # ---------------------------------------------------------------------- >> # Copyright (C) 2015 Christian Boltz <[email protected]> >> # >> === modified file ./utils/test/test-severity.py >> --- utils/test/test-severity.py 2016-08-14 22:03:16.917725001 +0200 >> +++ utils/test/test-severity.py 2016-08-23 19:19:56.368625073 +0200 >> @@ -1,4 +1,4 @@ >> -#!/usr/bin/env python >> +#!/usr/bin/python3 >> # ---------------------------------------------------------------------- >> # Copyright (C) 2013 Kshitij Gupta <[email protected]> >> # Copyright (C) 2014 Canonical, Ltd. >> === modified file ./utils/test/test-signal.py >> --- utils/test/test-signal.py 2016-01-07 20:41:32.706787734 +0100 >> +++ utils/test/test-signal.py 2016-08-23 19:19:56.368625073 +0200 >> @@ -1,4 +1,4 @@ >> -#!/usr/bin/env python >> +#!/usr/bin/python3 >> # ---------------------------------------------------------------------- >> # Copyright (C) 2015 Christian Boltz <[email protected]> >> # >> === modified file ./utils/test/test-translations.py >> --- utils/test/test-translations.py 2016-06-01 01:59:15.262474723 +0200 >> +++ utils/test/test-translations.py 2016-08-23 19:19:07.228866594 +0200 >> @@ -1,4 +1,4 @@ >> -#! /usr/bin/env python >> +#! /usr/bin/python3 >> # ------------------------------------------------------------------ >> # >> # Copyright (C) 2016 Christian Boltz <[email protected]> >> === modified file ./utils/test/test-unix_parse.py >> --- utils/test/test-unix_parse.py 2014-10-15 20:19:34.705810000 +0200 >> +++ utils/test/test-unix_parse.py 2016-08-23 19:19:07.316866164 +0200 >> @@ -1,4 +1,4 @@ >> -#! /usr/bin/env python >> +#! /usr/bin/python3 >> # ------------------------------------------------------------------ >> # >> # Copyright (C) 2014 Canonical Ltd. >> >> >>
signature.asc
Description: OpenPGP digital signature
-- AppArmor mailing list [email protected] Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/apparmor
