Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: modules/updateserver/manifests/init.pp

Issue 29354731: Issue 4458 - Use pip to install current versions of dependencies for updateUpdateManifests script (Closed) Base URL: https://hg.adblockplus.org/infrastructure
Patch Set: Created Sept. 22, 2016, 1:17 p.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: modules/updateserver/manifests/init.pp
===================================================================
--- a/modules/updateserver/manifests/init.pp
+++ b/modules/updateserver/manifests/init.pp
@@ -92,29 +92,45 @@ class updateserver(
$update_update_manifests_script = '/usr/local/bin/update_update_manifests'
file {$update_update_manifests_script:
mode => '0755',
content => template('updateserver/update_update_manifests.erb')
}
- $update_update_manifests_dependencies = ['python-crypto', 'python-jinja2']
+ ensure_packages(['python-pip', 'python-dev'])
- package {$update_update_manifests_dependencies:}
+ # Make sure that apt packages corresponding to the pip-installed modules below
+ # won't be installed unintentionally, these will take precedence otherwise.
+ package {['python-jinja2', 'python-crypto']:
+ ensure => 'held',
+ }
+
+ package {'Jinja2':
+ ensure => '2.8',
+ provider => 'pip',
+ require => [Package['python-pip'], Package['python-jinja2']],
+ }
+
+ package {'pycrypto':
+ ensure => '2.6.1',
+ provider => 'pip',
+ require => [Package['python-pip'], Package['python-crypto'], Package['python-dev']],
+ }
exec {'update_update_manifests':
command => $update_update_manifests_script,
user => 'sitescripts',
timeout => 0,
require => [Class['sitescripts'],
Fetch_repository[$repositories_to_sync],
File[$update_update_manifests_script],
File[$update_manifest_dirs], File[$safari_certificate_path],
- Package[$update_update_manifests_dependencies]]
+ Package['Jinja2', 'pycrypto']]
}
cron {'update_update_manifests':
ensure => present,
environment => ['MAILTO=admins@adblockplus.org'],
command => $update_update_manifests_script,
user => 'sitescripts',
minute => '*/10',
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld