automating patch4

Phil Howard phil-bind at ipal.net
Fri Nov 12 06:06:42 UTC 1999


Daniel Serna wrote:

> In looking at the patch file I noticed that there is only a slight change
> in the source code:

[actualy patch file snipped]


> So, the only difference is that you need to append a "=" to the right
> of the ">" in the following line:
> 
> if ((methode == ISIXFR) || (soa_cnt >= 2)) {

Yes I saw that.  I could have done it with emacs/vi/pico.


> All I did was append that to the named-xfer.c code and then followed the
> instructions to install bind. I would think that is all one has to do. I
> don't think that the patch is a patch in the traditional sense, i.e. you
> can install it using patchadd. It seems to be patch that is of the "This
> is the only change you have to make to make it work" variety, unless I
> missed something.
> 
> Hope that helps

I succesfully installed it.  My question is how to automate it given that
the patch file apparently wants the user to figure out where to apply it.
How do I make a script that will know how to apply it, given the directory
where the tarballs were extracted into?

The usual way to do a patch for a package extracted from a tar.gz or zip or
whatever would be to apply the patch from the same directory.  A script that
should work for any package would have to do this, or would have to find some
information in the patch file or the previously extracted data, to determine
what directory (perhaps relative to the extract directory) to patch from.

A patch file can be made recursively.  Supposedly a "patch" to a new version
could affect any or even all files anywhere in the whole directory tree that
was extracted.  Such a patch file would have to be applied from there.  If
it was applied within any subdirectory, it would be ambiguous.

What I'd seeking is to be able to automate this.  I want to know if there
is some standard here.  For example, I could code my script to handle bind
as a special case and cd to some subdirectory ... but which one?

-- 
Phil Howard | stop5809 at lame4ads.net a3b3c3d3 at no7where.org stop7914 at dumb0ads.com
  phil      | ads3suck at no2place.org a8b2c8d8 at anywhere.net no21ads2 at spammer0.org
      at    | eat84me3 at noplace1.net end0ads6 at anyplace.com suck2it3 at spammer6.net
  ipal      | eat8this at noplace1.net w7x5y8z9 at s3p9a5m3.com eat6this at no48ads3.org
     dot    | end2ads1 at dumbads5.edu stop3it7 at no0place.edu w3x3y7z9 at anyplace.net
  net       | end1ads3 at no8place.edu ads5suck at noplace8.org eat83me2 at no0place.com


More information about the bind-users mailing list