From owner-freebsd-ports@FreeBSD.ORG Mon Jul 14 12:28:54 2003 Return-Path: Delivered-To: freebsd-ports@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D067D37B401; Mon, 14 Jul 2003 12:28:54 -0700 (PDT) Received: from ms-smtp-03.southeast.rr.com (ms-smtp-03.southeast.rr.com [24.93.67.84]) by mx1.FreeBSD.org (Postfix) with ESMTP id CFEEB43F3F; Mon, 14 Jul 2003 12:28:42 -0700 (PDT) (envelope-from marcus@marcuscom.com) Received: from creme-brulee.marcuscom.com (rdu57-17-158.nc.rr.com [66.57.17.158])h6EJQh93018081; Mon, 14 Jul 2003 15:26:43 -0400 (EDT) Received: from [10.2.1.4] (vpn-client-4.marcuscom.com [10.2.1.4]) h6EJQm4x030115; Mon, 14 Jul 2003 15:26:48 -0400 (EDT) (envelope-from marcus@marcuscom.com) From: Joe Marcus Clarke To: Maxim Sobolev In-Reply-To: <1058208499.299.80.camel@gyros> References: <20030714165358.GC2875@vega.vega.com> <1058208499.299.80.camel@gyros> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="=-CH+bquypz8882HNy1xTO" Organization: MarcusCom, Inc. Message-Id: <1058210907.299.82.camel@gyros> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.3 Date: 14 Jul 2003 15:28:27 -0400 X-Spam-Status: No, hits=-10.7 required=5.0 tests=BAYES_01,IN_REP_TO,PGP_SIGNATURE_2,REFERENCES, USER_AGENT_XIMIAN autolearn=ham version=2.55 X-Spam-Checker-Version: SpamAssassin 2.55 (1.174.2.19-2003-05-19-exp) cc: ports@freebsd.org cc: portmgr@freebsd.org Subject: Re: Major flaws of the new make deinstall code X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 14 Jul 2003 19:28:55 -0000 --=-CH+bquypz8882HNy1xTO Content-Type: multipart/mixed; boundary="=-Yc0r+AmPAhScJ2qZA4a2" --=-Yc0r+AmPAhScJ2qZA4a2 Content-Type: text/plain Content-Transfer-Encoding: quoted-printable On Mon, 2003-07-14 at 14:48, Joe Marcus Clarke wrote: > On Mon, 2003-07-14 at 14:41, Maxim Sobolev wrote: > > On Mon, Jul 14, 2003 at 02:23:46PM -0400, Joe Marcus Clarke wrote: > > > On Mon, 2003-07-14 at 12:53, Maxim Sobolev wrote: > > > > Folks, > > > >=20 > > > > I've noticed several misbehaviours of the new make deinstall code, > > > > particularly: > > > >=20 > > > > 1. The new code behaves incorrectly when there are several @cwd > > > > statements in the packing list. Particularly, it affects many > > > > ports from games category, which usually create files and dirs > > > > under /var. For some reason, make deinstall code takes the second > > > > @cwd as the prefix of the installed package and obviously mismatch > > > > happens. This needs to be corrected ASAP. > > >=20 > > > Do you have a specific port in mind? I don't recall seeing this in > > > testing. > >=20 > > This is an in-house port for our product, pkg-plist looks like followin= g: > >=20 > > bin/radlast > > bin/radtest > > bin/raduse > > bin/radwho > > bin/radzap > > lib/xtradius/perlAAA.soc > > sbin/checkrad > > sbin/radiusd > > @dirrm lib/xtradius > > @cwd /var > > @exec /bin/mkdir %D/log/radacc > /dev/null 2> /dev/null || /usr/bin/tru= e > > @unexec /bin/rmdir %D/log/radacc > /dev/null 2> /dev/null || /usr/bin/t= rue > > @unexec if cmp -s %D/db/raddb/clients %D/db/raddb/clients.sample; then = rm -f %D/db/raddb/clients; fi > > db/raddb/clients.sample > > @exec [ -f %B/clients ] || cp %B/%f %B/clients > > db/raddb/dictionary > > db/raddb/dictionary.ascend > > db/raddb/dictionary.cisco > > db/raddb/dictionary.compat > > db/raddb/dictionary.livingston > > db/raddb/dictionary.quintum > > db/raddb/dictionary.shiva > > db/raddb/dictionary.tunnel > > db/raddb/dictionary.usr > > db/raddb/dictionary.versanet > > db/raddb/dictionary.xtradius > > db/raddb/execparams > > db/raddb/hints > > db/raddb/huntgroups > > @unexec if cmp -s %D/db/raddb/naslist %D/db/raddb/naslist.sample; then = rm -f %D/db/raddb/naslist; fi > > db/raddb/naslist.sample > > @exec [ -f %B/naslist ] || cp %B/%f %B/naslist > > db/raddb/naspasswd > > db/raddb/realms > > db/raddb/users > > db/raddb/users.xtr > > @dirrm db/raddb > >=20 > > For some reason, it picks /var from the installed package as a main > > prefix resulting in false positive. I have not checked other ports > > with multiple @cwd's though. >=20 > I'll take a look. This patch should take care of the problem. Joe >=20 > >=20 > > > > 2. In general, prefix-safety feature of make deinstall is misdesign= ed, > > > > as it should not reject deinstalling package which has no dependant= s > > > > (i.e. packages that depend on it) regardless of its prefix, as > > > > replacing this package with one with a different prefix will not > > > > lead to any problems I can think of. > > >=20 > > > Replacing a dependency (pkgconfig, for example) with a version in a > > > different prefix could have disasterous effects if you're dealing wit= h > > > files you expect to exist in a certain location. In any event, make > > > deinstall-all will remove all packages with a given ORIGIN regardless= of > > > PKGNAME or PREFIX. > >=20 > > I am not talking about "replacing", but about deleting - deleting > > package with different prefix should be harmless if no packages > > depend on one being deleted. >=20 > Ah, I see what you're saying. The old bsd.port.mk didn't do this > either. It only deleted the package if PKGNAME matched exactly. At > least with this version you have the ability to remove packages based on > ORIGIN (and PREFIX). Plus, the deinstall-all option turns on the > "ignore PREFIX" mode. >=20 > Joe >=20 > >=20 > > -Maxim > >=20 > > >=20 > > > Joe > > >=20 > > > >=20 > > > > -Maxim > > > --=20 > > > PGP Key : http://www.marcuscom.com/pgp.asc > > >=20 > > >=20 > >=20 --=20 PGP Key : http://www.marcuscom.com/pgp.asc --=-Yc0r+AmPAhScJ2qZA4a2 Content-Disposition: attachment; filename=bsd.port.mk.diff Content-Transfer-Encoding: base64 Content-Type: text/plain; name=bsd.port.mk.diff; charset=iso-8859-1 LS0tIC91c3IvcG9ydHMvTWsvYnNkLnBvcnQubWsJU2F0IEp1bCAxMiAxNTowMToxNyAyMDAzDQor KysgYnNkLnBvcnQubWsJTW9u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ICdzfF5AY3dkIHx8J2A7IFwNCisJCQkJCXByZng9YCR7UEtH X0lORk99IC1xIC1wICQke3B9IDI+IC9kZXYvbnVsbCB8ICR7SEVBRH0gLW4gMSB8ICR7U0VEfSAt ZSAnc3xeQGN3ZCB8fCdgOyBcDQogCQkJCQlpZiBbICJ4JHtQUkVGSVh9IiA9ICJ4JCR7cHJmeH0i IF07IHRoZW4gXA0KIAkJCQkJCQkke0VDSE9fTVNHfSAiPT09PiAgIERlaW5zdGFsbGluZyAkJHtw fSI7IFwNCiAJCQkJCQkJJHtQS0dfREVMRVRFfSAtZiAkJHtwfTsgXA0K --=-Yc0r+AmPAhScJ2qZA4a2-- --=-CH+bquypz8882HNy1xTO Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.2 (FreeBSD) iD8DBQA/EwRbb2iPiv4Uz4cRAhg/AKCG+lLelgmdGmawMV202vNro9uAGgCeMGRl jlthc+tDsZpVHpuFueGZLCM= =6KQN -----END PGP SIGNATURE----- --=-CH+bquypz8882HNy1xTO--