LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 02-02-2004, 12:53 PM   #1
farmerdan
Member
 
Registered: Feb 2004
Location: IA-MO State Line
Distribution: Ubuntu 10.04
Posts: 59

Rep: Reputation: 15
Upgrading xcdroast Failed


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.

Last edited by farmerdan; 02-02-2004 at 03:35 PM.
 
Old 02-02-2004, 10:11 PM   #2
linuxlah
Member
 
Registered: Jun 2002
Location: Batu Puteh, Malaysia
Distribution: (Mandrake 8.2) (Redhat 7.2,8.0,9.0) (Slackware 9.0,9.1)
Posts: 154

Rep: Reputation: 30
Why don't you do this . Do a rpm -ivh xxx.src.rpm . Then go to /usr/src/redhat/SPECS. Then do a rpmbuild -bb xxx.spec and see wheathe you can get a xxx.athlon.rpm. This is what I do when I have a src.rpm.
 
Old 02-03-2004, 07:54 PM   #3
DavidPhillips
LQ Guru
 
Registered: Jun 2001
Location: South Alabama
Distribution: Fedora / RedHat / SuSE
Posts: 7,163

Rep: Reputation: 58
I would say if you have the rpms then try to install them all at the same time like this

rpm -iv *rpm

Now you will probably need to use --force


I normally add this to the rpmbuild line

--target=i686
 
Old 02-03-2004, 09:56 PM   #4
farmerdan
Member
 
Registered: Feb 2004
Location: IA-MO State Line
Distribution: Ubuntu 10.04
Posts: 59

Original Poster
Rep: Reputation: 15
linuxiah and David--Don't know what happened a couple hours ago--must have not hit "Submit Reply."

When I started trying to rebuild and recompile, I thought that RPM would automatically compile to the architecture of my system. When I tried linuxiah's suggestion, I still got *i386* I then ran
Code:
rpmbuild -ba --rebuild --target athlon *.src.rpm
and got exactly what I wanted--almost. This version of Xcdroast requires GTK2 libraries and I don't want to forget that or have someone who might use my creation in the future not know it. Therefore--I'm learning guys--I'm going to change the SPEC file to add this information to the package and maintain the extender in the file name.

Second thing--I succeeded in getting the cdrtools package to compile.

The offending line in the Spec file (in red) and the example of a Spec file that worked are
Quote:
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
BuildRoot: /tmp/%{name}-%{version}-root
I think that I have learned %xxxxx means a macro--maybe in rpmrc. But the directory '%{tmpdir}/' was actually creating when I ran this the first time. Of course, this directory has "root only" permissions and therefore the different umask options in the spec couldn't access it. To test this I changed "%{tmpdir}/" to "/var/temp/" as in the line from the package that rebuilt. I achieved success. Now I can install all of the packages and not have to worry about dependencies.

This experience was interesting. Thanks for your help.

I have one more thing to try and that is mastering the macros in rpmrc.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Bind9: NDC command failed : rndc: connect failed: connection refused Boudewijn Linux - Networking 19 01-02-2014 07:19 AM
online_update failed - ERROR(Media:connection failed)[Connect failed] rover SUSE / openSUSE 8 02-22-2005 07:57 AM
unpacking of archive failed: cpio: read failed-input/output error rafc Linux - Newbie 0 04-21-2004 09:03 AM
Upgrading to postgresql 7.4 failed Manuel Tejada Red Hat 1 02-01-2004 02:31 PM
upgrading kde failed bjbruun Linux - Newbie 2 06-10-2003 09:20 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 03:49 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration