0

我只是设置了 chroot 环境来在 opensuse 中构建包。对于 chroot,我关注了http://blog.zenlinux.com/?p=428和其他一些来源。用于构建包http://en.opensuse.org/openSUSE:Build_Service_Tutorial

我坚持运行 osc 来构建包:

# osc co server:database mysql-workbench
A    server:database
A    server:database/mysql-workbench
A    server:database/mysql-workbench/mysql-workbench-gpl-5.2.44-avoid-version.patch
A    server:database/mysql-workbench/mysql-workbench-gpl-5.2.44-ctemplate-fix.patch
A    server:database/mysql-workbench/mysql-workbench-gpl-5.2.45-src.tar.gz
A    server:database/mysql-workbench/mysql-workbench.changes
A    server:database/mysql-workbench/mysql-workbench.spec
A    server:database/mysql-workbench/openSUSE_(Vendor_Package).xml
At revision 43cda63b296f40fa371cdb52a8e957d2.

# cd server:database/mysql-workbench
# osc -vt build openSUSE_12.2 x86_64 mysql-workbench.spec 
makeurl: https://api.opensuse.org ['source', 'server:database', '_meta'] []
makeurl: https://api.opensuse.org ['source', 'server:database', 'mysql-workbench'] cmd=getprojectservices
Run source service: /usr/lib/obs/service/format_spec_file --outdir /tmp/tmprT4XTU
Run source service: /usr/lib/obs/service/source_validator --outdir /tmp/tmp_tAFQr
Building mysql-workbench.spec for openSUSE_12.2/x86_64
Getting buildinfo from server and store to /root/repo/server:database/mysql-workbench/.osc/_buildinfo-openSUSE_12.2-x86_64.xml
makeurl: https://api.opensuse.org ['build', 'server:database', 'openSUSE_12.2', 'x86_64', 'mysql-workbench', '_buildinfo'] ['add=vim', 'add=gdb', 'add=strace', 'add=valgrind']
Getting buildconfig from server and store to /root/repo/server:database/mysql-workbench/.osc/_buildconfig-openSUSE_12.2-x86_64
makeurl: https://api.opensuse.org ['build', 'server:database', 'openSUSE_12.2', '_buildconfig'] []
Updating cache of required packages
0.0% cache miss. 421/421 dependencies cached.

makeurl: https://api.opensuse.org ['source', 'server:database', '_pubkey'] []
makeurl: https://api.opensuse.org ['source', 'openSUSE:12.2', '_pubkey'] []
Verifying integrity of cached packages
using keys from server:database, openSUSE:12.2
Writing build configuration
Running build
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/osc/babysitter.py", line 53, in run
    return prg.main()
  File "/usr/lib/python2.7/site-packages/osc/cmdln.py", line 310, in main
    return self.cmd(args)
  File "/usr/lib/python2.7/site-packages/osc/cmdln.py", line 333, in cmd
    retval = self.onecmd(argv)
  File "/usr/lib/python2.7/site-packages/osc/cmdln.py", line 449, in onecmd
    return self._dispatch_cmd(handler, argv)
  File "/usr/lib/python2.7/site-packages/osc/cmdln.py", line 1179, in _dispatch_cmd
    return handler(argv[0], opts, *args)
  File "/usr/lib/python2.7/site-packages/osc/commandline.py", line 5201, in do_build
    return osc.build.main(self.get_api_url(), opts, args)
  File "/usr/lib/python2.7/site-packages/osc/build.py", line 914, in main
    rc = subprocess.call(cmd)
  File "/usr/lib64/python2.7/subprocess.py", line 493, in call
    return Popen(*popenargs, **kwargs).wait()
  File "/usr/lib64/python2.7/subprocess.py", line 679, in __init__
    errread, errwrite)
  File "/usr/lib64/python2.7/subprocess.py", line 1249, in _execute_child
    raise child_exception
OSError: [Errno 2] No such file or directory
[Errno 2] No such file or directory

知道为什么我得到“没有这样的文件或目录”吗?或任何提示我该如何调试?

4

2 回答 2

0

看起来您可能缺少/usr/bin/build实际在 chroot 中运行 rpmbuild 的程序。它在一个名为build.

于 2013-03-28T18:32:23.940 回答
0

问题不见了sudo

我直接在 irc 上向开发人员询问了这个问题,经过一些调试,我们发现我错过了sudo。他们已经同意osc应该更精确地丢失sudo,所以这可能已经在新osc版本中修复。

于 2013-03-28T20:56:51.053 回答