Changelog 3/5/2009 New in Version 4.76.24-3
Eli Wapniarski
eli at orbsky.homelinux.org
Tue May 5 14:29:28 IST 2009
On Tuesday 05 May 2009 15:55:21 Julian Field wrote:
>
> On 05/05/2009 13:36, Eli Wapniarski wrote:
> > On Tuesday 05 May 2009 14:07:00 Julian Field wrote:
> >
> >> On 05/05/2009 11:12, Eli Wapniarski wrote:
> >>
> >>> On Tuesday 05 May 2009 11:15:39 Julian Field wrote:
> >>>
> >>>
> >>>> On 05/05/2009 08:41, Eli Wapniarski wrote:
> >>>>
> >>>>
> >>>>> One more query.
> >>>>>
> >>>>> One thing I don't understand, is the use of the BuildArch: parameter in the spec file.
> >>>>>
> >>>>>
> >>>>>
> >>>>>> From my understanding... rpm will automatically figure out the platform that a package is being built for. I get similar output for serveral packages when building on my server. One of things that you will notice is that there is a line that reads
> >>>>>>
> >>>>>>
> >>>>> Requires: libc.so.6()(64bit) libc.so.6(GLIBC_2.2.5)(64bit) rtld(GNU_HASH)
> >>>>>
> >>>>>
> >>>>> Processing files: perl-IO-1.2301-4-noarch
> >>>>> Provides: IO.so()(64bit) perl(IO) = 1.23 perl(IO::Dir) = 1.06 perl(IO::File) = 1.14 perl(IO::Handle) = 1.27 perl(IO::Pipe) = 1.13 perl(IO::Pipe::End) perl(IO::Poll) = 0.07 perl(IO::Seekable) = 1.10 perl(IO::Select) = 1.17 perl(IO::Socket) = 1.30 perl(IO::Socket::INET) = 1.31 perl(IO::Socket::UNIX) = 1.23
> >>>>> Requires(rpmlib): rpmlib(CompressedFileNames)<= 3.0.4-1 rpmlib(PayloadFilesHavePrefix)<= 4.0-1 rpmlib(VersionedDependencies)<= 3.0.3-1
> >>>>> Requires: libc.so.6()(64bit) libc.so.6(GLIBC_2.2.5)(64bit) rtld(GNU_HASH)
> >>>>> error: Arch dependent binaries in noarch package
> >>>>>
> >>>>>
> >>>>> RPM build errors:
> >>>>> Arch dependent binaries in noarch package
> >>>>>
> >>>>>
> >>>>> Please correct me where appropriate. I am only trying to gain a better understanding as to what's involved in the packaging and rebuilding.
> >>>>>
> >>>>> So... from what I'm reading the error being generated is correct in that libc on 64bit platform can either be the x86_64 library or the i386 library (if the i386 support files are included). Be that as it may, on my x86_64 bit platform I only want to compile and rebuild 64bit libraries (perl modules included). From my understanding Mailscanner itself is platform agnostic in that it is a script and will run properly if the environment variables are set correctly.
> >>>>>
> >>>>> So I guess in the end I'm asking why not remove the
> >>>>>
> >>>>> BuildArch: noarch
> >>>>>
> >>>>> from the spec file?
> >>>>>
> >>>>>
> >>>> I can't remove it altogether, as the BuildArch selects where the RPM
> >>>> file is put, which I need to know to be able to install it.
> >>>>
> >>>>
> >>> I think that rpm takes care of it. In that without the BuildArch, Using the %{libdir} macorw would install perl libraries in /usr/lib64 on 64bit platforms and /usr/lib on 32bit platforms. You shouldn't have to worry about this sort of thing (I think).
> >>>
> >>>
> >> That's not the issue. When you do a "rpmbuild --rebuild" on the SRPM, it
> >> puts it in /root/rpmbuild/RPMS/<arch> directory, where<arch> is the
> >> BuildArch. If I don't specify it, then I don't know where it put the
> >> final RPM that I'm trying to install!
> >>
> >>
> > Actually.... I've just done some research on this and as a matter of fact you do. Now I'm not trying to be a smart aleck. Cause I am by no stretch of the imagination an expert with regular expressions, however
> >
> > On my x86_64 platform
> >
> > rpm --showrc | grep "build arch"
> >
> > shows
> >
> > build arch : x86_64
> > compatible build archs: x86_64 noarch
> >
> > and on my i686 system
> >
> > build arch : i386
> > compatible build archs: i686 i586 i486 i386 noarch fat
> >
> > Now, it would seem to me (if you had the time of course) that if you could parse out the "build arch" line, you would know where the rpms are being built and you can have your script install the files where required.
> >
> But that does not tell you if it decided to build the rpm with
> i386/x86_64 or noarch. So it only partially helps. I already work out
> whether it's i386 or x86_64, I can do that already very easily. What I
> *don't* know is whether it decided it was a noarch RPM or not.
>
I don't believe that you need to worry about it. The packages will be built in the directory build arch is configured for by the distro. (ie /root/rpmbuild/RPMS/x86_64, or /root/rpmbuild/RPMS/i386 or /root/rpmbuild/RPMS/i586. no arch is not required and confusing.
I'm assuming that you're worried about running the rpm -Uvh / -ivh package command. Like I said I'm not trying to be too smart but, with the right regular expression you could grep "build arch" into a variable and then you would be able to exec rpm -Uvh /root/rpmbuild/RPMS/BuildArchVariable or however it is that you get the packages installed.
That would take care of the issues regarding noarch and arch dependant variables. You then do not need to specify whch arch you are installing on. The system will do that for you. It is probably the shape of things to come for upcoming Redhat and Centos versions and probably anything else that relies on RPM for package management since Fedora is probably the first to incorporate the latest greatest version.
Of course, its your baby and your decisions regarding how you wish to build and have MailScanner installed on the system. I am grateful for the insight you have provided. I will personally be doing some additional digging into this.
Thank You for this great and wonderful tool. A loyal user.
Eli
--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
More information about the MailScanner
mailing list