David Greaves wrote:
When building locally in a qemu/chroot and debugging I find I want to edit the files in the chroot from my desktop gui editor but they're all owned by 399:399.
When needed I hack around that with a script that changes the group and mode to 664 :-)
This pair of patches allows me to set the uid:gid to match my local user and eases this process.
usage is: build --build-abuild-id uid:gid
Quite long, what about just using --uid?
The osc patch also adds --map-repo to aggregatepac which allows repository mapping(s) to be given as SRC=TARGET[,SRC=TARGET]
I'd recommend to post that as separate patch.
+ --build-abuild-id) + ABUILD_ID="$ARG" + if [[ ${BASH_VERSINFO[0]} -ge 3 && ! $ABUILD_ID =~ ^[0-9]{1,5}:[0-9]{1,5}$ ]] ; then
if test -n "${ABUILD_UID//[0-9]/}"; then ... works with bash2 too
if test $BUILD_USER = abuild ; then if ! egrep '^abuild:' >/dev/null <$BUILD_ROOT/etc/passwd ; then - echo 'abuild::399:399:Autobuild:/home/abuild:/bin/bash' >>$BUILD_ROOT/etc/passwd + echo "abuild::${ABUILD_UID}:${ABUILD_GID}:Autobuild:/home/abuild:/bin/bash" >>$BUILD_ROOT/etc/passwd
You should better check whether uids still match.
--- osc-0.117/osc/conf.py 2009-04-22 12:16:00.000000000 +0100 +++ osc-0.117lbt/osc/conf.py 2009-05-08 20:30:51.758699798 +0100 @@ -48,6 +48,7 @@ + 'build-abuild-id': '399:399',
osc shouldn't hard code that setting. Default should be empty ie don't pass the uid option. cu Ludwig -- (o_ Ludwig Nussel //\ V_/_ http://www.suse.de/ SUSE LINUX Products GmbH, GF: Markus Rex, HRB 16746 (AG Nuernberg) -- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-buildservice+help@opensuse.org