The Linux Foundation is a non-profit consortium dedicated to fostering the growth of Linux.
Contents |
To aid in the development of portable software packages, the LSB proposed the addition of a new command `lsbinstall` which provid post-install script support services. The command did not 'make the cut' for LSB 3.0, but was included as part of an informative annex to indicate future directions.
The lsbinstall command is intended to solve the following problems:
Previous versions of the LSB have attempted to address these issues in different ways. In the case of init scripts, a tool is provided for installation, and namespace management rules are provided to avoide clashes. Somewhat accidentally, the install location for these files (`/etc/init.d`) was also added to the spec. In the case of crontab entries, the locations are specified and namespace rules again required. There is no mechanism for editing system repositories. There is no mechanism for handling an install where there are two or more common mechanisms (e.g. `/etc/inetd.conf` vs. individual files in `/etc/xinetd.d`). The namespace rules follow a three-level naming scheme which includes LANANA-registered names, a DNS based name, and names reserved to the distribution. This is complex because existing non-LSB (including distro-provided) installs are not required to follow the LSB conventions: the spec thus carves out somewhat cumbersome names for LSB-conforming packages to avoid conflicts.
The overall purpose of lsbinstall is to allow packages to be installed without requiring further manual administator setup action. The old model of a trained administrator for each system on which software is installed is rapidly breaking down with Linux desktops, server farms, grids, and other uses. Currently there are a number of things packages cannot do automatically, such as arrange for the newly installed binary to be in the user's search path, add entries to files and directories not specified in the LSB/FHS, etc.
Note that the sense of recent LSB discussions on this topic is that the more things can actually be moved into the spec as required and not be left to `lsbinstall` the better - use it as a last resort but not as a holding area for everything we think of that might become an issue.
The `lsbinstall` spec currently requires support for installation/check/removal of the following object types:
install a font file into the systemwide font repository, if the system supports one. There shall be one operand, that names a font file. Now withdrawn -- move to graphics in the future
Fonts are optional (because graphics is optional) only in the ISO sense. It is required in the LSB certification sense.
We need to specify what format of fonts may be accepated (including pointers to the definition of the formats). Probably use the file suffix to specify the type. .pcf & .ttf formats should be supported.
install an init script into the system specific location. There shall be one operand, that names an init script file. On success, a name suitable for use with the install_initd and remove_initd commands shall be printed to the standard output. See also Installation and Removal of Init Scripts.
The single operand shall be placed into a system specific location and configured to be active when a system boots into multi-user mode. The script will not be invoked as part of this installation.
Highly contentious at this stage.
Tobias Burnus comments (on not specifying init.d):
I think this is unfortunate. All newer systems I'm aware of have the init scripts under /etc/init.d/, which is also defined in the File Hierachy Standard. The filename poses no problem since we have a namespace. All files installed using the package software can (a) easily be removed and (b) the user can use rpm -qf /etc/init.d/<file> (or on DEB-Systems: dpkg -S /etc/init.d/<file>) to find out to which package that file actually belong. What problem is this copying actually trying to solve? >Does lsbinstall have an option to remove the init script? Do we >specify, that the package has to remove this file if it is deinstalled? I want to add the question what happens if the file is modified by the user, especially if one does an update? Package managers have techniques in place for this case (.rpmsave and .rpmnew for RPM systems).
Note ... in spite of Tobias' claim above `/etc/init.d` is not specified by the FHS.
Even though we have a namespace for which can be used for `/etc/init.d`, we do not forbid the distributions from stepping on this namespace, therefor the potential for collisions still exists. By letting lsbinstall handle everything, it can implement a resolution policy as determined by the distribution.
install a profile script into a system specific location. There shall be one operand, that names a profile shell script. The behavior is unspecified if this name does not have the suffix .sh. The sh utility shall read and execute commands from all such profile shell scripts when invoked as an interactive login shell, or if the -l (the letter ell) is specified (see Shell Invocation).
ensure a service name and number pair is known to the system service database. When installing, there must be at least two operands. The first operand shall have the format %d/%s with the port number and protocol values (e.g. 22/tcp), and the second operand shall be the name of the service. Any subsequent operands provide aliases for this service. If any of the -r, --remove, -c or --check options are specified, there shall be a single operand identifiying the port and protocol values (with the same format as above).
add an entry to the system's network super daemon configuration. If none of the -r, --remove, -c or --check options are specified, the first operand shall have the format:
"%s:%s:%s:%s:%s:%s"
Otherwise, the first operand shall have the format
"%s:%s"
The fields in the first operand have the following meaning, in order:
The name of a protocol. The name shall be one of those listed in `/etc/protocols`. If this attribute is not specified, the system shall use an implementation defined default protocol.
One of the following values:
`stream` - the service will use a stream type socket. `dgram` - the service will use a datagram type socket. `seqpacket` - the service will use a sequenced packet type socket.
If the value of this attribute is yes, once the service is started, no further requests for that service will be handled until the service exits. If the value is no, the network super daemon shall continue to handle further requests for the given service while that service is running.
The name of a user from the user login database. The service started to handle this request shall run with the privileges of the specified user.
The name of a program to run to handle the request.
The arguments to pass to the program.
Alternately, this could be specified in either the simpler traditional inetd format, or as a colon seperated 6-tuple which is passed in as the argument. The latter has the advantage of not requiring an additional to be installed as part of the package.
-t inet "netbios-ssn:stream:tcp:nowait:root:/usr/sbin/smbd
Install a crontab into the system specific location. There shall be one operand, that names a crontab file. See Cron Jobs.
The Cron Jobs reference already specifies `/etc/cron.{daily,weekly,monthly}` and `/etc/cron.d` ... why do we need this?
Invoke the system specific package installation utility (or package removal utility if the -r or --remove option was specified). There shall be one operand, that names a package file.
See bug 874 for the problems with this
This one should just be removed. Removed
install a desktop menu entry into the system menu database, if the system supports one. There shall be one operand, that names a menu file.
Incompletely specified. Optional.
Can't be optional. Either it's in or out. out
Register a directory that contains shared libraries with the system. There shall be one operand, that names a directory.
Do we have adequate collision avoidance rules in place for this? What happens if I install my own private copy of libX11.so.6? How will it interact with the system provided library?
Maybe we shouldn't specify this, and rely on applications to link them selve such that they will find the version of the library they are looking for. out
Install a manual page into the appropriate system manual repository. There shall be one operand, which is the full path to a man page which is installed as part of the application. lsbinstall shall take whatever actions are needed to ensure that this page will be found by man.
Is this needed? Is it just for the purposes of `mkwhatis`? The profile can update `MANPATH`. bug 858 documents this.
So where does MANPATH get defined?
This is not just for mkwhatis.
As mentioned above for init scripts, the potential for collision with system provided pages still exists. Just using the profile mechnism is not sufficient. lsbinstall needs to own enough of the installation process so that it can perform for collision resolution process if needed.
This command is pure invention from the LSB team ... something we would not normally consider. However, it is felt that there is a big gap here that this command fills. But we need a sample implementation to flesh out the issues. One is in progress.
Some quick design notes on the perl version now in cvs at `[lsb]/si/lsbinstall/perl`:
return (err("$target: no such file"));
For the teleconference, 2005-06-01.
At least two choices:
V1.1 of the ASSERT and STRATEGY caputre exercise is complete and located in the cvs at <CVSROOT>`/tests/lsb-runtime-test/wip/lsbinstall/tset/ASSERTs`
This file can also be viewed at lsbinstall
See LsbinstallTest for more information on the lsbinstall test development.
Reviews are needed by end of Jun 3, 2005.
This list represents high level desisions made since May 31 regarding lsbinstall Please correct as needed.
echo "Usage: $0 options args" 2>&1"
The following areas have generated some (sometimetimes lots) of discussion, but no concensus has yet formed:
[[[LsbinstallProblems]]/Comments User comments] [[Include(LsbinstallProblems/Comments)]]