Simon, I checked with my guys now, and they claim the standard solaris packages body works ok with solaris 10 (see the one in tests/units)
M Simon Barrett wrote: > I'm using Solaris 10 5/09 with standard Solaris pkgadd, pkginfo commands. > > Many Thanks, > > Simon > > > > 2009/11/12 Mark Burgess <mark.burg...@iu.hio.no > <mailto:mark.burg...@iu.hio.no>> > > > Tell us what kind of solaris you are using, and which package > manager and we can look into it. > > M > > Simon Barrett wrote: > > Thanks. I pulled down trunk 615 and compiled it. Is that the latest? > > Sorry, I not familiar with subversion. > > > > I still get the same error if I try and use "package_multiline_start" > > > > # ./cf-agent -KI -b packages > > cf3:/var/cfengine/inputs/packages.cf:33 <http://packages.cf:33> > <http://packages.cf:33>,53: > > Constraint lvalue package_multiline_start is not allowed in > > 'package_method' constraint body, near token '\s*PKGINST:\s+[^\s]+"' > > Summarizing promises as text to /var/cfengine/inputs/promises.cf.txt > > Summarizing promises as html to /var/cfengine/inputs/promises.cf.html > > cf-agent was not able to get confirmation of promises from > cf-promises, > > so going to failsafe > > >> Using command line specified bundlesequence > > Bundle "packages" listed in the bundlesequence was not found > > Fatal cfengine error: Errors in agent bundles > > > > If I comment it out, I still don't get a match on my package name or > > version. > > > > cf-agent -V shows this: > > > > # ./cf-agent -V > > This comprises cf-agent core community version 3.0.3 - (C) > Cfengine AS 2008- > > > > Is there a different version I should try? > > > > Many thanks for your help, > > > > Simon > > > > > > > > 2009/11/12 Mark Burgess <mark.burg...@iu.hio.no > <mailto:mark.burg...@iu.hio.no> > > <mailto:mark.burg...@iu.hio.no <mailto:mark.burg...@iu.hio.no>>> > > > > > > You probably need to upgrade to one of the svn versions of > cfengine 3. > > 3.0.2 does not contain the solaris patches > > > > M > > > > Simon Barrett wrote: > > > I have a bundle defined for installation of the SUNWsneep > package (see > > > below). Whenever I run it the package is re-installed. For > some reason > > > it is not picking up the installed version. The supplied > "pkginfo -l" > > > will provide multiline output but when I uncomment the > > > "package_multiline_start" below, I get: > > > > > > "Constraint lvalue package_multiline_start is not allowed in > > > 'package_method' constraint body, near token > '\s*PKGINST:\s+[^\s]+"'" > > > > > > Can anyone point me in the right direction on using packages > with > > Solaris? > > > > > > The cf-agent output is as follows: > > > > > > > ??????????????????????????????????????????????????????????????? > > > Reading package list from /usr/bin/pkginfo > > > > ??????????????????????????????????????????????????????????????? > > > # Software reporting feature is only available in version Nova > > and above > > > # Patch reporting feature is only available in version > Nova and > > above > > > > ??????????????????????????????????????????????????????????????? > > > Done checking packages and patches > > > > ??????????????????????????????????????????????????????????????? > > > -> Looking for (SUNWsneep,*,*) > > > !! Unsatisfied constraints in promise (SUNWsneep,*,*) > > > -> Looking for (SUNWsneep,2.6,*) > > > !! Unsatisfied constraints in promise (SUNWsneep,2.6,*) > > > -> 0 package(s) matching the name "SUNWsneep" already > installed > > > -> 0 package(s) match the promise body's criteria fully > > > -> Package promises to refer to itself as "SUNWsneep" to > the manager > > > -> Schedule package for addition > > > >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> > > > Offering these package-promise suggestions to the managers > > > >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> > > > -> Deletion schedule... > > > -> Addition schedule... > > > Execute scheduled package addition > > > Command prefix: /usr/sbin/pkgadd -n -a > /tmp/cfengine_admin_file -r > > > /tmp/SUNWsneep.response -d /tmp/SUNWsneep.pkg > > > Executing /usr/sbin/pkgadd -n -a /tmp/cfengine_admin_file -r > > /tmp/SUNW... > > > Q:pkgadd -n -a /tmp/cf ...: > > > Q:pkgadd -n -a /tmp/cf ...:This appears to be an attempt to > > install the > > > same architecture and > > > Q:pkgadd -n -a /tmp/cf ...:version of a package which is > already > > > installed. This installation > > > Q:pkgadd -n -a /tmp/cf ...:will attempt to overwrite this > package. > > > Q:pkgadd -n -a /tmp/cf ...: > > > Q:pkgadd -n -a /tmp/cf ...: > > > Q:pkgadd -n -a /tmp/cf ...:Installation of <SUNWsneep> was > > successful. > > > Q:pkgadd -n -a /tmp/cf ...: > > > > > > > > > > > > > > > > > > bundle agent packages > > > { > > > vars: > > > "admin_file" string => "cfengine_admin_file"; > > > > > > files: > > > "/tmp/$(admin_file)" > > > create => "true", > > > edit_defaults => empty_file, > > > edit_line => create_admin_file; > > > > > > > > > packages: > > > "SUNWsneep" > > > package_policy => "add", > > > package_method => solaris("SUNWsneep", "SUNWsneep.pkg", > > > "$(admin_file)"), > > > package_select => "!=", > > > package_version => "2.6"; > > > > > > } > > > > > > ############################################# > > > > > > body package_method solaris (pkgname, spoolfile, adminfile) > > > > > > { > > > solaris:: > > > > > > package_changes => "individual"; > > > > > > package_list_command => "/usr/bin/pkginfo -l"; > > > > > > #package_multiline_start => "\s*PKGINST:\s+[^\s]+"; > > > package_list_name_regex => "\s*PKGINST:\s+([^\s]+)"; > > > package_list_version_regex => "\s*VERSION:\s+([^\s]+)"; > > > package_list_arch_regex => "\s*ARCH:\s+([^\s]+)"; > > > > > > package_installed_regex => > > > "\s*STATUS:\s*(completely|partially)\s+installed.*"; > > > > > > package_name_convention => "$(name)"; > > > > > > > > > package_add_command => "/usr/sbin/pkgadd -n -a > /tmp/$(adminfile) -r > > > /tmp/${pkgname}.response -d /tmp/$(spoolfile)"; > > > package_delete_command => "/usr/sbin/pkgrm -n -a > /tmp/$(adminfile)"; > > > } > > > > > > ########################################################### > > > > > > bundle edit_line create_admin_file > > > { > > > insert_lines: > > > > > > "mail= > > > instance=unique > > > partial=nocheck > > > runlevel=nocheck > > > idepend=nocheck > > > rdepend=nocheck > > > space=nocheck > > > setuid=nocheck > > > conflict=nocheck > > > action=nocheck > > > networktimeout=60 > > > networkretries=3 > > > authentication=quit > > > keystore=/var/sadm/security > > > proxy= > > > basedir=default"; > > > } > > > > > > ########################################################### > > > > > > body edit_defaults empty_file > > > { > > > empty_file_before_editing => "true"; > > > } > > > > > > > > > > > > ------------------------------------------------------------------------ > > > > > > _______________________________________________ > > > Help-cfengine mailing list > > > Help-cfengine@cfengine.org > <mailto:Help-cfengine@cfengine.org> > <mailto:Help-cfengine@cfengine.org <mailto:Help-cfengine@cfengine.org>> > > > https://cfengine.org/mailman/listinfo/help-cfengine > > > > -- > > Mark Burgess > > > > ------------------------------------------------- > > Professor of Network and System Administration > > Oslo University College, Norway > > > > Personal Web: http://www.iu.hio.no/~mark > <http://www.iu.hio.no/%7Emark> <http://www.iu.hio.no/%7Emark> > > Office Telf : +47 22453272 > > ------------------------------------------------- > > > > > > -- > Mark Burgess > > ------------------------------------------------- > Professor of Network and System Administration > Oslo University College, Norway > > Personal Web: http://www.iu.hio.no/~mark <http://www.iu.hio.no/%7Emark> > Office Telf : +47 22453272 > ------------------------------------------------- > > -- Mark Burgess ------------------------------------------------- Professor of Network and System Administration Oslo University College, Norway Personal Web: http://www.iu.hio.no/~mark Office Telf : +47 22453272 ------------------------------------------------- _______________________________________________ Help-cfengine mailing list Help-cfengine@cfengine.org https://cfengine.org/mailman/listinfo/help-cfengine