##// END OF EJS Templates
supervisor: add patch for older kernel support.
marcink -
r3139:1ca05d4b default
parent child Browse files
Show More
@@ -0,0 +1,16 b''
1 diff -rup supervisor-3.3.4-orig/supervisor/options.py supervisor-3.3.4/supervisor/options.py
2 --- supervisor-3.3.4-orig/supervisor/options.py 1970-01-01 01:00:01.000000000 +0100
3 +++ supervisor-3.3.4/supervisor-new/options.py 2018-10-24 10:53:19.368503735 +0200
4 @@ -1395,7 +1395,11 @@ class ServerOptions(Options):
5 name = limit['name']
6 name = name # name is used below by locals()
7
8 - soft, hard = resource.getrlimit(res)
9 + try:
10 + soft, hard = resource.getrlimit(res)
11 + except Exception:
12 + # handle old kernel problems, this is not critical to execute
13 + soft, hard = -1, -1
14
15 if (soft < min) and (soft != -1): # -1 means unlimited
16 if (hard < min) and (hard != -1):
@@ -1,247 +1,253 b''
1 1 # Overrides for the generated python-packages.nix
2 2 #
3 3 # This function is intended to be used as an extension to the generated file
4 4 # python-packages.nix. The main objective is to add needed dependencies of C
5 5 # libraries and tweak the build instructions where needed.
6 6
7 7 { pkgs
8 8 , basePythonPackages
9 9 }:
10 10
11 11 let
12 12 sed = "sed -i";
13 13
14 14 localLicenses = {
15 15 repoze = {
16 16 fullName = "Repoze License";
17 17 url = http://www.repoze.org/LICENSE.txt;
18 18 };
19 19 };
20 20
21 21 in
22 22
23 23 self: super: {
24 24
25 25 "appenlight-client" = super."appenlight-client".override (attrs: {
26 26 meta = {
27 27 license = [ pkgs.lib.licenses.bsdOriginal ];
28 28 };
29 29 });
30 30
31 31 "beaker" = super."beaker".override (attrs: {
32 32 patches = [
33 33 ./patches/beaker/patch-beaker-lock-func-debug.diff
34 34 ./patches/beaker/patch-beaker-metadata-reuse.diff
35 35 ];
36 36 });
37 37
38 38 "gevent" = super."gevent".override (attrs: {
39 39 propagatedBuildInputs = attrs.propagatedBuildInputs ++ [
40 40 # NOTE: (marcink) odd requirements from gevent aren't set properly,
41 41 # thus we need to inject psutil manually
42 42 self."psutil"
43 43 ];
44 44 });
45 45
46 46 "future" = super."future".override (attrs: {
47 47 meta = {
48 48 license = [ pkgs.lib.licenses.mit ];
49 49 };
50 50 });
51 51
52 52 "testpath" = super."testpath".override (attrs: {
53 53 meta = {
54 54 license = [ pkgs.lib.licenses.mit ];
55 55 };
56 56 });
57 57
58 58 "gnureadline" = super."gnureadline".override (attrs: {
59 59 buildInputs = [
60 60 pkgs.ncurses
61 61 ];
62 62 patchPhase = ''
63 63 substituteInPlace setup.py --replace "/bin/bash" "${pkgs.bash}/bin/bash"
64 64 '';
65 65 });
66 66
67 67 "gunicorn" = super."gunicorn".override (attrs: {
68 68 propagatedBuildInputs = [
69 69 # johbo: futures is needed as long as we are on Python 2, otherwise
70 70 # gunicorn explodes if used with multiple threads per worker.
71 71 self."futures"
72 72 ];
73 73 });
74 74
75 75 "nbconvert" = super."nbconvert".override (attrs: {
76 76 propagatedBuildInputs = attrs.propagatedBuildInputs ++ [
77 77 # marcink: plug in jupyter-client for notebook rendering
78 78 self."jupyter-client"
79 79 ];
80 80 });
81 81
82 82 "ipython" = super."ipython".override (attrs: {
83 83 propagatedBuildInputs = attrs.propagatedBuildInputs ++ [
84 84 self."gnureadline"
85 85 ];
86 86 });
87 87
88 88 "lxml" = super."lxml".override (attrs: {
89 89 buildInputs = [
90 90 pkgs.libxml2
91 91 pkgs.libxslt
92 92 ];
93 93 propagatedBuildInputs = [
94 94 # Needed, so that "setup.py bdist_wheel" does work
95 95 self."wheel"
96 96 ];
97 97 });
98 98
99 99 "mysql-python" = super."mysql-python".override (attrs: {
100 100 buildInputs = [
101 101 pkgs.openssl
102 102 ];
103 103 propagatedBuildInputs = [
104 104 pkgs.libmysql
105 105 pkgs.zlib
106 106 ];
107 107 });
108 108
109 109 "psycopg2" = super."psycopg2".override (attrs: {
110 110 propagatedBuildInputs = [
111 111 pkgs.postgresql
112 112 ];
113 113 meta = {
114 114 license = pkgs.lib.licenses.lgpl3Plus;
115 115 };
116 116 });
117 117
118 118 "pycurl" = super."pycurl".override (attrs: {
119 119 propagatedBuildInputs = [
120 120 pkgs.curl
121 121 pkgs.openssl
122 122 ];
123 123 preConfigure = ''
124 124 substituteInPlace setup.py --replace '--static-libs' '--libs'
125 125 export PYCURL_SSL_LIBRARY=openssl
126 126 '';
127 127 meta = {
128 128 license = pkgs.lib.licenses.mit;
129 129 };
130 130 });
131 131
132 132 "pyramid" = super."pyramid".override (attrs: {
133 133 meta = {
134 134 license = localLicenses.repoze;
135 135 };
136 136 });
137 137
138 138 "pyramid-debugtoolbar" = super."pyramid-debugtoolbar".override (attrs: {
139 139 meta = {
140 140 license = [ pkgs.lib.licenses.bsdOriginal localLicenses.repoze ];
141 141 };
142 142 });
143 143
144 144 "pysqlite" = super."pysqlite".override (attrs: {
145 145 propagatedBuildInputs = [
146 146 pkgs.sqlite
147 147 ];
148 148 meta = {
149 149 license = [ pkgs.lib.licenses.zlib pkgs.lib.licenses.libpng ];
150 150 };
151 151 });
152 152
153 153 "pytest-runner" = super."pytest-runner".override (attrs: {
154 154 propagatedBuildInputs = [
155 155 self."setuptools-scm"
156 156 ];
157 157 });
158 158
159 159 "python-ldap" = super."python-ldap".override (attrs: {
160 160 propagatedBuildInputs = attrs.propagatedBuildInputs ++ [
161 161 pkgs.openldap
162 162 pkgs.cyrus_sasl
163 163 pkgs.openssl
164 164 ];
165 165 });
166 166
167 167 "python-pam" = super."python-pam".override (attrs: {
168 168 propagatedBuildInputs = [
169 169 pkgs.pam
170 170 ];
171 171 # TODO: johbo: Check if this can be avoided, or transform into
172 172 # a real patch
173 173 patchPhase = ''
174 174 substituteInPlace pam.py \
175 175 --replace 'find_library("pam")' '"${pkgs.pam}/lib/libpam.so.0"'
176 176 '';
177 177 });
178 178
179 179 "pyzmq" = super."pyzmq".override (attrs: {
180 180 buildInputs = [
181 181 pkgs.czmq
182 182 ];
183 183 });
184 184
185 185 "urlobject" = super."urlobject".override (attrs: {
186 186 meta = {
187 187 license = {
188 188 spdxId = "Unlicense";
189 189 fullName = "The Unlicense";
190 190 url = http://unlicense.org/;
191 191 };
192 192 };
193 193 });
194 194
195 195 "docutils" = super."docutils".override (attrs: {
196 196 meta = {
197 197 license = pkgs.lib.licenses.bsd2;
198 198 };
199 199 });
200 200
201 201 "colander" = super."colander".override (attrs: {
202 202 meta = {
203 203 license = localLicenses.repoze;
204 204 };
205 205 });
206 206
207 207 "pyramid-beaker" = super."pyramid-beaker".override (attrs: {
208 208 meta = {
209 209 license = localLicenses.repoze;
210 210 };
211 211 });
212 212
213 213 "pyramid-mako" = super."pyramid-mako".override (attrs: {
214 214 meta = {
215 215 license = localLicenses.repoze;
216 216 };
217 217 });
218 218
219 219 "repoze.lru" = super."repoze.lru".override (attrs: {
220 220 meta = {
221 221 license = localLicenses.repoze;
222 222 };
223 223 });
224 224
225 225 "python-editor" = super."python-editor".override (attrs: {
226 226 meta = {
227 227 license = pkgs.lib.licenses.asl20;
228 228 };
229 229 });
230 230
231 231 "translationstring" = super."translationstring".override (attrs: {
232 232 meta = {
233 233 license = localLicenses.repoze;
234 234 };
235 235 });
236 236
237 237 "venusian" = super."venusian".override (attrs: {
238 238 meta = {
239 239 license = localLicenses.repoze;
240 240 };
241 241 });
242 242
243 "supervisor" = super."supervisor".override (attrs: {
244 patches = [
245 ./patches/supervisor/patch-rlimits-old-kernel.diff
246 ];
247 });
248
243 249 # Avoid that base packages screw up the build process
244 250 inherit (basePythonPackages)
245 251 setuptools;
246 252
247 253 }
General Comments 0
You need to be logged in to leave comments. Login now