1. create software
mkdir /var/tmp/package
echo "blah" > /var/tmp/package/foo
cd /var/tmp/package
2. create repository
(needs filesystem, create repo, service(inst_root,port), publischerprefix)
zfs create rpool/export/repo
zfs set quota=4g rpool/export/repo
pkgrepo create /export/repo
svccfg -s application/pkg/server setprop pkg/inst_root=/export/repo
svccfg -s application/pkg/server setprop pkg/port=10000
svcadm refresh application/pkg/server
svcadm enable application/pkg/server
pkgrepo set -s /export/repo publisher/prefix=privrepo
3. create package manifest
pkgsend generate /var/tmp/package/ > manifest.foo
add the following entries at top of manifest.foo
set name=pkg.fmri value=pkg://privrepo/foo@1.0
set name=pkg.description value="new package"
set name=description value="my first package"
set name=info.classification value="groningen package"
pkgdepend generate -d /var/tmp/package manifest.foo > deps.foo
This package has no dependencies...since deps.foo remains empty
else you would have to resolve:
pkgdepend resolve deps.foo
make the manifest more readable:
pkgfmt manifest.foo
svccfg -s application/pkg/server setprop pkg/readonly=false
svcadm refresh application/pkg/server
svcadm restart application/pkg/server
pkgsend publish -d /var/tmp/package/ -s \
http://192.168.1.175:10000 manifest.foo
pkg set-publisher -g http://192.168.1.175:10000 privrepo
pkg publisher
PUBLISHER TYPE STATUS URI
solaris origin online http://192.168.1.161/
privrepo origin online http://192.168.1.175:10000/
pkg search -s http://192.168.1.175:10000 '*'
pkg info -g http://192.168.1.175:10000 '*'
pkg list -g http://192.168.1.175:10000
pkg contents -g http://192.168.1.175:10000 '*'