Hi,

2009/2/3 fox <[email protected]>:
> Hi all:
> I'm new here. When I tried to use mic2 to create my first moblin image, I
> found that it is not supported on gentoo because of yum, and the
> moblin-image-creator needs to be run as root. So:
>    1. Is it possible to make mic2 to run in a "generic" linux dist?

Yes, yum is not bound to any distro and will run on a "generic linux".
 I'm running mic2 on my gentoo successfully, albeit there are some
catches.  I'll try to summarise the process:

* You'll need most of the same dependencies installed as you would on
other distros, most notably rpm and yum. (emerge yum)

* It seems that mic2 was written against an older version of yum.  To
get mic2 to work I needed the following change:

--- a/mic/imgcreate/yuminst.py
+++ b/mic/imgcreate/yuminst.py
@@ -83,7 +83,7 @@ class LiveCDYum(yum.YumBase):
         self.doTsSetup()
         self.doRpmDBSetup()
         self.doRepoSetup()
-        self.doSackSetup()
+        del self.pkgSack

     def selectPackage(self, pkg):
         """Select a given package.  Can be specified with name.arch or name*"""

While I don't really know python, it seems that .doSackSetup() is
deprecated and shouldn't be used anymore.  The moblin repos are added
to the YumBase instance after this call and at this point the
"pkgSack" has already been initialised.  Current yum will notice this
fact and will not update the "Sack", which, if you're on Gentoo (which
has nothing in /etc/yum/repos.d by default) will mean that there will
be no packages in the Sack and any package look-up will fail.
Deleting the .pkgSack will force yum to regenerate the "sack" later.

* Gentoo's rpm package is based off rpm5.org, which I'm told is not
supported by yum, and indeed results in some hard to explain errors.
You'll need to build the one from rpm.org manually:

emerge -C rpm
git clone http://rpm.org/git/rpm.git
cd rpm
CPPFLAGS="`nspr-config --cflags` `nss-config --cflags`"
LDFLAGS="`nspr-config --libs` `nss-config --libs`" ./configure
--enable-sqlite3 --with-external-db --without-lua --enable-python
make
make install
ldconfig
export PYTHONPATH=/usr/local/lib/python2.5/site-packages/

After that moblin-image-creator should run fine.

>    2. As an image creator, why does it need root privilege?

It mounts and unmounts filesystems, and more importantly chroots into
the target filesystem.  This has the ugly consequence that your host
needs to be an x86 with 32-bits support (so I'm currently running mic
on my netbook which is my only 32-bit machine left).

>    3. Is it possible to make mic2 working like OpenEmbedded or we already 
> have a plan?

A full-featured build-system (incidentally based on OE) was considered
at one point.  I can't comment on it though.

Cheers

_______________________________________________
Moblin dev Mailing List
[email protected]

To manage or unsubscribe from this mailing list visit:
https://lists.moblin.org/mailman/listinfo/dev or your user account on 
http://moblin.org once logged in.

For more information on the Moblin Developer Mailing lists visit:
http://moblin.org/community/mailing-lists

Reply via email to