[csw-devel] csw/mgar/pkg

Dagobert Michelsen dam at opencsw.org
Fri Jan 9 20:50:20 CET 2009


Hi Andy,

Am 09.01.2009 um 19:15 schrieb Andy Igoshin:
> - how may i customize pre-remove package script?
>  for example, pkgrm CSWnginx must stop service or run init.d script
>  before removing. maybe there are some mgar macroses i can use?

You can look at cups/trunk/files/CSWcupsd.preremove as an example.

> - "Building for multiple ISAs" are experimental. is it usable?

Yes. It has been in production for a few month now. Once in a while
still some oddity pops up which needs fixing, so "experimental".
But the resulting packages have been released to current/.

> - how may i specify differrent optimizations for differrent arches  
> and ISAs?

First you need to look at gar.conf.mk on how the optimization
variables are assembled.

The easiest way to modify these is to use something like

   EXTRA_CFLAGS_sparcv9+vis = -fast <whatever>
   EXTRA_CFLAGS_sparcv8-fsmuld = -fast <whatever_else>
   EXTRA_CFLAGS = $(EXTRA_CFLAGS_$(ISA))

> - some files in package archive (.pkg.gz) should have specific
>  permissions and owner/group. how may i set them whithout
>  hardcoding in '.prototype'?

Highly experimental ;-)) You can use prototype filters for this.
The idea is to specify a program taking the prototype as stdin,
rewriting it and put the result to stdout. What is needed is
a program like
   pfilter --path=/opt/csw/etc/myconfig --owner=myself --perms=1644
No rocket science, just not been written yet.

The current quoting from the prototype-filter in
   sysstat/trunk/Makefile
looks a bit too complicated to be beautiful:
   PROTOTYPE_FILTER = awk '$$$$3 ~ /\/sysstatd$$$$/ { $$$$4 = "4755" }  
{ print }'
I guess you got the idea.

> - nginx package should be build separately on solaris 8 and solaris 10
>  (/dev/poll vs event port). what should i write in Makefile to do it?

Same as specific flags for Makefiles or alternatively

ifeq ($(GAROSREL),5.8)
CONFIGURE_ARGS += --use-dev-poll
endif

ifeq ($(GAROSREL),5.10)
CONFIGURE_ARGS += --use-event-port
endif

Then recompile once for Solaris 8 and Solaris 10. The resulting
4 packages should be correct for release. The naming and linking
in the catalogs makes sure the right package gets pulled in for
each release.

> - nginx has two versions of sources: release and development.
>  may i support them in one package?

The usual policy is to have stable/release/production versions
only. Is there a specific reason to package the development
version? You may of course make a separate package of that and
put it in testing/.

However, GAR supports putting multiple versions in one package.
If you are curious you can look at libtool/trunk/Makefile
for details (there is 1.5.26 and 2.2.4 in the same package there).


Best regards

   -- Dago



More information about the devel mailing list