[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Hopeful get Emdebian on i386 working! with a little help!! please

On Thu, 2008-01-24 at 08:38 +0000, Tim Massey wrote:
> >> Emdebian needs to be built inside Debian. Create the Debian environment
> >> and then install emdebian-tools into that environment, get the package
> >> source into the environment and work in there.
> >>
> >> Once built, Emdebian packages are then installed to give you an
> >> Emdebian environment that has *no* package building support. (Otherwise
> >> you'd simply install Debian on the device and build what you need on
> >> the device itself.)
> >> Ok this confuses me a little what are you saying install debain, then
> > apt-get emdedian-tools then apt-get source xyz.
> > Create a Debian chroot for unstable.
> > chroot into that environment
> > install emdebian-tools
> > emsource
> > build.
>  From this list above it seems that you have a Debian chroot for 
> unstable which is effectively a working copy of Debian 

Yes - although you will still need lots of packages installed to make it
a usable building environment. A bare debootstrap chroot is just enough
to install Debian, not really to run Debian.

Even that is too big for Emdebian users so we emdebianise Debian
packages to make them smaller so that when it comes to installing on the
actual device, the Emdebian root filesystem (which can be used as a
chroot in testing) is 70% smaller than a default debootstrap root

> then you replace 
> packages one by one with emdebian-tools via emsource

No. You do not install the packages again, they are already installed in
the chroot. You need to install the build dependencies.

Once built, the packages need to be copied into a local repository from
where you can make your selections to create a root filesystem and make
packages available to users to choose their installed package set.

>  and "build" by 
> build I guess you mean *emdebuild or do you mean *./configure make make 
> install*


This is an Emdebian version of debuild - read the manpage for that.
debuild calls dpkg-buildpackage which is where the work is really done.
In turn, dpkg-buildpackage calls debian/rules which in turn
calls ./configure ; make ; make install.

You need to understand how Debian packages are built before you start
playing with Emdebian packaging. Read:

> I understand that all emdebian packages are derived from debian packages 
> but what I don't understand how the that magic happen because currently 
> it seems to be magic to get the debain package to an emdebain package, I 
> am sure its not and I have just completely miss the use of a tool or the 
> point where I have to edit the make files then just use make install for 
> example

emsource checks out the emdebian patch files from Emdebian SVN and
applies those patches to the source tree created by emsource (via an
internal call to apt-get source).

Emdebian patches Debian to make an Emdebian package (with em[\d]+ suffix
appended to the version string).

apt-get source gets the .orig.tar.gz, the .diff.gz (if any) and the .dsc
from Debian repositories, expands the .orig.tar.gz and applies the
patches contained in the .diff.gz. emsource then picks up the Debian
source and applies the patches checked out from Emdebian SVN to make an
Emdebian package out of the Debian one.

> To install a standard package from source
> $ wget http://source.org/example.tar.gz

No. Upstream == Debian so you always get the Debian source package with
apt-get source (or you could use dget -x).

> $ tar zxvf example.tar.gz
> $ cd example
> $./configure
> $ make
> $ make install

That is upstream building. You build the package using Debian tools -
emdebuild calls dpkg-buildpackage.

> How does building a emdebain package differ these are the 6 standard 
> steps to install anything from source

Emdebian source == Debian packages, not upstream because Emdebian IS

> By edit the files do you mean such things like adding CFLAGS = -O2 for 
> optimizations etc stripping docs out??

No, use DEB_BUILD_OPTIONS to set nodocs, and nocheck, edit debian/rules
and other files in debian/ to modify the package, disable unwanted
components by adding --disable-foo commands to the call to ./configure
in debian/rules, remove calls to install that bring in unwanted files
like manpages if the package does not use dh_installman (em_make removes
calls to dh_installman and other debhelper scripts).

Emdebian builds a smaller version of Debian - NOT a smaller version of
upstream. If you want to do that, use OpenEmbedded.

> I guess what I am saying is, I guessed that there would be a procedure 
> to follow for a package to become emdebianized but I seems not or am I 
> wrong??

em_make followed by manual edits of files in debian/ for a new package
emsource for an existing package.



> for example I could get apt build it with some optimization strip the 
> docs out then it would be a emdebian app??

No. It would be a customised Debian package. Emdebian hasn't got a firm
Policy as yet but the idea is that the current patch set more-or-less
represents Emdebian Policy. i.e. if you use emsource, you build an
Emdebian package. If you use em_make and edit the package such that
emdebuild does not report any test failures after the build, then you
have built an Emdebian package.

> Ok I think this makes sence I would use em_make then .emdebuild

Drop this . business - it is emdebuild - nothing else.


Neil Williams

Attachment: signature.asc
Description: This is a digitally signed message part

Reply to: