This is part of The Pile, a partial archive of some open source mailing lists and newsgroups.
Subject: RE: Rebuilding RPMs From: Bernhard Rosenkraenzer <bero@redhat.de> Date: Sun, 28 Nov 1999 18:55:09 +0100 (CET) On Sun, 28 Nov 1999, patrick wrote: > You may run into some src that doesn't like any target > other than i386. XFree86 didn't like my use of target > i686, indicating that it wasn't an arch that was > supported for optimizing. Not related to optimizing. XFree86 uses ExclusiveArch to prevent you from building it on platforms the patches contained in the RPM haven't been tested with, such as PowerPC. i[456]86 weren't included because the i386 version works on those. The correct "fix" is to change a line in the XFree86-3.3.5.spec from Exclusivearch: i386 alpha sparc m68k armv4l to Exclusivearch: i386 i486 i586 i686 alpha sparc m68k armv4l === Subject: Rebuilding RPMS (fwd) - Take II :) From: "Michael J. McGillick" <mike@universe.ne.mediaone.net> Date: Mon, 13 Dec 1999 09:34:22 -0500 (EST) Morning: didn't see any replies to this previous post, so I thought I would try again. :) - Mike ------------------------------------------------------------------------- Morning Everyone: I've been playing around with rebuilding RPMS for the past 2 weeks. Some have gone smoothly, with absolutely no warnings, errors, etc. I'm trying to optimize these and compile them as i686 instead of i386 binaries. The steps I've done so far are this: 1) Gone into the file /usr/lib/rpm/rpmrc and modified the line: optflags: i386 -O2 -m486 -fno-strength-reduce with: optflags: -O3 -mpentiumpro -DCPU=i686 -fno-strength-reduce -fexpensive-optimizations -ffast-math -funroll-loops -fomit-frame-pointer This is all on one line, btw. Just broken up here for clarity. 2) Downloaded the srpms for all of the packages in the 6.1 distribution. 3) Doing one at a time, I install the source by doing: rpm -i filename-version.src.rpm 4) Then, in the /usr/src/redhat/SPECS directory I type: rpm -ba --target i686 filename.spec Now, like I said, some of these build just fine. I see all of the messages scroll past, and that it's compiling this file or that, and then at the end, I will usually see something like this (this happened to be on a rebuild of dhcp I was doing): Finding Provides: (using /usr/lib/rpm/find-provides)... Finding Requires: (using /usr/lib/rpm/find-requires)... PreReq: /bin/sh Requires: ld-linux.so.2 libc.so.6 /bin/sh libc.so.6(GLIBC_2.0) libc.so.6(GLIBC_2.1) Obsoletes: dhcpd Wrote: /usr/src/redhat/SRPMS/dhcp-2.0-3.src.rpm Wrote: /usr/src/redhat/RPMS/i686/dhcp-2.0-3.i686.rpm Executing: %clean + umask 022 + cd /usr/src/redhat/BUILD + cd dhcp-2.0 + rm -rf /var/tmp/dhcp-root + exit 0 Sure enough, if I go into /usr/src/redhat/RPMS/i686, the new binary is there. If I get to this point, can I assume that the binary rebuilt properly, or is there something else that I need to check. Secondly, is this package really optimized, or do I need to do something to the .tar.gz source code to really optimize it, IE. use pmake or egcs? In other instances, I have gotten a message that says something similare to this when I try to rebuild: # rpm -ba --target i686 filename.spec Building target platforms: i686 Building for target i686 Architecture is not included: i686 # What I've done in this case is go into the spec file, and change the line that says: ExclusiveArch: i386 sparc sparc64 to: ExclusiveArch: i386 i486 i586 i686 sparc sparc64 In most cases, this allows it to rebuild fine. However, I've run into about 15 RPMS so far that I haven't been able to rebuild. Take anonftp for one. Here is what the whole output from the rebuild process shows: /usr/src/redhat/SPECS: rpm -ba --target i686 anonftp.spec Building target platforms: i686 Building for target i686 Executing: %prep + umask 022 + cd /usr/src/redhat/BUILD + rm -rf /var/tmp/anonftp-root + exit 0 Executing: %install + umask 022 + cd /usr/src/redhat/BUILD + rm -rf /var/tmp/anonftp-root + mkdir -p /var/tmp/anonftp-root/home/ftp + mkdir -p /var/tmp/anonftp-root/home/ftp/pub + mkdir -p /var/tmp/anonftp-root/home/ftp/etc + mkdir -p /var/tmp/anonftp-root/home/ftp/bin + mkdir -p /var/tmp/anonftp-root/home/ftp/lib + cat + cat + cp -fd /etc/ld.so.cache /var/tmp/anonftp-root/home/ftp/etc + cp -fd /lib/libc.so.6.1 /lib/libc-2.1.1.so /var/tmp/anonftp-root/home/ftp/lib cp: /lib/libc.so.6.1: No such file or directory cp: /lib/libc-2.1.1.so: No such file or directory Bad exit status from /var/tmp/rpm-tmp.77624 (%install) Am I incorrect in assuming that if I have every package installed on my machine from a CD based 6.1 distribution, all libraries, everything, that I should be able to rebuild packages just like Red Hat builds them? Does Red Hat have some different machine set up with extra libraries on that they build all of these packages on? In the previous example, I see the two lines at then end that say those files (libraries I'm assuming) can't be copied, and sure enough, they aren't there. So if Red Hat is using what I am, why would it build for them and not the end user? Anyone who has experience in building these packages, I would really be interested in setting up a friendship with and discussing more about this topic. I've bought the book Maximum RPM, and understand some of what is going on. I'd really like to rebuild my 6.1 distribution with .i686 binaries instead of the standard .i386. I know Mandrake uses .i586, but when asking around, haven't run into a lot of people who are using it. ===