Чтв, 2003-11-27 у 23:13, Fezzik Giant написав: > Yes, I've recently looked at the LFS book. I wish it was scripted :) > > Right now the package dependencies are getting in my way (in terms of a > manual process). I'm thinking of writing a script that extracts the > 'BuildRequires' tags, creates a directed graph of the build dependencies (as > different from the installation dependencies), does a topological sort on > the graph and kicks off the build process. > > I would love to get some comments on this approach. Hopefully it's been done > and someone can send a link. I'm using rather simple prototype of build system written in python. This is not a complete solution, but it works well for me. It works this way: 1. It analyzes spec file and determines list of packages needed to build(BuildReq BuildPreReq fields). 2. Append to this list basic packages needed to build (gcc, rpm-build ...) 3. Recursively determines all packages needed by packages from this list and appends them to list too. 4. Installs them in chroot jail, copies spec and sources, setup environment 5. Build package in chroot 6. If all is Ok, it copies built packages to package set and remove chroot jail. This approach has several advantages 1. You don't break your system anyhow. 2. You always build against actual RPMs 3. This way can be built package to any version of distribution, everything you need is set of its RPM packages. You don't need several virtual or real machines for this. 4. You save disk space, since you don't need to have installed all development packages needed to build every package in distribution. 5. It helps to discover missing dependencies between packages. If some dependency is missing - required package wont be installed in chroot, therefore you cannot built your package until you fix it. Disadvantages: 1. Installing packages in chroot jail need 1-2 minutes on Athlon 2.4GHz with IDE disk. It is possible to reduce this time using RAID. It would be great to append dependencies resolution scheme to build several source packages automatically. But it's impossible for me now because many Fedora packages have missing dependencies and build process stops very often. PS. Sorry for poor English. -- Maxim Dziumanenko <mvd mylinux com ua> myLinux
Attachment:
signature.asc
Description: =?koi8-r?Q?=E3=C0?= =?koi8-r?Q?_=DE=C1=D3=D4=C9=CE=D5?==?koi8-u?Q?_=D0=CF=D7=A6=C4=CF=CD=CC=C5=CE=CE?==?koi8-u?Q?=D0=CF=D7=A6=C4=CF=CD=CC=C5=CE=CE=D1?==?koi8-u?Q?_=D0=A6=C4=D0=C9=D3=C1=CE=CF?==?koi8-r?Q?_=C3=C9=C6=D2=CF=D7=C9=CD?==?koi8-u?Q?_=D0=A6=C4=D0=C9=D3=CF=CD?=