freebsd-ports/Mk
Bryan Drewery e15449a9ef - Rename check-orphans to check-plist. Keep the old for backwards-compat.
- 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 not set.
     makeplist will still suggest them.
   - Fix showing files installed through unselected OPTIONS as orphans,
     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=!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 file 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_install is
      EOL, or sooner.
   - Consider @dirrm of directories owned by run-time dependencies, or
     /etc/mtree/* or Templates/BSD.local.dist (at LOCALBASE) as fatal errors.
     These should not be removed in the plist. @comment lines are not
     considered for this; they will not ignore an error.
        ===> Checking for directories owned by dependencies or MTREEs
        Error: Owned by dependency: @dirrmtry share/locale/af/LC_MESSAGES
        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 lines are
     not considered for this; they will not ignore an error.
        ===> 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:
        ===> Checking for items in STAGEDIR missing from pkg-plist
        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 respective
     OPTIONS.
   - Mark NOPORTDOCS/NOPORTEXAMPLES deprecated and hook them into the
     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_SED'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 space for
    larger sed vars
  - Cleanup redundant sed regexes
- Add a Scripts/plist_sub_sed_sort.sh to prefer longer values when substituting
  over shorter values.

- 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 [2]:
     @comment file
     @comment @dirrmtry dir

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 <yerenkow@gmail.com> [1]
Tested with:	pkg and pkg_install
Reported by:	many (false-positives)

[2] This is a partial solution, we may still need a plist.ignore too. 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 ignored
    someday. @comment is used as all the OPTION PLIST_SUB deactivations use
    @comment instead of something like @ignore.
2014-04-19 06:44:56 +00:00
..
Scripts - Rename check-orphans to check-plist. Keep the old for backwards-compat. 2014-04-19 06:44:56 +00:00
Uses Allow an alternative install prefix to be specified with 2014-04-11 21:45:55 +00:00
bsd.apache.mk Use default-versions.mk for Apache, PHP, MySQL And PostgreSQL. 2014-02-11 17:12:28 +00:00
bsd.autotools.mk Convert LIB_DEPENDS 2013-12-13 10:44:22 +00:00
bsd.commands.mk xz being included in all supported base system, remove code using version 2014-01-13 07:28:31 +00:00
bsd.database.mk Use default-versions.mk for Apache, PHP, MySQL And PostgreSQL. 2014-02-11 17:12:28 +00:00
bsd.default-versions.mk - Update to 2.6.4 2014-03-26 03:32:45 +00:00
bsd.destdir.mk - Remove emacs mode, -*- mode: ...; -*- [1] 2012-05-23 08:17:49 +00:00
bsd.drupal.mk - Allow to stage drupal mods 2014-02-19 01:32:23 +00:00
bsd.efl.mk Mk/bsd.(ruby,efl).mk: Replace "freebsd" with OPSYS:L 2014-02-21 18:53:16 +00:00
bsd.emacs.mk GNU Emacs updates 2013-03-30 05:13:30 +00:00
bsd.fpc.mk - Update to 2.6.4 2014-03-26 03:32:45 +00:00
bsd.gcc.mk Refer to bsd.default-versions.mk for the canonical version of GCC; no 2014-03-16 00:45:55 +00:00
bsd.gecko.mk Remove bits replaced by USES=gecko 2014-04-10 14:46:37 +00:00
bsd.gnome.mk followup with recent cleanup 2014-04-11 12:45:16 +00:00
bsd.gnustep.mk Specify minor version of libobjc to avoid LIB_DEPENDS to catch the gcc version if gcc is installed 2014-01-28 08:15:38 +00:00
bsd.gstreamer.mk Update to 1.2.2. 2013-12-30 12:56:11 +00:00
bsd.java.mk Update comments. 2014-04-11 17:17:33 +00:00
bsd.kde4.mk KDE/FreeBSD team presents KDE SC 4.12.4 and KDE Workspace 4.11.8! 2014-04-03 09:49:10 +00:00
bsd.ldap.mk bmake is quite strict with != make it really happy 2013-05-02 17:12:43 +00:00
bsd.licenses.db.mk - Change PGSQL to PostgreSQL 2014-02-19 14:44:07 +00:00
bsd.licenses.mk Remove more now useless fallback targets 2014-01-03 23:05:37 +00:00
bsd.linux-apps.mk Now that x11-toolkits/linux-f10-gtk is gone, remove its definition. 2013-12-01 00:40:07 +00:00
bsd.linux-rpm.mk Allow distfiles grouping for linux-rpm ports while not extracting the .src.rpm on the package builders 2014-03-25 11:42:59 +00:00
bsd.local.mk - Remove emacs mode, -*- mode: ...; -*- [1] 2012-05-23 08:17:49 +00:00
bsd.lua.mk Finish removing support for lua50 2013-11-18 16:15:51 +00:00
bsd.mate.mk Say hello to Mate 1.6. 2013-11-23 11:39:07 +00:00
bsd.ocaml.mk Make bsd.ocaml.mk more stage friendly 2014-03-26 20:07:11 +00:00
bsd.octave.mk Convert all USE_FORTRAN=yes to "USES=fortran, USE_GCC=yes". In most cases 2014-02-16 17:15:31 +00:00
bsd.openssl.mk - remove WITH_OPENSSL_HACK7 2014-03-03 05:43:38 +00:00
bsd.options.desc.mk libvpx is unconditionally built with VP9 support, so adapt its description accordingly 2014-04-18 12:19:10 +00:00
bsd.options.mk - Rename check-orphans to check-plist. Keep the old for backwards-compat. 2014-04-19 06:44:56 +00:00
bsd.pbi.mk - Fix bsd.pbi.mk to pull pbi-manager from the correct port 2013-09-27 10:10:29 +00:00
bsd.php.mk Welcome the new mod_php ports, in order to have default packages for 2014-03-27 16:09:37 +00:00
bsd.pkgng.mk Revert bdrewery will work on this later 2014-04-15 13:04:18 +00:00
bsd.port.mk makepatch: don't create empty patches 2014-04-18 17:31:12 +00:00
bsd.port.options.mk - Remove emacs mode, -*- mode: ...; -*- [1] 2012-05-23 08:17:49 +00:00
bsd.port.post.mk
bsd.port.pre.mk
bsd.port.subdir.mk - Use proper UNAME variable here 2013-12-03 19:08:47 +00:00
bsd.python.mk Mk/bsd.python.mk: Space to tabs in user message 2014-04-12 03:07:31 +00:00
bsd.qt.mk Mk/bsd.qt.mk: 2014-03-25 06:26:16 +00:00
bsd.ruby.mk - Fix issues with specifying ${RUBY} variable 2014-04-13 02:44:45 +00:00
bsd.sanity.mk Fix typo 2014-03-13 13:54:30 +00:00
bsd.scons.mk Allow scons port to support staging 2013-10-02 22:33:27 +00:00
bsd.sdl.mk Version two of the SDL2_gfx library, compatible with SDL2.0. 2013-11-13 18:15:08 +00:00
bsd.sites.mk - Remove e.pypi.python.org from MASTER_SITE_CHEESESHOP 2014-03-11 17:41:37 +00:00
bsd.ssp.mk - Rename public name of SSP support to WITH_SSP_PORTS as /usr/src 2013-09-22 00:26:05 +00:00
bsd.stage.mk - Rename check-orphans to check-plist. Keep the old for backwards-compat. 2014-04-19 06:44:56 +00:00
bsd.tex.mk - Update ls-R after fmtutil. 2013-06-08 11:48:04 +00:00
bsd.wx.mk Convert wxsvg to use wxGTK 3.0 2014-03-24 15:53:25 +00:00
bsd.xfce.mk - Fix devel/xfce4-dev-tools detection, when xfdev is used in USE_XFCE macro 2013-10-20 18:53:04 +00:00
bsd.xorg.mk The FreeBSD x11@ and graphics team proudly presents 2014-04-16 18:28:47 +00:00