pkgsrc provider for Package?

15 views
Skip to first unread message

Jesse Reynolds

unread,
Jan 27, 2009, 11:54:40 PM1/27/09
to Puppet Users
Hello

I'm wondering if anyone has looked into adding pkgsrc package
management as a provider for Package?

We use Joyent accelerators (zones on OpenSolaris) for our many of our
production services and about a year ago Joyent switched from
Blastwave to pkgsrc for userland packages.

pkgsrc catalog - http://pkgsrc.se/
pkgsrc guide - http://www.netbsd.org/docs/pkgsrc/
joyent pkgsrc info - http://wiki.joyent.com/accelerators:kb:pkgsrc

I had planned on using puppet to manage our joyent virtual boxes and
our local developer virtual machines including installation of ruby,
rails, apache, etc etc out of pkgsrc but seems this might be non
trivial. Any advice appreciated.

Thanks
Jesse

James Turnbull

unread,
Jan 28, 2009, 1:52:09 AM1/28/09
to puppet...@googlegroups.com
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1


Jesse Reynolds wrote:
> Hello
>
> I'm wondering if anyone has looked into adding pkgsrc package
> management as a provider for Package?
Not as far as I am aware.

> I had planned on using puppet to manage our joyent virtual boxes and
> our local developer virtual machines including installation of ruby,
> rails, apache, etc etc out of pkgsrc but seems this might be non
> trivial. Any advice appreciated.
Well I'd start with logging a ticket. pkgsrc is a NetBSD thing
right? Does it work like ports? Is there a pkgsrc package for Puppet?

Regards

James

- --
Author of:
* Pulling Strings with Puppet
(http://www.amazon.com/gp/product/1590599780/)
* Pro Nagios 2.0
(http://www.amazon.com/gp/product/1590596099/)
* Hardening Linux
(http://www.amazon.com/gp/product/1590594444/)

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkmAAJkACgkQ9hTGvAxC30B9NQCeIzMIoM1vZwoe5e02NkBXWhaw
zQYAoIO6vssPbB3OBIgyPKdBdplMjwr1
=00WI
-----END PGP SIGNATURE-----

Jesse Reynolds

unread,
Jan 28, 2009, 2:00:21 AM1/28/09
to puppet...@googlegroups.com


2009/1/28 James Turnbull <ja...@lovedthanlost.net>


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Jesse Reynolds wrote:
> Hello
>
> I'm wondering if anyone has looked into adding pkgsrc package
> management as a provider for Package?
Not as far as I am aware.
> I had planned on using puppet to manage our joyent virtual boxes and
> our local developer virtual machines including installation of ruby,
> rails, apache, etc etc out of pkgsrc but seems this might be non
> trivial. Any advice appreciated.
Well I'd start with logging a ticket.  pkgsrc is a NetBSD thing
right?  Does it work like ports?  Is there a pkgsrc package for Puppet?

It works similarly to ports, yes. It can build from scratch like ports, or it can install from a pre-built package repository. 

Yes there is package for Puppet in pkgsrc :-)

 OK I'll log a ticket, thanks. 

James Turnbull

unread,
Jan 28, 2009, 2:11:38 AM1/28/09
to puppet...@googlegroups.com
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Jesse Reynolds wrote:
>
>
> 2009/1/28 James Turnbull <ja...@lovedthanlost.net
> <mailto:ja...@lovedthanlost.net>>

So I just looked quickly at the doco for pkgsrc and the existing
freebsd, openbsd and ports support in Puppet and it looks to me like
it'll work fine. It's currently confined to only work on OpenBSd and
FreeBSD but it'd be an easy fix to update that and if there are minor
bugs fix those.

The files you want to look at are:

lib/puppet/provider/package/openbsd.rb
lib/puppet/provider/package/freebsd.rb
lib/puppet/provider/package/ports.rb

Cheers

James Turnbull

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkmABSoACgkQ9hTGvAxC30CQhgCg2JnsbhQ1fPJ2TDbUIYjRkcaJ
7gAAoLgiWpIa3yPTLI8xISfgeiQp1JLz
=NveT
-----END PGP SIGNATURE-----

Rob Chanter

unread,
Jan 28, 2009, 7:15:25 PM1/28/09
to puppet...@googlegroups.com
On Wed, Jan 28, 2009 at 6:11 PM, James Turnbull <ja...@lovedthanlost.net> wrote:
>
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> So I just looked quickly at the doco for pkgsrc and the existing
> freebsd, openbsd and ports support in Puppet and it looks to me like
> it'll work fine. It's currently confined to only work on OpenBSd and
> FreeBSD but it'd be an easy fix to update that and if there are minor
> bugs fix those.

Pkgsrc also works on Red Hat. We use it here for a few things. The
other thing that occurs to me is that with pkgsrc on non-NetBSD
systems, you end up with a mixed package system where core OS packages
are provided by RPM (or SVR4 pkgadd/pkgrm or whatever) and the
extended packages are managed using the pkgsrc toolset. There might
also be namespace clashes between the two package systems, since they
use different package databases.

Can puppet easily enough refer a package resource to an alternative provider?

cheers
rob

James Turnbull

unread,
Jan 28, 2009, 7:22:49 PM1/28/09
to puppet...@googlegroups.com
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Rob Chanter wrote:
>
>
> Can puppet easily enough refer a package resource to an alternative
provider?
>
package { blah:
ensure => latest,
provider => ports
}

The provider attribute allows you to specify which provider to use for
certain functions.

Regards

James Turnbull

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkmA9tgACgkQ9hTGvAxC30CayACg0g1xE51uaTVLsfe1HT61Ufv+
WtEAn2A1y9NeBB9fpDZHIpXMtmCNr/MF
=JiFJ
-----END PGP SIGNATURE-----

Reply all
Reply to author
Forward
0 new messages