Subject: building different package names from PKG_OPTIONS
To: None <tech-pkg@netbsd.org>
From: Jeremy C. Reed <reed@reedmedia.net>
List: tech-pkg
Date: 12/16/2005 17:57:15
So I updated a production machine with apache without thinking. It has a
vulnerable apache on it. But I was using suexec and new package didn't
include that. So as I build using pkgsrc now with:
APACHE_SUEXEC_DOCROOT=/ PKG_OPTIONS.apache=suexec
I am thinking we should discuss ideas on how to get binary packages for
this.
OpenBSD packages are called: stem-version[-flavors]. "Flavored packages
will also contain a list of flavors after the version identifier, in a
canonical order determined by FLAVORS in the corresponding port's
Makefile." (from OpenBSD's packages-specs(7)).
Flavors are compilation options (like "no_x11"). Each flavour is built
with its own woprking directory and is packages with its own package
name. Examples as found from ready-to-use packages from their server:
catdoc-0.91.4-tk
a2ps-4.13bp0-letter
aalib-1.2-no_x11
asclock-2.0.12-classic-english
aterm-0.4.2-big5-lite
sox-12.17.7p0-mp3-vorbis
zebra-0.93ap3-snmp
(They also have the packages without the -flavour.)
Notice how a few above have multiple options.
sox has two FLAVORS which are "mp3" and "vorbis". I don't know if the
OpenBSD ports has a mechanism to also build two more packages, such as:
sox-12.17.7p0
sox-12.17.7p0-mp3
sox-12.17.7p0-vorbis
sox-12.17.7p0-mp3-vorbis
But by default it doesn't look like it.
Anyone want to work on this for pkgsrc?
1) Have an option that adds the PKG_OPTIONS to the package name.
2) pkg tools and infrastructure recognize the new naming
3) Have a build option that says to build package using all PKG_OPTIONS to
create package
Or just add more dummy pkgsrc packages to add options. (Example is to
readd aalib-x11 which was just removed).
By the time I researched this and wrote this, my new apache package is
ready to use. (Sadly its name doesn't tell me it has "suexec".)
Jeremy C. Reed
technical support & remote administration
http://www.pugetsoundtechnology.com/