Mailinglist Archive: opensuse-buildservice (244 mails)

< Previous Next >
Re: [opensuse-buildservice] [PATCH] run build under uid 0 when userootforbuild is used
  • From: Adrian Schröter <adrian@xxxxxxx>
  • Date: Mon, 25 Jun 2012 17:35:34 +0200
  • Message-id: <6877894.0j64s50vRF@scherben>
Am Montag, 25. Juni 2012, 16:24:47 schrieb Michal Vyskocil:
osc --userootforbuild setup the --build_uid to 0:0. When both specified,
--userootforbuild has bigger priority.
---
osc/build.py | 2 ++
1 file changed, 2 insertions(+)

diff --git a/osc/build.py b/osc/build.py
index 9f97063..6879a2e 100644
--- a/osc/build.py
+++ b/osc/build.py
@@ -442,6 +442,8 @@ def main(apiurl, opts, argv):
build_uid = config['build-uid']
if opts.build_uid:
build_uid = opts.build_uid
+ if opts.userootforbuild:
+ build_uid='0:0'

hm, the problem is that needs also to be permitted by the admin on server side.
So, just with this it will not have the same result as on the server.
I think we should export the used user via buildinfo.xml ...

if build_uid:
buildidre = re.compile('^[0-9]{1,5}:[0-9]{1,5}$')
if build_uid == 'caller':

--
Adrian Schroeter
SUSE Linux Products GmbH
email: adrian@xxxxxxx

--
To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@xxxxxxxxxxxx
To contact the owner, e-mail: opensuse-buildservice+owner@xxxxxxxxxxxx

< Previous Next >
References