From owner-freebsd-questions@FreeBSD.ORG Fri May 29 17:03:22 2009 Return-Path: Delivered-To: questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B04FD106567D; Fri, 29 May 2009 17:03:22 +0000 (UTC) (envelope-from kurt.buff@gmail.com) Received: from mail-px0-f106.google.com (mail-px0-f106.google.com [209.85.216.106]) by mx1.freebsd.org (Postfix) with ESMTP id 7B94C8FC0C; Fri, 29 May 2009 17:03:22 +0000 (UTC) (envelope-from kurt.buff@gmail.com) Received: by pxi4 with SMTP id 4so5319478pxi.3 for ; Fri, 29 May 2009 10:03:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=PjiUFAqCl8wiP1NumtwcJ3/TurHykTk/GhsLIMG7ixw=; b=OSlMvMQYd+AjMEUZQbhOyeTkr2aeH8E3blYqv6zaAWDPcaNWr6HWwJ7dor2ywf4qZi l1mwyIkzltF1KOlWqaWA86FbYcmZzu3inaR8B8L+T/zTLJ5wQYMN7zVHGGA3vG1148VG hQ14CD8GoqZTb96d59lsCi0HJwocfSQbA0phs= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=LRLbYZBLr1vnasJ7OEqpmUyIjNHEFsIbIgJOk1uqY2o5ySxoPpwyS2CLwTxriUSMyG PpIXg0S4RMQ6hG1Klap1thBy+xlwazdlfD/WUqOvud+wDbiSLLWQuAovczaMQwyZAg/0 +VjmfJ88UZpTqvl+JxDzgxYmUXaxE4FZ7BRp4= MIME-Version: 1.0 Received: by 10.142.216.18 with SMTP id o18mr898640wfg.312.1243616602239; Fri, 29 May 2009 10:03:22 -0700 (PDT) In-Reply-To: <4A1FEBDE.90009@ibctech.ca> References: <200905272036.04272.mel.flynn+fbsd.questions@mailing.thruhere.net> <4A1FEBDE.90009@ibctech.ca> Date: Fri, 29 May 2009 10:03:22 -0700 Message-ID: From: Kurt Buff To: Steve Bertrand Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Cc: FreeBSD Questions , freebsd-questions@freebsd.org Subject: Re: Patching? Probably a trivial question, but... X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 29 May 2009 17:03:23 -0000 On Fri, May 29, 2009 at 07:06, Steve Bertrand wrote: > Kurt Buff wrote: >> On Wed, May 27, 2009 at 11:36, Mel Flynn >> 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 >>> >>>> 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