25000 "ˆl–äY>”ÊeJ�và]¸'TÅ£È ƒq§ÜÆÅ`/*! \page builddependencies Generating build dependencies automatically As we start updating packages for the next Red Hat distro, I'd like to see packages start to make use of build dependencies. Basically build dependencies are just like install dependencies, but they are resolved against the build system just after parsing the spec file. Syntactically, build dependencies look just like install dependencies in a spec file with "Build" prefixed: \verbatim BuildPreReq: BuildRequires: BuildConflicts: \endverbatim All the above dependencies include versions, files, existence/range tests, etc. The build dependency checking can also be turned off with --nodeps if necessary just like install dependency checking can. Eventually, build dependencies will be automated in rpm, but the major impediment to that effort is the engineering required to maintain the pretense that src rpm's are "noarch". Meanwhile, I've added a package called "InDependence-1.0" to powertools-6.2 that may be of use in detecting build dependencies that can be added to spec files as part of rebuilding packages for Red Hat 6.2. Here's a short example of how to generate the package/file names that were used while building gnorpm using InDependence: \verbatim rpm -U /mnt/redhat/comps/powertools/6.2/i386/InDependence-1.0-3.i386.rpm rpm -i /mnt/redhat/comps/dist/6.2/SRPMS/gnorpm-0.9-11.src.rpm cd /usr/src/redhat/SPECS dep -detail rpmbuild -ba gnorpm.spec >& xxx ... (the build will take longer since both dep and strace are pigs) ... grep -- '::' xxx > yyy \endverbatim \verbatim Aside: The dep perl wrapper is a "pig" only because it's exec'ing rpm -qf in order to turn filenames into package names. There are easier/faster ways to get this information... There's no way to speed up the /sbin/strace -q -etrace=open,execve -o ... command itself. The eventual implementation in rpm will snatch the same open/execve syscalls using LD_PRELOAD. Patches cheerfully accepted :-) \endverbatim Here's what's in yyy (\::\ format): \verbatim ORBit-devel-0.4.95-2::/usr/bin/orbit-config XFree86-libs-3.3.5-6::/usr/X11R6/lib/libICE.so.6 XFree86-libs-3.3.5-6::/usr/X11R6/lib/libSM.so.6 XFree86-libs-3.3.5-6::/usr/X11R6/lib/libX11.so.6 XFree86-libs-3.3.5-6::/usr/X11R6/lib/libXext.so.6 audiofile-0.1.9-1::/usr/lib/libaudiofile.so.0 autoconf-2.13-5::/usr/bin/autoconf autoconf-2.13-5::/usr/bin/autoheader autoconf-2.13-5::/usr/share/autoconf/acgeneral.m4 autoconf-2.13-5::/usr/share/autoconf/autoconf.m4f automake-1.4-5::/usr/bin/aclocal automake-1.4-5::/usr/bin/automake bash-1.14.7-16::/bin/sh bash-1.14.7-16::/etc/bashrc binutils-2.9.1.0.23-7::/usr/bin/strip binutils-2.9.1.0.23-7::/usr/lib/libbfd-2.9.1.0.24.so binutils-2.9.1.0.23-7::/usr/lib/libopcodes-2.9.1.0.24.so bzip2-0.9.5c-1::/usr/lib/libbz2.so.0 dev-2.7.10-2::/dev/null diffutils-2.7-16::/usr/bin/cmp egcs-1.1.2-25::/usr/bin/gcc egcs-1.1.2-25::/usr/lib/gcc-lib/i386-redhat-linux/egcs-2.91.66/specs esound-0.2.14-1::/usr/lib/libesd.so.0 file-3.27-3::/usr/bin/file file-3.27-3::/usr/share/magic fileutils-4.0-8::/bin/chgrp fileutils-4.0-8::/bin/chmod fileutils-4.0-8::/bin/chown fileutils-4.0-8::/bin/cp fileutils-4.0-8::/bin/ln fileutils-4.0-8::/bin/ls fileutils-4.0-8::/bin/mkdir fileutils-4.0-8::/bin/mv fileutils-4.0-8::/bin/rm fileutils-4.0-8::/usr/bin/install findutils-4.1-32::/usr/bin/xargs gawk-3.0.4-1::/bin/awk gawk-3.0.4-1::/bin/gawk gettext-0.10.35-13::/usr/bin/xgettext glib-1.2.5-1::/usr/lib/libglib-1.2.so.0 glib-1.2.5-1::/usr/lib/libgmodule-1.2.so.0 glib-devel-1.2.5-1::/usr/bin/glib-config glibc-2.1.2-13::/etc/localtime glibc-2.1.2-13::/etc/nsswitch.conf glibc-2.1.2-13::/lib/ld-linux.so.2 glibc-2.1.2-13::/lib/libc.so.6 glibc-2.1.2-13::/lib/libcrypt.so.1 glibc-2.1.2-13::/lib/libdb.so.2 glibc-2.1.2-13::/lib/libdl.so.2 glibc-2.1.2-13::/lib/libm.so.6 glibc-2.1.2-13::/lib/libnsl.so.1 glibc-2.1.2-13::/lib/libnss_d