Is this some automated Shell patch format?

Posted on 2004-11-19
Last Modified: 2013-12-16
I am trying to install Subversion but it complains that it cannot find the Berkeley database.  It has the right path, and the configure log indicates it is finding the include and library files, but it is failing, anyway, saying it cannot find usable Berkeley headers and library files.
The Subversion web site ( indicates this patch (  should be applied to ./subversion/apr-util/config.   Below, the first few lines from the patch (it is over 500 lines long):

--- srclib/apr-util/configure      Fri Oct 24 10:51:13 2003
+++ srclib/apr-util/configure      Wed Nov 26 02:45:42 2003
@@ -13386,6 +13386,536 @@
    { (exit 1); exit 1; }; }
+  db42)
+  places="$check_places"
+  if test -z "$places"; then
+    places="std /usr/local/BerkeleyDB.4.2"
+  fi
+  bdb_version="4"
+  if test ""1"" != "-1"; then
+    bdb_version="$bdb_version."2""
+    if test ""-1"" != "-1"; then
+      bdb_version="$bdb_version."-1""
+    fi
+  fi
+  bdb_places="$places"
+  bdb_default_search_headers="db4/db.h db.h"
+  bdb_default_search_lib_names="db-4.2 db4 db"

I have never seen this format for a shell script, before.  Is this some sort of format for an automated patch process?  It does not conform to the GNU 'patch' format.  Is it something else from the vast library of 'things I do not know about' ?

I used sed to cut out the leading + symbols and simply pasted the patch in over what seemed to be the appropriate code in the configure script.  It ran, but the same problems re-occurred.  So, either I did not apply the patch correctly or there is another problem.  While I explore the 'other problem' scenario, I was hoping someone could teach me something about this patch file.
Thank you!
Question by:jrtanenb
    1 Comment
    LVL 61

    Accepted Solution

    this is diff format, not a shell script.

    patch -p0 < that file

    Hmm...  Looks like a unified diff to me...
    The text leading up to this was:
    |--- srclib/apr-util/configure     Fri Oct 24 10:51:13 2003
    |+++ srclib/apr-util/configure     Wed Nov 26 02:45:42 2003


    most likley will replace one revision of file named srclib/apr-util/configure with another

    Featured Post

    Maximize Your Threat Intelligence Reporting

    Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

    Join & Write a Comment

    Using libpcap/Jpcap to capture and send packets on Solaris version (10/11) Library used: 1.      Libpcap ( Version 1.2 2.      Jpcap( Version 0.6 Prerequisite: 1.      GCC …
    Why Shell Scripting? Shell scripting is a powerful method of accessing UNIX systems and it is very flexible. Shell scripts are required when we want to execute a sequence of commands in Unix flavored operating systems. “Shell” is the command line i…
    Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
    Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…

    732 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    18 Experts available now in Live!

    Get 1:1 Help Now