1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-22 00:35:15 +00:00
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
bsd.autotools.mk
bsd.commands.mk
bsd.database.mk
bsd.default-versions.mk
bsd.destdir.mk
bsd.drupal.mk
bsd.efl.mk
bsd.emacs.mk
bsd.fpc.mk
bsd.gcc.mk
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
bsd.gstreamer.mk
bsd.java.mk Update comments. 2014-04-11 17:17:33 +00:00
bsd.kde4.mk
bsd.ldap.mk
bsd.licenses.db.mk
bsd.licenses.mk
bsd.linux-apps.mk
bsd.linux-rpm.mk
bsd.local.mk
bsd.lua.mk
bsd.mate.mk
bsd.ocaml.mk
bsd.octave.mk
bsd.openssl.mk
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
bsd.php.mk
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
bsd.port.post.mk
bsd.port.pre.mk
bsd.port.subdir.mk
bsd.python.mk Mk/bsd.python.mk: Space to tabs in user message 2014-04-12 03:07:31 +00:00
bsd.qt.mk
bsd.ruby.mk - Fix issues with specifying ${RUBY} variable 2014-04-13 02:44:45 +00:00
bsd.sanity.mk
bsd.scons.mk
bsd.sdl.mk
bsd.sites.mk
bsd.ssp.mk
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
bsd.wx.mk
bsd.xfce.mk
bsd.xorg.mk The FreeBSD x11@ and graphics team proudly presents 2014-04-16 18:28:47 +00:00