For about a month now, I have been running RedHat 9 on an Athlon-AMD 1G processor. I am currently using RedHat's version of kernel 2.4.20-28.9. This is my first Linux experience. I don't know whether what I'm about to describe has a
cause-and-effect relationship, I have system settings that I need to change or that I'm implementing RPM incorrectly. I do know that I'm having trouble deciphering error messages and "not-installed" installed RPM packages.
I have installed all of the update packages from RedHat and now want to back up these and other files I have downloaded. In preparing to back up I decided to install the latest release of
xCDroast. I obtained
- 1. xcdroast-0.98alpha15-1.GTK2.src.rpm
2. xcdroast-0.98alpha15.tar.gz
3. cdrtools-2.00.3-3.athlon.rpm
4. cdrtools-2.00.3-3.src.rpm
Using information from Googling, this forum, man pages, and the
xCDroast and cdrtools websites, I ran
Code:
$ rpmbuild --rebuild xcdroast-0.98alpha15-1.GTK2.src.rpm
There were no errors and two RPM packages got created
- xcdroast-0.98alpha15-1.i386.rpm
- xcdroast-debuginfo-0.98alpha15-1.i386.rpm
First of all I was surprised that I got
*.i386.rpm since I thought rpmbuild --rebuild recompiled the *.src.rpm for the system. But this surprise led to further discoveries. In reading "Maximum RPM, I learned that the RPM database didn't get updated by rpmbuild although it is supposed to install the package. So I ran a query to investigate. These are the results:
Code:
$ rpm -qi xcdroast
Name : xcdroast Relocations: (not relocateable)
Version : 0.98a13 Vendor: Red Hat, Inc.
Release : 4 Build Date: Sat 25 Jan 2003 02:26:57 AM CST
Install Date: Sun 18 Jan 2004 08:01:54 AM CST Build Host: porky.devel.redhat.com
So then naturally, I wanted to make sure that my new package updated the database. Therefore, I ran an install (actually update):
Code:
$ rpm -Uvh xcdroast-0.98alpha15-1.i386.rpm
error: Failed dependencies:
cdrtools-cdda2wav is needed by xcdroast-0.98alpha15-1
cdrtools-cdrecord is needed by xcdroast-0.98alpha15-1
cdrtools-mkisofs is needed by xcdroast-0.98alpha15-1
Not a problem. Next step.
Code:
$ rpm -Uvh cdrtools-2.00.3-3.athlon.rpm
warning: cdrtools-2.00.3-3.athlon.rpm: V3 DSA signature: NOKEY, key ID e01260f1
Preparing... ########################################### [100%]
And again attempted to install the
xCDroast package. Same results.
Although an rpm query indicated that
cdrtools is installed, here is some rather interesting information
Code:
$ file cdrtools*
cdrtools-2.00.3-3.athlon.rpm: RPM v4 bin i386 cdrtools-2.00.3-3
cdrtools-2.00.3-3.src.rpm: RPM v4 src i386 cdrtools-2.00.3-3
cdrtools-2.01a25-1.src.rpm: RPM v3 src i386 cdrtools-2.01a25-1
Doesn't look like there's anything to run.
I thought I would just start over, but rpm -e told me that cdrecord, mksofs and cda2wave all needed this package. It seemed like I had gone in a full circle.
Since I had the cdrtools*.src.rpm, I just thought I'd to a rebuild to see if there wasn't something in the *.ahtlon.rpm that was stopping me. The build failed:
Code:
RPM build errors:
user builder does not exist - using rootRPM build errors:
user builder does not exist - using root
group builder does not exist - using root
user builder does not exist - using root
group builder does not exist - using root
user builder does not exist - using root
group builder does not exist - using root
user builder does not exist - using root
group builder does not exist - using root
user builder does not exist - using root
group builder does not exist - using root
user builder does not exist - using root
group builder does not exist - using root
user builder does not exist - using root
group builder does not exist - using root
user builder does not exist - using root
group builder does not exist - using root
user builder does not exist - using root
group builder does not exist - using root
File not found by glob: /%{tmpdir}/cdrtools-2.00.3-root-root/usr/share/man/man8/mkisofs.8*
File not found by glob: /%{tmpdir}/cdrtools-2.00.3-root-root/usr/share/man/man8/mkhybrid.8*
File not found: /%{tmpdir}/cdrtools-2.00.3-root-root/usr/bin/mkhybrid
I "googled" this error and found nothing helpful. Except that "Maximum RPM"--what a book--talks about file permission in
%attr.
Added later
I did some more reading. Ch. 16 of "Maximum RPM" talks about non-root users building packages. When I did what I have described, I was logged on in the terminal as root. However, I'm wondering about the file permissions in the *.src.rpm and whether or not it reads the environment variables passed by RPM. Thinking that it might be safer to try to do this stuff in my own UID I was investigating the possibility of doing this build "not as root," and I succeeded only in adding more mud to the waters.
The
cdrtools spec file contains the line
Quote:
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
|
That tells me that I can build in an alternate directory. However,
Quote:
%install
rm -rf $RPM_BUILD_ROOT
install -d $RPM_BUILD_ROOT{%{_sysconfdir},%{_includedir}/schily/scg}
|
Does this statement re-define the Build_Root?
End of Addition
Unless someone comes up with something else I should investigate, I have the following questions:
- 1. Since I have both the "tarballs" would it be easier to learn how to compile my own packages?
2. Did the NOKEY cause the problem?
3. Does rpmbuild actually install the package like "Maximum RPM" it does or is there something else I should be looking for?
4. Does the solution lie in the %attr macro or %install section of the SPEC file? If so would someone, please, supply some tips on what to look for?
I'm looking forward to learning how to solve this.