[opensuse-buildservice] Permission denied for exec scripts in chroot enviroment.
hi, everybody I'm found that obs can not retain the files' permission in chroot build enviroment. 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- root/usr/share/doc/samba-3.0.33 + cp -pr examples/printing /var/tmp/samba-3.0.33- root/usr/share/doc/samba-3.0.33 + exit 0 error: Couldn't exec /usr/src/turbo/SOURCES/filter-requires-samba.sh: Permission denied getOutputFrom(): Broken pipe ========================================================== because the file have not excute permission, the exec will "Permission denied". 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 [ http://jianlee.ylinux.org ] -- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-buildservice+help@opensuse.org
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 enviroment.
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- root/usr/share/doc/samba-3.0.33 + cp -pr examples/printing /var/tmp/samba-3.0.33- root/usr/share/doc/samba-3.0.33 + exit 0 error: Couldn't exec /usr/src/turbo/SOURCES/filter-requires-samba.sh: Permission denied getOutputFrom(): Broken pipe ==========================================================
because the file have not excute permission, the exec will "Permission denied".
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 [ http://jianlee.ylinux.org ]
-- Adrian Schroeter SUSE Linux Products GmbH email: adrian@suse.de -- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-buildservice+help@opensuse.org
On Wed, Jan 27, 2010 at 04:30:34PM +0800, Jian Lee wrote:
---------------------------------------------------------- + cp -pr examples/autofs examples/LDAP examples/libsmbclient examples/misc examples/printer-accounting /var/tmp/samba-3.0.33- root/usr/share/doc/samba-3.0.33 + cp -pr examples/printing /var/tmp/samba-3.0.33- root/usr/share/doc/samba-3.0.33
More than a bit off topic but 3.0.33 isn't only old it's also no longer feed with security updates. See for example http://news.samba.org/releases/3.0.37/ Please feel free to contact me directly if you need additional input on this and like to offer more input why you need 3.0. Lars -- Lars Müller [ˈlaː(r)z ˈmʏlɐ] Samba Team SUSE Linux, Maxfeldstraße 5, 90409 Nürnberg, Germany
participants (3)
-
Adrian Schröter
-
Jian Lee
-
Lars Müller