selinux.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] python/sepolicy: drop python shebang from the module
@ 2019-02-17 21:36 Nicolas Iooss
  2019-02-17 21:36 ` [PATCH 2/2] python: always use python3 in the shebang of programs using setools Nicolas Iooss
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Nicolas Iooss @ 2019-02-17 21:36 UTC (permalink / raw)
  To: selinux

The files in sepolicy's module directory are not supposed to used as
executable files. The shebang line is therefore not needed.

Signed-off-by: Nicolas Iooss <nicolas.iooss@m4x.org>
---
 python/sepolicy/sepolicy/__init__.py    | 2 --
 python/sepolicy/sepolicy/booleans.py    | 1 -
 python/sepolicy/sepolicy/communicate.py | 1 -
 python/sepolicy/sepolicy/generate.py    | 2 --
 python/sepolicy/sepolicy/gui.py         | 2 --
 python/sepolicy/sepolicy/interface.py   | 2 --
 python/sepolicy/sepolicy/manpage.py     | 1 -
 python/sepolicy/sepolicy/network.py     | 1 -
 python/sepolicy/sepolicy/transition.py  | 1 -
 9 files changed, 13 deletions(-)

diff --git a/python/sepolicy/sepolicy/__init__.py b/python/sepolicy/sepolicy/__init__.py
index 6f7294726be4..6aed31bddf1e 100644
--- a/python/sepolicy/sepolicy/__init__.py
+++ b/python/sepolicy/sepolicy/__init__.py
@@ -1,5 +1,3 @@
-#!/usr/bin/python
-
 # Author: Dan Walsh <dwalsh@redhat.com>
 # Author: Ryan Hallisey <rhallise@redhat.com>
 # Author: Jason Zaman <perfinion@gentoo.org>
diff --git a/python/sepolicy/sepolicy/booleans.py b/python/sepolicy/sepolicy/booleans.py
index cf5f1ffc6469..ad07ab045d3e 100644
--- a/python/sepolicy/sepolicy/booleans.py
+++ b/python/sepolicy/sepolicy/booleans.py
@@ -1,4 +1,3 @@
-#! /usr/bin/python -Es
 # Copyright (C) 2012 Red Hat
 # see file 'COPYING' for use and warranty information
 #
diff --git a/python/sepolicy/sepolicy/communicate.py b/python/sepolicy/sepolicy/communicate.py
index 299316e0bf27..374002204f84 100755
--- a/python/sepolicy/sepolicy/communicate.py
+++ b/python/sepolicy/sepolicy/communicate.py
@@ -1,4 +1,3 @@
-#! /usr/bin/python -Es
 # Copyright (C) 2012 Red Hat
 # see file 'COPYING' for use and warranty information
 #
diff --git a/python/sepolicy/sepolicy/generate.py b/python/sepolicy/sepolicy/generate.py
index 5a2195b8033f..019e7836c597 100644
--- a/python/sepolicy/sepolicy/generate.py
+++ b/python/sepolicy/sepolicy/generate.py
@@ -1,5 +1,3 @@
-#!/usr/bin/python -Es
-#
 # Copyright (C) 2007-2012 Red Hat
 # see file 'COPYING' for use and warranty information
 #
diff --git a/python/sepolicy/sepolicy/gui.py b/python/sepolicy/sepolicy/gui.py
index d4bf3b48e629..00fd7a11dab8 100644
--- a/python/sepolicy/sepolicy/gui.py
+++ b/python/sepolicy/sepolicy/gui.py
@@ -1,5 +1,3 @@
-#!/usr/bin/python -Es
-#
 # Copyright (C) 2013 Red Hat
 # see file 'COPYING' for use and warranty information
 #
diff --git a/python/sepolicy/sepolicy/interface.py b/python/sepolicy/sepolicy/interface.py
index 27c37bb8e1f8..583091ae18aa 100644
--- a/python/sepolicy/sepolicy/interface.py
+++ b/python/sepolicy/sepolicy/interface.py
@@ -1,5 +1,3 @@
-#!/usr/bin/python -Es
-#
 # Copyright (C) 2012 Red Hat
 # see file 'COPYING' for use and warranty information
 #
diff --git a/python/sepolicy/sepolicy/manpage.py b/python/sepolicy/sepolicy/manpage.py
index af18b6ffc12f..1d367962365a 100755
--- a/python/sepolicy/sepolicy/manpage.py
+++ b/python/sepolicy/sepolicy/manpage.py
@@ -1,4 +1,3 @@
-#! /usr/bin/python -Es
 # Copyright (C) 2012-2013 Red Hat
 # AUTHOR: Dan Walsh <dwalsh@redhat.com>
 # AUTHOR: Miroslav Grepl <mgrepl@redhat.com>
diff --git a/python/sepolicy/sepolicy/network.py b/python/sepolicy/sepolicy/network.py
index 115f6b8778d5..34267d929b0d 100755
--- a/python/sepolicy/sepolicy/network.py
+++ b/python/sepolicy/sepolicy/network.py
@@ -1,4 +1,3 @@
-#! /usr/bin/python -Es
 # Copyright (C) 2012 Red Hat
 # see file 'COPYING' for use and warranty information
 #
diff --git a/python/sepolicy/sepolicy/transition.py b/python/sepolicy/sepolicy/transition.py
index 7dea80597dc1..6414a765d0fa 100755
--- a/python/sepolicy/sepolicy/transition.py
+++ b/python/sepolicy/sepolicy/transition.py
@@ -1,4 +1,3 @@
-#! /usr/bin/python -Es
 # Copyright (C) 2011 Red Hat
 # see file 'COPYING' for use and warranty information
 #
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH 2/2] python: always use python3 in the shebang of programs using setools
  2019-02-17 21:36 [PATCH 1/2] python/sepolicy: drop python shebang from the module Nicolas Iooss
@ 2019-02-17 21:36 ` Nicolas Iooss
  2019-02-18 13:01   ` Petr Lautrbach
  2019-02-18 13:01 ` [PATCH 1/2] python/sepolicy: drop python shebang from the module Petr Lautrbach
  2019-02-18 13:01 ` Jason Zaman
  2 siblings, 1 reply; 6+ messages in thread
From: Nicolas Iooss @ 2019-02-17 21:36 UTC (permalink / raw)
  To: selinux

setools 4.2.0 dropped support for Python 2. On systems where
/usr/bin/python is Python 2, several tools are now broken because of
this. Update the shebang of these tools to /usr/bin/python3.

For future reference, as semanage/seobject.py, sepolicy and sepolgen
import setools, every program that uses one of these modules need to be
run with Python 3. The following programs do not use any of these
modules so their shebangs have not been modified:

    dbus/selinux_server.py
    libsemanage/utils/semanage_migrate_store
    mcstrans/share/util/mlscolor-test
    mcstrans/share/util/mlstrans-test
    sandbox/start

Signed-off-by: Nicolas Iooss <nicolas.iooss@m4x.org>
---
 gui/polgengui.py                  | 2 +-
 gui/system-config-selinux.py      | 2 +-
 python/audit2allow/audit2allow    | 2 +-
 python/audit2allow/sepolgen-ifgen | 2 +-
 python/chcat/chcat                | 2 +-
 python/sepolicy/sepolicy.py       | 2 +-
 sandbox/sandbox                   | 2 +-
 7 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/gui/polgengui.py b/gui/polgengui.py
index 1601dbef0e8d..b1cc99372434 100644
--- a/gui/polgengui.py
+++ b/gui/polgengui.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python -Es
+#!/usr/bin/python3 -Es
 #
 # polgengui.py - GUI for SELinux Config tool in system-config-selinux
 #
diff --git a/gui/system-config-selinux.py b/gui/system-config-selinux.py
index ce7c74b1333c..c42301b626fc 100644
--- a/gui/system-config-selinux.py
+++ b/gui/system-config-selinux.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python -Es
+#!/usr/bin/python3 -Es
 #
 # system-config-selinux.py - GUI for SELinux Config tool in system-config-selinux
 #
diff --git a/python/audit2allow/audit2allow b/python/audit2allow/audit2allow
index 18fe0a531d02..09b06f664bc4 100644
--- a/python/audit2allow/audit2allow
+++ b/python/audit2allow/audit2allow
@@ -1,4 +1,4 @@
-#! /usr/bin/python -Es
+#!/usr/bin/python3 -Es
 # Authors: Karl MacMillan <kmacmillan@mentalrootkit.com>
 # Authors: Dan Walsh <dwalsh@redhat.com>
 #
diff --git a/python/audit2allow/sepolgen-ifgen b/python/audit2allow/sepolgen-ifgen
index c482f227193f..be2d093be597 100644
--- a/python/audit2allow/sepolgen-ifgen
+++ b/python/audit2allow/sepolgen-ifgen
@@ -1,4 +1,4 @@
-#! /usr/bin/python -Es
+#!/usr/bin/python3 -Es
 #
 # Authors: Karl MacMillan <kmacmillan@mentalrootkit.com>
 #
diff --git a/python/chcat/chcat b/python/chcat/chcat
index 5bef0073b7a4..ba398684376d 100755
--- a/python/chcat/chcat
+++ b/python/chcat/chcat
@@ -1,4 +1,4 @@
-#! /usr/bin/python -Es
+#!/usr/bin/python3 -Es
 # Copyright (C) 2005 Red Hat
 # see file 'COPYING' for use and warranty information
 #
diff --git a/python/sepolicy/sepolicy.py b/python/sepolicy/sepolicy.py
index 8cc7e8cc5c1c..1934cd8620b0 100755
--- a/python/sepolicy/sepolicy.py
+++ b/python/sepolicy/sepolicy.py
@@ -1,4 +1,4 @@
-#! /usr/bin/python -Es
+#!/usr/bin/python3 -Es
 # Copyright (C) 2012 Red Hat
 # AUTHOR: Dan Walsh <dwalsh@redhat.com>
 # see file 'COPYING' for use and warranty information
diff --git a/sandbox/sandbox b/sandbox/sandbox
index c07a1d812a13..1dec07acdcb8 100644
--- a/sandbox/sandbox
+++ b/sandbox/sandbox
@@ -1,4 +1,4 @@
-#! /usr/bin/python -Es
+#!/usr/bin/python3 -Es
 # Authors: Dan Walsh <dwalsh@redhat.com>
 # Authors: Thomas Liu <tliu@fedoraproject.org>
 # Authors: Josh Cogliati
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH 1/2] python/sepolicy: drop python shebang from the module
  2019-02-17 21:36 [PATCH 1/2] python/sepolicy: drop python shebang from the module Nicolas Iooss
  2019-02-17 21:36 ` [PATCH 2/2] python: always use python3 in the shebang of programs using setools Nicolas Iooss
@ 2019-02-18 13:01 ` Petr Lautrbach
  2019-02-18 13:01 ` Jason Zaman
  2 siblings, 0 replies; 6+ messages in thread
From: Petr Lautrbach @ 2019-02-18 13:01 UTC (permalink / raw)
  To: Nicolas Iooss; +Cc: selinux


Nicolas Iooss <nicolas.iooss@m4x.org> writes:

> The files in sepolicy's module directory are not supposed to 
> used as
> executable files. The shebang line is therefore not needed.
>
> Signed-off-by: Nicolas Iooss <nicolas.iooss@m4x.org>

Acked-by: Petr Lautrbach <plautrba@redhat.com>


> ---
>  python/sepolicy/sepolicy/__init__.py    | 2 --
>  python/sepolicy/sepolicy/booleans.py    | 1 -
>  python/sepolicy/sepolicy/communicate.py | 1 -
>  python/sepolicy/sepolicy/generate.py    | 2 --
>  python/sepolicy/sepolicy/gui.py         | 2 --
>  python/sepolicy/sepolicy/interface.py   | 2 --
>  python/sepolicy/sepolicy/manpage.py     | 1 -
>  python/sepolicy/sepolicy/network.py     | 1 -
>  python/sepolicy/sepolicy/transition.py  | 1 -
>  9 files changed, 13 deletions(-)
>
> diff --git a/python/sepolicy/sepolicy/__init__.py 
> b/python/sepolicy/sepolicy/__init__.py
> index 6f7294726be4..6aed31bddf1e 100644
> --- a/python/sepolicy/sepolicy/__init__.py
> +++ b/python/sepolicy/sepolicy/__init__.py
> @@ -1,5 +1,3 @@
> -#!/usr/bin/python
> -
>  # Author: Dan Walsh <dwalsh@redhat.com>
>  # Author: Ryan Hallisey <rhallise@redhat.com>
>  # Author: Jason Zaman <perfinion@gentoo.org>
> diff --git a/python/sepolicy/sepolicy/booleans.py 
> b/python/sepolicy/sepolicy/booleans.py
> index cf5f1ffc6469..ad07ab045d3e 100644
> --- a/python/sepolicy/sepolicy/booleans.py
> +++ b/python/sepolicy/sepolicy/booleans.py
> @@ -1,4 +1,3 @@
> -#! /usr/bin/python -Es
>  # Copyright (C) 2012 Red Hat
>  # see file 'COPYING' for use and warranty information
>  #
> diff --git a/python/sepolicy/sepolicy/communicate.py 
> b/python/sepolicy/sepolicy/communicate.py
> index 299316e0bf27..374002204f84 100755
> --- a/python/sepolicy/sepolicy/communicate.py
> +++ b/python/sepolicy/sepolicy/communicate.py
> @@ -1,4 +1,3 @@
> -#! /usr/bin/python -Es
>  # Copyright (C) 2012 Red Hat
>  # see file 'COPYING' for use and warranty information
>  #
> diff --git a/python/sepolicy/sepolicy/generate.py 
> b/python/sepolicy/sepolicy/generate.py
> index 5a2195b8033f..019e7836c597 100644
> --- a/python/sepolicy/sepolicy/generate.py
> +++ b/python/sepolicy/sepolicy/generate.py
> @@ -1,5 +1,3 @@
> -#!/usr/bin/python -Es
> -#
>  # Copyright (C) 2007-2012 Red Hat
>  # see file 'COPYING' for use and warranty information
>  #
> diff --git a/python/sepolicy/sepolicy/gui.py 
> b/python/sepolicy/sepolicy/gui.py
> index d4bf3b48e629..00fd7a11dab8 100644
> --- a/python/sepolicy/sepolicy/gui.py
> +++ b/python/sepolicy/sepolicy/gui.py
> @@ -1,5 +1,3 @@
> -#!/usr/bin/python -Es
> -#
>  # Copyright (C) 2013 Red Hat
>  # see file 'COPYING' for use and warranty information
>  #
> diff --git a/python/sepolicy/sepolicy/interface.py 
> b/python/sepolicy/sepolicy/interface.py
> index 27c37bb8e1f8..583091ae18aa 100644
> --- a/python/sepolicy/sepolicy/interface.py
> +++ b/python/sepolicy/sepolicy/interface.py
> @@ -1,5 +1,3 @@
> -#!/usr/bin/python -Es
> -#
>  # Copyright (C) 2012 Red Hat
>  # see file 'COPYING' for use and warranty information
>  #
> diff --git a/python/sepolicy/sepolicy/manpage.py 
> b/python/sepolicy/sepolicy/manpage.py
> index af18b6ffc12f..1d367962365a 100755
> --- a/python/sepolicy/sepolicy/manpage.py
> +++ b/python/sepolicy/sepolicy/manpage.py
> @@ -1,4 +1,3 @@
> -#! /usr/bin/python -Es
>  # Copyright (C) 2012-2013 Red Hat
>  # AUTHOR: Dan Walsh <dwalsh@redhat.com>
>  # AUTHOR: Miroslav Grepl <mgrepl@redhat.com>
> diff --git a/python/sepolicy/sepolicy/network.py 
> b/python/sepolicy/sepolicy/network.py
> index 115f6b8778d5..34267d929b0d 100755
> --- a/python/sepolicy/sepolicy/network.py
> +++ b/python/sepolicy/sepolicy/network.py
> @@ -1,4 +1,3 @@
> -#! /usr/bin/python -Es
>  # Copyright (C) 2012 Red Hat
>  # see file 'COPYING' for use and warranty information
>  #
> diff --git a/python/sepolicy/sepolicy/transition.py 
> b/python/sepolicy/sepolicy/transition.py
> index 7dea80597dc1..6414a765d0fa 100755
> --- a/python/sepolicy/sepolicy/transition.py
> +++ b/python/sepolicy/sepolicy/transition.py
> @@ -1,4 +1,3 @@
> -#! /usr/bin/python -Es
>  # Copyright (C) 2011 Red Hat
>  # see file 'COPYING' for use and warranty information
>  #


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH 1/2] python/sepolicy: drop python shebang from the module
  2019-02-17 21:36 [PATCH 1/2] python/sepolicy: drop python shebang from the module Nicolas Iooss
  2019-02-17 21:36 ` [PATCH 2/2] python: always use python3 in the shebang of programs using setools Nicolas Iooss
  2019-02-18 13:01 ` [PATCH 1/2] python/sepolicy: drop python shebang from the module Petr Lautrbach
@ 2019-02-18 13:01 ` Jason Zaman
  2 siblings, 0 replies; 6+ messages in thread
From: Jason Zaman @ 2019-02-18 13:01 UTC (permalink / raw)
  To: Nicolas Iooss; +Cc: selinux

On Sun, Feb 17, 2019 at 10:36:49PM +0100, Nicolas Iooss wrote:
> The files in sepolicy's module directory are not supposed to used as
> executable files. The shebang line is therefore not needed.
> 
> Signed-off-by: Nicolas Iooss <nicolas.iooss@m4x.org>

For both these patches:
Acked-by: Jason Zaman <jason@perfinion.com>
> ---
>  python/sepolicy/sepolicy/__init__.py    | 2 --
>  python/sepolicy/sepolicy/booleans.py    | 1 -
>  python/sepolicy/sepolicy/communicate.py | 1 -
>  python/sepolicy/sepolicy/generate.py    | 2 --
>  python/sepolicy/sepolicy/gui.py         | 2 --
>  python/sepolicy/sepolicy/interface.py   | 2 --
>  python/sepolicy/sepolicy/manpage.py     | 1 -
>  python/sepolicy/sepolicy/network.py     | 1 -
>  python/sepolicy/sepolicy/transition.py  | 1 -
>  9 files changed, 13 deletions(-)
> 
> diff --git a/python/sepolicy/sepolicy/__init__.py b/python/sepolicy/sepolicy/__init__.py
> index 6f7294726be4..6aed31bddf1e 100644
> --- a/python/sepolicy/sepolicy/__init__.py
> +++ b/python/sepolicy/sepolicy/__init__.py
> @@ -1,5 +1,3 @@
> -#!/usr/bin/python
> -
>  # Author: Dan Walsh <dwalsh@redhat.com>
>  # Author: Ryan Hallisey <rhallise@redhat.com>
>  # Author: Jason Zaman <perfinion@gentoo.org>
> diff --git a/python/sepolicy/sepolicy/booleans.py b/python/sepolicy/sepolicy/booleans.py
> index cf5f1ffc6469..ad07ab045d3e 100644
> --- a/python/sepolicy/sepolicy/booleans.py
> +++ b/python/sepolicy/sepolicy/booleans.py
> @@ -1,4 +1,3 @@
> -#! /usr/bin/python -Es
>  # Copyright (C) 2012 Red Hat
>  # see file 'COPYING' for use and warranty information
>  #
> diff --git a/python/sepolicy/sepolicy/communicate.py b/python/sepolicy/sepolicy/communicate.py
> index 299316e0bf27..374002204f84 100755
> --- a/python/sepolicy/sepolicy/communicate.py
> +++ b/python/sepolicy/sepolicy/communicate.py
> @@ -1,4 +1,3 @@
> -#! /usr/bin/python -Es
>  # Copyright (C) 2012 Red Hat
>  # see file 'COPYING' for use and warranty information
>  #
> diff --git a/python/sepolicy/sepolicy/generate.py b/python/sepolicy/sepolicy/generate.py
> index 5a2195b8033f..019e7836c597 100644
> --- a/python/sepolicy/sepolicy/generate.py
> +++ b/python/sepolicy/sepolicy/generate.py
> @@ -1,5 +1,3 @@
> -#!/usr/bin/python -Es
> -#
>  # Copyright (C) 2007-2012 Red Hat
>  # see file 'COPYING' for use and warranty information
>  #
> diff --git a/python/sepolicy/sepolicy/gui.py b/python/sepolicy/sepolicy/gui.py
> index d4bf3b48e629..00fd7a11dab8 100644
> --- a/python/sepolicy/sepolicy/gui.py
> +++ b/python/sepolicy/sepolicy/gui.py
> @@ -1,5 +1,3 @@
> -#!/usr/bin/python -Es
> -#
>  # Copyright (C) 2013 Red Hat
>  # see file 'COPYING' for use and warranty information
>  #
> diff --git a/python/sepolicy/sepolicy/interface.py b/python/sepolicy/sepolicy/interface.py
> index 27c37bb8e1f8..583091ae18aa 100644
> --- a/python/sepolicy/sepolicy/interface.py
> +++ b/python/sepolicy/sepolicy/interface.py
> @@ -1,5 +1,3 @@
> -#!/usr/bin/python -Es
> -#
>  # Copyright (C) 2012 Red Hat
>  # see file 'COPYING' for use and warranty information
>  #
> diff --git a/python/sepolicy/sepolicy/manpage.py b/python/sepolicy/sepolicy/manpage.py
> index af18b6ffc12f..1d367962365a 100755
> --- a/python/sepolicy/sepolicy/manpage.py
> +++ b/python/sepolicy/sepolicy/manpage.py
> @@ -1,4 +1,3 @@
> -#! /usr/bin/python -Es
>  # Copyright (C) 2012-2013 Red Hat
>  # AUTHOR: Dan Walsh <dwalsh@redhat.com>
>  # AUTHOR: Miroslav Grepl <mgrepl@redhat.com>
> diff --git a/python/sepolicy/sepolicy/network.py b/python/sepolicy/sepolicy/network.py
> index 115f6b8778d5..34267d929b0d 100755
> --- a/python/sepolicy/sepolicy/network.py
> +++ b/python/sepolicy/sepolicy/network.py
> @@ -1,4 +1,3 @@
> -#! /usr/bin/python -Es
>  # Copyright (C) 2012 Red Hat
>  # see file 'COPYING' for use and warranty information
>  #
> diff --git a/python/sepolicy/sepolicy/transition.py b/python/sepolicy/sepolicy/transition.py
> index 7dea80597dc1..6414a765d0fa 100755
> --- a/python/sepolicy/sepolicy/transition.py
> +++ b/python/sepolicy/sepolicy/transition.py
> @@ -1,4 +1,3 @@
> -#! /usr/bin/python -Es
>  # Copyright (C) 2011 Red Hat
>  # see file 'COPYING' for use and warranty information
>  #
> -- 
> 2.20.1
> 

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH 2/2] python: always use python3 in the shebang of programs using setools
  2019-02-17 21:36 ` [PATCH 2/2] python: always use python3 in the shebang of programs using setools Nicolas Iooss
@ 2019-02-18 13:01   ` Petr Lautrbach
  2019-02-20 10:07     ` Petr Lautrbach
  0 siblings, 1 reply; 6+ messages in thread
From: Petr Lautrbach @ 2019-02-18 13:01 UTC (permalink / raw)
  To: Nicolas Iooss; +Cc: selinux


Nicolas Iooss <nicolas.iooss@m4x.org> writes:

> setools 4.2.0 dropped support for Python 2. On systems where
> /usr/bin/python is Python 2, several tools are now broken 
> because of
> this. Update the shebang of these tools to /usr/bin/python3.
>
> For future reference, as semanage/seobject.py, sepolicy and 
> sepolgen
> import setools, every program that uses one of these modules 
> need to be
> run with Python 3. The following programs do not use any of 
> these
> modules so their shebangs have not been modified:
>
>     dbus/selinux_server.py
>     libsemanage/utils/semanage_migrate_store
>     mcstrans/share/util/mlscolor-test
>     mcstrans/share/util/mlstrans-test
>     sandbox/start
>
> Signed-off-by: Nicolas Iooss <nicolas.iooss@m4x.org>

Acked-by: Petr Lautrbach <plautrba@redhat.com>

> ---
>  gui/polgengui.py                  | 2 +-
>  gui/system-config-selinux.py      | 2 +-
>  python/audit2allow/audit2allow    | 2 +-
>  python/audit2allow/sepolgen-ifgen | 2 +-
>  python/chcat/chcat                | 2 +-
>  python/sepolicy/sepolicy.py       | 2 +-
>  sandbox/sandbox                   | 2 +-
>  7 files changed, 7 insertions(+), 7 deletions(-)
>
> diff --git a/gui/polgengui.py b/gui/polgengui.py
> index 1601dbef0e8d..b1cc99372434 100644
> --- a/gui/polgengui.py
> +++ b/gui/polgengui.py
> @@ -1,4 +1,4 @@
> -#!/usr/bin/python -Es
> +#!/usr/bin/python3 -Es
>  #
>  # polgengui.py - GUI for SELinux Config tool in 
>  system-config-selinux
>  #
> diff --git a/gui/system-config-selinux.py 
> b/gui/system-config-selinux.py
> index ce7c74b1333c..c42301b626fc 100644
> --- a/gui/system-config-selinux.py
> +++ b/gui/system-config-selinux.py
> @@ -1,4 +1,4 @@
> -#!/usr/bin/python -Es
> +#!/usr/bin/python3 -Es
>  #
>  # system-config-selinux.py - GUI for SELinux Config tool in 
>  system-config-selinux
>  #
> diff --git a/python/audit2allow/audit2allow 
> b/python/audit2allow/audit2allow
> index 18fe0a531d02..09b06f664bc4 100644
> --- a/python/audit2allow/audit2allow
> +++ b/python/audit2allow/audit2allow
> @@ -1,4 +1,4 @@
> -#! /usr/bin/python -Es
> +#!/usr/bin/python3 -Es
>  # Authors: Karl MacMillan <kmacmillan@mentalrootkit.com>
>  # Authors: Dan Walsh <dwalsh@redhat.com>
>  #
> diff --git a/python/audit2allow/sepolgen-ifgen 
> b/python/audit2allow/sepolgen-ifgen
> index c482f227193f..be2d093be597 100644
> --- a/python/audit2allow/sepolgen-ifgen
> +++ b/python/audit2allow/sepolgen-ifgen
> @@ -1,4 +1,4 @@
> -#! /usr/bin/python -Es
> +#!/usr/bin/python3 -Es
>  #
>  # Authors: Karl MacMillan <kmacmillan@mentalrootkit.com>
>  #
> diff --git a/python/chcat/chcat b/python/chcat/chcat
> index 5bef0073b7a4..ba398684376d 100755
> --- a/python/chcat/chcat
> +++ b/python/chcat/chcat
> @@ -1,4 +1,4 @@
> -#! /usr/bin/python -Es
> +#!/usr/bin/python3 -Es
>  # Copyright (C) 2005 Red Hat
>  # see file 'COPYING' for use and warranty information
>  #
> diff --git a/python/sepolicy/sepolicy.py 
> b/python/sepolicy/sepolicy.py
> index 8cc7e8cc5c1c..1934cd8620b0 100755
> --- a/python/sepolicy/sepolicy.py
> +++ b/python/sepolicy/sepolicy.py
> @@ -1,4 +1,4 @@
> -#! /usr/bin/python -Es
> +#!/usr/bin/python3 -Es
>  # Copyright (C) 2012 Red Hat
>  # AUTHOR: Dan Walsh <dwalsh@redhat.com>
>  # see file 'COPYING' for use and warranty information
> diff --git a/sandbox/sandbox b/sandbox/sandbox
> index c07a1d812a13..1dec07acdcb8 100644
> --- a/sandbox/sandbox
> +++ b/sandbox/sandbox
> @@ -1,4 +1,4 @@
> -#! /usr/bin/python -Es
> +#!/usr/bin/python3 -Es
>  # Authors: Dan Walsh <dwalsh@redhat.com>
>  # Authors: Thomas Liu <tliu@fedoraproject.org>
>  # Authors: Josh Cogliati


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH 2/2] python: always use python3 in the shebang of programs using setools
  2019-02-18 13:01   ` Petr Lautrbach
@ 2019-02-20 10:07     ` Petr Lautrbach
  0 siblings, 0 replies; 6+ messages in thread
From: Petr Lautrbach @ 2019-02-20 10:07 UTC (permalink / raw)
  To: selinux; +Cc: Nicolas Iooss, Petr Lautrbach


Petr Lautrbach <plautrba@redhat.com> writes:

> Nicolas Iooss <nicolas.iooss@m4x.org> writes:
>
>> setools 4.2.0 dropped support for Python 2. On systems where
>> /usr/bin/python is Python 2, several tools are now broken 
>> because of
>> this. Update the shebang of these tools to /usr/bin/python3.
>>
>> For future reference, as semanage/seobject.py, sepolicy and 
>> sepolgen
>> import setools, every program that uses one of these modules 
>> need to be
>> run with Python 3. The following programs do not use any of 
>> these
>> modules so their shebangs have not been modified:
>>
>>     dbus/selinux_server.py
>>     libsemanage/utils/semanage_migrate_store
>>     mcstrans/share/util/mlscolor-test
>>     mcstrans/share/util/mlstrans-test
>>     sandbox/start
>>
>> Signed-off-by: Nicolas Iooss <nicolas.iooss@m4x.org>
>
> Acked-by: Petr Lautrbach <plautrba@redhat.com>

Both patches are merged already.

>> ---
>>  gui/polgengui.py                  | 2 +-
>>  gui/system-config-selinux.py      | 2 +-
>>  python/audit2allow/audit2allow    | 2 +-
>>  python/audit2allow/sepolgen-ifgen | 2 +-
>>  python/chcat/chcat                | 2 +-
>>  python/sepolicy/sepolicy.py       | 2 +-
>>  sandbox/sandbox                   | 2 +-
>>  7 files changed, 7 insertions(+), 7 deletions(-)
>>
>> diff --git a/gui/polgengui.py b/gui/polgengui.py
>> index 1601dbef0e8d..b1cc99372434 100644
>> --- a/gui/polgengui.py
>> +++ b/gui/polgengui.py
>> @@ -1,4 +1,4 @@
>> -#!/usr/bin/python -Es
>> +#!/usr/bin/python3 -Es
>>  #
>>  # polgengui.py - GUI for SELinux Config tool in 
>>  system-config-selinux
>>  #
>> diff --git a/gui/system-config-selinux.py 
>> b/gui/system-config-selinux.py
>> index ce7c74b1333c..c42301b626fc 100644
>> --- a/gui/system-config-selinux.py
>> +++ b/gui/system-config-selinux.py
>> @@ -1,4 +1,4 @@
>> -#!/usr/bin/python -Es
>> +#!/usr/bin/python3 -Es
>>  #
>>  # system-config-selinux.py - GUI for SELinux Config tool in
>> system-config-selinux
>>  #
>> diff --git a/python/audit2allow/audit2allow 
>> b/python/audit2allow/audit2allow
>> index 18fe0a531d02..09b06f664bc4 100644
>> --- a/python/audit2allow/audit2allow
>> +++ b/python/audit2allow/audit2allow
>> @@ -1,4 +1,4 @@
>> -#! /usr/bin/python -Es
>> +#!/usr/bin/python3 -Es
>>  # Authors: Karl MacMillan <kmacmillan@mentalrootkit.com>
>>  # Authors: Dan Walsh <dwalsh@redhat.com>
>>  #
>> diff --git a/python/audit2allow/sepolgen-ifgen
>> b/python/audit2allow/sepolgen-ifgen
>> index c482f227193f..be2d093be597 100644
>> --- a/python/audit2allow/sepolgen-ifgen
>> +++ b/python/audit2allow/sepolgen-ifgen
>> @@ -1,4 +1,4 @@
>> -#! /usr/bin/python -Es
>> +#!/usr/bin/python3 -Es
>>  #
>>  # Authors: Karl MacMillan <kmacmillan@mentalrootkit.com>
>>  #
>> diff --git a/python/chcat/chcat b/python/chcat/chcat
>> index 5bef0073b7a4..ba398684376d 100755
>> --- a/python/chcat/chcat
>> +++ b/python/chcat/chcat
>> @@ -1,4 +1,4 @@
>> -#! /usr/bin/python -Es
>> +#!/usr/bin/python3 -Es
>>  # Copyright (C) 2005 Red Hat
>>  # see file 'COPYING' for use and warranty information
>>  #
>> diff --git a/python/sepolicy/sepolicy.py 
>> b/python/sepolicy/sepolicy.py
>> index 8cc7e8cc5c1c..1934cd8620b0 100755
>> --- a/python/sepolicy/sepolicy.py
>> +++ b/python/sepolicy/sepolicy.py
>> @@ -1,4 +1,4 @@
>> -#! /usr/bin/python -Es
>> +#!/usr/bin/python3 -Es
>>  # Copyright (C) 2012 Red Hat
>>  # AUTHOR: Dan Walsh <dwalsh@redhat.com>
>>  # see file 'COPYING' for use and warranty information
>> diff --git a/sandbox/sandbox b/sandbox/sandbox
>> index c07a1d812a13..1dec07acdcb8 100644
>> --- a/sandbox/sandbox
>> +++ b/sandbox/sandbox
>> @@ -1,4 +1,4 @@
>> -#! /usr/bin/python -Es
>> +#!/usr/bin/python3 -Es
>>  # Authors: Dan Walsh <dwalsh@redhat.com>
>>  # Authors: Thomas Liu <tliu@fedoraproject.org>
>>  # Authors: Josh Cogliati


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2019-02-20 10:07 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-02-17 21:36 [PATCH 1/2] python/sepolicy: drop python shebang from the module Nicolas Iooss
2019-02-17 21:36 ` [PATCH 2/2] python: always use python3 in the shebang of programs using setools Nicolas Iooss
2019-02-18 13:01   ` Petr Lautrbach
2019-02-20 10:07     ` Petr Lautrbach
2019-02-18 13:01 ` [PATCH 1/2] python/sepolicy: drop python shebang from the module Petr Lautrbach
2019-02-18 13:01 ` Jason Zaman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).