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

Re: Building Debian Completely From Source



John Goerzen <jgoerzen@complete.org> writes:

> Hello,
> 
> For various reasons [1], I am interested in building Debian from source
> -- and continuing to do so for upgrades and newly-installed packages.
> 
> What I'm after is basically something where I can say:
> 
>   apt-foo install kde
> 
> The system will then:
> 
>  1. Look at kde and build/install any of its build-deps
>  2. Build kde
>  3. Build/install any Depends or Pre-Depends of kde
>  4. Install kde
> 
> (These four steps would be repeated for all dependencies that had to be
> filled.)
> 
> In other words, at no time would a .deb be downloaded.  All .debs would
> be built locally and installed locally.

There are several packages that have depends/build-depends
loops. Without having a previous version you can't build them. That
would make quite a bit of debian uninstalable for you.


The method I use here (still experimental stage) is to have the
original debian debs available for apt and a local repository of
compiled sources. A script in /etc/apt/apt.conf.d monitors any deb
that gets installed and adds original debian packages to the
autobuilder queue. The autobuilder fetches the source and adds a 0.0.1
to the version, a version higher than debians but lower than the next
version, build the package and uploads it to the local repository. The
next day an apt-get upgrade will upgrade to the locally build package.

The benefit is that you don't have to wait for days to install
something. You don't end up in deadlocks with dependency cycles
either.


To further minimise downloading of debian debs you can run a cron job
that runs

 apt-get update
 apt-get upgrade --some-options-to-trigger-the-build-without-download

Since I use my method for rebuilding custom kernel images instead of
actual debian debs I haven't bothered with the correct options yet.


> I'd also like to be able to say:
> 
>   apt-foo dist-upgrade
> 
> Which would essentially run the above steps and upgrade my system.
> Again, no .deb would ever be downloaded; they'd be built and installed
> locally.

I made a script for that and apart from needing some manual
interventions for dependency deadlocks, which was anoying on its own,
it also takes so long you never want to do this again.

Far better to have the compile going on in the background, overnight,
while you sleep. If you have more than one computer you want to only
compile every deb once too.

> We seem to already have the metadata necessary to do this, but as far as
> I can tell, our existing tools don't support it.  For instance:
> 
>  * apt-build has an option to build a package and all packages it
>    depends upon, but always downloads binary .debs of -dev packages.
>    (Or maybe I got this backwards; I'm not sitting at my apt-build
>    machine right now.)
> 
>  * pbuilder and sbuild don't bother with actual installation,
>    so they don't resolve dependencies at all.  Also, they only download
>    .debs of build-deps.
> 
> The nearest I have seen is fink, but I know little about it.
> 
> Am I missing something?  Is anyone working on this?

buildd, wanna-build?

MfG
        Goswin



Reply to: