Mailinglist Archive: opensuse-buildservice (244 mails)

< Previous Next >
Re: [opensuse-buildservice] Re: [PATCH] run build under uid 0 when userootforbuild is used
On 2012-06-27 14:32:24 +0200, Michal Vyskocil wrote:
On Wed, Jun 27, 2012 at 02:22:54PM +0200, Marcus Hüwe wrote:
Hi,

On 2012-06-25 16:24:47 +0200, Michal Vyskocil wrote:
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'

Normally this is not needed (given that you have a "# needsrootforbuild"
line in your spec file).

Well, the osc build --userootforbuild did not work for me even the
#needsrootforbuild was not present.

It _has_ to be present otherwise "build" still builds as "abuild" (or
the passed abuild user). That is in order to build as root the following
is necessary:
- "osc build --userootforbuild"
- a "# needsrootforbuild" line in the spec file


Adding --build_uid=0:0 made my build as root.


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

< Previous Next >
Follow Ups