Tim Landscheidt has uploaded a new change for review. https://gerrit.wikimedia.org/r/238662
Change subject: Tools: Source python-socketio-client for Trusty from backports ...................................................................... Tools: Source python-socketio-client for Trusty from backports python-socketio-client has been backported to Ubuntu Trusty and thus there is no longer a requirement to keep a local package for it. This change establishes a framework to enable the specific backports repository for Ubuntu and Debian releases with the default policy to not consider their packages at all, but white-list those packages that should be installed and updated from those repositories. At the moment, it only lists the package python-socketio-client for Ubuntu Trusty. As Trusty's python-socketio-client depends on the distribution's python-websocket while our local package python-socketio-client depends on another local package python-websocket-client that conflicts with python-websocket, exchanging one package for the other is not done by this change, but left for manual administration. Bug: T91874 Change-Id: Iad5c9e77b3f8546df7d1717ec3e6a71b267d00b2 --- M modules/toollabs/manifests/init.pp 1 file changed, 47 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/62/238662/1 diff --git a/modules/toollabs/manifests/init.pp b/modules/toollabs/manifests/init.pp index bb37d90..15d656a 100644 --- a/modules/toollabs/manifests/init.pp +++ b/modules/toollabs/manifests/init.pp @@ -133,6 +133,53 @@ notify => Exec['apt-get update'], } + # Enable backports for specific distributions and packages only. + case $::lsbdistcodename { + 'trusty': { + $packages_from_backports = ['python-socketio-client'] + } + } + case $::operatingsystem { + 'Debian': { + apt::repository { "${::lsbdistcodename}-backports": + uri => 'http://mirrors.wikimedia.org/debian', + dist => "${::lsbdistcodename}-backports", + components => 'main', + } + } + 'Ubuntu': { + apt::repository { "${::lsbdistcodename}-backports": + uri => 'http://nova.clouds.archive.ubuntu.com/ubuntu/', + dist => "${::lsbdistcodename}-backports", + components => 'main restricted universe multiverse', + } + } + default: { + fail("Unknown operating system '$::operatingsystem'.") + } + } + # By default, mark packages from backports as ineligible for + # installation. + apt::pin { "${::lsbdistcodename}-backports": + pin => "release a=${::lsbdistcodename}-backports", + priority => -1, + package => '*', + } + # Explicitly white-list the packages we want to install from + # backports. + apt::pin { "${::lsbdistcodename}-backports-whitelisted": + ensure => $packages_from_backports ? { + undef => absent, + default => present, + }, + pin => "release a=${::lsbdistcodename}-backports", + priority => 500, + package => $packages_from_backports ? { + undef => undef, + default => join($packages_from_backports, ' '), + }, + } + # Trustworthy enough # Only necessary on precise hosts, trusty has its own mariadb package if $::lsbdistcodename == 'precise' { -- To view, visit https://gerrit.wikimedia.org/r/238662 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Iad5c9e77b3f8546df7d1717ec3e6a71b267d00b2 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Tim Landscheidt <t...@tim-landscheidt.de> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits