Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Next revisionBoth sides next revision
playground:package-messages [2018/03/12 19:30] jeffplayground:package-messages [2018/03/12 20:08] – [Overview] jeff
Line 3: Line 3:
 ===== Overview ===== ===== Overview =====
  
-At present, ''opkg'' and the package-generation system does not provide a formal way to display messages about the package to end users. +At present, ''opkg'' and the package-generation system does not provide a formal way to display //messages// about the package to end users. It does include a package //description//.
  
-Other package-management systems, such as ''dpkg'' on Debian-like systems, and ''pkg'' on FreeBSD-like systems provide a "package message" that can be viewed before installation, as well as displayed on installation.+''pkg'' on FreeBSD-like systems provide a "package message" that can be viewed before installation, as well as displayed on installation
 + 
 +It is not clear that ''dpkg'' or the RPM Package manager provide a similar facility.
  
 This page is a work-in-progress to define the use cases and success criteria for any future development of such a facility. At the time of this writing (March, 2018), there is not a schedule for such development. This page is a work-in-progress to define the use cases and success criteria for any future development of such a facility. At the time of this writing (March, 2018), there is not a schedule for such development.
Line 37: Line 39:
 ===== Similar Implementations ===== ===== Similar Implementations =====
  
-This section describes how package messages are handled in other Unix-like operating systems. It is intended as a reference for the specification of behavior that is appropriate in the OpenWRT environment.+This section describes how package messages are handled in other Unix-like operating systems. It is intended as a reference for the preparation of specification of behavior that is appropriate in the OpenWRT environment.
  
 ==== FreeBSD ==== ==== FreeBSD ====
  
 Recent FreeBSD distributions use the ''[[https://www.freebsd.org/cgi/man.cgi?query=pkg&sektion=&n=1|pkg]]'' system.  Recent FreeBSD distributions use the ''[[https://www.freebsd.org/cgi/man.cgi?query=pkg&sektion=&n=1|pkg]]'' system. 
 +
 +Note that portions of this content may be subject to [[https://www.freebsd.org/copyright/freebsd-license.html|The FreeBSD Copyright]] or other licenses.
  
 === Package Install Example === === Package Install Example ===
Line 132: Line 136:
 </code> </code>
  
 +=== Implementation ===
 +
 +Primary documentation for the FreeBSD ''pkg'' system may be found at [[https://www.freebsd.org/doc/en_US.ISO8859-1/books/porters-handbook/|https://www.freebsd.org/doc/en_US.ISO8859-1/books/porters-handbook/]]
 +
 +FreeBSD does not, in its base configuration, supply GUI utilities for package management.
 +
 +There is [[https://www.freebsd.org/doc/en_US.ISO8859-1/books/porters-handbook/pkg-files.html#porting-message|specific documentation]] on messaging end users. As of March 2018, it, in part, reads
 +
 +> To display a message when the package is installed, place the message in pkg-message. This capability is often useful to display additional installation steps to be taken after a pkg install or to display licensing information.
 +
 +> When some lines about the build-time knobs or warnings have to be displayed, use ECHO_MSG. pkg-message is only for post-installation steps. Likewise, the distinction between ECHO_MSG is for printing informational text to the screen and ECHO_CMD is for command pipelining:
 +
 +<code>
 +update-etc-shells:
 + @${ECHO_MSG} "updating /etc/shells"
 + @${CP} /etc/shells /etc/shells.bak
 + @( ${GREP} -v ${PREFIX}/bin/bash /etc/shells.bak; \
 + ${ECHO_CMD} ${PREFIX}/bin/bash) >/etc/shells
 + @${RM} /etc/shells.bak
 +</code>
 +
 +==== Debian-based Systems ====
 +
 +Debian-based systems typically use the ''dpkg'' (''.deb'') format and tools, even if overlaid with more user-friendly tools, such as ''apt'', ''apt-get'', or GUI-based tools such as ''synaptic''. The ''dpkg'' format appears to be similar to that used by ''opkg'' although the archive/compression format used is different.
 +
 +Debian packaging has a [[https://wiki.debian.org/Packaging|"jump page" in the Debian wiki]]. There is also a [[https://www.debian.org/doc/manuals/packaging-tutorial/packaging-tutorial.en.pdf|good tutorial available]].
 +
 +https://www.debian.org/doc/debian-policy/ does not appear to describe a "package message" functionality. It does discuss the [[https://www.debian.org/doc/debian-policy/#description|Description]] field. 
 +
 +The presence or absence of a "controlling terminal" is [[https://www.debian.org/doc/debian-policy/#controlling-terminal-for-maintainer-scripts|discussed in the debian-policy documentation]]. As of March, 2018, this reads, in part
 +
 +> Maintainer scripts are not guaranteed to run with a controlling terminal and may not be able to interact with the user. They must be able to fall back to noninteractive behavior if no controlling terminal is available. Maintainer scripts that prompt via a program conforming to the Debian Configuration Management Specification (see Prompting in maintainer scripts) may assume that program will handle falling back to noninteractive behavior.
  
 +[[https://www.debian.org/doc/debian-policy/#s-maintscriptprompt|Prompting in maintainer scripts]] is also discussed.
  
 +==== RedHat/Fedora/CentOS-based Systems ====
  
 +RedHat, Fedora, and their derivatives use the [[https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/5/html/deployment_guide/ch-rpm|RPM Package Manager]]. The details of the package are generally [[http://ftp.rpm.org/max-rpm/s1-rpm-build-creating-spec-file.html|specified in a ''.spec'' file]]. The ''.spec'' file contains a "Description" section in the "human readable" preamble.
  
  • Last modified: 2018/03/12 20:49
  • by jeff