Bug 162924 - [bsd.port.mk] [patch] report more information at port/pkg installation
Summary: [bsd.port.mk] [patch] report more information at port/pkg installation
Status: Closed Overcome By Events
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Ports Framework (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Port Management Team
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-11-28 15:20 UTC by Matthew Seaman
Modified: 2019-09-04 13:44 UTC (History)
0 users

See Also:


Attachments
bpm.diff (4.98 KB, patch)
2011-11-28 15:20 UTC, Matthew Seaman
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Matthew Seaman 2011-11-28 15:20:08 UTC
This was inspired by one of the interminable threads on
freebsd-ports@... resulting from necessary work to prune out no-longer
viable ports.  In short, there were complaints that a port could be
deprecated and then pass an expiry date however far in the future and
be removed with users none the wiser until that port had actually
disappeared.  The idea is to add messages to the package (similarly to
the way pkg-message works) whenever certain conditions are detected.
If PORTREVISION is incremented at the same time as eg. EXPIRATION_DATE
is set, then users should see the message as the do the consequent
update, irrespective of whether the user updates by compiling from
ports or by installing pre-compiled packages.

As it includes those messages into any generated packages, those
choosing to install from per-compiled packages will see the same
information, and anyone can use 'pkg_info -D' to recall it after
installation.  This also has the benefit that the messages are printed
out at the end of a portmaster(8) run, instead of just scrolling past
in the middle of all sorts of other output.

In detail:

    If any of DEPRECATED, FORBIDDEN, BROKEN, RESTRICTED, NO_PACKAGE,
    NO_CDROM or EXPIRATION_DATE are set, their value is displayed.
    FORBIDDEN, BROKEN, RETRICTED or NO_PACKAGE will usually abort the
    build process before the display code is reached, but can be
    overridden, in which case a message should be produced.

    If MAINTAINER is ports@FreeBSD.org, a message is printed
    soliciting volunteers to assume maintainership.

    If the security-report target produces any output, it is also
    recorded in the package data.

Including these extra messages adds at most a few kilobytes of extra
data to affected packages /before/ compression.

Having the RESTRICTED, NO_PACKAGE and NO_CDROM messages included
directly in packages should help prevent mistakes leading to
inappropriate redistribution of software under restrictive licenses.

Example results:

% pkg_info -D p5-Text-WikiFormat-0.79
Information for p5-Text-WikiFormat-0.79:

Install notice:
===> The p5-Text-WikiFormat port currently lacks a MAINTAINER
     Anyone interested in volunteering please enquire
     via the freebsd-ports@freebsd.org mailing list


===>>> pkg-message for php5-5.3.8
***************************************************************

Make sure index.php is part of your DirectoryIndex.

You should add the following to your Apache configuration file:

AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps

***************************************************************
===> SECURITY REPORT: 
      This port has installed the following files which may act as network
      servers and may therefore pose a remote security risk to the system.
/usr/local/libexec/apache22/libphp5.so
/usr/local/bin/php
/usr/local/bin/php-cgi

      If there are vulnerabilities in these programs there may be a security
      risk to the system. FreeBSD makes no guarantee about the security of
      ports included in the Ports Collection. Please type 'make deinstall'
      to deinstall the port if this is a concern.

      For more information, and contact details about the security
      status of this software, see the following webpage: 
http://www.php.net/


===>>> pkg-message for tarsnap-1.0.31
================================================================================

If you have never used tarsnap before, you will need to create an account
with the tarsnap service and deposit money into the account before you
can start using tarsnap; see
  https://www.tarsnap.com/gettingstarted.html
for details.

Once you have a tarsnap account you will need to create a key file using
the tarsnap-keygen utility before you start storing archives; this key
file MUST BE KEPT IN A SAFE LOCATION since you will not be able to read
your backups without it.

================================================================================
===> This port is RESTRICTED:
     license restricts redistribution of source and binaries
Comment 1 Edwin Groothuis freebsd_committer 2011-11-28 15:20:19 UTC
Responsible Changed
From-To: freebsd-ports-bugs->portmgr

bsd.port.mk is portmgr territory (via the GNATS Auto Assign Tool)
Comment 2 Mark Linimon freebsd_committer freebsd_triage 2014-06-02 02:54:39 UTC
Infrastructure PR.
Comment 3 Baptiste Daroussin freebsd_committer 2019-09-04 13:44:58 UTC
Part of it, is already in b.p.m now, I feel like this is enough. Please provide an updated patch with the missing bits only if you feel some are lacking.