SlideShare ist ein Scribd-Unternehmen logo
1 von 26
Downloaden Sie, um offline zu lesen
mGAR
             Producing complex packages for Solaris the easy way


                            OpenCSW Technical Wintercamp
                                    Dublin 2011

                                 Dagobert Michelsen
                                 dam@opencsw.org


Samstag, 19. Februar 2011                                          1
Once upon a time
               find /usr/local/pkg -print > /tmp/files
               cat /tmp/files | pkgproto > /tmp/Prototype
               vim /tmp/Prototype

               PKG=FOOtree
               NAME=tree - A recursive directory listing program
               ARCH=sparc
               VERSION=1.5.3,REV=2010.02.02
               CATEGORY=application
               VENDOR=http://mama.indstate.edu/users/ice/tree/
               EMAIL=joe@example.com
               PSTAMP=joe@darkstar-20100202140539
               CLASSES=none
               HOTLINE=http://www.example.com/

               pkgmk -o -r / -d /tmp -f Prototype
               pkgtrans . tree.pkg FOOtree
               gzip tree.pkg


Samstag, 19. Februar 2011                                          2
What is missing? What‘s wrong?

           Compilation
           Packaging standards
           Checking for errors
           Hardcoded prototypes
           Hardcoded pkginfo


Samstag, 19. Februar 2011                      3
Enter mGAR




                            gmake package
Samstag, 19. Februar 2011                   4
What is mGAR?

           A system to build packages for
           Solaris
           Origins are „GAR“
           LNX-BBC and GARNOME
           m = modulated
           ➜ multiple similar builds
           Files written in GNU Make

                                  5
Samstag, 19. Februar 2011                   5
The simplest case
    The minimal information to build a package:
    1. What should the package be named
    2. Where to get the sources
    3. What the dependencies are




Samstag, 19. Februar 2011                         6
Example: gperf
                NAME = gperf
                VERSION = 3.0.3
                CATEGORIES = devel

                DESCRIPTION = A perfect hash function generator

                MASTER_SITES = $(GNU_MIRROR)
                DISTFILES = $(NAME)-$(VERSION).tar.gz

                CONFIGURE_ARGS = $(DIRPATHS)

                TEST_TARGET = check

                include gar/category.mk




Samstag, 19. Februar 2011                                         7
Categories
      include gar/category.mk
              Should be really named 'profiles'
              Contains settings common to a
              class of builds
                       Generic
                       Perl Modules
                       Ruby Gems
                       Python Eggs



Samstag, 19. Februar 2011                          8
Typical customization needs
            Code needs to be patched to compile or run on Solaris
            Code doesn‘t honor information passed via ./configure
            Files need to placed at specific locations in the package
Samstag, 19. Februar 2011                                               9
Phases




    prerequisites fetch checksum exract patch configure build test install merge package checkpkg

                                          ...and custom targets:
                                                 pre-fetch
                                                post-fetch
                                               pre-extract
                                                    (...)
Samstag, 19. Februar 2011                                                                           10
Modulations
                     „A Modulation is the process of varying
                       one waveform in relation to another
                                  waveform“
                             For soft ware builds that means:

          „A Modulation is the process of varying a build in
                 relation to certain parameters“




Samstag, 19. Februar 2011                                       11
Phases and modulations
                            Prerequisites                Executed
                                               One
                            Fetch           modulation
                                                          globally
                            Checksum
                            Extract
                            Patch
                            Configure           Executed inside
                            Build
                            Test                   modulation
                            Install
                            Merge
                            Package          Executed globally


Samstag, 19. Februar 2011                                            12
What can be used
                                 as modulator?
                            ISA for build architecture
                            For 32/64 bit versions and optimized binaries.
                            See lame

                            Package version
                            Useful when multiple versions of a library should be included
                            See automake

                            ...anything that controls the build
                               Static vs. dynamic linked versions
                               See wget

                               Parameter size
                               See nrpe

                               Wide vs. narrow characters
                               See ncurses
Samstag, 19. Februar 2011                                                                   13
Modulation
                                            over ISA
                            Allows easy building of multiple ISAs
                            Built-in special case of modulation
                              No merge needed also


                            Simplest case
                            BUILD64 = 1


                            Advanced
                            EXTRA_BUILD_ISAS = sparcv8plus+vis pentium_pro




Samstag, 19. Februar 2011                                                    14
Modulation
                             over ISA requirements
                            Certain ISAs require specific platforms
                            x64 requires Solaris 10, but integrated package for Solaris 8-10


                            Parallelizing modulation builds
                            May require builds on multiple hosts


                            Build platform for each modulation can
                            be specified in the package manifest
                            How does ISAEXEC relate to multi-ISA?


Samstag, 19. Februar 2011                                                                      15
Modulation
                 over static/dynamic linking
                                                        Adds modulator with
                        GARNAME = wget                       this name
                        ...                                                                     Cool trick:
                        EXTRA_MODULATORS = STATIC                                   Use dynamically expanded variables
                                                                                          to set per-modulation
                        MODULATIONS_STATIC = disable enable

                        EXTRA_CONFIGURE_STATIC-disable = --with-ssl
                        EXTRA_CONFIGURE_STATIC-enable = --disable-shared
                        EXTRA_CONFIGURE_STATIC-enable += --enable-static
                        EXTRA_CONFIGURE_STATIC-enable += --without-ssl
                        ...
                        CONFIGURE_ARGS += $(EXTRA_CONFIGURE_STATIC-$(STATIC))

                        MERGE_SCRIPTS_isa-sparcv8-static-disable = copy-all
                         MERGE_SCRIPTS_isa-sparcv8-static-enable = rename-wget copy-only
                            MERGE_DIRS_isa-sparcv8-static-enable = $(bindir)

                            MERGE_SCRIPTS_isa-i386-static-disable = copy-all
                             MERGE_SCRIPTS_isa-i386-static-enable = rename-wget copy-only
                                MERGE_DIRS_isa-i386-static-enable = $(bindir)

                        merge-rename-wget:
                                @mv $(DESTDIR)$(bindir)/wget $(DESTDIR)$(bindir)/wget.static
                        ...
                        include gar/category.mk




Samstag, 19. Februar 2011                                                                                                16
Modulation
                                 over parameter size
                                                    Ok, I guess you understood
                        GARNAME = nrpe                    how this works
                        ...
                        EXTRA_MODULATORS = SIZE                                   Use patchfiles on a
                        MODULATIONS_SIZE = 1k 8k                                 per-modulation basis
                        ...
                        PATCHFILES_isa-sparcv8-size-8k = common.h.diff
                        PATCHFILES_isa-i386-size-8k = common.h.diff
                        ...
                        MERGE_SCRIPTS_isa-sparcv8-size-1k = copy-all
                        MERGE_SCRIPTS_isa-sparcv8-size-8k = copy-nrpe-only

                        MERGE_SCRIPTS_isa-i386-size-1k = copy-all
                        MERGE_SCRIPTS_isa-i386-size-8k = copy-nrpe-only

                        include gar/category.mk
                        ...
                        merge-copy-nrpe-only:
                                cp $(INSTALLISADIR)$(bindir)/nrpe_1k $(PKGROOT)$(bindir)/nrpe_8k
                                cp $(INSTALLISADIR)$(LIBEXECDIR)/check_nrpe $(PKGROOT)$(LIBEXECDIR)/check_nrpe_8k
                                @$(MAKECOOKIE)




Samstag, 19. Februar 2011                                                                                           17
Modulations
                                  and their names
                            The name of a modulation is
                                <modulator1>-<value1>-<modulator2>-<value2>-...

                            Call each phase from a modulation manually with
                                <phase>-<modulation>

                            Example:
                                gmake build-isa-sparcv8

                            This results in a sub-make-invocation
                                <phase>-modulated   MODULATION=<MODULATION>
                                                    <MODULATOR1>=<value1> ...
                            Example:
                                gmake build-modulated MODULATION=isa-sparcv8
                                                      ISA=sparcv8

Samstag, 19. Februar 2011                                                         18
Merging
                               Why is this needed?
                            Optimized binaries with isaexec
                            Libraries may be located elsewhere in
                            the package than they were configured
                              
/lib/32 -> .
                              
/lib/64 -> sparcv9 | amd64
                              Pathes stored in pkgconfig-files




Samstag, 19. Februar 2011                                           19
Merging
                                 Why is this needed?
                32 and 64 bit need different install locations
                to have sane pkgconfig-files


                            build-isa-sparcv8/opt/csw/bin/myapp
         Install            build-isa-sparcv9/opt/csw/bin/64/myapp



                                        pkgroot/opt/csw/bin/myapp
                              Merge
                                        pkgroot/opt/csw/bin/sparcv9/myapp




                                                   /opt/csw/bin/myapp -> isaexec
                                        Package    /opt/csw/bin/sparcv8/myapp
                                                   /opt/csw/bin/sparcv9/myapp




Samstag, 19. Februar 2011                                                          20
Merging
                                 Builtin rules
                                     Copy all      Copy only some
                                                    MERGE_DIRS_<mod>



              Do not relocate      copy-all        copy-only




                   Do relocate     copy-relocate   copy-relocated-only




Samstag, 19. Februar 2011                                                21
Merging
                                    with custom rules
                Only merge specific files
                                                                               This is the default build
                        GARNAME = nrpe                                       Just copy everything over
                        ...
                        MERGE_SCRIPTS_isa-sparcv8-size-1k = copy-all
                        MERGE_SCRIPTS_isa-sparcv8-size-8k = copy-nrpe-only
                                                                             We want to control exactly what is used
                                                                                from the additional modulation
                        MERGE_SCRIPTS_isa-i386-size-1k = copy-all
                        MERGE_SCRIPTS_isa-i386-size-8k = copy-nrpe-only
                                                                      Merging copies from the install
                        include gar/category.mk                          location to PKGROOT
                        ...
                        merge-copy-nrpe-only:
                                cp $(INSTALLISADIR)$(bindir)/nrpe_1k $(PKGROOT)$(bindir)/nrpe_8k
                                cp $(INSTALLISADIR)$(LIBEXECDIR)/check_nrpe $(PKGROOT)$(LIBEXECDIR)/check_nrpe_8k
                                @$(MAKECOOKIE)




Samstag, 19. Februar 2011                                                                                              22
Class Action Scripts
        They mean more or less 'hooks'
                   f cswinitsmf /opt/csw/etc/init.d/cswpuppetd
                   i.<class> scripts handle the files
                         i.cswinitsmf
                         r.cswinitsmf
        GAR integration:
                   INITSMF = $(prefix)/init.d/cswpuppetd
        Fully automated:
                   Texinfo registration
                   Configuration file preser vation
                   Placement of README.CSW in package docs
                   ...

Samstag, 19. Februar 2011                                        23
checkpkg and overrides
           Examines a set of .pkg files
           Looks for common issues
           Written mostly in Python, with lintian in mind
                                allows to override checks




Samstag, 19. Februar 2011                                   24
Your package is ready!




Samstag, 19. Februar 2011                            25
Questions?




                            Bueller? Anybody?
Samstag, 19. Februar 2011                       26

Weitere Àhnliche Inhalte

Andere mochten auch

ĐżĐ»Đ°Đœ ŃƒŃ€ĐŸĐșĐ°
ĐżĐ»Đ°Đœ ŃƒŃ€ĐŸĐșĐ°ĐżĐ»Đ°Đœ ŃƒŃ€ĐŸĐșĐ°
ĐżĐ»Đ°Đœ ŃƒŃ€ĐŸĐșĐ°killaruns
 
Cortes forest-petition-delivery.1.12.12
Cortes forest-petition-delivery.1.12.12Cortes forest-petition-delivery.1.12.12
Cortes forest-petition-delivery.1.12.12wildstands
 
De lach door de jaren heen
De lach door de jaren heen De lach door de jaren heen
De lach door de jaren heen thijsvanraak
 
Jesus the Christ in ITALIAN
Jesus the Christ in ITALIANJesus the Christ in ITALIAN
Jesus the Christ in ITALIANdearl1
 
ĐżĐŸĐŒĐŸĐłĐžŃ‚Đ” Đ±ŃƒŃ€Đ°Ń‚ĐžĐœĐŸ
ĐżĐŸĐŒĐŸĐłĐžŃ‚Đ” Đ±ŃƒŃ€Đ°Ń‚ĐžĐœĐŸĐżĐŸĐŒĐŸĐłĐžŃ‚Đ” Đ±ŃƒŃ€Đ°Ń‚ĐžĐœĐŸ
ĐżĐŸĐŒĐŸĐłĐžŃ‚Đ” Đ±ŃƒŃ€Đ°Ń‚ĐžĐœĐŸkillaruns
 
Digital security
Digital securityDigital security
Digital securitykschreiner12
 
JavaScript as Development Platform
JavaScript as Development PlatformJavaScript as Development Platform
JavaScript as Development PlatformAlexei Skachykhin
 
Communication final
Communication finalCommunication final
Communication finalIam Varien
 
Chemical bonding
Chemical bondingChemical bonding
Chemical bondingDaRwin ParAn
 
Pa yessy
Pa yessyPa yessy
Pa yessySJM
 
ĐżĐŸĐ»ŃŒŃˆĐ°
ĐżĐŸĐ»ŃŒŃˆĐ°ĐżĐŸĐ»ŃŒŃˆĐ°
ĐżĐŸĐ»ŃŒŃˆĐ°polemic
 
May 2013 Newsletter
May 2013 NewsletterMay 2013 Newsletter
May 2013 NewsletterJOHNLEACH
 
Abdulkalam team 10
Abdulkalam team 10Abdulkalam team 10
Abdulkalam team 10Nikhil Tanni
 
Superant obstacles
Superant obstaclesSuperant obstacles
Superant obstaclescarmeo
 
Movi moves
Movi movesMovi moves
Movi movesmiloherr
 
PersecuciĂł amb parkour
PersecuciĂł amb parkourPersecuciĂł amb parkour
PersecuciĂł amb parkourcarmeo
 
1.cw analysis
1.cw analysis1.cw analysis
1.cw analysisgia1995
 
ĐŸĐ»Đ°Đșаты ЕГЭ 2015
ĐŸĐ»Đ°Đșаты ЕГЭ 2015 ĐŸĐ»Đ°Đșаты ЕГЭ 2015
ĐŸĐ»Đ°Đșаты ЕГЭ 2015 killaruns
 

Andere mochten auch (20)

ĐżĐ»Đ°Đœ ŃƒŃ€ĐŸĐșĐ°
ĐżĐ»Đ°Đœ ŃƒŃ€ĐŸĐșĐ°ĐżĐ»Đ°Đœ ŃƒŃ€ĐŸĐșĐ°
ĐżĐ»Đ°Đœ ŃƒŃ€ĐŸĐșĐ°
 
Emily new
Emily newEmily new
Emily new
 
Cortes forest-petition-delivery.1.12.12
Cortes forest-petition-delivery.1.12.12Cortes forest-petition-delivery.1.12.12
Cortes forest-petition-delivery.1.12.12
 
De lach door de jaren heen
De lach door de jaren heen De lach door de jaren heen
De lach door de jaren heen
 
Jesus the Christ in ITALIAN
Jesus the Christ in ITALIANJesus the Christ in ITALIAN
Jesus the Christ in ITALIAN
 
ĐżĐŸĐŒĐŸĐłĐžŃ‚Đ” Đ±ŃƒŃ€Đ°Ń‚ĐžĐœĐŸ
ĐżĐŸĐŒĐŸĐłĐžŃ‚Đ” Đ±ŃƒŃ€Đ°Ń‚ĐžĐœĐŸĐżĐŸĐŒĐŸĐłĐžŃ‚Đ” Đ±ŃƒŃ€Đ°Ń‚ĐžĐœĐŸ
ĐżĐŸĐŒĐŸĐłĐžŃ‚Đ” Đ±ŃƒŃ€Đ°Ń‚ĐžĐœĐŸ
 
Digital security
Digital securityDigital security
Digital security
 
JavaScript as Development Platform
JavaScript as Development PlatformJavaScript as Development Platform
JavaScript as Development Platform
 
Communication final
Communication finalCommunication final
Communication final
 
Chemical bonding
Chemical bondingChemical bonding
Chemical bonding
 
Pa yessy
Pa yessyPa yessy
Pa yessy
 
ĐżĐŸĐ»ŃŒŃˆĐ°
ĐżĐŸĐ»ŃŒŃˆĐ°ĐżĐŸĐ»ŃŒŃˆĐ°
ĐżĐŸĐ»ŃŒŃˆĐ°
 
May 2013 Newsletter
May 2013 NewsletterMay 2013 Newsletter
May 2013 Newsletter
 
Abdulkalam team 10
Abdulkalam team 10Abdulkalam team 10
Abdulkalam team 10
 
John institution q
John institution qJohn institution q
John institution q
 
Superant obstacles
Superant obstaclesSuperant obstacles
Superant obstacles
 
Movi moves
Movi movesMovi moves
Movi moves
 
PersecuciĂł amb parkour
PersecuciĂł amb parkourPersecuciĂł amb parkour
PersecuciĂł amb parkour
 
1.cw analysis
1.cw analysis1.cw analysis
1.cw analysis
 
ĐŸĐ»Đ°Đșаты ЕГЭ 2015
ĐŸĐ»Đ°Đșаты ЕГЭ 2015 ĐŸĐ»Đ°Đșаты ЕГЭ 2015
ĐŸĐ»Đ°Đșаты ЕГЭ 2015
 

Ähnlich wie An introductionto mGAR (Dublin 2011)

An introduction to OSGi
An introduction to OSGi An introduction to OSGi
An introduction to OSGi Andrea Chiodoni
 
OpenEmbedded
OpenEmbeddedOpenEmbedded
OpenEmbeddedScott Garman
 
OSGi-enabled Java EE applications in GlassFish
OSGi-enabled Java EE applications in GlassFishOSGi-enabled Java EE applications in GlassFish
OSGi-enabled Java EE applications in GlassFishArun Gupta
 
OSGi-enabled Java EE Applications using GlassFish
OSGi-enabled Java EE Applications using GlassFishOSGi-enabled Java EE Applications using GlassFish
OSGi-enabled Java EE Applications using GlassFishArun Gupta
 
OSGi & Java EE in GlassFish - Best of both worlds
OSGi & Java EE in GlassFish - Best of both worldsOSGi & Java EE in GlassFish - Best of both worlds
OSGi & Java EE in GlassFish - Best of both worldsArun Gupta
 
OSGi & Java EE in GlassFish @ Silicon Valley Code Camp 2010
OSGi & Java EE in GlassFish @ Silicon Valley Code Camp 2010OSGi & Java EE in GlassFish @ Silicon Valley Code Camp 2010
OSGi & Java EE in GlassFish @ Silicon Valley Code Camp 2010Arun Gupta
 
Oracle Solaris 11 - Best for Enterprise Applications
Oracle Solaris 11 - Best for Enterprise ApplicationsOracle Solaris 11 - Best for Enterprise Applications
Oracle Solaris 11 - Best for Enterprise Applicationsglynnfoster
 
SOUG - Experiences with Oracle Solaris 11.4
SOUG - Experiences with Oracle Solaris 11.4SOUG - Experiences with Oracle Solaris 11.4
SOUG - Experiences with Oracle Solaris 11.4JomaSoft
 
OSGi-enabled Java EE Applications using GlassFish at JCertif 2011
OSGi-enabled Java EE Applications using GlassFish at JCertif 2011OSGi-enabled Java EE Applications using GlassFish at JCertif 2011
OSGi-enabled Java EE Applications using GlassFish at JCertif 2011Arun Gupta
 
Enterprise OSGi at eBay
Enterprise OSGi at eBayEnterprise OSGi at eBay
Enterprise OSGi at eBayTony Ng
 
every-day-automation
every-day-automationevery-day-automation
every-day-automationAmir Barylko
 
Mercurial: Modern Source Control Management
Mercurial: Modern Source Control ManagementMercurial: Modern Source Control Management
Mercurial: Modern Source Control ManagementJohn Paulett
 
(ATS3-DEV08) Team Development with Accelrys Enterprise Platform
(ATS3-DEV08) Team Development with Accelrys Enterprise Platform(ATS3-DEV08) Team Development with Accelrys Enterprise Platform
(ATS3-DEV08) Team Development with Accelrys Enterprise PlatformBIOVIA
 
The Yocto Project
The Yocto ProjectThe Yocto Project
The Yocto Projectrossburton
 
Gemini WEB and Virgo
Gemini WEB and VirgoGemini WEB and Virgo
Gemini WEB and VirgoHristo Iliev
 
Os Grossupdated
Os GrossupdatedOs Grossupdated
Os Grossupdatedoscon2007
 
Building a Large Java Codebase with Bazel - Natan Silnitsky
Building a Large Java Codebase with Bazel - Natan Silnitsky Building a Large Java Codebase with Bazel - Natan Silnitsky
Building a Large Java Codebase with Bazel - Natan Silnitsky Wix Engineering
 
BP207 - Meet the Java Application Server You Already Own – IBM Domino
BP207 - Meet the Java Application Server You Already Own – IBM DominoBP207 - Meet the Java Application Server You Already Own – IBM Domino
BP207 - Meet the Java Application Server You Already Own – IBM DominoSerdar Basegmez
 
Java Modularity with OSGi
Java Modularity with OSGiJava Modularity with OSGi
Java Modularity with OSGiIlya Rybak
 
Extending Spring for Custom Usage
Extending Spring for Custom UsageExtending Spring for Custom Usage
Extending Spring for Custom UsageJoshua Long
 

Ähnlich wie An introductionto mGAR (Dublin 2011) (20)

An introduction to OSGi
An introduction to OSGi An introduction to OSGi
An introduction to OSGi
 
OpenEmbedded
OpenEmbeddedOpenEmbedded
OpenEmbedded
 
OSGi-enabled Java EE applications in GlassFish
OSGi-enabled Java EE applications in GlassFishOSGi-enabled Java EE applications in GlassFish
OSGi-enabled Java EE applications in GlassFish
 
OSGi-enabled Java EE Applications using GlassFish
OSGi-enabled Java EE Applications using GlassFishOSGi-enabled Java EE Applications using GlassFish
OSGi-enabled Java EE Applications using GlassFish
 
OSGi & Java EE in GlassFish - Best of both worlds
OSGi & Java EE in GlassFish - Best of both worldsOSGi & Java EE in GlassFish - Best of both worlds
OSGi & Java EE in GlassFish - Best of both worlds
 
OSGi & Java EE in GlassFish @ Silicon Valley Code Camp 2010
OSGi & Java EE in GlassFish @ Silicon Valley Code Camp 2010OSGi & Java EE in GlassFish @ Silicon Valley Code Camp 2010
OSGi & Java EE in GlassFish @ Silicon Valley Code Camp 2010
 
Oracle Solaris 11 - Best for Enterprise Applications
Oracle Solaris 11 - Best for Enterprise ApplicationsOracle Solaris 11 - Best for Enterprise Applications
Oracle Solaris 11 - Best for Enterprise Applications
 
SOUG - Experiences with Oracle Solaris 11.4
SOUG - Experiences with Oracle Solaris 11.4SOUG - Experiences with Oracle Solaris 11.4
SOUG - Experiences with Oracle Solaris 11.4
 
OSGi-enabled Java EE Applications using GlassFish at JCertif 2011
OSGi-enabled Java EE Applications using GlassFish at JCertif 2011OSGi-enabled Java EE Applications using GlassFish at JCertif 2011
OSGi-enabled Java EE Applications using GlassFish at JCertif 2011
 
Enterprise OSGi at eBay
Enterprise OSGi at eBayEnterprise OSGi at eBay
Enterprise OSGi at eBay
 
every-day-automation
every-day-automationevery-day-automation
every-day-automation
 
Mercurial: Modern Source Control Management
Mercurial: Modern Source Control ManagementMercurial: Modern Source Control Management
Mercurial: Modern Source Control Management
 
(ATS3-DEV08) Team Development with Accelrys Enterprise Platform
(ATS3-DEV08) Team Development with Accelrys Enterprise Platform(ATS3-DEV08) Team Development with Accelrys Enterprise Platform
(ATS3-DEV08) Team Development with Accelrys Enterprise Platform
 
The Yocto Project
The Yocto ProjectThe Yocto Project
The Yocto Project
 
Gemini WEB and Virgo
Gemini WEB and VirgoGemini WEB and Virgo
Gemini WEB and Virgo
 
Os Grossupdated
Os GrossupdatedOs Grossupdated
Os Grossupdated
 
Building a Large Java Codebase with Bazel - Natan Silnitsky
Building a Large Java Codebase with Bazel - Natan Silnitsky Building a Large Java Codebase with Bazel - Natan Silnitsky
Building a Large Java Codebase with Bazel - Natan Silnitsky
 
BP207 - Meet the Java Application Server You Already Own – IBM Domino
BP207 - Meet the Java Application Server You Already Own – IBM DominoBP207 - Meet the Java Application Server You Already Own – IBM Domino
BP207 - Meet the Java Application Server You Already Own – IBM Domino
 
Java Modularity with OSGi
Java Modularity with OSGiJava Modularity with OSGi
Java Modularity with OSGi
 
Extending Spring for Custom Usage
Extending Spring for Custom UsageExtending Spring for Custom Usage
Extending Spring for Custom Usage
 

KĂŒrzlich hochgeladen

Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?Igalia
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)wesley chun
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CVKhem
 

KĂŒrzlich hochgeladen (20)

Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 

An introductionto mGAR (Dublin 2011)

  • 1. mGAR Producing complex packages for Solaris the easy way OpenCSW Technical Wintercamp Dublin 2011 Dagobert Michelsen dam@opencsw.org Samstag, 19. Februar 2011 1
  • 2. Once upon a time find /usr/local/pkg -print > /tmp/files cat /tmp/files | pkgproto > /tmp/Prototype vim /tmp/Prototype PKG=FOOtree NAME=tree - A recursive directory listing program ARCH=sparc VERSION=1.5.3,REV=2010.02.02 CATEGORY=application VENDOR=http://mama.indstate.edu/users/ice/tree/ EMAIL=joe@example.com PSTAMP=joe@darkstar-20100202140539 CLASSES=none HOTLINE=http://www.example.com/ pkgmk -o -r / -d /tmp -f Prototype pkgtrans . tree.pkg FOOtree gzip tree.pkg Samstag, 19. Februar 2011 2
  • 3. What is missing? What‘s wrong? Compilation Packaging standards Checking for errors Hardcoded prototypes Hardcoded pkginfo Samstag, 19. Februar 2011 3
  • 4. Enter mGAR gmake package Samstag, 19. Februar 2011 4
  • 5. What is mGAR? A system to build packages for Solaris Origins are „GAR“ LNX-BBC and GARNOME m = modulated ➜ multiple similar builds Files written in GNU Make 5 Samstag, 19. Februar 2011 5
  • 6. The simplest case The minimal information to build a package: 1. What should the package be named 2. Where to get the sources 3. What the dependencies are Samstag, 19. Februar 2011 6
  • 7. Example: gperf NAME = gperf VERSION = 3.0.3 CATEGORIES = devel DESCRIPTION = A perfect hash function generator MASTER_SITES = $(GNU_MIRROR) DISTFILES = $(NAME)-$(VERSION).tar.gz CONFIGURE_ARGS = $(DIRPATHS) TEST_TARGET = check include gar/category.mk Samstag, 19. Februar 2011 7
  • 8. Categories include gar/category.mk Should be really named 'profiles' Contains settings common to a class of builds Generic Perl Modules Ruby Gems Python Eggs Samstag, 19. Februar 2011 8
  • 9. Typical customization needs Code needs to be patched to compile or run on Solaris Code doesn‘t honor information passed via ./configure Files need to placed at specific locations in the package Samstag, 19. Februar 2011 9
  • 10. Phases prerequisites fetch checksum exract patch configure build test install merge package checkpkg ...and custom targets: pre-fetch post-fetch pre-extract (...) Samstag, 19. Februar 2011 10
  • 11. Modulations „A Modulation is the process of varying one waveform in relation to another waveform“ For soft ware builds that means: „A Modulation is the process of varying a build in relation to certain parameters“ Samstag, 19. Februar 2011 11
  • 12. Phases and modulations Prerequisites Executed One Fetch modulation globally Checksum Extract Patch Configure Executed inside Build Test modulation Install Merge Package Executed globally Samstag, 19. Februar 2011 12
  • 13. What can be used as modulator? ISA for build architecture For 32/64 bit versions and optimized binaries. See lame Package version Useful when multiple versions of a library should be included See automake ...anything that controls the build Static vs. dynamic linked versions See wget Parameter size See nrpe Wide vs. narrow characters See ncurses Samstag, 19. Februar 2011 13
  • 14. Modulation over ISA Allows easy building of multiple ISAs Built-in special case of modulation No merge needed also Simplest case BUILD64 = 1 Advanced EXTRA_BUILD_ISAS = sparcv8plus+vis pentium_pro Samstag, 19. Februar 2011 14
  • 15. Modulation over ISA requirements Certain ISAs require specific platforms x64 requires Solaris 10, but integrated package for Solaris 8-10 Parallelizing modulation builds May require builds on multiple hosts Build platform for each modulation can be specified in the package manifest How does ISAEXEC relate to multi-ISA? Samstag, 19. Februar 2011 15
  • 16. Modulation over static/dynamic linking Adds modulator with GARNAME = wget this name ... Cool trick: EXTRA_MODULATORS = STATIC Use dynamically expanded variables to set per-modulation MODULATIONS_STATIC = disable enable EXTRA_CONFIGURE_STATIC-disable = --with-ssl EXTRA_CONFIGURE_STATIC-enable = --disable-shared EXTRA_CONFIGURE_STATIC-enable += --enable-static EXTRA_CONFIGURE_STATIC-enable += --without-ssl ... CONFIGURE_ARGS += $(EXTRA_CONFIGURE_STATIC-$(STATIC)) MERGE_SCRIPTS_isa-sparcv8-static-disable = copy-all MERGE_SCRIPTS_isa-sparcv8-static-enable = rename-wget copy-only MERGE_DIRS_isa-sparcv8-static-enable = $(bindir) MERGE_SCRIPTS_isa-i386-static-disable = copy-all MERGE_SCRIPTS_isa-i386-static-enable = rename-wget copy-only MERGE_DIRS_isa-i386-static-enable = $(bindir) merge-rename-wget: @mv $(DESTDIR)$(bindir)/wget $(DESTDIR)$(bindir)/wget.static ... include gar/category.mk Samstag, 19. Februar 2011 16
  • 17. Modulation over parameter size Ok, I guess you understood GARNAME = nrpe how this works ... EXTRA_MODULATORS = SIZE Use patchfiles on a MODULATIONS_SIZE = 1k 8k per-modulation basis ... PATCHFILES_isa-sparcv8-size-8k = common.h.diff PATCHFILES_isa-i386-size-8k = common.h.diff ... MERGE_SCRIPTS_isa-sparcv8-size-1k = copy-all MERGE_SCRIPTS_isa-sparcv8-size-8k = copy-nrpe-only MERGE_SCRIPTS_isa-i386-size-1k = copy-all MERGE_SCRIPTS_isa-i386-size-8k = copy-nrpe-only include gar/category.mk ... merge-copy-nrpe-only: cp $(INSTALLISADIR)$(bindir)/nrpe_1k $(PKGROOT)$(bindir)/nrpe_8k cp $(INSTALLISADIR)$(LIBEXECDIR)/check_nrpe $(PKGROOT)$(LIBEXECDIR)/check_nrpe_8k @$(MAKECOOKIE) Samstag, 19. Februar 2011 17
  • 18. Modulations and their names The name of a modulation is <modulator1>-<value1>-<modulator2>-<value2>-... Call each phase from a modulation manually with <phase>-<modulation> Example: gmake build-isa-sparcv8 This results in a sub-make-invocation <phase>-modulated MODULATION=<MODULATION> <MODULATOR1>=<value1> ... Example: gmake build-modulated MODULATION=isa-sparcv8 ISA=sparcv8 Samstag, 19. Februar 2011 18
  • 19. Merging Why is this needed? Optimized binaries with isaexec Libraries may be located elsewhere in the package than they were configured 
/lib/32 -> . 
/lib/64 -> sparcv9 | amd64 Pathes stored in pkgconfig-files Samstag, 19. Februar 2011 19
  • 20. Merging Why is this needed? 32 and 64 bit need different install locations to have sane pkgconfig-files build-isa-sparcv8/opt/csw/bin/myapp Install build-isa-sparcv9/opt/csw/bin/64/myapp pkgroot/opt/csw/bin/myapp Merge pkgroot/opt/csw/bin/sparcv9/myapp /opt/csw/bin/myapp -> isaexec Package /opt/csw/bin/sparcv8/myapp /opt/csw/bin/sparcv9/myapp Samstag, 19. Februar 2011 20
  • 21. Merging Builtin rules Copy all Copy only some MERGE_DIRS_<mod> Do not relocate copy-all copy-only Do relocate copy-relocate copy-relocated-only Samstag, 19. Februar 2011 21
  • 22. Merging with custom rules Only merge specific files This is the default build GARNAME = nrpe Just copy everything over ... MERGE_SCRIPTS_isa-sparcv8-size-1k = copy-all MERGE_SCRIPTS_isa-sparcv8-size-8k = copy-nrpe-only We want to control exactly what is used from the additional modulation MERGE_SCRIPTS_isa-i386-size-1k = copy-all MERGE_SCRIPTS_isa-i386-size-8k = copy-nrpe-only Merging copies from the install include gar/category.mk location to PKGROOT ... merge-copy-nrpe-only: cp $(INSTALLISADIR)$(bindir)/nrpe_1k $(PKGROOT)$(bindir)/nrpe_8k cp $(INSTALLISADIR)$(LIBEXECDIR)/check_nrpe $(PKGROOT)$(LIBEXECDIR)/check_nrpe_8k @$(MAKECOOKIE) Samstag, 19. Februar 2011 22
  • 23. Class Action Scripts They mean more or less 'hooks' f cswinitsmf /opt/csw/etc/init.d/cswpuppetd i.<class> scripts handle the files i.cswinitsmf r.cswinitsmf GAR integration: INITSMF = $(prefix)/init.d/cswpuppetd Fully automated: Texinfo registration Configuration file preser vation Placement of README.CSW in package docs ... Samstag, 19. Februar 2011 23
  • 24. checkpkg and overrides Examines a set of .pkg files Looks for common issues Written mostly in Python, with lintian in mind allows to override checks Samstag, 19. Februar 2011 24
  • 25. Your package is ready! Samstag, 19. Februar 2011 25
  • 26. Questions? Bueller? Anybody? Samstag, 19. Februar 2011 26