Andrew Bogott has submitted this change and it was merged.
Change subject: contint: extract android SDK dependencies to a module
......................................................................
contint: extract android SDK dependencies to a module
The Android SDK requires a few specific packages and ant 1.8+. It is
being used by other projects than contint (ex: on Tools Labs) so this is
factoring out the code to a new androidsdk module.
* creates module androidsdk
* get rid of contint::android-sdk, moved to androidsdk::dependencies
* Tools Labs might want the packages to be ensure => latest, so have the
dependency class to accept a different ensure value for packages it
defines.
* be paranoid and only define Package['ant'] when it is not there already.
* remove obsolete ant18 class since Ubuntu Precise ship ant 1.8 by
default
* Move out android SDK include from gallium in favor of an include in
contint::packages (one less line in site.pp).
Change-Id: Ic37af0fd68fbabe0c8defbdc865364e142118290
---
M manifests/site.pp
A modules/androidsdk/manifests/dependencies.pp
D modules/contint/manifests/android-sdk.pp
M modules/contint/manifests/packages.pp
4 files changed, 32 insertions(+), 55 deletions(-)
Approvals:
Andrew Bogott: Looks good to me, approved
jenkins-bot: Verified
diff --git a/manifests/site.pp b/manifests/site.pp
index bf83983..998ac52 100644
--- a/manifests/site.pp
+++ b/manifests/site.pp
@@ -1024,7 +1024,6 @@
include standard
include contint::firewall
- include contint::android-sdk
include role::ci::master
include role::ci::slave
include role::ci::testswarm
diff --git a/modules/androidsdk/manifests/dependencies.pp
b/modules/androidsdk/manifests/dependencies.pp
new file mode 100644
index 0000000..a364a29
--- /dev/null
+++ b/modules/androidsdk/manifests/dependencies.pp
@@ -0,0 +1,31 @@
+# == Class androidsdk::dependencies
+#
+# Class installing prerequisites to the Android SDK.
+#
+# The SDK itself need to be installed manually for now.
+#
+# Help link: http://developer.android.com/sdk/installing.html
+#
+# == Parameters
+#
+# [*ensure*] puppet stanza passed to package definitions. Default: 'present'
+class androidsdk::dependencies( $ensure = 'present' ) {
+
+ if ! defined(Package['ant']) {
+ package { 'ant':
+ ensure => $ensure,
+ }
+ }
+
+ # 32bit libs needed by Android SDK
+ # ..but NOT just all of ia32-libs ..
+ package { [
+ 'libgcc1:i386',
+ 'libncurses5:i386',
+ 'libsdl1.2debian:i386',
+ 'libstdc++6:i386',
+ 'zlib1g:i386',
+ ]: ensure => $ensure;
+ }
+
+}
diff --git a/modules/contint/manifests/android-sdk.pp
b/modules/contint/manifests/android-sdk.pp
deleted file mode 100644
index 681dde3..0000000
--- a/modules/contint/manifests/android-sdk.pp
+++ /dev/null
@@ -1,23 +0,0 @@
-# vim: set ts=2 sw=2 et :
-# continuous integration (CI)
-
-class contint::android-sdk {
- # Class installing prerequisites to the Android SDK
- # The SDK itself need to be installed manually for now.
- #
- # Help link: http://developer.android.com/sdk/installing.html
-
- include contint::packages::ant18
-
- # 32bit libs needed by Android SDK
- # ..but NOT just all of ia32-libs ..
- package { [
- 'libstdc++6:i386',
- 'libgcc1:i386',
- 'zlib1g:i386',
- 'libncurses5:i386',
- 'libsdl1.2debian:i386',
- 'libswt-gtk-3.5-java'
- ]: ensure => installed;
- }
-}
diff --git a/modules/contint/manifests/packages.pp
b/modules/contint/manifests/packages.pp
index 32b16c5..aed42ad 100644
--- a/modules/contint/manifests/packages.pp
+++ b/modules/contint/manifests/packages.pp
@@ -5,9 +5,7 @@
#
class contint::packages {
- # Make sure we use ant version 1.8 or we will have a conflict
- # with android
- include contint::packages::ant18
+ include androidsdk::dependencies
# Get several OpenJDK packages including the jdk to build mobile
# applications.
@@ -189,33 +187,5 @@
'ocaml-nox',
]:
ensure => present;
- }
-}
-
-
-class contint::packages::ant18 {
-
- if ($::lsbdistcodename == 'lucid') {
- # When specifying 'latest' for package 'ant' on Lucid it will actually
- # install ant1.7 which might not be the version we want. This is
similar to
- # the various gcc version packaged in Debian, albeit ant1.7 and ant1.8
are
- # conflicting with each others.
- # Thus, this let us explicitly install ant version 1.8
- package { [
- 'ant1.8'
- ]:
- ensure => installed,
- }
- package { [
- 'ant',
- 'ant1.7'
- ]:
- ensure => absent,
- }
- } else {
- # Ubuntu post Lucid ship by default with ant 1.8 or later
- package { ['ant']:
- ensure => installed,
- }
}
}
--
To view, visit https://gerrit.wikimedia.org/r/126000
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Ic37af0fd68fbabe0c8defbdc865364e142118290
Gerrit-PatchSet: 6
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Hashar <[email protected]>
Gerrit-Reviewer: Andrew Bogott <[email protected]>
Gerrit-Reviewer: Hashar <[email protected]>
Gerrit-Reviewer: Tim Landscheidt <[email protected]>
Gerrit-Reviewer: Yuvipanda <[email protected]>
Gerrit-Reviewer: coren <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits