Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 29 May 2009 10:03:22 -0700
From:      Kurt Buff <kurt.buff@gmail.com>
To:        Steve Bertrand <steve@ibctech.ca>
Cc:        FreeBSD Questions <questions@freebsd.org>, freebsd-questions@freebsd.org
Subject:   Re: Patching? Probably a trivial question, but...
Message-ID:  <a9f4a3860905291003v6a1f3e5as2841e410fa36c866@mail.gmail.com>
In-Reply-To: <4A1FEBDE.90009@ibctech.ca>
References:  <a9f4a3860905270821h31c36b9fh25389f79ee33c29@mail.gmail.com> <200905272036.04272.mel.flynn%2Bfbsd.questions@mailing.thruhere.net> <a9f4a3860905271228sf2860e2r478ea61fd5a64218@mail.gmail.com> <4A1FEBDE.90009@ibctech.ca>

next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, May 29, 2009 at 07:06, Steve Bertrand <steve@ibctech.ca> wrote:
> Kurt Buff wrote:
>> On Wed, May 27, 2009 at 11:36, Mel Flynn
>> <mel.flynn+fbsd.questions@mailing.thruhere.net> wrote:
>>> On Wednesday 27 May 2009 17:21:42 Kurt Buff wrote:
>>>> All,
>>>>
>>>> I've gotten a patch for a program in the ports tree from one of the
>>>> authors of the program - not the port maintainer - to fix a small
>>>> problem, but don't know how to install the updated port.
>>>>
>>>> I cd'ed into the
>>>> /usr/ports/%CATEGORY%/%PROGRAM%/work/%PROGRAM-VERSION% directory, then
>>>> performed 'patch <patch-name' successfully, AFAICT.
>>>>
>>>> Then I did a make, but got no output.
>>>>
>>>> So - I'm obviously lacking clue here. Anyone have a spare set?
>>> Don't feel like reading the entire thread atm, but for reference:
>>> - Patches need to have relative paths, where the root of the path corre=
sponds
>>> to the port's notion of $PATCH_WRKSRC
>>> - You can find out this directory by running:
>>> =C3=82 =C2=A0=C3=82 =C2=A0=C3=82 =C2=A0=C3=82 % make -C /usr/ports/cate=
gory/portname -V PATCH_WRKSRC
>>> =C3=82 The default is $WRKSRC which is $WRKDIR/$DISTNAME by default.
>>> =C3=82 Example:
>>> =C3=82 =C2=A0=C3=82 =C2=A0=C3=82 =C2=A0=C3=82 % make -C /usr/ports/sysu=
tils/nagios-statd -V PATCH_WRKSRC
>>> =C3=82 =C2=A0=C3=82 =C2=A0=C3=82 =C2=A0=C3=82 /stable/usr/obj/usr/ports=
/sysutils/nagios-statd/work/nagios-statd-3.12
>>>
>>> - Patches are automatically applied if they reside in the port's notion=
 of
>>> PATCHDIR and are named patch-*
>>> - You can find out this directory by running:
>>> =C3=82 =C2=A0=C3=82 =C2=A0=C3=82 =C2=A0=C3=82 %make -C /usr/ports/categ=
ory/portname -V PATCHDIR
>>> =C3=82 The default is $.CURDIR/files.
>>> =C3=82 Example:
>>> =C3=82 =C2=A0=C3=82 =C2=A0=C3=82 =C2=A0=C3=82 % make -C /usr/ports/sysu=
tils/nagios-statd -V PATCHDIR
>>> =C3=82 =C2=A0=C3=82 =C2=A0=C3=82 =C2=A0=C3=82 /usr/ports/sysutils/nagio=
s-statd/files
>>>
>>> - In order to apply a new patch after you have previously gone past the=
 patch
>>> stage (configure, build, install), either run make clean or:
>>> =C3=82 =C2=A0=C3=82 =C2=A0=C3=82 =C2=A0=C3=82 % rm $(make -C /usr/ports=
/category/portname -V PATCH_COOKIE)
>>> =C3=82 The above can cause problems, with the build. The normal course =
of action is
>>> to make clean.
>>
>> Excellent. I will be trying this tomorrow - I'm leaving work early
>> today to get some things taken care of.
>
> Kurt,
>
> I had to leave rather hastily the other day, but I did test the patch,
> and it worked ok. If this is a one-off thing, here is how I did it:
>
> # cd /usr/ports/category/program
> # make clean
> # ee source.patch (pasted the patch in)
> # make configure (which preps the source)
> # cd work/progname
> # patch < ../../source.patch
> # cd ../..
> # make
> # make install
>
> All worked well.
>
> Steve

I did as others have suggested, placing the patch in
/usr/ports/www/squid30/files as patch-HttpHeader, then doing a 'make
&& make clean'. After fixing the typo, it went just fine.

I'll be installing at the end of the day today and testing with a few
folks to see how this works.

Kurt



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?a9f4a3860905291003v6a1f3e5as2841e410fa36c866>