Bug 133870

Summary: Build error in AMTU SRPM
Product: Red Hat Enterprise Linux 4 Reporter: John Morris <jmorris>
Component: amtuAssignee: Steve Grubb <sgrubb>
Status: CLOSED ERRATA QA Contact:
Severity: low Docs Contact:
Priority: medium    
Version: 4.0CC: jos
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: RHBA-2006-0339 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2006-08-10 21:12:54 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 176155, 181409    

Description John Morris 2004-09-28 03:02:25 UTC
Description of problem:

Package can only be built as root and scribbles outside the buildroot.

Version-Release number of selected component (if applicable):

amtu-0.1-6RHEL

How reproducible:

Always

Steps to Reproduce:
1.  Try rpmbuild --rebuild as a non-root user
2.  BOOM!
3.  Make sure /usr/share/doc/amtu-* does not exist
4.  su up to root and build again, it will succeed and leave docs
behind./

Additional info:

RPM_BUILD_ROOT isn't set during the %install phase, as evidenced by
the following:

+ cd /home/buildsys/rpmbuild/BUILD
+ cd amtu
+ LANG=C
+ export LANG
+ unset DISPLAY
+ '[' '' '!=' / ']'
+ rm -rf
+ mkdir -p //usr/share/doc/amtu-0.1
mkdir: cannot create directory `//usr/share/doc/amtu-0.1': Permission
denied
error: Bad exit status from /var/tmp/rpm-tmp.49046 (%install)
 
 
RPM build errors:
    Bad exit status from /var/tmp/rpm-tmp.49046 (%install)

Compare to the .spec starting at line 45:
%install
[ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT
                                                                     
          
mkdir -p $RPM_BUILD_ROOT/%{_defaultdocdir}/amtu-%{version}
make DESTDIR=$RPM_BUILD_ROOT install-strip
gzip doc/amtu.8
install -m 644 doc/AMTUHowTo.txt
$RPM_BUILD_ROOT/%{_defaultdocdir}/amtu-%{version}/AMTUHowTo.txt
install -m 644 doc/amtu.8.gz $RPM_BUILD_ROOT/%{_mandir}/man8/amtu.8.gz

Comment 1 rob 2005-01-09 17:20:25 UTC
FPT_AMT.1 is the correct name of the requirement this utility meets. 
it is correctly identified in the manpage.  it is incorrectly
identified in /usr/share/doc/amtu-0.1/AMTUHowTo.txt as FTP_AMT.1.  it
is similarly misidentified in the %description.

there is still no BuildRoot defined in amtu-0.1-7RHEL.

may i suggest something similar to:
BuildRoot: %{_tmppath}/%{name}-%{version}-root

there are also missing BuildRequires.

may i suggest at a minimum:
BuildRequires: autoconf, automake

Comment 2 Steve Grubb 2006-02-09 14:39:12 UTC
This is addressed in 1.0.2-4.

Comment 6 Bob Johnson 2006-04-11 16:52:56 UTC
This issue is on Red Hat Engineering's list of planned work items 
for the upcoming Red Hat Enterprise Linux 4.4 release.  Engineering 
resources have been assigned and barring unforeseen circumstances, Red 
Hat intends to include this item in the 4.4 release.

Comment 10 Red Hat Bugzilla 2006-08-10 21:12:54 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on the solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2006-0339.html