File: 0002-Fix-Python-shebang-for-various-scripts.patch

package info (click to toggle)
pagure 5.14.1%2Bdfsg-8
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 31,008 kB
  • sloc: python: 125,295; javascript: 22,012; makefile: 208; sh: 191
file content (148 lines) | stat: -rw-r--r-- 3,494 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
Description: Fix Python shebang for various scripts

Pagure ships with the "/usr/bin/env python" shebang, which doesn't
work on Debian because "python" refers to Python 2.  This patch
replaces every occurrence of this by "/usr/bin/python3".

Author: Sergio Durigan Junior <sergiodj@sergiodj.net>
Forwarded: sort of, https://pagure.io/pagure/issue/4725

--- a/createdb.py
+++ b/createdb.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/python3
 
 from __future__ import print_function, unicode_literals, absolute_import
 
--- a/files/aclchecker.py
+++ b/files/aclchecker.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/python3
 # -*- coding: utf-8 -*-
 
 """
--- a/files/api_key_expire_mail.py
+++ b/files/api_key_expire_mail.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/python3
 
 from __future__ import print_function, absolute_import
 import os
--- a/files/emoji_clean_json.py
+++ b/files/emoji_clean_json.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/python3
 
 from __future__ import print_function, absolute_import
 import json
--- a/files/keyhelper.py
+++ b/files/keyhelper.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/python3
 # -*- coding: utf-8 -*-
 
 """
--- a/files/mirror_project_in.py
+++ b/files/mirror_project_in.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/python3
 
 from __future__ import print_function, absolute_import
 import os
--- a/files/pagure_mirror_project_in.service
+++ b/files/pagure_mirror_project_in.service
@@ -9,7 +9,7 @@ Description=Pagure service to mirror in
 Documentation=https://pagure.io/pagure
 
 [Service]
-ExecStart=/usr/bin/python /usr/share/pagure/mirror_project_in.py
+ExecStart=/usr/bin/python3 /usr/share/pagure/mirror_project_in.py
 Environment="PAGURE_CONFIG=/etc/pagure/pagure.cfg"
 Type=simple
 User=git
--- a/pagure-ev/pagure_stream_server.py
+++ b/pagure-ev/pagure_stream_server.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/python3
 
 """
  (c) 2015-2017 - Copyright Red Hat Inc
--- a/pagure-milters/comment_email_milter.py
+++ b/pagure-milters/comment_email_milter.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/python3
 # -*- coding: utf-8 -*-
 
 # Milter calls methods of your class at milter events.
--- a/pagure/hooks/files/git_multimail_upstream.py
+++ b/pagure/hooks/files/git_multimail_upstream.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/python3
 
 __version__ = "1.4.0"
 
--- a/pagure/hooks/files/hookrunner
+++ b/pagure/hooks/files/hookrunner
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/python3
 # -*- coding: utf-8 -*-
 
 """
--- a/pagure/hooks/files/repospannerhook
+++ b/pagure/hooks/files/repospannerhook
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/python3
 # -*- coding: utf-8 -*-
 
 """
--- a/setup.py
+++ b/setup.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/python3
 
 """
 Setup script
--- a/tests/test_fnmatch.py
+++ b/tests/test_fnmatch.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/python3
 # -*- coding: utf-8 -*-
 
 """
--- a/tests/test_pagure_flask_ui_issues_acl_checks.py
+++ b/tests/test_pagure_flask_ui_issues_acl_checks.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/python3
 # coding=utf-8
 
 """
--- a/tests/test_stream_server.py
+++ b/tests/test_stream_server.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/python3
 # -*- coding: utf-8 -*-
 
 """
--- a/tests/test_style.py
+++ b/tests/test_style.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/python3
 # -*- coding: utf-8 -*-
 
 """