Bug 113348 - Patches in spec file are not applied on hpux
Patches in spec file are not applied on hpux
Status: CLOSED CURRENTRELEASE
Product: Red Hat Linux
Classification: Retired
Component: rpm (Show other bugs)
8.0
parisc11 Linux
medium Severity medium
: ---
: ---
Assigned To: Paul Nasrat
Mike McLean
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2004-01-12 17:39 EST by Dano Carroll
Modified: 2007-04-18 13:01 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2005-04-19 14:41:16 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
patch to correct path to patch files (874 bytes, patch)
2004-01-12 17:41 EST, Dano Carroll
no flags Details | Diff

  None (edit)
Description Dano Carroll 2004-01-12 17:39:37 EST
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 17:41:25 EST
Created attachment 96909 [details]
patch to correct path to patch files
Comment 2 Jeff Johnson 2004-01-16 13:22:29 EST
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 14:41:16 EDT
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.

Note You need to log in before you can comment on or make changes to this bug.