python/sepolicy: drop python shebang from the module
PATCH 1/2 python/sepolicy: drop python shebang from the module
The files in sepolicy's module directory are not supposed to used as executable files. The shebang line is therefore not needed.
--- 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(-)
python/sepolicy/sepolicy/__init__.py +0 -2
@@ -1,5 +1,3 @@ -#!/usr/bin/python - # Author: Dan Walsh <[email protected]> # Author: Ryan Hallisey <[email protected]> # Author: Jason Zaman <[email protected]>
python/sepolicy/sepolicy/booleans.py +0 -1
@@ -1,4 +1,3 @@ -#! /usr/bin/python -Es # Copyright (C) 2012 Red Hat # see file 'COPYING' for use and warranty information #
python/sepolicy/sepolicy/communicate.py +0 -1
@@ -1,4 +1,3 @@ -#! /usr/bin/python -Es # Copyright (C) 2012 Red Hat # see file 'COPYING' for use and warranty information #
python/sepolicy/sepolicy/generate.py +0 -2
@@ -1,5 +1,3 @@ -#!/usr/bin/python -Es -# # Copyright (C) 2007-2012 Red Hat # see file 'COPYING' for use and warranty information #
python/sepolicy/sepolicy/gui.py +0 -2
@@ -1,5 +1,3 @@ -#!/usr/bin/python -Es -# # Copyright (C) 2013 Red Hat # see file 'COPYING' for use and warranty information #
python/sepolicy/sepolicy/interface.py +0 -2
@@ -1,5 +1,3 @@ -#!/usr/bin/python -Es -# # Copyright (C) 2012 Red Hat # see file 'COPYING' for use and warranty information #
python/sepolicy/sepolicy/manpage.py +0 -1
@@ -1,4 +1,3 @@ -#! /usr/bin/python -Es # Copyright (C) 2012-2013 Red Hat # AUTHOR: Dan Walsh <[email protected]> # AUTHOR: Miroslav Grepl <[email protected]>
python/sepolicy/sepolicy/network.py +0 -1
@@ -1,4 +1,3 @@ -#! /usr/bin/python -Es # Copyright (C) 2012 Red Hat # see file 'COPYING' for use and warranty information #
python/sepolicy/sepolicy/transition.py +0 -1
@@ -1,4 +1,3 @@ -#! /usr/bin/python -Es # Copyright (C) 2011 Red Hat # see file 'COPYING' for use and warranty information #
Signature · 1 line
2.20.1
PATCH 2/2 python: always use python3 in the shebang of programs using setools
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
--- 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(-)
gui/polgengui.py +1 -1
@@ -1,4 +1,4 @@ -#!/usr/bin/python -Es +#!/usr/bin/python3 -Es # # polgengui.py - GUI for SELinux Config tool in system-config-selinux #
gui/system-config-selinux.py +1 -1
@@ -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 #
python/audit2allow/audit2allow +1 -1
@@ -1,4 +1,4 @@ -#! /usr/bin/python -Es +#!/usr/bin/python3 -Es # Authors: Karl MacMillan <[email protected]> # Authors: Dan Walsh <[email protected]> #
python/audit2allow/sepolgen-ifgen +1 -1
@@ -1,4 +1,4 @@ -#! /usr/bin/python -Es +#!/usr/bin/python3 -Es # # Authors: Karl MacMillan <[email protected]> #
python/chcat/chcat +1 -1
@@ -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 #
python/sepolicy/sepolicy.py +1 -1
@@ -1,4 +1,4 @@ -#! /usr/bin/python -Es +#!/usr/bin/python3 -Es # Copyright (C) 2012 Red Hat # AUTHOR: Dan Walsh <[email protected]> # see file 'COPYING' for use and warranty information
sandbox/sandbox +1 -1
@@ -1,4 +1,4 @@ -#! /usr/bin/python -Es +#!/usr/bin/python3 -Es # Authors: Dan Walsh <[email protected]> # Authors: Thomas Liu <[email protected]> # Authors: Josh Cogliati
Signature · 1 line
2.20.1
Re: [PATCH 2/2] python: always use python3 in the shebang of programs using setools
Quoted 9 lines · Nicolas Iooss
setools 4.2.0 dropped support for Python 2. On systems where
/usr/bin/pythonis 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:
Quoted 7 lines
dbus/selinux_server.py
libsemanage/utils/semanage_migrate_store
mcstrans/share/util/mlscolor-test
mcstrans/share/util/mlstrans-test
sandbox/startSigned-off-by Nicolas Iooss <[email protected]>
Quoted 82 lines
--- 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(-)gui/polgengui.py +1
-1@@ -1,4 +1,4 @@ -#!/usr/bin/python -Es +#!/usr/bin/python3 -Es # # polgengui.py - GUI for SELinux Config tool in system-config-selinux#
gui/system-config-selinux.py +1
-1@@ -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#
python/audit2allow/audit2allow +1
-1@@ -1,4 +1,4 @@ -#! /usr/bin/python -Es +#!/usr/bin/python3 -Es # Authors: Karl MacMillan <[email protected]> # Authors: Dan Walsh <[email protected]> #python/audit2allow/sepolgen-ifgen +1
-1@@ -1,4 +1,4 @@ -#! /usr/bin/python -Es +#!/usr/bin/python3 -Es # # Authors: Karl MacMillan <[email protected]> #python/chcat/chcat +1
-1@@ -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 #python/sepolicy/sepolicy.py +1
-1@@ -1,4 +1,4 @@ -#! /usr/bin/python -Es +#!/usr/bin/python3 -Es # Copyright (C) 2012 Red Hat # AUTHOR: Dan Walsh <[email protected]> # see file 'COPYING' for use and warranty informationsandbox/sandbox +1
-1@@ -1,4 +1,4 @@ -#! /usr/bin/python -Es +#!/usr/bin/python3 -Es # Authors: Dan Walsh <[email protected]> # Authors: Thomas Liu <[email protected]> # Authors: Josh Cogliati
Re: [PATCH 2/2] python: always use python3 in the shebang of programs using setools
Quoted 17 lines · Petr Lautrbach
Quoted 15 lines · Nicolas Iooss
setools 4.2.0 dropped support for Python 2. On systems where
/usr/bin/pythonis 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
Quoted 3 lines
Quoted 1 line
Signed-off-by Nicolas Iooss <[email protected]>Acked-by Petr Lautrbach <[email protected]>
Both patches are merged already.
Quoted 83 lines
Quoted 83 lines
--- 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(-)gui/polgengui.py +1
-1@@ -1,4 +1,4 @@ -#!/usr/bin/python -Es +#!/usr/bin/python3 -Es # # polgengui.py - GUI for SELinux Config tool in system-config-selinux#
gui/system-config-selinux.py +1
-1@@ -1,4 +1,4 @@ -#!/usr/bin/python -Es +#!/usr/bin/python3 -Es # # system-config-selinux.py - GUI for SELinux Config tool insystem-config-selinux
#python/audit2allow/audit2allow +1
-1@@ -1,4 +1,4 @@ -#! /usr/bin/python -Es +#!/usr/bin/python3 -Es # Authors: Karl MacMillan <[email protected]> # Authors: Dan Walsh <[email protected]> #python/audit2allow/sepolgen-ifgen +1
-1@@ -1,4 +1,4 @@ -#! /usr/bin/python -Es +#!/usr/bin/python3 -Es # # Authors: Karl MacMillan <[email protected]> #python/chcat/chcat +1
-1@@ -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 #python/sepolicy/sepolicy.py +1
-1@@ -1,4 +1,4 @@ -#! /usr/bin/python -Es +#!/usr/bin/python3 -Es # Copyright (C) 2012 Red Hat # AUTHOR: Dan Walsh <[email protected]> # see file 'COPYING' for use and warranty informationsandbox/sandbox +1
-1@@ -1,4 +1,4 @@ -#! /usr/bin/python -Es +#!/usr/bin/python3 -Es # Authors: Dan Walsh <[email protected]> # Authors: Thomas Liu <[email protected]> # Authors: Josh Cogliati
Quoted 4 lines · Nicolas Iooss
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 <[email protected]>
Quoted 97 lines
--- 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(-)python/sepolicy/sepolicy/__init__.py +0
-2@@ -1,5 +1,3 @@ -#!/usr/bin/python - # Author: Dan Walsh <[email protected]> # Author: Ryan Hallisey <[email protected]> # Author: Jason Zaman <[email protected]>python/sepolicy/sepolicy/booleans.py +0
-1@@ -1,4 +1,3 @@ -#! /usr/bin/python -Es # Copyright (C) 2012 Red Hat # see file 'COPYING' for use and warranty information #python/sepolicy/sepolicy/communicate.py +0
-1@@ -1,4 +1,3 @@ -#! /usr/bin/python -Es # Copyright (C) 2012 Red Hat # see file 'COPYING' for use and warranty information #python/sepolicy/sepolicy/generate.py +0
-2@@ -1,5 +1,3 @@ -#!/usr/bin/python -Es -# # Copyright (C) 2007-2012 Red Hat # see file 'COPYING' for use and warranty information #python/sepolicy/sepolicy/gui.py +0
-2@@ -1,5 +1,3 @@ -#!/usr/bin/python -Es -# # Copyright (C) 2013 Red Hat # see file 'COPYING' for use and warranty information #python/sepolicy/sepolicy/interface.py +0
-2@@ -1,5 +1,3 @@ -#!/usr/bin/python -Es -# # Copyright (C) 2012 Red Hat # see file 'COPYING' for use and warranty information #python/sepolicy/sepolicy/manpage.py +0
-1@@ -1,4 +1,3 @@ -#! /usr/bin/python -Es # Copyright (C) 2012-2013 Red Hat # AUTHOR: Dan Walsh <[email protected]> # AUTHOR: Miroslav Grepl <[email protected]>python/sepolicy/sepolicy/network.py +0
-1@@ -1,4 +1,3 @@ -#! /usr/bin/python -Es # Copyright (C) 2012 Red Hat # see file 'COPYING' for use and warranty information #python/sepolicy/sepolicy/transition.py +0
-1@@ -1,4 +1,3 @@ -#! /usr/bin/python -Es # Copyright (C) 2011 Red Hat # see file 'COPYING' for use and warranty information #
Quoted 4 lines · Nicolas Iooss
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 <[email protected]>
For both these patches:
Quoted 100 lines
--- 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(-)python/sepolicy/sepolicy/__init__.py +0
-2@@ -1,5 +1,3 @@ -#!/usr/bin/python - # Author: Dan Walsh <[email protected]> # Author: Ryan Hallisey <[email protected]> # Author: Jason Zaman <[email protected]>python/sepolicy/sepolicy/booleans.py +0
-1@@ -1,4 +1,3 @@ -#! /usr/bin/python -Es # Copyright (C) 2012 Red Hat # see file 'COPYING' for use and warranty information #python/sepolicy/sepolicy/communicate.py +0
-1@@ -1,4 +1,3 @@ -#! /usr/bin/python -Es # Copyright (C) 2012 Red Hat # see file 'COPYING' for use and warranty information #python/sepolicy/sepolicy/generate.py +0
-2@@ -1,5 +1,3 @@ -#!/usr/bin/python -Es -# # Copyright (C) 2007-2012 Red Hat # see file 'COPYING' for use and warranty information #python/sepolicy/sepolicy/gui.py +0
-2@@ -1,5 +1,3 @@ -#!/usr/bin/python -Es -# # Copyright (C) 2013 Red Hat # see file 'COPYING' for use and warranty information #python/sepolicy/sepolicy/interface.py +0
-2@@ -1,5 +1,3 @@ -#!/usr/bin/python -Es -# # Copyright (C) 2012 Red Hat # see file 'COPYING' for use and warranty information #python/sepolicy/sepolicy/manpage.py +0
-1@@ -1,4 +1,3 @@ -#! /usr/bin/python -Es # Copyright (C) 2012-2013 Red Hat # AUTHOR: Dan Walsh <[email protected]> # AUTHOR: Miroslav Grepl <[email protected]>python/sepolicy/sepolicy/network.py +0
-1@@ -1,4 +1,3 @@ -#! /usr/bin/python -Es # Copyright (C) 2012 Red Hat # see file 'COPYING' for use and warranty information #python/sepolicy/sepolicy/transition.py +0
-1@@ -1,4 +1,3 @@ -#! /usr/bin/python -Es # Copyright (C) 2011 Red Hat # see file 'COPYING' for use and warranty information #Signature · 1 line
2.20.1