On Wed, Nov 05, 2003, Anshuman Kanwar wrote:
> I received no replies to yesterday's post. I an rephrasing my question below
> hoping that it would be easier to answer this way.
>
Our emails crossed. Sorry about that.

> 1) I have a bunch of precompiled binaries in /opt/$arch/app abd a few
> config files in /opt/$arch/app/conf.
> 2) The aim is to package these binaries using openpkg and add in
> configuration scripts for the files in /opt/$arch/app/conf.
> 3) I do not want to install the final application under /cw (or whereever
> the openpkg subtree is) but under /opt
> 4) The app will be deployed on 400 machines running Solaris and FreeBSD.
>
Keep in mind that all binary OpenPKG packages are built from source OpenPKG
packages. Although it is seldomly done, you could assimilate a group of
binaries into a source package for distribution onto hosts.

A better approach is to use OpenPKG as it is intended. That means isolate
each software and make a source package for it. Build the source package
into a binary package. Install the binary package on one or more machines.

This is how we make the source packages in the official package repository.
Your item #2 is definitely possible, but you'll be writing, maintaining, and
supporting your own packages.

> Questions:
> A) After reading through the docs I am not sure if using Openpkg for the
> above job is a good idea or not.
>
It's hard to say. If you bypass enough of the advantages that OpenPKG
offers, it becomes less and less useful to you. What are the reasons that
you dislike using the native packaging systems of Solaris and FreeBSD? What
about RPM or apt/get?

  If you want to always build from source easily, &&
  If you want multiple instances on one machine, &&
  If you want excellent security advisory, &&
  If you want a build-in run command processor, &&
  If you have more than one platform (os/arch/version)
  ... then OpenPKG is probably your only choice.

> B) Can I provide a --prefix option to openpkg to install the binary in some
> location other than the installroot ?
>
You've probably misunderstood the term 'installroot', which corresponds to
the prefix you supply yourself at the time of bootstrap. If you don't use
the '--prefix' parameter then, I guess that the default one is /cw.

> C) I don't understand the need for the rc file in case I am able to use the
> --prefix option (and I use the /full/path/to when i run openpkg)
>
The rc file associated with a daemon package allows you to manipulate the
daemon. For example, whether starting sendmail, proftpd, or apache, the
command is the same (/opt/opkg/etc/rc apache start). Or try other things:

  $ rc all daily restart
  $ rc apache stop daily start restart reload (a silly example)

The rc script is flexible, consistent, and intends to make things easier to
administer. If you don't like it, then put a:

  openpkg_runall="no"

in the /opt/opkg/etc/rc.conf file. Then there will be no daily, weekly, or
monthly automatic logfile rotation. No software from any package will start
at system bootup, and you can start, stop, and reload in your own way.

-- 
[EMAIL PROTECTED]
Development Team, Operations Northern Europe
Cable & Wireless Telecommunications Services GmbH

Attachment: pgp00000.pgp
Description: PGP signature

Reply via email to