After some discussion, we've decided to remove INSTALL/DEINSTALL/REQ scripts.
First, REQ scripts have never been in wide use in OpenBSD. There are a total
of 5 ports ever to have a REQ script in our archives. I'm pretty certain the
support in pkg_add was not really tested, and those scripts are completely
anecdotic anyways.
About INSTALL/DEINSTALL: they're not really needed.
@exec/@unexec can do exactly the same job. Having one single mechanism
means the code can be simpler, and better tested (and also, we have
enough substitution mechanisms already).
In case the action requested is complex enough, then it can be a script
that *belongs* as part of the package proper. This makes for better
engineering in my opinion, since it forces the maintainer to think about
what's going on.
More importantly, those scripts get in the way of systematic audits
and replacements: this makes for one extra place where you have to look
for `special behavior' in the package, instead of the packing-list proper.
The last INSTALL script in the ports tree died an hour ago: it was part
of postfix, and interested people can look at the change: this script
was doing part of what MESSAGE is intended for, and the rest now happily
lives inside the postfix package proper.
Both the pkg_* tools and bsd.port.mk have been updated to warn about
INSTALL and DEINSTALL scripts. REQ has become an error outright
(both pkg_add and pkg_delete ignore it now, which isn't an issue with
any package we know about).
I'll probably phase out INSTALL scripts entirely in a few weeks. DEINSTALL
is there to stay for a bit longer, since it's required for old
package deinstallation and updates...
Some archeology tells me that there were about 20 packages with DEINSTALL
in 2005. Over the life of our ports tree, this amounts to 291 DEINSTALL
scripts ever.
The latest scripts died in 2006:
./www/twiki/pkg/Attic/DEINSTALL,v:date 2005.11.09.10.27.06; author aanriot;
state dead;
./www/jakarta-tomcat/v3/pkg/Attic/DEINSTALL,v:date 2006.08.03.17.48.51;
author kurt; state dead;
./lang/python/2.3/pkg/Attic/DEINSTALL,v:date 2006.11.01.20.12.58; author
alek; state dead;
./lang/python/2.3/pkg/Attic/DEINSTALL-idle,v:date 2006.11.01.20.12.58;
author alek; state dead;
(note that none of these scripts are actually critical)
There were about the same number of INSTALL scripts btw.
If you had special stuff that needed REQ scripts for real, please talk to
me privately. We'll figure out what functionality you need, and design
a better way to achieve it.
INSTALL/DEINSTALL conversions from other package systems to OpenBSD should
be straight-forward.
- weed out all the misuses.
* Directory creation can be achieved with a proper
Note that this also frees some of my time to look at new mechanisms instead
of repairing old stuff...
combination of
@mode
@owner
@group
@sample dir/
* MESSAGE and UNMESSAGE will be displayed at install/deinstall.
* configuration files are better created through @sample.
- simple operations can be achieved directly through @exec/@unexec.
- remaining complex operations can be put in a script under ${FILESDIR},
that would be installed during post-install, and then run through
@exec/@unexec at the proper location in the packing-list.
Some further stats: it looks like about 13% of all packages have @exec/@unexec
annotations these days.