Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Solaris 11 Makefile and packaging README #52

Closed
wants to merge 2 commits into from

2 participants

@mathieulegrand

Oracle Solaris 11 has a different packaging system from Solaris 10. For instance, Ruby 1.8 can be installed directly from Oracle repositories and is compiled with Sun Studio. Therefore the packaging for Solaris 10 which uses the OpenCSW directory structure does not apply in Solaris 11.

This is a simple Makefile (inspired by the Debian Makefile) to support the default directory structure of Solaris 11. I've added a README with the steps to create a Solaris package repository as well.

@ripienaar

merged thanks

@ripienaar ripienaar closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Oct 1, 2012
  1. @mathieulegrand
  2. @mathieulegrand

    Fixed formatting

    mathieulegrand authored
This page is out of date. Refresh to see the latest.
Showing with 150 additions and 0 deletions.
  1. +46 −0 ext/solaris11/Makefile
  2. +104 −0 ext/solaris11/README.md
View
46 ext/solaris11/Makefile
@@ -0,0 +1,46 @@
+#!/usr/bin/make -f
+
+DESTDIR=
+
+build:
+
+clean:
+
+install: install-bin install-lib install-conf install-plugins # install-doc
+
+install-bin:
+ install -d $(DESTDIR)/usr/sbin
+ install -d $(DESTDIR)/usr/bin
+ cp bin/mc-* $(DESTDIR)/usr/sbin
+ cp bin/mco $(DESTDIR)/usr/bin
+ cp bin/mcollectived $(DESTDIR)/usr/sbin/mcollectived
+ cp COPYING $(DESTDIR)/
+
+install-lib:
+ install -d $(DESTDIR)/usr/ruby/1.8/lib/ruby/site_ruby/1.8/
+ cp -rp lib/* $(DESTDIR)/usr/ruby/1.8/lib/ruby/site_ruby/1.8/
+
+install-conf:
+ install -d $(DESTDIR)/etc/mcollective/
+ install -d $(DESTDIR)/etc/init.d
+ cp -r etc/* $(DESTDIR)/etc/mcollective/
+ cp mcollective.init $(DESTDIR)/etc/init.d/mcollective
+ rm $(DESTDIR)/etc/mcollective/ssl/PLACEHOLDER
+ rm $(DESTDIR)/etc/mcollective/ssl/clients/PLACEHOLDER
+
+install-plugins:
+ install -d $(DESTDIR)/usr/share/mcollective/
+ cp -rp plugins $(DESTDIR)/usr/share/mcollective/
+
+install-doc:
+ install -d $(DESTDIR)/usr/share/doc/
+ cp -rp doc $(DESTDIR)/usr/share/doc/mcollective
+
+uninstall:
+ rm -f $(DESTDIR)/usr/sbin/mcollectived
+ rm -rf $(DESTDIR)/usr/ruby/1.8/lib/ruby/site_ruby/1.8/mcollective*
+ rm -rf $(DESTDIR)/usr/share/mcollective
+ rm -rf $(DESTDIR)/etc/mcollective
+
+.PHONY: build clean install uninstall
+
View
104 ext/solaris11/README.md
@@ -0,0 +1,104 @@
+Requirements
+------------
+
+- Ruby (pkg install pkg:/runtime/ruby-18)
+- Header files (pkg install system/header)
+- GCC to install JSON (pkg install developer/gcc-3)
+- Stomp: gem install stomp
+- Ruby-JSON: gem install json
+
+Installation
+------------
+
+Clone the github repository and install as root:
+
+ $ cd marionette-collective
+ $ make -f ext/solaris11/Makefile install
+
+This will use / as a default destination root directory.
+
+IPS package
+-----------
+
+To create an IPS package, follow the excellent guide at:
+http://www.neuhalfen.name/blog/2011/07/02/Solaris11-Packaging-IPS_simple_packages/
+
+To create a basic IPS repository (and start the associated services):
+
+ # zfs create rpool/IPS
+ # zfs set atime=off rpool/IPS
+ # zfs set mountpoint=/IPS rpool/IPS
+ # mkdir /IPS/Solaris11
+ # svcadm enable application/pkg/server
+ # svccfg -s application/pkg/server setprop pkg/inst_root=/IPS/Solaris11
+ # svccfg -s application/pkg/server setprop pkg/readonly=false
+ # pkgrepo create /IPS/Solaris11/
+ # pkgrepo set -s /IPS/Solaris11 publisher/prefix=legrand.im
+ # pkgrepo -s /IPS/Solaris11 refresh
+ # svcadm refresh application/pkg/server
+ # svcadm enable application/pkg/server
+ # pkg set-publisher -O http://localhost:80 legrand.im
+
+To create and send the package itself, from the guide above:
+
+ # mkdir ~/package
+ # cd <GITHUB>/marionette-collective
+ # cat Makefile | sed 's/DESTDIR=$/DESTDIR=~\/package/' > Makefile.package
+ # make -f ext/solaris11/Makefile.package install
+ # pkg install pkg:/file/gnu-findutils
+ # export ROOT=/
+ # export description="MCollective"
+ # export user="root"
+ # export group="root"
+ # cd ~/package
+ # cat > ../send.sh << "EOF"
+ #!/bin/sh
+ export PKGSEND="pkgsend -s http://localhost:80"
+ eval `$PKGSEND open mcollective@1.1-1`
+ $PKGSEND add license ./COPYING license=lorem_ipsum
+ $PKGSEND add set name=description value="${description}"
+ EOF
+ # gfind . -type d -not -name . -printf "\$PKGSEND add dir mode=%m owner=${user} group=${group} path=$ROOT/%h/%f \n" >> ../send.sh
+ # gfind . -type f -not -name LICENSE -printf "\$PKGSEND add file %h/%f mode=%m owner=${user} group=${group} path=$ROOT/%h/%f \n" >> ../send.sh
+ # gfind . -type l -not -name LICENSE -printf "\$PKGSEND add link path=%h/%f target=%l \n" >> ../send.sh
+ # echo '$PKGSEND close' >> ../send.sh
+ # sh -x ../send.sh
+
+The package can then be installed with:
+
+ # pkg install pkg://legrand.im/mcollective
+
+Configuration
+-------------
+
+There is no packaged configuration; you can use the following example:
+
+ # cat > /etc/mcollective/client.cfg << "EOF"
+ topicprefix = /topic/
+ main_collective = mcollective
+ collectives = mcollective
+ libdir = /usr/share/mcollective/plugins
+ logfile = /dev/null
+ loglevel = info
+ # Plugins
+ securityprovider = psk
+ plugin.psk = unset
+ connector = stomp
+ plugin.stomp.host = mqserver
+ plugin.stomp.port = 6163
+ plugin.stomp.user = mcollective
+ plugin.stomp.password = changeme
+ # Facts
+ factsource = yaml
+ plugin.yaml = /etc/mcollective/facts.yaml
+ EOF
+
+License
+------
+
+http://creativecommons.org/publicdomain/zero/1.0/
+
+To the extent possible under law, Mathieu Legrand has waived all copyright and related or
+neighboring rights to this work. This work is published from: Singapore.
+
+
Something went wrong with that request. Please try again.