5. Solaris Packages
What is OpenCSW?
• Priority 1: Porting together with Upstream
• 43 projects using the OpenCSW buildfarm to ensure Solaris
compatibility
• 12 GNU projects
Donnerstag, 10. Januar 13
6. Solaris Packages
What is OpenCSW?
• Priority 1: Porting together with Upstream
• 43 projects using the OpenCSW buildfarm to ensure Solaris
compatibility
• 12 GNU projects
• Priority 2: Packaging
• About 3700 packages
Donnerstag, 10. Januar 13
9. Solaris Packages
Why “Open”CSW?
• Open build descriptions
• Repository hosted at SourceForge
• Open download for binary packages
Donnerstag, 10. Januar 13
10. Solaris Packages
Why “Open”CSW?
• Open build descriptions
• Repository hosted at SourceForge
• Open download for binary packages
• Open for contributors
Donnerstag, 10. Januar 13
11. Solaris Packages
Why “Open”CSW?
• Open build descriptions
• Repository hosted at SourceForge
• Open download for binary packages
• Open for contributors
• Open for upstream projects
Donnerstag, 10. Januar 13
12. Camps twice a year
all around Europe
Community
Donnerstag, 10. Januar 13
13. Camps twice a year
all around Europe
Community
Kiel
Oslo
München
Dublin
Zürich
Donnerstag, 10. Januar 13
16. Solaris Packages
History
• CSW
Community SoftWare,
Alan DuBoff
• Start 2002
with packages from Phil Brown,
hosted at Blastwave
• Fork 2008
OpenCSW
http://www.flickr.com/photos/bertiemabootoo/2362780033/
Donnerstag, 10. Januar 13
19. Solaris Packages
pkgutil
• Wrapper around pkgadd / pkgrm
• Automatic download
• Automatic dependency resolution
• For OpenCSW packages,
but also other non-csw packages
→ Use CSWpkgutilplus
Donnerstag, 10. Januar 13
20. Solaris Packages
Getting Started
# pkgadd -d http://get.opencsw.org/now
# PATH=$PATH:/opt/csw/bin
# pkgutil -i top
# top
Donnerstag, 10. Januar 13
22. Solaris Packages
Update
• Update the catalog
# pkgutil -U
• Update a package
# pkgutil -y -u CSWapache2
• Update all packages
# pkgutil -y -u
Donnerstag, 10. Januar 13
23. Solaris Packages
Paths
• Configuration
/etc/opt/csw! ! (local) configuration
/opt/csw/etc! ! Artifacts and global configurations
• Binaries and libraries
/opt/csw
• Variable files
/var/opt/csw
Donnerstag, 10. Januar 13
24. Solaris Packages
Catalogs
• By stability
‣ stable
Legacy, dead since 2008
‣ testing
At the moment „dublin“
‣ unstable
Lots of updates
• By release
‣ dublin
Features shared library splitting
‣ kiel
Features OpenSSL 1.0, GCC 4.7
‣ bratislava
Features world rebuild, custom prefix
Donnerstag, 10. Januar 13
27. Solaris Packages
/etc/opt/csw/pkgutil.conf
…
# Max package list length
# During dependency calculation the recursive algorithm needs to be protected
# against cyclic dependencies in the catalog (packages that list each other
# as dependencies) or pkgutil will not stop until memory is exhausted.
# Default: 250000
#maxpkglist=250000
# Mirror to use for downloads
# See http://www.opencsw.org/mirrors for alternative mirrors.
# Default: http://mirror.opencsw.org/opencsw/unstable
mirror=http://mirror.opencsw.org/opencsw/unstable
# Support non-CSW packages. If you have your own packages that have a different
# prefix that you want to use with pkgutil you must enable this otherwise
# pkgutil will skip every package not prefixed by CSW.
# NOTE: this also affects options like -c/C, however it's easy to filter the
# output if wanted, e.g. "pkgutil -C CSW".
# Default: false
#noncsw=true
…
Donnerstag, 10. Januar 13
28. Solaris Packages
Security
• Catalog is signed with GPG
• Checksum for each package in the catalog
pkgutil
-‐i
CSWcswpki
*or*
wget
-‐q
-‐O
-‐
http://www.opencsw.org/security/
|
gpg
-‐-‐import
-‐
gpg
-‐-‐edit-‐key
board@opencsw.org
trust
• Fingerprint
4DCE 3C80 AAB2
CAB1
E60C
9A3C
05F4
2D66
9306
CC77
Donnerstag, 10. Januar 13
31. Solaris Packages
No internet?
or lots of local package traffic
• Local mirror
rsync -Hrav
rsync://mirror.opencsw.org/opencsw
/export/opencsw
vi /etc/opt/csw/pkgutil.conf
(Edit mirror=file:///export/opencsw/unstable)
Donnerstag, 10. Januar 13
32. Solaris Packages
No internet?
• One package with dependencies
# pkgutil --stream --download -T sparc:5.10 bind
…
Transforming packages into stream (/home/dam/.pkgutil/packages/bind.sparc.5.10.pkg)
…
• Copy over bind.sparc.5.10.pkg
• Install packages
# pkgadd -d bind.sparc.5.10.pkg all
Donnerstag, 10. Januar 13
33. Solaris Packages
Packaging
• Dependencies between CSW packages,
No dependencies to SUNW packages
• Split-off development packages
CSW<library>-dev
• On libraries one package per SONAME
• Simplfied updates on versions bumps
• Canonical package name deriver from SONAME
Donnerstag, 10. Januar 13
34. Solaris Packages
Compiling against
OpenCSW
• Compiler
• “Dublin”+ “Kiel”:
Solaris Studio 12.x
“Bratislava”:
GCC 4.7
• Flags
CFLAGS -I/opt/csw/include
LDFLAGS -L/opt/csw/lib{/64}
-R/opt/csw/lib{/64}
PKG_CONFIG_PATH
/opt/csw/lib/pkgconfig{/64}
Donnerstag, 10. Januar 13
35. Solaris Packages
32/64 Bit
• Combined 32/64 bit packages where useful
‣ Kernel memory
‣ >2 GB memory
‣ >256 file descriptors
‣ x64
• isaexec
Donnerstag, 10. Januar 13
36. Solaris Packages
Sparse Zones
• Yes, we can! :-)
• Solaris 11: No more sparse zones
• Global Zone
Class Action Scripts
CSWcas-*
/usr/sadm/install/scripts/{i|r}.<class>
• Nonglobal Zones: nothing special
Donnerstag, 10. Januar 13
39. Solaris Packages
Live Demo
• Name
• Description
• Version
• Filename
• Download from where?
Donnerstag, 10. Januar 13
40. Solaris Packages
Live Demo
NAME = gperf
VERSION = 3.0.4
DESCRIPTION = A perfect hash function generator
MASTER_SITES = http://ftp.gnu.org/gnu/gperf
DISTFILES = $(NAME)-$(VERSION).tar.gz
include gar/category.mk
Donnerstag, 10. Januar 13
41. Solaris Packages
Live Demo
NAME = gperf
VERSION = 3.0.4
DESCRIPTION = A perfect hash function generator
MASTER_SITES = $(GNU_MIRROR)
DISTFILES = $(NAME)-$(VERSION).tar.gz
include gar/category.mk
Donnerstag, 10. Januar 13
42. Solaris Packages
Live Demo
NAME = gperf
VERSION = 3.0.4
DESCRIPTION = A perfect hash function generator
MASTER_SITES = $(GNU_MIRROR)
DISTFILES = $(NAME)-$(VERSION).tar.gz
BUILD64 = 1
include gar/category.mk
Donnerstag, 10. Januar 13
43. Solaris Packages
Live Demo
.
`-- opt
`-- csw
|-- bin
| |-- gperf
| `-- sparcv9
| `-- gperf
`-- share
|-- doc
| |-- gperf
| | `-- license
| `-- gperf.html
|-- info
| `-- gperf.info
`-- man
`-- man1
`-- gperf.1
Donnerstag, 10. Januar 13
47. Solaris Packages
Live Demo
NAME = gperf
VERSION = 3.0.4
DESCRIPTION = A perfect hash function generator
MASTER_SITES = $(GNU_MIRROR)
DISTFILES = $(NAME)-$(VERSION).tar.gz
BUILD64 = 1
ISAEXEC = 1
include gar/category.mk
Donnerstag, 10. Januar 13
48. Solaris Packages
Live Demo
.
`-- opt
`-- csw
|-- bin
| |-- gperf -> isaexec
| `-- sparcv8plus
| `-- gperf
| `-- sparcv9
| `-- gperf
`-- share
|-- doc
| |-- gperf
| | `-- license
| `-- gperf.html
|-- info
| `-- gperf.info
`-- man
`-- man1
Donnerstag, 10. Januar 13