/[adm]/puppet/modules/buildsystem/templates/mgarepo.conf
ViewVC logotype

Annotation of /puppet/modules/buildsystem/templates/mgarepo.conf

Parent Directory Parent Directory | Revision Log Revision Log


Revision 3149 - (hide annotations) (download)
Thu May 23 15:06:02 2013 UTC (10 years, 11 months ago) by boklm
File size: 2289 byte(s)
buildsystem: remove use of .each on hashes

Remove use of "each" methods on hashes in template files. With ruby 1.8,
the order in which the hash is enumerated is random. When using the each
method to scan all hash keys and elements in template files, puppet will
do unnecessary changes in files installed on the server, making it more
difficult to see the real changes. In order to avoid this, we stop using
the "each" method on hashes and instead use the "keys" method to get an
array of all keys and sort it alphabetically.

With ruby 1.9 the hashes enumerate their values in the order that the
corresponding keys were inserted, but we are still using ruby 1.8 with
Mageia 2.
1 boklm 3138 <%-
2     default_distro = scope.lookupvar('buildsystem::var::distros::default_distro')
3     distros = scope.lookupvar('buildsystem::var::distros::distros')
4     -%>
5 blino 500 [global]
6     verbose = no
7 boklm 3138 default_parent = <%= scope.lookupvar('buildsystem::var::mgarepo::svn_root_packages') %>/<%= default_distro %>
8 blino 500 #url-map = svn\+ssh://svn\.mageia\.org/(.*) file:///\1
9 blino 732 tempdir = <%= sched_home_dir %>/repsys/tmp
10 boklm 3138 trunk-dir = <%= default_distro %>
11     <%-
12     conf = scope.lookupvar('buildsystem::var::mgarepo::conf')
13     if conf['global'] != nil
14 boklm 3149 conf['global'].keys.sort.each{|key|
15     value = conf['global'][key]
16 boklm 3138 -%><%= key %> = <%= value %>
17     <%-
18     }
19     end
20     -%>
21 blino 500
22 boklm 3138
23 blino 500 [log]
24 boklm 3138 oldurl = <%= scope.lookupvar('buildsystem::var::mgarepo::oldurl') %>
25 blino 500 # controls up to which revision the rpm changelog
26     # will be constructed (default zero, i.e., oldest
27     # commit)
28     # revision-offset = 0
29     # commit lines containing this string won't be shown in the changelog:
30     ignore-string = SILENT
31    
32     [template]
33     path = /usr/share/repsys/default.chlog
34    
35     [users]
36     iurt = Mageia build bot <mageia-sysadm@<%= domain %>>
37    
38     [submit]
39 boklm 3138 default = <%= default_distro %>
40     host = <%= scope.lookupvar('buildsystem::var::mgarepo::submit_host') %>
41 blino 500
42 boklm 3141 <%-
43 boklm 3149 distros.keys.sort.each{|d|
44     distro = distros[d]
45 boklm 3141 -%>
46     [submit <%= d %>]
47 blino 732 target = <%= sched_home_dir %>/repsys/srpms
48 boklm 3141 allowed = <%= distro['submit_allowed'] %>
49     rpm-macros = global <%= d %>
50 blino 500
51 boklm 3141 <%-
52     }
53     -%>
54 pterjan 1711
55 blino 500 [macros global]
56 blino 506 # mkrel definition to be removed when rpm-setup is updated on main build node
57 blino 725 mkrel(c:) = %{-c: 0.%{-c*}.}%{1}%{?subrel:.%subrel}%{?distsuffix:%distsuffix}%{?!distsuffix:.mga}%{?distro_release:%distro_release}
58 blino 500
59 boklm 3141 <%-
60 boklm 3149 distros.keys.sort.each{|d|
61     distro = distros[d]
62 boklm 3141 -%>
63     [macros <%= d %>]
64     distro_release = <%= distro['version'] %>
65     <%-
66 boklm 3149 distro['macros'].keys.sort.each{|macro|
67     value = distro['macros'][macro]
68 boklm 3141 -%><%= macro %> = <%= value %>
69     <%- } %>
70     <%- }
71     %>
72 blino 500
73     [helper]
74     create-srpm = /usr/share/repsys/create-srpm
75 blino 1469 upload-srpm = /usr/local/bin/mga-youri-submit
76 blino 500 # needed by mdvsys 2.0
77     install-buildrequires = sudo rurpmi --auto --no-suggests
78 boklm 1961 upload-bin = /usr/local/bin/wrapper.upload-bin
79 blino 500
80     [srpm]
81     run-prep = yes
82 boklm 1961
83     [binrepo]
84 boklm 3112 <%- binrepo_hostname = scope.lookupvar('buildsystem::var::binrepo::hostname') -%>
85     download_url = http://<%= binrepo_hostname %>/
86     upload_host = <%= binrepo_hostname %>
87 boklm 1961

  ViewVC Help
Powered by ViewVC 1.1.30