Hello.
  I would like to make a request for the addition of a new parameter
within the package resource.  This feature would only be used by
Solaris puppet users.   The requested enhancement would add an
interface into native "pkgadd" feature.
  The new parameter which I have been calling "pkginst" (indifferent
about parameter name) offers the ability to install a subset of
packages or all packages contained within 1 datastream package file.
For example if I had a datastream package file called "s10-
dinner-3.18e-i86pc" which contained the packages "appetizer", "salad",
"dinner" and "desert".    Most of the time the end user would want to
install all of the sub packages within "s10-dinner-3.18e-i86pc" as the
individual packages really make up the entire logical application or
service.   That would be accomplished with the following markup

  #  In this example we install "all" of the sub packages of the
"dinner" package.
  #  the most common usage for the pkginst parameter.
package { "dinner":,
           adminfile    => "/etc/pkgadmin",
           source       => "/var/tmp/s10-dinner-3.18e-i86pc",
           ensure       => installed,
           pkginst      => "all",
        }

  # In this example we install everything but the "desert" package
because we
  # had too many deserts over the holiday
package { "dinner":,
           adminfile    => "/etc/pkgadmin",
           source       => "/var/tmp/s10-dinner-3.18e-i86pc",
           ensure       => installed,
           pkginst      => [ "appetizer", "dinner", "salad" ]
        }


   The patch to    ./lib/puppet/type/package.rb creates the "pkginst"
paramater

--- type/package.rb     Wed Nov 25 13:25:36 2009
+++ type/package.rb.new Wed Nov 25 13:28:01 2009
@@ -230,6 +230,17 @@
             end
         end

+        newparam(:pkginst) do
+           desc "Names for the sub packages contained within 1
datastream file.
+                Providing 1 file which contains multiple packages is
a
+                legitimate way to distribute packages that are used
together.
+                The problem is that may want to instal SUNWJet but
that package
+                file contains a dozen other supporting packages.
This way
+                you can pass in the list of package names to install
or the
+                keyword 'all' which is the most common use."
+
+        end
+
         newparam(:adminfile) do
             desc "A file containing package defaults for installing
packages.
                 This is currently only used on Solaris.  The value
will be



   The patch to ./lib/puppet/provider/package/sun.rb basically decides
which form of the package instance will be passed to pkgadd.  The
normal "name" parameter or the new "pkginst" parameter.

--- package/sun.rb      Wed Nov 25 13:31:11 2009
+++ package/sun.rb.new  Wed Nov 25 13:30:29 2009
@@ -131,8 +131,13 @@
         end

         cmd << "-d" << @resource[:source]
-        cmd << "-n" << @resource[:name]

+        if @resource[:pkginst]
+            cmd << "-n" << @resource[:pkginst]
+       else
+            cmd << "-n" << @resource[:name]
+        end
+
         pkgadd cmd
     end


   As I'm early in a cfengine -> puppet migration I'm still learning
the process for requests like this.   I  had mistakenly opened up a
ticket before submitting this request to the dev team.   The ticket
http://projects.reductivelabs.com/issues/2878 has an attached tarball
with the patches, supporting packages for testing and further
documentation.

    I'd be happy to update the wiki or any other doc source if people
like my request and it moves forward.
   Thanks.  Derek.

--

You received this message because you are subscribed to the Google Groups 
"Puppet Developers" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/puppet-dev?hl=en.


Reply via email to