Merge lp:~cv.clearcorp/oerptools/oerptools into lp:oerptools
- oerptools
- Merge into 2.0
Proposed by
Carlos Vásquez (ClearCorp)
Status: | Merged |
---|---|
Merged at revision: | 427 |
Proposed branch: | lp:~cv.clearcorp/oerptools/oerptools |
Merge into: | lp:oerptools |
Diff against target: |
348 lines (+55/-48) 8 files modified
oerptools/dev/repository.py (+7/-7) oerptools/install/install.py (+1/-1) oerptools/lib/apache.py (+9/-6) oerptools/lib/bzr.py (+4/-4) oerptools/lib/config.py (+1/-1) oerptools/lib/phppgadmin.py (+5/-5) oerptools/oerp/instance.py (+2/-0) oerptools/oerp/server.py (+26/-24) |
To merge this branch: | bzr merge lp:~cv.clearcorp/oerptools/oerptools |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
ClearCorp drivers | Pending | ||
Review via email: mp+206777@code.launchpad.net |
Commit message
Description of the change
[UPDATE] Oerptools can be installed in LinuxMint.
[FIX] Options in oerp-install addons can be selected and phppgadmin is fully installed.
[FIX] bad branch in banking-addon trunk
To post a comment you must log in.
- 427. By Ronald Rubi
-
[MRG] Oerptools can be installed in LinuxMint.
Preview Diff
[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1 | === modified file 'oerptools/dev/repository.py' |
2 | --- oerptools/dev/repository.py 2013-02-22 20:08:23 +0000 |
3 | +++ oerptools/dev/repository.py 2014-02-17 18:05:35 +0000 |
4 | @@ -175,7 +175,7 @@ |
5 | self._branch_project('openerp-costa-rica', False, ['6.1', '7.0', 'trunk']) |
6 | self._branch_project('oerptools', False, ['1.0', '2.0', 'trunk']) |
7 | |
8 | - self._branch_project('banking-addons', True, ['6.1', 'trunk']) |
9 | + self._branch_project('banking-addons', True, ['6.1']) |
10 | |
11 | return True |
12 | |
13 | @@ -196,7 +196,7 @@ |
14 | self._update_project('openerp-costa-rica', False, ['6.1', '7.0', 'trunk']) |
15 | self._update_project('oerptools', False, ['1.0', '2.0', 'trunk']) |
16 | |
17 | - self._update_project('banking-addons', True, ['6.1', 'trunk']) |
18 | + self._update_project('banking-addons', True, ['6.1']) |
19 | |
20 | return True |
21 | |
22 | @@ -217,7 +217,7 @@ |
23 | self._reset_project_locations('openerp-costa-rica', False, ['6.1', '7.0', 'trunk']) |
24 | self._reset_project_locations('oerptools', False, ['1.0', '2.0', 'trunk']) |
25 | |
26 | - self._reset_project_locations('banking-addons', True, ['6.1', 'trunk']) |
27 | + self._reset_project_locations('banking-addons', True, ['6.1']) |
28 | |
29 | return True |
30 | |
31 | @@ -336,7 +336,7 @@ |
32 | self._src_branch_project('openerp-ccorp-addons', False, ['6.1', '7.0', 'trunk']) |
33 | self._src_branch_project('openerp-costa-rica', False, ['6.1', '7.0', 'trunk']) |
34 | |
35 | - self._src_branch_project('banking-addons', True, ['6.1', 'trunk']) |
36 | + self._src_branch_project('banking-addons', True, ['6.1']) |
37 | |
38 | self._src_compress_project('openobject-server', True, ['6.1', '7.0', 'trunk']) |
39 | self._src_compress_project('openobject-addons', True, ['6.1', '7.0', 'trunk']) |
40 | @@ -345,7 +345,7 @@ |
41 | self._src_compress_project('openerp-ccorp-addons', False, ['6.1', '7.0', 'trunk']) |
42 | self._src_compress_project('openerp-costa-rica', False, ['6.1', '7.0', 'trunk']) |
43 | |
44 | - self._src_compress_project('banking-addons', True, ['6.1', 'trunk']) |
45 | + self._src_compress_project('banking-addons', True, ['6.1']) |
46 | |
47 | self._src_compress_repo() |
48 | |
49 | @@ -365,7 +365,7 @@ |
50 | self._src_update_project('openerp-ccorp-addons', False, ['6.1', '7.0', 'trunk']) |
51 | self._src_update_project('openerp-costa-rica', False, ['6.1', '7.0', 'trunk']) |
52 | |
53 | - self._src_update_project('banking-addons', True, ['6.1', 'trunk']) |
54 | + self._src_update_project('banking-addons', True, ['6.1']) |
55 | |
56 | self._src_compress_project('openobject-server', True, ['6.1', '7.0', 'trunk']) |
57 | self._src_compress_project('openobject-addons', True, ['6.1', '7.0', 'trunk']) |
58 | @@ -374,7 +374,7 @@ |
59 | self._src_compress_project('openerp-ccorp-addons', False, ['6.1', '7.0', 'trunk']) |
60 | self._src_compress_project('openerp-costa-rica', False, ['6.1', '7.0', 'trunk']) |
61 | |
62 | - self._src_compress_project('banking-addons', True, ['6.1', 'trunk']) |
63 | + self._src_compress_project('banking-addons', True, ['6.1']) |
64 | |
65 | self._src_compress_repo() |
66 | |
67 | |
68 | === modified file 'oerptools/install/install.py' |
69 | --- oerptools/install/install.py 2013-01-24 08:31:39 +0000 |
70 | +++ oerptools/install/install.py 2014-02-17 18:05:35 +0000 |
71 | @@ -40,7 +40,7 @@ |
72 | def oerptools_install(install_dir): |
73 | os_version = tools.get_os() |
74 | if os_version['os'] == 'Linux': |
75 | - if os_version['version'][0] == 'Ubuntu': |
76 | + if (os_version['version'][0] == 'Ubuntu') or (os_version['version'][0] == 'LinuxMint'): |
77 | return ubuntu_oerptools_install(install_dir) |
78 | elif os_version['version'][0] == 'arch': |
79 | return arch_oerptools_install(install_dir) |
80 | |
81 | === modified file 'oerptools/lib/apache.py' |
82 | --- oerptools/lib/apache.py 2013-02-26 16:11:41 +0000 |
83 | +++ oerptools/lib/apache.py 2014-02-17 18:05:35 +0000 |
84 | @@ -34,13 +34,16 @@ |
85 | def apache_install(): |
86 | os_version = tools.get_os() |
87 | if os_version['os'] == 'Linux': |
88 | - if os_version['version'][0] == 'Ubuntu': |
89 | - return ubuntu_apache_install() |
90 | + string = '' |
91 | + if (os_version['version'][0] == 'Ubuntu') or (os_version['version'][0] == 'LinuxMint'): |
92 | + if os_version['version'][0] == 'LinuxMint': |
93 | + string = '000-' |
94 | + return ubuntu_apache_install(string) |
95 | elif os_version['version'][0] == 'arch': |
96 | return arch_apache_install() |
97 | return False |
98 | |
99 | -def ubuntu_apache_install(): |
100 | +def ubuntu_apache_install(string): |
101 | _logger.info('Installing Apache web server') |
102 | if not tools.ubuntu_install_package(['apache2']): |
103 | _logger.error('Failed to install apache package. Exiting.') |
104 | @@ -56,7 +59,7 @@ |
105 | if tools.exec_command('a2enmod ssl rewrite suexec include proxy proxy_http proxy_connect proxy_ftp headers', as_root=True): |
106 | _logger.error('Failed to enable Apache modules. Exiting.') |
107 | return False |
108 | - if tools.exec_command('a2ensite default default-ssl', as_root=True): |
109 | + if tools.exec_command('a2ensite '+string+'default default-ssl', as_root=True): |
110 | _logger.error('Failed to enable Apache sites. Exiting.') |
111 | return False |
112 | if tools.exec_command('/etc/init.d/apache2 restart', as_root=True): |
113 | @@ -70,12 +73,12 @@ |
114 | _logger.error('Failed to install apache package. Exiting.') |
115 | return False |
116 | return True |
117 | - #TODO: lp:1133347 configuration for apache in arch |
118 | + #TODO: configuration for apache in arch |
119 | |
120 | def apache_restart(): |
121 | os_version = tools.get_os() |
122 | if os_version['os'] == 'Linux': |
123 | - if os_version['version'][0] == 'Ubuntu': |
124 | + if (os_version['version'][0] == 'Ubuntu') or (os_version['version'][0] == 'LinuxMint'): |
125 | return ubuntu_apache_restart() |
126 | elif os_version['version'][0] == 'arch': |
127 | return arch_apache_restart() |
128 | |
129 | === modified file 'oerptools/lib/bzr.py' |
130 | --- oerptools/lib/bzr.py 2013-02-26 16:11:41 +0000 |
131 | +++ oerptools/lib/bzr.py 2014-02-17 18:05:35 +0000 |
132 | @@ -33,7 +33,7 @@ |
133 | def bzr_install(): |
134 | os_version = tools.get_os() |
135 | if os_version and os_version['os'] == 'Linux': |
136 | - if os_version['version'][0] == 'Ubuntu': |
137 | + if (os_version['version'][0] == 'Ubuntu') or (os_version['version'][0] == 'LinuxMint'): |
138 | return ubuntu_bzr_install() |
139 | elif os_version['version'][0] == 'arch': |
140 | return arch_bzr_install() |
141 | @@ -41,12 +41,12 @@ |
142 | return False |
143 | |
144 | def ubuntu_bzr_install(): |
145 | - #TODO: lp:1133369 logger gets the output of the command |
146 | + #TODO: logger gets the output of the command |
147 | _logger.info('Installing bzr...') |
148 | return tools.ubuntu_install_package(['bzr', 'python-bzrlib'], update=True) |
149 | |
150 | def arch_bzr_install(): |
151 | - #TODO: lp:1133369 logger gets the output of the command |
152 | + #TODO: logger gets the output of the command |
153 | _logger.info('Installing bzr...') |
154 | return tools.arch_install_repo_package(['bzr']) |
155 | |
156 | @@ -66,7 +66,7 @@ |
157 | load_plugins() |
158 | |
159 | def bzr_init_repo(target, no_trees=False): |
160 | - #TODO: lp:1133372 do this with the python library |
161 | + #TODO: do this with the python library |
162 | if no_trees: |
163 | if tools.exec_command('bzr init-repo --no-tree %s' % target): |
164 | _logger.error('Failed to create repository in: %s. Exiting.' % target) |
165 | |
166 | === modified file 'oerptools/lib/config.py' |
167 | --- oerptools/lib/config.py 2013-02-26 19:01:35 +0000 |
168 | +++ oerptools/lib/config.py 2014-02-17 18:05:35 +0000 |
169 | @@ -546,5 +546,5 @@ |
170 | tools.exec_command('chmod o-w %s' % file_path, as_root=True) |
171 | |
172 | return file_path |
173 | - |
174 | + |
175 | params = configParameters() |
176 | |
177 | === modified file 'oerptools/lib/phppgadmin.py' |
178 | --- oerptools/lib/phppgadmin.py 2013-03-11 19:31:50 +0000 |
179 | +++ oerptools/lib/phppgadmin.py 2014-02-17 18:05:35 +0000 |
180 | @@ -34,7 +34,7 @@ |
181 | def phppgadmin_install(): |
182 | os_version = tools.get_os() |
183 | if os_version['os'] == 'Linux': |
184 | - if os_version['version'][0] == 'Ubuntu': |
185 | + if (os_version['version'][0] == 'Ubuntu') or (os_version['version'][0] == 'LinuxMint'): |
186 | return ubuntu_phppgadmin_install() |
187 | elif os_version['version'][0] == 'arch': |
188 | return arch_phppgadmin_install() |
189 | @@ -42,15 +42,15 @@ |
190 | |
191 | def ubuntu_phppgadmin_install(): |
192 | _logger.info('Installing PostgreSQL Web administration interface (phppgadmin)') |
193 | - if tools.ubuntu_install_package(['phppgadmin']): |
194 | + if not tools.ubuntu_install_package(['phppgadmin']): |
195 | _logger.error('Failed to install phppgadmin package. Exiting.') |
196 | return False |
197 | - return |
198 | + return True |
199 | |
200 | def arch_phppgadmin_install(): |
201 | _logger.info('Installing PostgreSQL Web administration interface (phppgadmin)') |
202 | - if tools.arch_install_repo_package(['phppgadmin']): |
203 | + if not tools.arch_install_repo_package(['phppgadmin']): |
204 | _logger.error('Failed to install phppgadmin package. Exiting.') |
205 | return False |
206 | - #TODO: lp:1133345 configuration for phppgadmin in arch |
207 | + #TODO: configuration for phppgadmin in arch |
208 | |
209 | |
210 | === modified file 'oerptools/oerp/instance.py' |
211 | --- oerptools/oerp/instance.py 2013-03-01 22:44:19 +0000 |
212 | +++ oerptools/oerp/instance.py 2014-02-17 18:05:35 +0000 |
213 | @@ -42,6 +42,8 @@ |
214 | self._postgresql_version = '8.4' |
215 | else: |
216 | self._postgresql_version = '9.1' |
217 | + if self._os_info['os'] == 'Linux' and self._os_info['version'][0] == 'LinuxMint': |
218 | + self._postgresql_version = '9.1' |
219 | |
220 | self._branch = config.params['branch'] or '7.0' |
221 | |
222 | |
223 | === modified file 'oerptools/oerp/server.py' |
224 | --- oerptools/oerp/server.py 2013-09-19 17:51:24 +0000 |
225 | +++ oerptools/oerp/server.py 2014-02-17 18:05:35 +0000 |
226 | @@ -41,6 +41,8 @@ |
227 | self._postgresql_version = '8.4' |
228 | else: |
229 | self._postgresql_version = '9.1' |
230 | + elif self._os_info['os'] == 'Linux' and self._os_info['version'][0] == 'LinuxMint': |
231 | + self._postgresql_version = '9.1' |
232 | elif self._os_info['os'] == 'Linux' and self._os_info['version'][0] == 'arch': |
233 | self._postgresql_version = '9.1' |
234 | |
235 | @@ -51,33 +53,30 @@ |
236 | else: |
237 | _logger.debug('Server initialized without instance: %s' % instance) |
238 | self._branch = config.params['branch'] or '7.0' |
239 | - print config.params[self._branch+'_installation_type'] |
240 | - print config.params['installation_type'] |
241 | self._installation_type = config.params[self._branch+'_installation_type'] or config.params['installation_type'] or 'dev' |
242 | - print self._installation_type |
243 | self._user = config.params[self._branch+'_user'] or config.params['user'] or None |
244 | |
245 | - if self._branch+'_install_openobject_addons' in config.params: |
246 | + if 'install_openobject_addons' in config.params: |
247 | + self._install_openobject_addons = config.params['install_openobject_addons'] |
248 | + elif self._branch+'_install_openobject_addons' in config.params: |
249 | self._install_openobject_addons = config.params[self._branch+'_install_openobject_addons'] |
250 | - elif 'install_openobject_addons' in config.params: |
251 | - self._install_openobject_addons = config.params['install_openobject_addons'] |
252 | else: |
253 | - self._install_openobject_addons = True |
254 | - |
255 | - if self._branch+'_install_openerp_ccorp_addons' in config.params: |
256 | + self._install_openobject_addons = True |
257 | + |
258 | + if 'install_openerp_ccorp_addons' in config.params: |
259 | + self._install_openerp_ccorp_addons = config.params['install_openerp_ccorp_addons'] |
260 | + elif self._branch+'_install_openerp_ccorp_addons' in config.params: |
261 | self._install_openerp_ccorp_addons = config.params[self._branch+'_install_openerp_ccorp_addons'] |
262 | - elif 'install_openerp_ccorp_addons' in config.params: |
263 | - self._install_openerp_ccorp_addons = config.params['install_openerp_ccorp_addons'] |
264 | else: |
265 | self._install_openerp_ccorp_addons = True |
266 | |
267 | - if self._branch+'_install_openerp_costa_rica' in config.params: |
268 | + if 'install_openerp_costa_rica' in config.params: |
269 | + self._install_openerp_costa_rica = config.params['install_openerp_costa_rica'] |
270 | + elif self._branch+'_install_openerp_costa_rica' in config.params: |
271 | self._install_openerp_costa_rica = config.params[self._branch+'_install_openerp_costa_rica'] |
272 | - elif 'install_openerp_costa_rica' in config.params: |
273 | - self._install_openerp_costa_rica = config.params['install_openerp_costa_rica'] |
274 | else: |
275 | self._install_openerp_costa_rica = True |
276 | - |
277 | + |
278 | if self._branch+'_update_postgres_hba' in config.params: |
279 | self._update_postgres_hba = config.params[self._branch+'_update_postgres_hba'] |
280 | elif 'update_postgres_hba' in config.params: |
281 | @@ -321,7 +320,7 @@ |
282 | |
283 | # Test distro and call appropriate function |
284 | if self._os_info and self._os_info['os'] == 'Linux': |
285 | - if self._os_info['version'][0] == 'Ubuntu': |
286 | + if (self._os_info['version'][0] == 'Ubuntu') or (self._os_info['version'][0] == 'LinuxMint'): |
287 | return self._ubuntu_install_python_libs(packages) |
288 | elif self._os_info['version'][0] == 'arch': |
289 | return self._arch_install_python_libs(packages) |
290 | @@ -390,7 +389,7 @@ |
291 | _logger.info('Installing PostgreSQL.') |
292 | # Test distro and call appropriate function |
293 | if self._os_info and self._os_info['os'] == 'Linux': |
294 | - if self._os_info['version'][0] == 'Ubuntu': |
295 | + if (self._os_info['version'][0] == 'Ubuntu') or (self._os_info['version'][0] == 'LinuxMint'): |
296 | return self._ubuntu_install_postgresql() |
297 | elif self._os_info['version'][0] == 'arch': |
298 | return self._arch_install_postgresql() |
299 | @@ -433,7 +432,7 @@ |
300 | _logger.info('Updating PostgreSQL pg_hba.conf file.') |
301 | # Test distro and call appropriate function |
302 | if self._os_info and self._os_info['os'] == 'Linux': |
303 | - if self._os_info['version'][0] == 'Ubuntu': |
304 | + if (self._os_info['version'][0] == 'Ubuntu') or (self._os_info['version'][0] == 'LinuxMint'): |
305 | return self._ubuntu_do_update_postgres_hba() |
306 | elif self._os_info['version'][0] == 'arch': |
307 | return self._arch_do_update_postgres_hba() |
308 | @@ -511,7 +510,7 @@ |
309 | if tools.exec_command('mkdir -p /usr/local/src/oerptools/oerp', as_root=True): |
310 | _logger.error('Failed to create /usr/local/src/oerptools/oerp dir. Exiting.') |
311 | return False |
312 | - |
313 | + |
314 | if 'repo_tgz' in config.params and config.params['repo_tgz'] and os.path.isfile(os.path.abspath(config.params['repo_tgz'])): |
315 | if tools.exec_command('cp %s /usr/local/src/oerptools/oerp/openerp.tgz' % os.path.abspath(config.params['repo_tgz']), as_root=True): |
316 | _logger.warning('Failed to copy %s to /usr/local/src/oerptools/oerp.') |
317 | @@ -661,13 +660,16 @@ |
318 | def _do_install_apache(self): |
319 | os_version = tools.get_os() |
320 | if os_version['os'] == 'Linux': |
321 | - if os_version['version'][0] == 'Ubuntu': |
322 | - return self._ubuntu_do_install_apache() |
323 | + string = '' |
324 | + if (os_version['version'][0] == 'Ubuntu') or (os_version['version'][0] == 'LinuxMint'): |
325 | + if os_version['version'][0] == 'LinuxMint': |
326 | + string = '000-' |
327 | + return self._ubuntu_do_install_apache(string) |
328 | elif os_version['version'][0] == 'arch': |
329 | return self._arch_do_install_apache() |
330 | return False |
331 | |
332 | - def _ubuntu_do_install_apache(self): |
333 | + def _ubuntu_do_install_apache(self, string): |
334 | if not apache.apache_install(): |
335 | _logger.error('Failed to install Apache. Exiting.') |
336 | return False |
337 | @@ -678,9 +680,9 @@ |
338 | _logger.warning('Failed make /etc/openerp/apache2/rewrites.') |
339 | if tools.exec_command('cp %s/oerptools/oerp/static/apache/apache-ssl-%s-skeleton /etc/openerp/apache2/ssl-%s-skeleton' % (config.params['oerptools_path'], self._branch, self._branch), as_root=True): |
340 | _logger.warning('Failed copy Apache rewrite skeleton.') |
341 | - if tools.exec_command('sed -i "s#ServerAdmin .*\\$#ServerAdmin support@clearcorp.co.cr\\n\\n\\tInclude /etc/apache2/sites-available/erp#g" /etc/apache2/sites-available/default', as_root=True): |
342 | + if tools.exec_command('sed -i "s#ServerAdmin .*\\$#ServerAdmin support@clearcorp.co.cr\\n\\n\\tInclude /etc/apache2/sites-available/erp#g" /etc/apache2/sites-available/'+string+'default.conf', as_root=True): |
343 | _logger.warning('Failed config Apache site.') |
344 | - if tools.exec_command('sed -i "s#ServerAdmin .*\\$#ServerAdmin support@clearcorp.co.cr\\n\\n\\tInclude /etc/openerp/apache2/rewrites#g" /etc/apache2/sites-available/default-ssl', as_root=True): |
345 | + if tools.exec_command('sed -i "s#ServerAdmin .*\\$#ServerAdmin support@clearcorp.co.cr\\n\\n\\tInclude /etc/openerp/apache2/rewrites#g" /etc/apache2/sites-available/default-ssl.conf', as_root=True): |
346 | _logger.warning('Failed config Apache site.') |
347 | if not apache.apache_restart(): |
348 | _logger.warning('Failed restart Apache.') |