On Tue, May 29, 2012 at 4:14 PM, David Greaves <[email protected]> wrote:

> On 29/05/12 02:02, Hui Zhang wrote:
> > hi, all,
> >
> >    Is there any convinent way to setup a full building environment
> locally, just
> > like making a rootfs with all the package-devel in it, then I can chroot
> to it
> > to do any building.
>
> This isn't too hard to do but we do have tasks to make it even easier and
> to tie
> it to the osc approach.
>
> You'll almost certainly want cross compilation too so see:
>  http://wiki.merproject.org/wiki/Platform_SDK_and_SB2
>
> The main thing is that there's no easy way to say what "all the
> package-devel"
> tools are for any situation. For now you have to install any -devel
> pacakages to
> the target (see the "Compile the simple C program" section).
>
> This gives you a traditional "messy" environment that's linked to your
> home area
> and can just be used to compile src.
>
Good, I think http://wiki.merproject.org/wiki/Platform_SDK_and_SB2 would be
the final solution? I will try this.


>
> Let me just see if I can make life a bit easier on the osc side too:
>
> >    At this moment, when we build src-tarball,we following the steps:
> >    1. tar the src to src.tar.gz
> >    2. write spec file, adding BuildRequres
> >    3. Upload src.tar.gz and spec to OBS.
> >    4. checkout the project and package to local.
> >    5. osc build(to downloading all the build-requirements to local)
> >    6. osc chroot to the build envirement of Mer
> >    7. under osc chroot, modify the source codes.
> >    The steps 4,5,6,7 is a little boring:)
>
> Yes :)
>
> You can skip some of these steps and re-use them though.
>
> I would do 1,2,4,5 (skipping 3), then I'd bind mount the git repo for the
> source
> from my home to the osc chroot... then "osc chroot".
>
> At this point I repeat
> * "make" (or rpmbuild)
> * test
> * edit code
> until I'm happy.
> (If you do use this approach make sure you don't remove the build root
> without
> removing the bind-mount)
>
> Hopefully one of these approaches will work - let me know and if anyone
> has any
> improvements then please share.
>
> David
>
> --
> "Don't worry, you'll be fine; I saw it work in a cartoon once..."
>

Reply via email to