Bug 113348

Summary: Patches in spec file are not applied on hpux
Product: [Retired] Red Hat Linux Reporter: Dano Carroll <dano>
Component: rpmAssignee: Paul Nasrat <nobody+pnasrat>
Status: CLOSED CURRENTRELEASE QA Contact: Mike McLean <mikem>
Severity: medium Docs Contact:
Priority: medium    
Version: 8.0   
Target Milestone: ---   
Target Release: ---   
Hardware: parisc11   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2005-04-19 18:41:16 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:
Attachments:
Description Flags
patch to correct path to patch files none

Description Dano Carroll 2004-01-12 22:39:37 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i586; en-US; rv:1.2.1)
Gecko/20021130

Description of problem:
On HP-UX, patches in the spec file do not get applied. This is because
a call is made to the basename function on the pointer fn which holds
the full path to the patch. On HP-UX basename actually modifies fn,
reducing it to the basename. This causes the script produced to fail
to find the patch since the cwd is the build directory and the patch
is located in the source directory. 

The following patch copies the contents of fn (before the basename
call) to urlfn. In the line that makes the call to basename, urlfn is
used to provide the full path to the patch rather than the already
modified fn.


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


How reproducible:
Always

Steps to Reproduce:

    Steps to Reproduce:
1. Extract source from tar file
2. Apply patches from bugs 97662, 97887, 97907, 101717 113340
3. ./configure --prefix=/usr/local --without-python (I don't think the
options
matter, thought)
4. make
5. make install
6. rpmbuild -bp <anyspecwithpatches>

Actual Results:  Executing(%prep): /bin/sh -e /var/local/tmp/rpm-tmp.6716
+ umask 022
+ cd /data/packager/BUILD
+ cd /data/packager/BUILD
+ rm -rf cpan2rpm-2.018
+ /usr/local/bin/gzip -dc /data/packager/SOURCES/cpan2rpm-2.018.tar.gz
+ tar -xf -
+ STATUS=0
+ [ 0 -ne 0 ]
+ cd cpan2rpm-2.018
+ echo Patch #1 (cpan2rpm.patch):
Patch #1 (cpan2rpm.patch):
+ patch -p1 -s
+ /var/local/tmp/rpm-tmp.6716[30]: cpan2rpm.patch: Cannot find or open
the file.
error: Bad exit status from /var/local/tmp/rpm-tmp.6716 (%prep)

Lines from /var/local/tmp/rpm-tmp.6716:

cd cpan2rpm-2.018
echo "Patch #1 (cpan2rpm.patch):"
patch -p1  -s < cpan2rpm.patch


Expected Results:  The last line of rpm-tmp.6716 should read:

patch -p1  -s < /data/packager/SOURCES/cpan2rpm.patch


Additional info:

Comment 1 Dano Carroll 2004-01-12 22:41:25 UTC
Created attachment 96909 [details]
patch to correct path to patch files

Comment 2 Jeff Johnson 2004-01-16 18:22:29 UTC
I'd rather use misc/basname.c than change the code just for
hpux. How about a configure test for fn modifying basname on
hpux instead?

Comment 3 Jeremy Katz 2005-04-19 18:41:16 UTC
Closing due to inactivity.  If this issue still occurs with current releases,
please reopen and set the release in which you've encountered the problem.