selinux.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Petr Lautrbach <plautrba@redhat.com>
To: Nicolas Iooss <nicolas.iooss@m4x.org>
Cc: selinux@vger.kernel.org
Subject: Re: [PATCH 2/2] python: always use python3 in the shebang of programs using setools
Date: Mon, 18 Feb 2019 14:01:35 +0100	[thread overview]
Message-ID: <pjdpnrpmes0.fsf@redhat.com> (raw)
In-Reply-To: <20190217213650.25974-2-nicolas.iooss@m4x.org>


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


  reply	other threads:[~2019-02-18 13:01 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=pjdpnrpmes0.fsf@redhat.com \
    --to=plautrba@redhat.com \
    --cc=nicolas.iooss@m4x.org \
    --cc=selinux@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).