Simpler Navigation for Servers and Operating Systems - Please Update Your Bookmarks
Completed: a much simpler Servers and Operating Systems section of the Community. We combined many of the older boards, so you won't have to click through so many levels to get at the information you need. Check the consolidated boards here as many sub-forums are now single boards.
If you have bookmarked forums or discussion boards in Servers and Operating Systems, we suggest you check and update them as needed.
General
cancel
Showing results for 
Search instead for 
Did you mean: 

Patching iexpress postgresql on itanium 11.23

SOLVED
Go to solution
Ed Loehr
Advisor

Patching iexpress postgresql on itanium 11.23

I'm installing slony, a replication engine, on an ia64 box running 11.23 with iexpress postgresql 7.3.4. Slony requires the source build tree be there, fully made. The README.hp has a series of diffs at the bottom which one can apply to the 7.3.4 source to get it to build.

Q: How do you apply a patch created with "diff -Nur"? patch doesn't seem to recognize it...

$ head patchfile
diff -Nur postgresql-7.3.4-orig/configure postgresql-7.3.4/configure
--- postgresql-7.3.4-orig/configure 2003-07-22 21:09:40.000000000 -0700
+++ postgresql-7.3.4/configure 2003-10-13 16:46:10.000000000 -0700
@@ -1451,7 +1451,6 @@
# assembler code in src/include/storage/s_lock.h, so we just use
...

$ patch < patchfile
Hmm... I can't seem to find a patch in there anywhere.

Ed
3 REPLIES
Ermin Borovac
Honored Contributor
Solution

Re: Patching iexpress postgresql on itanium 11.23

Your patch file seems to be in unified diff format (created with diff -u), and HP-UX patch command doesn't understand unified diffs.

GNU patch utility handles unified diffs so if you install it you should be able to apply your patch.
Ermin Borovac
Honored Contributor

Re: Patching iexpress postgresql on itanium 11.23

Forgot to mention that you can download GNU patch depot for 11.23 at

http://hpux.cs.utah.edu/ftp/hpux/Sysadmin/patch-2.5.4/patch-2.5.4-sd-11.23.depot.gz
Ed Loehr
Advisor

Re: Patching iexpress postgresql on itanium 11.23


Thanks for that tip. Gnu patch 2.5.4 works, but HP's iexpress patch notes appear bogus for PostgreSQL 7.3.4. For example, here's the first patch:

diff -Nur postgresql-7.3.4-orig/configure postgresql-7.3.4/configure
--- postgresql-7.3.4-orig/configure 2003-07-22 21:09:40.000000000 -0700
+++ postgresql-7.3.4/configure 2003-10-13 16:46:10.000000000 -0700
@@ -1451,7 +1451,6 @@
# assembler code in src/include/storage/s_lock.h, so we just use
# a dummy file here.
case $host in
- *-*-hpux*) need_tas=yes; tas_file=hpux.s ;;
sparc-*-solaris*) need_tas=yes; tas_file=solaris_sparc.s ;;
i?86-*-solaris*) need_tas=yes; tas_file=solaris_i386.s ;;
*) need_tas=no; tas_file=dummy.s ;;


But here's 7.3.4's original file for that line range:

$cat -n postgresql-7.3.4/configure | head -1460 | tail -12
1449 echo "$as_me: error: '$withval' is not a valid template name. Use 'list' for a list." >&2;}
1450 { (exit 1); exit 1; }; }
1451 fi;;
1452 esac
1453
1454 ;;
1455 esac
1456
1457 else
1458
1459 # --with-template not given
1460

The lines they suggest patching are later in the file, suggesting the patch diff comes from something other than 7.3.4 original source:

$cat -n postgresql-7.3.4/configure | head -1532 | tail -7
1526 # assembler code in src/include/storage/s_lock.h, so we just use
1527 # a dummy file here.
1528 case $host in
1529 ## *-*-hpux*) need_tas=yes; tas_file=hpux.s ;;
1530 sparc-*-solaris*) need_tas=yes; tas_file=solaris_sparc.s ;;
1531 i?86-*-solaris*) need_tas=yes; tas_file=solaris_i386.s ;;
1532 *) need_tas=no; tas_file=dummy.s ;;


Hand-editing to patch results in failed build as well.

Seems like HP engineers creating an HP-specific patch file ought to make it compatible with HP's patch utility... :(

Ed