mirror of
https://github.com/openSUSE/osc.git
synced 2025-02-04 02:26:16 +01:00
Merge branch 'build-as-user' of https://github.com/adrianschroeter/osc
Allow a local build as the current user/support an empty su-wrapper config option.
This commit is contained in:
commit
4e9dde71b8
1
NEWS
1
NEWS
@ -4,6 +4,7 @@
|
||||
- add build --stage flag. Useful for example for fixing file lists and just
|
||||
running the install section to see the result of it (use --stage=i=).
|
||||
Check the help for more details.
|
||||
- allow to run build script as non-root, by setting su-wrapper empty
|
||||
|
||||
0.172.0
|
||||
- support --lastsucceeded/--last-succeeded in "osc buildlog", "osc
|
||||
|
@ -552,6 +552,7 @@ def run_build(opts, *args):
|
||||
cmd += args
|
||||
|
||||
sucmd = os.environ.get('OSC_SU_WRAPPER', config['su-wrapper']).split()
|
||||
if sucmd:
|
||||
if sucmd[0] == 'su':
|
||||
if sucmd[-1] == '-c':
|
||||
sucmd.pop()
|
||||
@ -1341,6 +1342,7 @@ def main(apiurl, opts, argv):
|
||||
|
||||
if need_root:
|
||||
sucmd = config['su-wrapper'].split()
|
||||
if sucmd:
|
||||
if sucmd[0] == 'su':
|
||||
if sucmd[-1] == '-c':
|
||||
sucmd.pop()
|
||||
|
@ -219,6 +219,8 @@ apiurl = %(apiurl)s
|
||||
|
||||
# Wrapper to call build as root (sudo, su -, ...)
|
||||
#su-wrapper = %(su-wrapper)s
|
||||
# set it empty to run build script as user (works only with KVM atm):
|
||||
#su-wrapper =
|
||||
|
||||
# rootdir to setup the chroot environment
|
||||
# can contain %%(repo)s, %%(arch)s, %%(project)s, %%(package)s and %%(apihost)s (apihost is the hostname
|
||||
|
Loading…
Reference in New Issue
Block a user