On Wed, Jun 25, 2008 at 03:08:16PM -0500, Kevin Monceaux wrote:

> pkg info displays a short package description.  Do, or will, packages
> have a long description?

They don't currently, but will.  If you look through the mail archives,
there's a thread on "tags and attributes" which talks about that bit of
metadata, as well as the others that we'll be supporting down the road.
But the packages don't currently contain that metadata, and the tools don't
look for it.

> So, if I switch to Indiana I'd like to take a stab at learning how to 
> create packages, or at least learn how to modify existing packages.  I've 
> come across the IPS intro on OpenSolaris.org, but most packages involve 
> actually building software.  Creating one text file and packaging it up 
> isn't really all that useful.  Is there a tutorial that covers creating an 
> IPS package from a typical configure -> make -> make install type project?

No, there isn't, mostly because the tools we have for package publication
are still ... a bit rough.

One point that you may or may not be familiar with is that IPS explicitly
does not incorporate a build system.  You can build your bits any way you
choose, and then build packages from those bits.  In particular, that will
allow us (Sun) to easily plug IPS package creation into our widely varied
build processes, as well as anyone else to make their own choices about how
to do that.  All the choices on how to build your bits, and what features
to enable in that build, and so on, are up to you -- we don't provide any
support for that whatsoever.

But, assuming you've built your bits, then the most straightforward way to
create a package is (briefly) as follows:

  - create a "proto area" with your bits.  The simplest way, likely, to do
    this is to run "make install DESTDIR=/some/place".

  - tar that proto area up.  We can read tar files and old Solaris
    packages, but not directory trees.  Yet.  I have the code for it, but
    keep forgetting to integrate it.

  - run /usr/lib/pkg.depotd -p <port> -d /path/to/repo

    Choose <port> such that you have permissions to bind on that port, and
    a directory you have permissions to write to (it needn't exist).  If
    you use port 10000, then the following pkgsend commands needn't be
    adorned with "-s http://localhost:<port>/"

  - pkgsend open -e <pkg_name>@version

  - have your shell evaluate the output of that, either by copy/paste, or
    by passing through $()

  - pkgsend import foo.tar

    This refers to the tar file you created earlier

  - pkgsend add <action>

    Add more actions to the package, such as set actions for package
    metadata, depend actions for dependencies (pkgsend doesn't compute
    those for you yet), license actions, etc.  See pkg(5) and existing
    package manifests for ideas.

  - pkgsend close

    This should print "PUBLISHED" and the full package FMRI.

At this point, you should be able to add "http://localhost:<port>/" as the
origin of a new authority, and install your package from it.  We will
automate more of the process, and undoubtedly someone will write a nifty
little GUI tool to make the basics really easy.  For people doing a lot of
these, there's likely going to be a set of makefiles, scripts, ant recipes,
whatever, that does all this stuff based on existing manifests, but that's
all still future work.

Danek
_______________________________________________
pkg-discuss mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/pkg-discuss

Reply via email to