aboutsummaryrefslogtreecommitdiffstats
path: root/modules
diff options
context:
space:
mode:
authorNicolas Vigier <boklm@mageia.org>2013-05-23 15:05:31 +0000
committerNicolas Vigier <boklm@mageia.org>2013-05-23 15:05:31 +0000
commit0a6dbab426b5a58db0044ce952c1362d8c781dfb (patch)
treeb57628ce8541a66d8de267b51250e3e24979853e /modules
parent98fa28e23cbd8ac75e428b1bee6b89cdbbe0d5bf (diff)
downloadpuppet-0a6dbab426b5a58db0044ce952c1362d8c781dfb.tar
puppet-0a6dbab426b5a58db0044ce952c1362d8c781dfb.tar.gz
puppet-0a6dbab426b5a58db0044ce952c1362d8c781dfb.tar.bz2
puppet-0a6dbab426b5a58db0044ce952c1362d8c781dfb.tar.xz
puppet-0a6dbab426b5a58db0044ce952c1362d8c781dfb.zip
Add buildsystem::var::mgarepo.
The mgarepo.conf template is now using settings from buildsystem::var::mgarepo.
Diffstat (limited to 'modules')
-rw-r--r--modules/buildsystem/manifests/var/distros.pp3
-rw-r--r--modules/buildsystem/manifests/var/mgarepo.pp19
-rw-r--r--modules/buildsystem/templates/mgarepo.conf35
-rwxr-xr-xmodules/buildsystem/templates/submit_package.pl2
4 files changed, 42 insertions, 17 deletions
diff --git a/modules/buildsystem/manifests/var/distros.pp b/modules/buildsystem/manifests/var/distros.pp
index a0c8aafd..30d51f3d 100644
--- a/modules/buildsystem/manifests/var/distros.pp
+++ b/modules/buildsystem/manifests/var/distros.pp
@@ -1,3 +1,5 @@
+# $default_distro:
+# the name of the default distribution
# $distros:
# a hash variable containing distributions informations indexed by
# distribution name. Each distribution is itself an hash containing
@@ -33,5 +35,6 @@
# },
# }
class buildsystem::var::distros(
+ $default_distro,
$distros
) { }
diff --git a/modules/buildsystem/manifests/var/mgarepo.pp b/modules/buildsystem/manifests/var/mgarepo.pp
new file mode 100644
index 00000000..52f9d9cc
--- /dev/null
+++ b/modules/buildsystem/manifests/var/mgarepo.pp
@@ -0,0 +1,19 @@
+# $submit_host:
+# hostname used to submit packages
+# $svn_hostname:
+# hostname of the svn server used for packages
+# $svn_root_packages:
+# svn root url of the svn repository for packages
+# $oldurl:
+# svn url where the import logs of the rpm are stored
+# $conf:
+# $conf{'global'} is a has table of values used in mgarepo.conf in
+# the [global] section
+class buildsystem::var::mgarepo(
+ $submit_host,
+ $svn_hostname,
+ $svn_root_packages,
+ $oldurl,
+ $conf
+) {
+}
diff --git a/modules/buildsystem/templates/mgarepo.conf b/modules/buildsystem/templates/mgarepo.conf
index e46ae2fa..70f1ffc0 100644
--- a/modules/buildsystem/templates/mgarepo.conf
+++ b/modules/buildsystem/templates/mgarepo.conf
@@ -1,23 +1,26 @@
+<%-
+ default_distro = scope.lookupvar('buildsystem::var::distros::default_distro')
+ distros = scope.lookupvar('buildsystem::var::distros::distros')
+-%>
[global]
verbose = no
-default_parent = svn://svn.<%= domain %>/svn/packages/cauldron
+default_parent = <%= scope.lookupvar('buildsystem::var::mgarepo::svn_root_packages') %>/<%= default_distro %>
#url-map = svn\+ssh://svn\.mageia\.org/(.*) file:///\1
tempdir = <%= sched_home_dir %>/repsys/tmp
-# ldap settings
-# ldap is searched first: if not found, then [users] is read
-# if ldap search matched, then [users] is not consulted
-# if ldap is down, [users] is not consulted either
-#
-# we should have a generic fqdn here to use round-robin DNS
-# enhancement for repsys: support multiple ldap servers here
-ldap-server = ldap.<%= domain %>
-ldap-base = ou=People,<%= dc_suffix %>
-ldap-filterformat = (&(objectClass=inetOrgPerson)(uid=$username))
-ldap-resultformat = $cn <$mail>
-trunk-dir = cauldron
+trunk-dir = <%= default_distro %>
+<%-
+conf = scope.lookupvar('buildsystem::var::mgarepo::conf')
+if conf['global'] != nil
+ conf['global'].each{|key,value|
+ -%><%= key %> = <%= value %>
+<%-
+ }
+end
+-%>
+
[log]
-oldurl = svn+ssh://svn.<%= domain %>/svn/packages/misc
+oldurl = <%= scope.lookupvar('buildsystem::var::mgarepo::oldurl') %>
# controls up to which revision the rpm changelog
# will be constructed (default zero, i.e., oldest
# commit)
@@ -32,8 +35,8 @@ path = /usr/share/repsys/default.chlog
iurt = Mageia build bot <mageia-sysadm@<%= domain %>>
[submit]
-default = cauldron
-host = pkgsubmit.<%= domain %>
+default = <%= default_distro %>
+host = <%= scope.lookupvar('buildsystem::var::mgarepo::submit_host') %>
[submit cauldron]
target = <%= sched_home_dir %>/repsys/srpms
diff --git a/modules/buildsystem/templates/submit_package.pl b/modules/buildsystem/templates/submit_package.pl
index 7ef81e65..1fdf7749 100755
--- a/modules/buildsystem/templates/submit_package.pl
+++ b/modules/buildsystem/templates/submit_package.pl
@@ -2,7 +2,7 @@
use strict;
use warnings;
-my $svn_server = 'svn.<%= domain %>';
+my $svn_server = '<%= scope.lookupvar('buildsystem::var::mgarepo::svn_hostname') %>';
my $packagersgroup="<%= scope.lookupvar('buildsystem::var::groups::packagers') %>";
my $login = getpwuid($<);