solaris 11 publish new package

root@s11-serv1:~# svcadm disable application/pkg/server
root@s11-serv1:~# svccfg –s application/pkg/server setprop \
pkg/readonly=false
root@s11-serv1:~# svcadm refresh application/pkg/server
root@s11-serv1:~# svcadm enable application/pkg/server

A best practice is to make the IPS repository read-only when not actively adding packages. This assumes this practice is being observed.

root@s11-desktop:~# mkdir –p /var/tmp/new_package
root@s11-desktop:~# cd /var/tmp/new_package

root@s11-desktop:/var/tmp/new_package# vi ips_rocks
blah blah

root@s11-desktop:/var/tmp/new_package# eval 'pkgsend -s \ http://s11-serv1.mydomain.com open new_package@1.0-1'
export PKG_TRANS_ID=1300392779_pkg%3A%2F%2Fsolaris%2Fnew_package%401.0%2
C5.11-1%3A20110317T201259Z

In this example, the –s points to your IPS publisher. The “new_package” version is 1.0, sub-version 1.

root@s11-desktop:/var/tmp/new_package# export \ PKG_TRANS_ID=1300392779_pkg%3A%2F%2Fsolaris%2Fnew_package%401.0%2 C5.11-1%3A20110317T201259Z
The PKG_TRANS_ID environment variable is required to give context to any additional pkgsend commands used to build the package.

root@s11-desktop:/var/tmp/new_package# pkgsend -s \ http://s11-serv1.mydomain.com add dir mode=0555 owner=root \ group=bin path=/export/new_package

root@s11-desktop:/var/tmp/new_package# pkgsend -s \ http://s11-serv1.mydomain.com add file \ /var/tmp/new_package/ips_rocks mode=0555 owner=root group=bin \
path=/export/new_package/ips_rocks

root@s11-desktop:/var/tmp/new_package# pkgsend -s \ http://s11-serv1.mydomain.com add set name=description \ value="My first IPS package"

root@s11-desktop:/var/tmp/new_package# pkgsend -s \ http://s11-serv1.mydomain.com close
PUBLISHED
pkg://solaris/new_package@1.0,5.11-1:20110317T201259Z

root@s11-serv1:~# svcadm disable application/pkg/server root@s11-serv1:~# svccfg –s application/pkg/server setprop \
pkg/readonly=true
root@s11-serv1:~# svcadm refresh application/pkg/server root@s11-serv1:~# svcadm enable application/pkg/server

root@s11-serv1:~# pkgrepo refresh -s /export/IPS/repo root@s11-serv1:~#

This entry was posted in solaris. Bookmark the permalink.

Comments are closed.