Mailinglist Archive: opensuse-buildservice (306 mails)

< Previous Next >
Re: [opensuse-buildservice] Permission denied for exec scripts in chroot enviroment.
  • From: Adrian Schröter <adrian@xxxxxxx>
  • Date: Wed, 27 Jan 2010 09:50:08 +0100
  • Message-id: <201001270950.08762.adrian@xxxxxxx>
Am Mittwoch, 27. Januar 2010 09:30:34 schrieb Jian Lee:
hi, everybody

I'm found that obs can not retain the files' permission in chroot build

Yes, this is intended, because this is not working via http and going
forward storing attributes may also depend on the filesystem.

The recommended solution for this is to install it via "install -m 0755"
or flag it via %attr in %file section.

In my local obs server, the build result of many packages have errors
like following:

+ cp -pr examples/autofs examples/LDAP examples/libsmbclient
examples/misc examples/printer-accounting /var/tmp/samba-3.0.33-
+ cp -pr examples/printing /var/tmp/samba-3.0.33-
+ exit 0
error: Couldn't exec /usr/src/turbo/SOURCES/
Permission denied
getOutputFrom(): Broken pipe

because the file have not excute permission, the exec will "Permission

So I added "chmod a+x $BUILD_ROOT/$TOPDIR/SOURCES/*" before chroot in
/usr/lib/obs/server/build/build :

1535 chmod 755 $BUILD_ROOT/.build.command
1536 # Jian Lee: add the exec premission to all files
1537 chmod a+x $BUILD_ROOT/$TOPDIR/SOURCES/*
1538 chroot $BUILD_ROOT su -c /.build.command - $BUILD_USER <
/dev/null && BUILD_SUCCEEDED=true
1539 fi

Maybe next version can solve this problem.

Thanks, all


Jian Lee [ ]


Adrian Schroeter
SUSE Linux Products GmbH
email: adrian@xxxxxxx

To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: opensuse-buildservice+help@xxxxxxxxxxxx

< Previous Next >