From owner-freebsd-questions@FreeBSD.ORG Tue Mar 9 12:26:26 2004 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D61C416A4CE for ; Tue, 9 Mar 2004 12:26:26 -0800 (PST) Received: from home.mnet.bg (home.mnet.bg [193.110.223.2]) by mx1.FreeBSD.org (Postfix) with ESMTP id 38C2A43D1D for ; Tue, 9 Mar 2004 12:26:25 -0800 (PST) (envelope-from dpenev@mnet.bg) Received: from localhost (home [127.0.0.1]) by home.mnet.bg (Postfix) with ESMTP id DF60C3B2FF; Tue, 9 Mar 2004 22:26:16 +0200 (EET) Received: from venus.dpsca.bg (ip220-81.mnet.bg [193.110.220.81]) (using TLSv1 with cipher EDH-RSA-DES-CBC3-SHA (168/168 bits)) (No client certificate requested) by home.mnet.bg (Postfix) with ESMTP id 5503C3B2E4; Tue, 9 Mar 2004 22:26:15 +0200 (EET) Received: from earth.dpsca.bg (earth.dpsca.bg [192.168.1.1]) by venus.dpsca.bg (8.12.9/8.12.9) with ESMTP id i29KRGlV027850; Tue, 9 Mar 2004 22:27:16 +0200 (EET) Received: (from dpenev@localhost) by earth.dpsca.bg (8.12.10/8.12.10/Submit) id i29KVPu8002579; Tue, 9 Mar 2004 22:31:25 +0200 (EET) (envelope-from dpenev) Date: Tue, 9 Mar 2004 22:31:25 +0200 From: Dancho Penev To: "Shaun T. Erickson" Message-ID: <20040309203125.GC615@earth.dpsca.bg> Mail-Followup-To: "Shaun T. Erickson" , freebsd-questions@FreeBSD.ORG References: <5.2.0.9.1.20040309192650.01ad49f0@postamt1.charite.de> <404DFE56.6030204@ste-land.com> <404DFE56.6030204@ste-land.com> <5.2.0.9.1.20040309192650.01ad49f0@postamt1.charite.de> <5.2.0.9.1.20040309195409.01a90d80@postamt1.charite.de> <404E1E9A.7030101@ste-land.com> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="jousvV0MzM2p6OtC" Content-Disposition: inline In-Reply-To: <404E1E9A.7030101@ste-land.com> User-Agent: Mutt/1.4.1i X-Virus-Scanned: by amavisd-new-20030616-p7 (Debian GNU/Linux) at mnet.bg cc: freebsd-questions@FreeBSD.ORG Subject: Re: How do I add a local patch to a port? X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 Mar 2004 20:26:26 -0000 --jousvV0MzM2p6OtC Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Mar 09, 2004 at 02:44:26PM -0500, Shaun T. Erickson wrote: >Date: Tue, 09 Mar 2004 14:44:26 -0500 >From: "Shaun T. Erickson" >To: Alexander Haderer >Cc: freebsd-questions@freebsd.org >Subject: Re: How do I add a local patch to a port? > >Alexander Haderer wrote: > >>Just another guess: Probably it makes a difference if the patchfile=20 >>patches ./dir/tobepatched and dir/tobepatched. A brief look into other=20 >>ports shows me that the latter is used. I don't know if it have to be=20 >>this way or not. > >Ok. I'm trying to patch=20 >"/usr/ports/security/cyrus-sasl2-saslauthd/work/cyrus-sasl-2.1.17/saslauth= d/auth_pam.c".=20 >The patchfile is named "patch-aa" and is located in=20 >"/usr/ports/security/cyrus-sasl2-saslauthd/files". Here is the contents of= =20 >the patchfile that works manually, when I cd to=20 >"/usr/ports/security/cyrus-sasl2-saslauthd/work/cyrus-sasl-2.1.17" and run= =20 >"patch < /usr/ports/security/cyrus-sasl2-saslauthd/files/patch-aa": > >Index: saslauthd/auth_pam.c >diff -u saslauthd/auth_pam.c.orig saslauthd/auth_pam.c >--- saslauthd/auth_pam.c.orig Sat May 31 13:00:24 2003 >+++ saslauthd/auth_pam.c Tue Mar 9 11:53:44 2004 >@@ -178,7 +178,7 @@ > const char *login, /* I: plaintext authenticator */ > const char *password, /* I: plaintext password = */ > const char *service, /* I: service name */ >- const char *realm __attribute__((unused)) >+ const char *realm > /* END PARAMETERS */ > ) > { >@@ -186,17 +186,25 @@ > pam_appdata my_appdata; /* application specific data */ > struct pam_conv my_conv; /* pam conversion data */ > pam_handle_t *pamh; /* pointer to PAM handle = */ >+ char user[256]; > int rc; /* return code holder */ > /* END VARIABLES */ > >- my_appdata.login =3D login; >+ strlcpy(user, login, 256); >+ >+ if (realm) { >+ strlcat(user, "@", 256); >+ strlcat(user, realm, 256); >+ } >+ >+ my_appdata.login =3D user; > my_appdata.password =3D password; > my_appdata.pamh =3D NULL; > > my_conv.conv =3D saslauthd_pam_conv; > my_conv.appdata_ptr =3D &my_appdata; > >- rc =3D pam_start(service, login, &my_conv, &pamh); >+ rc =3D pam_start(service, user, &my_conv, &pamh); > if (rc !=3D PAM_SUCCESS) { > syslog(LOG_DEBUG, "DEBUG: auth_pam: pam_start failed: %s", > pam_strerror(pamh, rc)); > > >It all looks right to me, but when I do a "make clean" follwed by a=20 >make, the file does not get patched. What am I doing wrong? Put the patch in security/cyrus-sasl2/files directory. Take a look in port's Makefile where ${PATCHDIR} is set to different location. > > -ste > >_______________________________________________ >freebsd-questions@freebsd.org mailing list >http://lists.freebsd.org/mailman/listinfo/freebsd-questions >To unsubscribe, send any mail to "freebsd-questions-unsubscribe@freebsd.or= g" --=20 Dancho Penev GnuGP public key: http://www.mnet.bg/~dpenev/gnupg.key Key fingerprint: E88D 8B7B 3EF6 E9C8 C5D2 7554 2AA8 C347 71A1 4277 --jousvV0MzM2p6OtC Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (FreeBSD) iD8DBQFATimdKqjDR3GhQncRAs/9AJ4mW+B47jD7Y7hpgK01dvPe/GIaDQCfWOSK iz5vvXKXywsEhAq1Qwa3Eos= =niv/ -----END PGP SIGNATURE----- --jousvV0MzM2p6OtC--