Top Banner
Solaris Packages Dagobert Michelsen Baltic Online Computer GmbH Donnerstag, 10. Januar 13
51

OpenCSW - What is the project about?

Nov 22, 2014

Download

Technology

dmichelsen

This is an introduction on the OpenCSW project - what is about and how the basic things are done
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: OpenCSW - What is the project about?

Solaris PackagesDagobert Michelsen

Baltic Online Computer GmbH

Donnerstag, 10. Januar 13

Page 2: OpenCSW - What is the project about?

Me

Donnerstag, 10. Januar 13

Page 3: OpenCSW - What is the project about?

MeBorn 1971

Solaris 1994„root“ 1998CSW 2006

Donnerstag, 10. Januar 13

Page 4: OpenCSW - What is the project about?

Solaris Packages

What is OpenCSW?

Donnerstag, 10. Januar 13

Page 5: OpenCSW - What is the project about?

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

Page 6: OpenCSW - What is the project about?

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

Page 7: OpenCSW - What is the project about?

Solaris Packages

Why “Open”CSW?

Donnerstag, 10. Januar 13

Page 8: OpenCSW - What is the project about?

Solaris Packages

Why “Open”CSW?

• Open build descriptions

• Repository hosted at SourceForge

Donnerstag, 10. Januar 13

Page 9: OpenCSW - What is the project about?

Solaris Packages

Why “Open”CSW?

• Open build descriptions

• Repository hosted at SourceForge

• Open download for binary packages

Donnerstag, 10. Januar 13

Page 10: OpenCSW - What is the project about?

Solaris Packages

Why “Open”CSW?

• Open build descriptions

• Repository hosted at SourceForge

• Open download for binary packages

• Open for contributors

Donnerstag, 10. Januar 13

Page 11: OpenCSW - What is the project about?

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

Page 12: OpenCSW - What is the project about?

Camps twice a yearall around Europe

Community

Donnerstag, 10. Januar 13

Page 13: OpenCSW - What is the project about?

Camps twice a yearall around Europe

Community

Kiel

Oslo

München

Dublin

Zürich

Donnerstag, 10. Januar 13

Page 14: OpenCSW - What is the project about?

Solaris Packages

Open...What?

• German: Open-Ze-Es-We

• English: Open-Cashew Open-\kə-ˈshü\

Donnerstag, 10. Januar 13

Page 15: OpenCSW - What is the project about?

Solaris Packages

Open...What?

• German: Open-Ze-Es-We

• English: Open-Cashew Open-\kə-ˈshü\

Cashew nut

Donnerstag, 10. Januar 13

Page 16: OpenCSW - What is the project about?

Solaris Packages

History

• CSW Community SoftWare, Alan DuBoff

• Start 2002 with packages from Phil Brown, hosted at Blastwave

• Fork 2008 OpenCSWhttp://www.flickr.com/photos/bertiemabootoo/2362780033/

Donnerstag, 10. Januar 13

Page 17: OpenCSW - What is the project about?

Using OpenCSW

Donnerstag, 10. Januar 13

Page 18: OpenCSW - What is the project about?

Solaris Packages

Solaris versions

Sparc

8

9

10

11

x86

8

9

10

11

Donnerstag, 10. Januar 13

Page 19: OpenCSW - What is the project about?

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

Page 20: OpenCSW - What is the project about?

Solaris Packages

Getting Started

# pkgadd -d http://get.opencsw.org/now

# PATH=$PATH:/opt/csw/bin

# pkgutil -i top

# top

Donnerstag, 10. Januar 13

Page 21: OpenCSW - What is the project about?

Solaris Packages

What is available?[unstable10s]:/home/dam > pkgutil -a xmlcommon package catalog sizelibqtxml4_gxx CSWlibqtxml4-gxx 4.8.0,REV=2012.06.08 132.3 KBlibxml CSWlibxml 1.8.17 1.4 MBlibxml++ CSWlibxml++ 1.0.0,REV=2004.06.14 50.3 KBlibxml2_2 CSWlibxml2-2 2.7.8,REV=2011.03.24 1.4 MBlibxml2_dev CSWlibxml2-dev 2.7.8,REV=2011.03.24 864.6 KBlibxml2_stub CSWlibxml2 2.7.8,REV=2011.03.24 1.9 KBlibxml2devel_stub CSWlibxml2devel 2.7.8,REV=2011.03.24 1.9 KBphp5_xmlreader CSWphp5-xmlreader 5.3.15,REV=2012.07.25 23.5 KBphp5_xmlrpc CSWphp5-xmlrpc 5.3.15,REV=2012.07.25 51.9 KBphp5_xmlwriter CSWphp5-xmlwriter 5.3.15,REV=2012.07.25 24.0 KBphp5xmlreader_stub CSWphp5xmlreader 5.3.15,REV=2012.07.25 2.5 KBphp5xmlrpc_stub CSWphp5xmlrpc 5.3.15,REV=2012.07.25 2.5 KBphp5xmlwriter_stub CSWphp5xmlwriter 5.3.15,REV=2012.07.25 2.5 KBpm_libxmlperl CSWpmlibxmlperl 0.08,REV=2006.08.15 46.0 KBpm_marcxml CSWpmmarcxml 0.92,REV=2010.06.11 10.4 KBpm_rpcxml CSWpmrpcxml 0.74,REV=2011.02.13 171.4 KBpm_testxml CSWpmtestxml 0.07,REV=2006.02.21 10.0 KBpm_xml_atom CSWpm-xml-atom 0.39,REV=2011.06.26 26.7 KB…

Donnerstag, 10. Januar 13

Page 22: OpenCSW - What is the project about?

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

Page 23: OpenCSW - What is the project about?

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

Page 24: OpenCSW - What is the project about?

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

Page 25: OpenCSW - What is the project about?

Solaris Packages

Catalogshttp://mirror.opencsw.org/opencsw/

stable ! ./README (dead!) testing ! dublin/ unstable/

dublin/ (will become new stable) kiel/ (has updates from unstable) bratislava/ (still almost empty)

Donnerstag, 10. Januar 13

Page 26: OpenCSW - What is the project about?

Solaris Packages

Catalogs<catalog>"## i386$   "## 5.8$ $   "## catalog$ $   "## descriptions$ $   %## pkg-1.0,REV=2912.11.21-SunOS5.8-sparc-CSW.pkg.gz$   %## 5.9$ $   "## catalog$ $   "## descriptions$ $   %## pkg-1.0,REV=2912.11.21-SunOS5.8-sparc-CSW.pkg.gz$ $   -> ../5.8/pkg-1.0,REV=2912.11.21-SunOS5.8-sparc-CSW.pkg.gz$   "## 5.10$ $   "## catalog$ $   "## descriptions$ $   %## pkg-1.0,REV=2912.11.21-SunOS5.10-sparc-CSW.pkg.gz$   "## 5.11%## sparc "## 5.8 "## 5.9 "## 5.10 %## 5.11

Donnerstag, 10. Januar 13

Page 27: OpenCSW - What is the project about?

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/unstablemirror=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

Page 28: OpenCSW - What is the project about?

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  [email protected]  trust

• Fingerprint4DCE 3C80 AAB2  CAB1  E60C    9A3C  05F4  2D66  9306  CC77

Donnerstag, 10. Januar 13

Page 29: OpenCSW - What is the project about?

No internet?

Donnerstag, 10. Januar 13

Page 30: OpenCSW - What is the project about?

No internet?

Donnerstag, 10. Januar 13

Page 31: OpenCSW - What is the project about?

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

Page 32: OpenCSW - What is the project about?

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

Page 33: OpenCSW - What is the project about?

Solaris Packages

Packaging

• Dependencies between CSW packages,No dependencies to SUNW packages

• Split-off development packagesCSW<library>-dev

• On libraries one package per SONAME

• Simplfied updates on versions bumps

• Canonical package name deriver from SONAME

Donnerstag, 10. Januar 13

Page 34: OpenCSW - What is the project about?

Solaris Packages

Compiling against OpenCSW

• Compiler

• “Dublin”+ “Kiel”: Solaris Studio 12.x“Bratislava”: GCC 4.7

• FlagsCFLAGS -I/opt/csw/includeLDFLAGS -L/opt/csw/lib{/64} -R/opt/csw/lib{/64}PKG_CONFIG_PATH /opt/csw/lib/pkgconfig{/64}

Donnerstag, 10. Januar 13

Page 35: OpenCSW - What is the project about?

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

Page 36: OpenCSW - What is the project about?

Solaris Packages

Sparse Zones

• Yes, we can! :-)

• Solaris 11: No more sparse zones

• Global ZoneClass Action Scripts CSWcas-*/usr/sadm/install/scripts/{i|r}.<class>

• Nonglobal Zones: nothing special

Donnerstag, 10. Januar 13

Page 37: OpenCSW - What is the project about?

Buildsystem

Donnerstag, 10. Januar 13

Page 38: OpenCSW - What is the project about?

Solaris Packages

Buildsystem: GARhttp://gar.opencsw.org

Donnerstag, 10. Januar 13

Page 39: OpenCSW - What is the project about?

Solaris Packages

Live Demo

• Name

• Description

• Version

• Filename

• Download from where?

Donnerstag, 10. Januar 13

Page 40: OpenCSW - What is the project about?

Solaris Packages

Live DemoNAME = gperfVERSION = 3.0.4

DESCRIPTION = A perfect hash function generator

MASTER_SITES = http://ftp.gnu.org/gnu/gperfDISTFILES = $(NAME)-$(VERSION).tar.gz

include gar/category.mk

Donnerstag, 10. Januar 13

Page 41: OpenCSW - What is the project about?

Solaris Packages

Live DemoNAME = gperfVERSION = 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

Page 42: OpenCSW - What is the project about?

Solaris Packages

Live DemoNAME = gperfVERSION = 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

Page 43: OpenCSW - What is the project about?

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

Page 44: OpenCSW - What is the project about?

Solaris Packages

PrerequisitesFetchChecksumExtractPatchConfigureBuildTestInstallMergePackage

Global

Inside amodulation

Global

Phases

Donnerstag, 10. Januar 13

Page 45: OpenCSW - What is the project about?

Solaris Packages

PrerequisitesFetchChecksumExtractPatchConfigureBuildTestInstallMergePackage

Global

Inside amodulation

Global

Phases

Donnerstag, 10. Januar 13

Page 46: OpenCSW - What is the project about?

Solaris Packages

PrerequisitesFetchChecksumExtractPatchConfigureBuildTestInstallMergePackage

Global

Inside amodulation

Global

Phases

One Modulation

Donnerstag, 10. Januar 13

Page 47: OpenCSW - What is the project about?

Solaris Packages

Live DemoNAME = gperfVERSION = 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

Page 48: OpenCSW - What is the project about?

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

Page 49: OpenCSW - What is the project about?

Solaris Packages

Features, …

• Reinplacement

• Checkpkg

• Categories

• Auto–SMF

• Preserveconf

• CPAN makemake

• Platforms

• Mapfiles

• Modulations

• Obsoletions

• Dynamic prototypes

Donnerstag, 10. Januar 13

Page 50: OpenCSW - What is the project about?

Solaris Packages

Things to come

• IPS

• Rebuild the World with custom prefix

• ACMEopenldap

• /opt/acme

Donnerstag, 10. Januar 13

Page 51: OpenCSW - What is the project about?

http://www.opencsw.org http://www.opencsw.org/communityhttp://freenode.net IRC-Channel #opencswTwitter: @opencsw

Donnerstag, 10. Januar 13