aboutsummaryrefslogtreecommitdiffstats
path: root/modules/buildsystem
diff options
context:
space:
mode:
authorDan Fandrich <danf@mageia.org>2024-10-04 19:28:06 -0700
committerDan Fandrich <danf@mageia.org>2024-10-04 19:28:06 -0700
commit2c7da66570999dcd21f11f976dc6ec27d820f45c (patch)
treeb97dd9f25df691c66b2be31b658cc6fec638d47e /modules/buildsystem
parenta69863ece1973cf3eae488f30c657b57dfb89779 (diff)
downloadpuppet-2c7da66570999dcd21f11f976dc6ec27d820f45c.tar
puppet-2c7da66570999dcd21f11f976dc6ec27d820f45c.tar.gz
puppet-2c7da66570999dcd21f11f976dc6ec27d820f45c.tar.bz2
puppet-2c7da66570999dcd21f11f976dc6ec27d820f45c.tar.xz
puppet-2c7da66570999dcd21f11f976dc6ec27d820f45c.zip
Use @ when accessing variables in templates
Access without the @ symbol is the older method and is discouraged.
Diffstat (limited to 'modules/buildsystem')
-rw-r--r--modules/buildsystem/templates/iurt.conf18
-rw-r--r--modules/buildsystem/templates/media.cfg4
-rw-r--r--modules/buildsystem/templates/mgarepo.conf30
-rw-r--r--modules/buildsystem/templates/repoctl.conf12
-rw-r--r--modules/buildsystem/templates/signbot/sudoers.signpackage4
-rw-r--r--modules/buildsystem/templates/sudoers.youri4
-rw-r--r--modules/buildsystem/templates/upload.conf12
-rw-r--r--modules/buildsystem/templates/vhost_repository.conf14
-rw-r--r--modules/buildsystem/templates/youri/host.conf2
-rw-r--r--modules/buildsystem/templates/youri/submit.conf12
10 files changed, 56 insertions, 56 deletions
diff --git a/modules/buildsystem/templates/iurt.conf b/modules/buildsystem/templates/iurt.conf
index 2dd8bf0e..15718130 100644
--- a/modules/buildsystem/templates/iurt.conf
+++ b/modules/buildsystem/templates/iurt.conf
@@ -1,18 +1,18 @@
<%- distro = scope.lookupvar('buildsystem::var::distros::distros')[@distribution] -%>
{
- supported_arch => [ '<%= distro['arch'].join("', '") %>' ],
+ supported_arch => [ '<%= @distro['arch'].join("', '") %>' ],
all_media =>{
<%- distro['medias'].keys.sort.each{|media| -%>
- '<%= media %>' => [ '<%=
+ '<%= @media %>' => [ '<%=
distro['medias'][media]['repos'].keys.sort.join("', '") %>' ],
<%-
} -%>
},
- distribution => '<%= distro['macros']['distribution'] %>',
- vendor => '<%= distro['macros']['vendor'] %>',
- base_media => [ '<%= distro['base_media'].join("', '") %>' ],
- upload => '<%= build_login %>@pkgsubmit:~/uploads/',
- upload_queue => '<%= build_login %>@pkgsubmit:~/uploads/queue/',
+ distribution => '<%= @distro['macros']['distribution'] %>',
+ vendor => '<%= @distro['macros']['vendor'] %>',
+ base_media => [ '<%= @distro['base_media'].join("', '") %>' ],
+ upload => '<%= @build_login %>@pkgsubmit:~/uploads/',
+ upload_queue => '<%= @build_login %>@pkgsubmit:~/uploads/queue/',
unwanted_packages => '^monotone-',
repository => 'http://<%= scope.lookupvar('buildsystem::var::repository::hostname') %>/<%= scope.lookupvar('buildsystem::var::repository::distribdir') %>/',
log_url => 'https://<%= scope.lookupvar('buildsystem::var::webstatus::hostname') %>/queue/build/',
@@ -22,14 +22,14 @@
log_size_limit => '600M',
build_timeout => {
<%- build_timeout.keys.sort.each{|package| -%>
- '<%= package %>' => <%= (build_timeout[package].to_f * scope.lookupvar('buildsystem::var::iurt::timeout_multiplier').to_f).to_i %>,
+ '<%= @package %>' => <%= (@build_timeout[package].to_f * scope.lookupvar('buildsystem::var::iurt::timeout_multiplier').to_f).to_i %>,
<%-
} -%>
},
use_netns => {
'default' => 1,
<%- allow_network_access.sort.each{|package| -%>
- '<%= package %>' => 0,
+ '<%= @package %>' => 0,
<%-
} -%>
},
diff --git a/modules/buildsystem/templates/media.cfg b/modules/buildsystem/templates/media.cfg
index 64757a2b..565c8c13 100644
--- a/modules/buildsystem/templates/media.cfg
+++ b/modules/buildsystem/templates/media.cfg
@@ -26,9 +26,9 @@ end
distro = scope.lookupvar('buildsystem::var::distros::distros')[@distro_name]
-%>
[media_info]
-version=<%= distro['version'] %>
+version=<%= @distro['version'] %>
mediacfg_version=2
-branch=<%= distro['branch'] %>
+branch=<%= @distro['branch'] %>
<%-
if @arch != 'armv7hl'
-%>
diff --git a/modules/buildsystem/templates/mgarepo.conf b/modules/buildsystem/templates/mgarepo.conf
index fbe5109c..80675cce 100644
--- a/modules/buildsystem/templates/mgarepo.conf
+++ b/modules/buildsystem/templates/mgarepo.conf
@@ -4,16 +4,16 @@
-%>
[global]
verbose = no
-default_parent = <%= scope.lookupvar('buildsystem::var::mgarepo::svn_root_packages') %>/<%= default_distro %>
+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
-trunk-dir = <%= default_distro %>
+tempdir = <%= @sched_home_dir %>/repsys/tmp
+trunk-dir = <%= @default_distro %>
<%-
conf = scope.lookupvar('buildsystem::var::mgarepo::conf')
if conf['global'] != nil
conf['global'].keys.sort.each{|key|
value = conf['global'][key]
- -%><%= key %> = <%= value %>
+ -%><%= @key %> = <%= @value %>
<%-
}
end
@@ -33,20 +33,20 @@ ignore-string = SILENT
path = /usr/share/mgarepo/default.chlog
[users]
-iurt = Mageia build bot <mageia-sysadm@<%= domain %>>
+iurt = Mageia build bot <mageia-sysadm@<%= @domain %>>
[submit]
-default = <%= default_distro %>
+default = <%= @default_distro %>
host = <%= scope.lookupvar('buildsystem::var::mgarepo::submit_host') %>
<%-
distros.keys.sort.each{|d|
distro = distros[d]
-%>
-[submit <%= d %>]
-target = <%= sched_home_dir %>/repsys/srpms
-allowed = <%= distro['submit_allowed'] %> <%= distro['backports_allowed'] %>
-rpm-macros = global <%= d %>
+[submit <%= @d %>]
+target = <%= @sched_home_dir %>/repsys/srpms
+allowed = <%= @distro['submit_allowed'] %> <%= @distro['backports_allowed'] %>
+rpm-macros = global <%= @d %>
<%-
}
@@ -61,12 +61,12 @@ dist = %{?distsuffix:%distsuffix}%{?!distsuffix:.mga}%{?distro_release:%distro_r
distros.keys.sort.each{|d|
distro = distros[d]
-%>
-[macros <%= d %>]
-distro_release = <%= distro['version'] %>
+[macros <%= @d %>]
+distro_release = <%= @distro['version'] %>
<%-
distro['macros'].keys.sort.each{|macro|
value = distro['macros'][macro]
- -%><%= macro %> = <%= value %>
+ -%><%= @macro %> = <%= @value %>
<%- } %>
<%- }
%>
@@ -83,6 +83,6 @@ run-prep = yes
[binrepo]
<%- binrepo_hostname = scope.lookupvar('buildsystem::var::binrepo::hostname') -%>
-download_url = http://<%= binrepo_hostname %>/
-upload_host = <%= binrepo_hostname %>
+download_url = http://<%= @binrepo_hostname %>/
+upload_host = <%= @binrepo_hostname %>
diff --git a/modules/buildsystem/templates/repoctl.conf b/modules/buildsystem/templates/repoctl.conf
index 14506a25..9c148046 100644
--- a/modules/buildsystem/templates/repoctl.conf
+++ b/modules/buildsystem/templates/repoctl.conf
@@ -27,12 +27,12 @@ lockdir=/var/lib/repoctl/locks
hdlistsdir=/var/lib/repoctl/hdlists
rootdir=<%= scope.lookupvar('buildsystem::var::repository::bootstrap_root') %>
finalrootdir=<%= scope.lookupvar('buildsystem::var::repository::mirror_root') %>
-distribdir=$rootdir/<%= distribdir %>
-finaldistribdir=$finalrootdir/<%= distribdir %>
-distroreleases='<%= distros.keys.sort.join(' ') -%>'
-distrosections='<%= distrosections.keys.sort.join(' ') -%>'
-sectionsrepos='<%= sectionsrepos.keys.sort.join(' ') -%>'
-arches='<%= arches.keys.sort.join(' ') -%>'
+distribdir=$rootdir/<%= @distribdir %>
+finaldistribdir=$finalrootdir/<%= @distribdir %>
+distroreleases='<%= @distros.keys.sort.join(' ') -%>'
+distrosections='<%= @distrosections.keys.sort.join(' ') -%>'
+sectionsrepos='<%= @sectionsrepos.keys.sort.join(' ') -%>'
+arches='<%= @arches.keys.sort.join(' ') -%>'
mirror_rsync_options="-v --delete -alH"
timestampfile="mageia_timestamp"
sha1sumfile="mageia_sha1sum"
diff --git a/modules/buildsystem/templates/signbot/sudoers.signpackage b/modules/buildsystem/templates/signbot/sudoers.signpackage
index 4ea30238..7a5ff7c2 100644
--- a/modules/buildsystem/templates/signbot/sudoers.signpackage
+++ b/modules/buildsystem/templates/signbot/sudoers.signpackage
@@ -1,2 +1,2 @@
-<%= sched_login %> ALL =(<%= scope.lookupvar('buildsystem::var::signbot::login') %>) NOPASSWD: /usr/local/bin/mga-signpackage
-<%= sched_login %> ALL =(<%= scope.lookupvar('buildsystem::var::signbot::login') %>) NOPASSWD: /usr/local/bin/sign-check-package
+<%= @sched_login %> ALL =(<%= scope.lookupvar('buildsystem::var::signbot::login') %>) NOPASSWD: /usr/local/bin/mga-signpackage
+<%= @sched_login %> ALL =(<%= scope.lookupvar('buildsystem::var::signbot::login') %>) NOPASSWD: /usr/local/bin/sign-check-package
diff --git a/modules/buildsystem/templates/sudoers.youri b/modules/buildsystem/templates/sudoers.youri
index 3bc7cc2d..8e7ec8bf 100644
--- a/modules/buildsystem/templates/sudoers.youri
+++ b/modules/buildsystem/templates/sudoers.youri
@@ -1,6 +1,6 @@
<%- sched_login = scope.lookupvar('buildsystem::var::scheduler::login') -%>
Cmnd_Alias YOURI = /usr/local/bin/mga-youri-submit.wrapper
Defaults!YOURI always_set_home
-Defaults!YOURI runas_default = <%= sched_login %>
+Defaults!YOURI runas_default = <%= @sched_login %>
Defaults!YOURI !requiretty
-%<%= scope.lookupvar('buildsystem::var::groups::packagers') -%> ALL = (<%= sched_login %>) NOPASSWD: YOURI
+%<%= scope.lookupvar('buildsystem::var::groups::packagers') -%> ALL = (<%= @sched_login %>) NOPASSWD: YOURI
diff --git a/modules/buildsystem/templates/upload.conf b/modules/buildsystem/templates/upload.conf
index af610c92..c481c6ef 100644
--- a/modules/buildsystem/templates/upload.conf
+++ b/modules/buildsystem/templates/upload.conf
@@ -14,7 +14,7 @@ my %nodes = (
<%-
build_nodes.keys.sort.each{|arch|
-%>
- <%= arch -%> => [ '<%= build_nodes[arch].join("', '") -%>' ],
+ <%= @arch -%> => [ '<%= @build_nodes[arch].join("', '") -%>' ],
<%-
}
-%>
@@ -77,7 +77,7 @@ my $homedir = "<%= scope.lookupvar('buildsystem::var::iurt::homedir') %>";
distros = scope.lookupvar('buildsystem::var::distros::distros')
distros.keys.sort.each{|distroname|
-%>
- '<%= distroname -%>' => {
+ '<%= @distroname -%>' => {
<%-
distro = distros[distroname]
distro['medias'].keys.sort.each{|medianame|
@@ -85,7 +85,7 @@ my $homedir = "<%= scope.lookupvar('buildsystem::var::iurt::homedir') %>";
media['repos'].keys.sort.each{|reponame|
deps = repo_deps(distros, distroname, medianame, reponame)
-%>
- "<%= [ medianame, reponame ].join('/') %>" => [ "<%=
+ "<%= [ @medianame, @reponame ].join('/') %>" => [ "<%=
deps.keys.sort.join('", "')
%>" ],
<%-
@@ -100,12 +100,12 @@ my $homedir = "<%= scope.lookupvar('buildsystem::var::iurt::homedir') %>";
admin => '<%= scope.lookupvar('buildsystem::var::scheduler::admin_mail') %>',
http_queue => 'https://<%= scope.lookupvar('buildsystem::var::webstatus::hostname') %>/uploads',
upload_user => '<%= scope.lookupvar('buildsystem::var::scheduler::login') %>',
- email_domain => '<%= domain %>',
+ email_domain => '<%= @domain %>',
arch => {
<%-
distros.keys.sort.each{|distroname|
-%>
- <%= distroname -%> => [ '<%= distros[distroname]['arch'].join("', '") %>' ],
+ <%= @distroname -%> => [ '<%= @distros[distroname]['arch'].join("', '") %>' ],
<%-
}
-%>
@@ -120,7 +120,7 @@ my $homedir = "<%= scope.lookupvar('buildsystem::var::iurt::homedir') %>";
march = distros[distroname]['arch']
end
-%>
- <%= distroname -%> => [ '<%= march.join("', '") %>' ],
+ <%= @distroname -%> => [ '<%= @march.join("', '") %>' ],
<%-
}
-%>
diff --git a/modules/buildsystem/templates/vhost_repository.conf b/modules/buildsystem/templates/vhost_repository.conf
index e082ffca..3dbdfc46 100644
--- a/modules/buildsystem/templates/vhost_repository.conf
+++ b/modules/buildsystem/templates/vhost_repository.conf
@@ -9,7 +9,7 @@ distros = scope.lookupvar('buildsystem::var::distros::distros')
-%>
<VirtualHost *:80>
ServerName <%= scope.lookupvar('buildsystem::var::repository::hostname') %>
- DocumentRoot <%= mirror_root %>
+ DocumentRoot <%= @mirror_root %>
# Some simple API to check existence of SRPMs for QA
RewriteEngine On
@@ -36,35 +36,35 @@ distros = scope.lookupvar('buildsystem::var::distros::distros')
access_requires = [ 'all granted' ]
end
%>
- Alias /bootstrap/ "<%= bootstrap_reporoot %>/"
+ Alias /bootstrap/ "<%= @bootstrap_reporoot %>/"
<%-
distros.keys.sort.each{|distroname|
distro = distros[distroname]
if distro['no_mirror'] -%>
- Alias /<%= distribdir %>/<%= distroname %>/ "<%= bootstrap_reporoot %>/<%= distroname %>/"
+ Alias /<%= @distribdir %>/<%= @distroname %>/ "<%= @bootstrap_reporoot %>/<%= @distroname %>/"
<%-
end
}
-%>
- <Directory <%= bootstrap_reporoot %>>
+ <Directory <%= @bootstrap_reporoot %>>
Header append Cache-Control "public, must-revalidate"
<%-
for req in access_requires do
-%>
- Require <%= req %>
+ Require <%= @req %>
<%-
end
-%>
Options Indexes FollowSymLinks
</Directory>
- <Directory <%= mirror_root %>>
+ <Directory <%= @mirror_root %>>
Header append Cache-Control "public, must-revalidate"
<%-
for req in access_requires do
-%>
- Require <%= req %>
+ Require <%= @req %>
<%-
end
-%>
diff --git a/modules/buildsystem/templates/youri/host.conf b/modules/buildsystem/templates/youri/host.conf
index bf4fa086..90964486 100644
--- a/modules/buildsystem/templates/youri/host.conf
+++ b/modules/buildsystem/templates/youri/host.conf
@@ -20,4 +20,4 @@
}
}
-%>
-<%= str -%>
+<%= @str -%>
diff --git a/modules/buildsystem/templates/youri/submit.conf b/modules/buildsystem/templates/youri/submit.conf
index 0d7cf927..337f667d 100644
--- a/modules/buildsystem/templates/youri/submit.conf
+++ b/modules/buildsystem/templates/youri/submit.conf
@@ -93,7 +93,7 @@ def get_definitions(def_name, conf_name, conf, conf_default, distros)
end
%>
-home: <%= sched_home_dir %>
+home: <%= @sched_home_dir %>
<%-
repository = {
@@ -108,7 +108,7 @@ home: <%= sched_home_dir %>
}
-%>
# repository declaration
-<%= hash_text(repository, 0) %>
+<%= hash_text(@repository, 0) %>
<%-
targets = {
@@ -116,25 +116,25 @@ home: <%= sched_home_dir %>
}
-%>
# targets definition
-<%= hash_text(targets, 0) %>
+<%= hash_text(@targets, 0) %>
<%-
checks = get_definitions('checks', conf_name, conf, conf_default, distros)
-%>
# checks definition
-<%= hash_text(checks, 0) -%>
+<%= hash_text(@checks, 0) -%>
<%-
actions = get_definitions('actions', conf_name, conf, conf_default, distros)
-%>
# actions definitions
-<%= hash_text(actions, 0) -%>
+<%= hash_text(@actions, 0) -%>
<%-
posts = get_definitions('posts', conf_name, conf, conf_default, distros)
-%>
# posts definitions
-<%= hash_text(posts, 0) -%>
+<%= hash_text(@posts, 0) -%>
# vim:ft=yaml:et:sw=4