From owner-svn-ports-all@FreeBSD.ORG Sat Apr 19 06:54:07 2014 Return-Path: Delivered-To: svn-ports-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B09E3E9C for ; Sat, 19 Apr 2014 06:54:07 +0000 (UTC) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8DFE414A0 for ; Sat, 19 Apr 2014 06:54:07 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.8/8.14.8) with ESMTP id s3J6s7hE089888 for ; Sat, 19 Apr 2014 06:54:07 GMT (envelope-from bdrewery@freefall.freebsd.org) Received: (from bdrewery@localhost) by freefall.freebsd.org (8.14.8/8.14.8/Submit) id s3J6s7V8089882 for svn-ports-all@freebsd.org; Sat, 19 Apr 2014 06:54:07 GMT (envelope-from bdrewery) Received: (qmail 92727 invoked from network); 19 Apr 2014 01:54:05 -0500 Received: from unknown (HELO ?10.10.0.24?) (freebsd@shatow.net@10.10.0.24) by sweb.xzibition.com with ESMTPA; 19 Apr 2014 01:54:05 -0500 Message-ID: <53521D88.6000103@FreeBSD.org> Date: Sat, 19 Apr 2014 01:54:00 -0500 From: Bryan Drewery Organization: FreeBSD User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:24.0) Gecko/20100101 Thunderbird/24.4.0 MIME-Version: 1.0 To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org, ports-developers@FreeBSD.org Subject: Re: check-orphans updates and renamed check-plist References: <201404190644.s3J6iuaM097417@svn.freebsd.org> <53521CDE.8040209@FreeBSD.org> In-Reply-To: <53521CDE.8040209@FreeBSD.org> X-Enigmail-Version: 1.6 OpenPGP: id=6E4697CF; url=http://www.shatow.net/bryan/bryan2.asc Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="3v4chg1QNjK30pg6l69LXVfuqPLXkE1s4" X-BeenThere: svn-ports-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for the ports tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 19 Apr 2014 06:54:07 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --3v4chg1QNjK30pg6l69LXVfuqPLXkE1s4 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 4/19/2014 1:51 AM, Bryan Drewery wrote: > Please take note of all of this carefully. "check-orphans" should be fa= r > less false-positive prone now (false-positive in the sense of files tha= t > are already in plist or owned by a dependency). Please let me know of > any that come up. I.e., PORTDOCS/PORTEXAMPLES issues are fixed. Lots mo= re. >=20 > Poudriere will be updated in the next week to utilize all of this > instead of its own logic. >=20 > I will also be working with Tinderbox/crees to get it hooked into all o= f > this as well as r351446 which creates 1 central whitelist for leftovers= =2E And this also means I now fully support removing all the .if ${PORT_OPTIONS:M****} conditional installs. This update handles all OPTIONS properly, as long as the files they are installing are in the plist with their %%OPTION%%. >=20 > On 4/19/2014 1:44 AM, Bryan Drewery wrote: >> Author: bdrewery >> Date: Sat Apr 19 06:44:56 2014 >> New Revision: 351587 >> URL: http://svnweb.freebsd.org/changeset/ports/351587 >> QAT: https://qat.redports.org/buildarchive/r351587/ >> >> Log: >> - Rename check-orphans to check-plist. Keep the old for backwards-co= mpat. >> - Bug fixes: >> makeplist/check-plist: >> - Fix showing directories owned by RUN_DEPENDS/LIB_DEPENDS [1] >> - Use proper "rmdir PATH" syntax, not "rmdir >/dev/null... PATH" = which >> pkg will not recognize. >> - Never consider base /etc/mtree/BSD.usr.dist or LOCLABASE >> Templates/BSD.local.dist as needing @dirrm handling. >> check-plist: >> - Fix showing PORTDOCS/PORTEXAMPLES files when the OPTIONS are no= t set. >> makeplist will still suggest them. >> - Fix showing files installed through unselected OPTIONS as orpha= ns, >> by considering "@comment file" to be ignored. [2] >> - Fix @sample, @fc, @fcfontsdir, @fontsdir support >> - Fix return status when orphans are found to be non-zero >> - Add note when PREFIX=3D!LOCALBASE >> - Be more clear when orphans/no orphans are found. >> - Add a whitelist mechanism for globally approved ignores. >> - Add *.bak/*.orig to orphan whitelist for now. >> - Fix false-positive with dirs installed to /, such as with >> archivers/dpkg creating /var/db/dpkg >> - Fix false-positive with @dirrm ending in /, such as with >> ports-mgmt/poudriere with a @dirrmtry share/zsh/ >> - There are likely still some false-positives. I fixed as many as= I could >> find. Please let me know of others. >> * One in particular that is not easily fixable is installing a f= ile into >> a directory owned by another port where that other port is not= a run-time >> dependency. So the leaf port may create all of the parent dirs= and never >> clean them up. Cleaning them up is not proper unless no other = package is >> depending on them. This will be addressed by pkg(8) once pkg_i= nstall is >> EOL, or sooner. >> - Consider @dirrm of directories owned by run-time dependencies, = or >> /etc/mtree/* or Templates/BSD.local.dist (at LOCALBASE) as fata= l errors. >> These should not be removed in the plist. @comment lines are no= t >> considered for this; they will not ignore an error. >> =3D=3D=3D> Checking for directories owned by dependencies or= MTREEs >> Error: Owned by dependency: @dirrmtry share/locale/af/LC_MES= SAGES >> Error: Owned by dependency: @dirrmtry share/locale/af >> Error: Owned by dependency: @dirrmtry %%PERL5_MAN3%% >> - Detect files in plist that do not exist in the stagedir. Pkgng = already did >> this, but now we have it unified with this check. @comment line= s are >> not considered for this; they will not ignore an error. >> =3D=3D=3D> Checking for items in pkg-plist which are not in = STAGEDIR >> Error: Missing: foo >> Error: Missing: @dirrmtry bar >> - Change orphaned output due to several new errors introduced: >> =3D=3D=3D> Checking for items in STAGEDIR missing from pkg-p= list >> Error: Orphaned: foo >> - Send errors to stderr >> check_leftovers.sh: >> - Prefer longer values for PLIST_SUB. >> bsd.options.mk: >> - Fix NOPORTDOCS/WITHOUT_NLS/NOPORTEXAMPLES not unsetting their r= espective >> OPTIONS. >> - Mark NOPORTDOCS/NOPORTEXAMPLES deprecated and hook them into th= e >> OPTIONS_WARNING to tell users the new format. >> - check-stagedir.sh refactoring: >> - Switch to using new PLIST_SUB_SED >> - Use ! instead of , in sed(1) regex to allow files/dirs with ',' >> - Rework PORTEXAMPLES/PORTDOCS handling so it acts on PLIST_SUB_SE= D'd >> value and not absolutes. Also simplify the regex for these a bit= to >> allow reuse. >> - No longer need DOCSDIRS/EXAMPLESDIR in env >> - Wrap long lines >> - Unset some vars in env when they are done being used to free spa= ce for >> larger sed vars >> - Cleanup redundant sed regexes >> - Add a Scripts/plist_sub_sed_sort.sh to prefer longer values when s= ubstituting >> over shorter values. >> =20 >> - To make check-plist ignore a file *as an orphan* do one of the fol= lowing: >> 1. Install it >> 2. post-install: ${RM} ${STAGEDIR}file >> 3. Put the file behind an OPTION with a PLIST_SUB: %%OPTION%%file >> 4. Add to plist as a @comment [2]: >> @comment file >> @comment @dirrmtry dir >> =20 >> Reviewed by: mat (much earlier version) >> Discussed with: mat, antoine, bapt, swills (various bits) >> With hat: portmgr >> PR: ports/185561 [1] >> Reported By: Alexander Yerenkow [1] >> Tested with: pkg and pkg_install >> Reported by: many (false-positives) >> =20 >> [2] This is a partial solution, we may still need a plist.ignore too= =2E It >> doesn't make much sense to add files in main pkg-plist we don't = care about, >> but maybe it does since you'll see and reconsider them being ign= ored >> someday. @comment is used as all the OPTION PLIST_SUB deactivati= ons use >> @comment instead of something like @ignore. >> >> Added: >> head/Mk/Scripts/plist_sub_sed_sort.sh (contents, props changed) >> Modified: >> head/CHANGES >> head/Mk/Scripts/check-stagedir.sh >> head/Mk/Scripts/check_leftovers.sh >> head/Mk/bsd.options.mk >> head/Mk/bsd.stage.mk >> >> Modified: head/CHANGES >> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D >> --- head/CHANGES Sat Apr 19 06:43:21 2014 (r351586) >> +++ head/CHANGES Sat Apr 19 06:44:56 2014 (r351587) >> @@ -10,6 +10,22 @@ in the release notes and/or placed into=20 >> =20 >> All ports committers are allowed to commit to this file. >> =20 >> +20140419: >> +AUTHOR: bdrewery@FreeBSD.org >> + >> + check-orphans has been renamed to check-plist. It now checks: >> + A. Files in STAGEDIR that are missing from plist. >> + To make check-plist ignore a file *as an orphan* do one of the= >> + following: >> + 1. Install it >> + 2. post-install: ${RM} ${STAGEDIR}file >> + 3. Put the file behind an OPTION with a PLIST_SUB: %%OPTION%%= file >> + 4. Add to plist as a @comment >> + @comment file >> + @comment @dirrmtry dir >> + B. Files in plist missing from STAGEDIR >> + C. Files in plist which are owned by dependencies/MTREEs >> + >=20 --=20 Regards, Bryan Drewery --3v4chg1QNjK30pg6l69LXVfuqPLXkE1s4 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (MingW32) Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBAgAGBQJTUh2JAAoJEDXXcbtuRpfPDk8H/3YGkS8QCywDJ5E/FJDlAUl6 ZkvT/wN1TXeik6UXNj2Pz8B7bPbq4qWibry41K9mZfNUSdhwtHY4BFmkc+nhBmDK 0cZ30soz6lwCL+KnMG20bWronSbn7ErizQ+CfYKzfR+Kau773xgK6lbOCu7Y8uO+ hR4Fs1uSNQwlZUnsjbKQUS4hafJYNRQoZnHZ8d+wCimbkNXPmsNtci5xLlqVCogy 3kyLYf6baRI8tLBi//vtthFNJYh6jdmXGKPWK5RVwETCnsmVSr6wE2ji49l5gIZ7 pF2V0h2oL7OYS2gFZE1YB7Mb0abSC4aT7667EWR1/4J8NAHBwN1A/kZoRpC4Lhk= =ekB5 -----END PGP SIGNATURE----- --3v4chg1QNjK30pg6l69LXVfuqPLXkE1s4--