Meego Wiki
Views

Local Build Without OBS Needed

From MeeGo wiki
(Difference between revisions)
Jump to: navigation, search
(Exec format error)
(Troubleshooting (ARM))
Line 70: Line 70:
one of reasons: maybe 'qemu-arm' is not right set.
one of reasons: maybe 'qemu-arm' is not right set.
Try command:'file /usr/bin/qemu-arm' ,and if its output show 'dynamically linked',and the problem maye is here,and it should be  'statically linked'.you can use commands 'rpm -i http://download.opensuse.org/repositories/home:/dl9pf:/qemu/Fedora_12/i386/qemu-devel-0.13git2010.06.24.1826-8.1.i386.rpm' to reinstall this part, and maybe you will meet some problem because of its dependencies ,and  you can uninstall all of them first.
Try command:'file /usr/bin/qemu-arm' ,and if its output show 'dynamically linked',and the problem maye is here,and it should be  'statically linked'.you can use commands 'rpm -i http://download.opensuse.org/repositories/home:/dl9pf:/qemu/Fedora_12/i386/qemu-devel-0.13git2010.06.24.1826-8.1.i386.rpm' to reinstall this part, and maybe you will meet some problem because of its dependencies ,and  you can uninstall all of them first.
 +
 +
=== rpm error ===
 +
This problem on ubuntu 10.04 when using 'build' to create a i686 rpm package.
 +
''Error:rpm: error while loading shared libraries: liblua-5.1.so: cannot open shared object file: No such file or directory''
 +
Please modify the '''/usr/lib/build/configs/default.conf''' in preinstall section add liblua.--[[User:Kismeter|Kismeter]] 15:02, 2 December 2010 (UTC)

Revision as of 15:02, 2 December 2010

Contents

Building your package using build

A more convenient package build way is to use 'build' which is a project from OpenSUSE, MeeGo build infrastructure used it.

You can get build binary package from http://repo.meego.com/MeeGo/tools/repos/ per your Linux distribution, if your Linux distribution isn't there, you can get build source package from http://www.gitorious.org/opensuse/build to build it yourself manually.

After you install it ( I suppose you know how to install a package on your Linux), you can run “build –help” to get help info.

You must run build as root. If your network needs proxy, please export proxy environment variables, for example:

export http_proxy=http://proxy.yourcompany.com:8080/
export no_proxy=localhost,127.0.0.0/8,.yourcompany.com, 172.16.0.0/16

If you used to run “sudo build …” and your network needs proxy, please ensure sudo to inherit proxy environment variables, you can do this by adding the below line to /etc/sudoers

Defaults    env_keep += "http_proxy no_proxy HTTP_PROXY NO_PROXY"

build also will check rpm package signature, so you must import public key of repository you're using, for example:

For http://repo.meego.com/MeeGo/builds/trunk/preview/core/repos/ia32/packages/

You can get its public key for http://repo.meego.com/MeeGo/builds/trunk/preview/core/repos/ia32/packages/repodata/repomd.xml.key

$ wget http://repo.meego.com/MeeGo/builds/trunk/preview/core/repos/ia32/packages/repodata/repomd.xml.key
$ sudo rpm --import repomd.xml.key

This command will build a cpio binary package for MeeGo.

build --repository http://repo.meego.com/MeeGo/builds/trunk/preview/core/repos/ia32/packages/ --arch i686 cpio-2.11-2.6.src.rpm

Optionally, you also can use spec file to build it, for this case, build will find your source tar ball and patches under current work dir.

build --repository http://repo.meego.com/MeeGo/builds/trunk/preview/core/repos/ia32/packages/ --arch i686 cpio.spec

build will base your repo URL to cache your repo, so please use the same URL string for the same repo every time (URL with / at the end of it and the same URL without / at the end of it will result in different cache dirs), you can use multiple --repository options to specify multiple repos, for example:

build --repository http://repo.meego.com/MeeGo/builds/trunk/preview/core/repos/ia32/packages/ \
    --repository http://repo.meego.com/MeeGo/builds/trunk/preview/netbook/repos/ia32/packages/ \
    --arch i686 meego-panel-applications-0.2.3-1.10.src.rpm

The default cache dir is /var/cache/build, you can use option –cachedir to set to other dir.

The default BUILDROOT dir is /var/tmp/build-root, you can use --root option to specify one more dir, once build is done, you can get your binary package in BUILDROOT, for example:

...
Wrote: /home/abuild/rpmbuild/SRPMS/cpio-2.11-2.meego.src.rpm
Wrote: /home/abuild/rpmbuild/RPMS/i586/cpio-2.11-2.meego.i586.rpm
Wrote: /home/abuild/rpmbuild/RPMS/i586/cpio-debuginfo-2.11-2.meego.i586.rpm
...

Your cpio binary package is /var/tmp/build-root/home/abuild/rpmbuild/RPMS/i586/2.11-2.meego.i586.rpm

Troubleshooting (ARM)

Exec format error

Meet this problem on fedora13 when using 'build' to create a armv7l rpm package. one of reasons: maybe 'qemu-arm' is not right set. Try command:'file /usr/bin/qemu-arm' ,and if its output show 'dynamically linked',and the problem maye is here,and it should be 'statically linked'.you can use commands 'rpm -i http://download.opensuse.org/repositories/home:/dl9pf:/qemu/Fedora_12/i386/qemu-devel-0.13git2010.06.24.1826-8.1.i386.rpm' to reinstall this part, and maybe you will meet some problem because of its dependencies ,and you can uninstall all of them first.

rpm error

This problem on ubuntu 10.04 when using 'build' to create a i686 rpm package. Error:rpm: error while loading shared libraries: liblua-5.1.so: cannot open shared object file: No such file or directory Please modify the /usr/lib/build/configs/default.conf in preinstall section add liblua.--Kismeter 15:02, 2 December 2010 (UTC)

Personal tools