[Mageia-sysadm] [817] add submit_package wrapper
root at mageia.org
root at mageia.org
Mon Jan 17 19:25:08 CET 2011
Revision: 817
Author: boklm
Date: 2011-01-17 19:25:08 +0100 (Mon, 17 Jan 2011)
Log Message:
-----------
add submit_package wrapper
Modified Paths:
--------------
puppet/modules/buildsystem/manifests/init.pp
Added Paths:
-----------
puppet/modules/buildsystem/templates/submit_package
Modified: puppet/modules/buildsystem/manifests/init.pp
===================================================================
--- puppet/modules/buildsystem/manifests/init.pp 2011-01-17 17:50:02 UTC (rev 816)
+++ puppet/modules/buildsystem/manifests/init.pp 2011-01-17 18:25:08 UTC (rev 817)
@@ -6,6 +6,8 @@
$sched_login = "schedbot"
$sched_home_dir = "/home/$sched_login"
$repository_root = "/distrib/bootstrap"
+ $packagers_group = 'mga-packagers'
+ $createsrpm_path = '/usr/share/repsys/create-srpm'
include ssh::auth
ssh::auth::key { $build_login: } # declare a key for build bot: RSA, 2048 bits
@@ -153,6 +155,12 @@
require => File["/etc/youri"],
content => template("buildsystem/youri_acl.conf")
}
+
+ file { '/usr/local/bin/submit_package':
+ ensure => present,
+ mode => 755,
+ content => template('buildsystem/submit_package')
+ }
}
define sshuser($homedir, $comment) {
Added: puppet/modules/buildsystem/templates/submit_package
===================================================================
--- puppet/modules/buildsystem/templates/submit_package (rev 0)
+++ puppet/modules/buildsystem/templates/submit_package 2011-01-17 18:25:08 UTC (rev 817)
@@ -0,0 +1,25 @@
+#!/bin/sh
+
+packagersgroup="<%= packagers_group %>"
+createsrpm="<%= createsrpm_path %>"
+
+function isingroup()
+{
+ grp="$1"
+ for group in `groups`
+ do if [ "$grp" = "$group" ]
+ then
+ return 0
+ fi
+ done
+ return 1
+}
+
+if ! isingroup "$packagersgroup"
+then
+ echo "You are not in $packagersgroup group."
+ exit 1
+fi
+
+exec $createsrpm "$*"
+
Property changes on: puppet/modules/buildsystem/templates/submit_package
___________________________________________________________________
Added: svn:executable
+ *
-------------- next part --------------
An HTML attachment was scrubbed...
URL: </pipermail/mageia-sysadm/attachments/20110117/1f841e3e/attachment.html>
More information about the Mageia-sysadm
mailing list