SlideShare une entreprise Scribd logo
1  sur  56
Télécharger pour lire hors ligne
GAR
Advanced Topics
 OpenCSW Technical Summercamp
          Oslo 2009


      Dagobert Michelsen
       dam@opencsw.org
Topic:


Modulations
„A Modulation is the process of varying
  one waveform in relation to another
             waveform“
„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“
Phases
Phases
Prerequisites
Phases
Prerequisites
Fetch
Phases
Prerequisites
Fetch
Checksum
Phases
Prerequisites
Fetch
Checksum
Extract
Phases
Prerequisites
Fetch
Checksum
Extract
Patch
Phases
Prerequisites
Fetch
Checksum
Extract
Patch
Configure
Phases
Prerequisites
Fetch
Checksum
Extract
Patch
Configure
Build
Phases
Prerequisites
Fetch
Checksum
Extract
Patch
Configure
Build
Test
Phases
Prerequisites
Fetch
Checksum
Extract
Patch
Configure
Build
Test
Install
Phases
Prerequisites
Fetch
Checksum
Extract
Patch
Configure
Build
Test
Install
Merge
Phases
Prerequisites
Fetch
Checksum
Extract
Patch
Configure
Build
Test
Install
Merge
Package
Phases
Prerequisites               Executed
Fetch
                             globally
Checksum
Extract
Patch
Configure             Executed inside
Build
Test                    modulation
Install
Merge
Package             Executed globally
Phases
Prerequisites               Executed
Fetch
                             globally
Checksum
Extract
Patch
Configure             Executed inside
Build
Test                    modulation
Install
Merge
Package             Executed globally
Phases
Prerequisites                    Executed
                       One
Fetch               modulation
                                  globally
Checksum
Extract
Patch
Configure                Executed inside
Build
Test                       modulation
Install
Merge
Package              Executed globally
Modulations
  and pre-/post-phases
When is pre-build called?
  Technically ran before first build,
  but after every configure
Problem: each phase should be runnable
independently
Often sufficient: To be run per modulation
    pre-build-modulated
pre-/post-<phase> is likely to be replaced
with pre-/post-<phase>-modulated
Modulations
  and pre-/post-phases
When is pre-build called?
  Technically ran before first build,
  but after every configure
Problem: each phase should be runnable
independently
Often sufficient: To be run per modulation
    pre-build-modulated
pre-/post-<phase> is likely to be replaced
with pre-/post-<phase>-modulated
Modulations
  and pre-/post-phases
When is pre-build called?
  Technically ran before first build,
  but after every configure Synchronisation
                                  needed
Problem: each phase should be runnable
independently
Often sufficient: To be run per modulation
    pre-build-modulated
pre-/post-<phase> is likely to be replaced
with pre-/post-<phase>-modulated
Modulations
  and pre-/post-phases
When is pre-build called?
  Technically ran before first build,
  but after every configure
Problem: each phase should be runnable
independently
Often sufficient: To be run per modulation
    pre-build-modulated
pre-/post-<phase> is likely to be replaced
with pre-/post-<phase>-modulated
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
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
Verify modulations
                 over ISA
build8s% gmake modenv
          Arch: sparc
        Kernel: sparcv9

Default ISA 32: sparcv8
Default ISA 64: sparcv9

Requested ISAs: sparcv8 sparcv9 i386 amd64 sparcv8plus+vis pentium_pro
   Needed ISAs: sparcv8 sparcv9 sparcv8plus+vis
    Build ISAs: sparcv8 sparcv9 sparcv8plus+vis

  ISAEXEC dirs: /opt/csw/bin /opt/csw/sbin /opt/csw/libexec
 ISAEXEC files: /opt/csw/bin/lame

 Merge include:
 Merge exclude:     /opt/csw/share/info/dir /opt/csw/lib/.*.la .*~ /opt/csw/lib/.*.a

    Modulators: ISA
   Modulations: isa-sparcv8 isa-sparcv9 isa-sparcv8plus+vis

Requested compiler flags:

* Modulation isa-sparcv8: ISA=sparcv8
           PATH = /home/dam/mgar/pkg/lame/trunk/work/install-isa-sparcv8/opt/csw/bin:/home/dam/mgar/pkg/lame/
trunk/work/install-isa-sparcv8/opt/csw/bin:/home/dam/mgar/pkg/lame/trunk/work/install-isa-sparcv8/opt/csw/sbin:/
home/dam/mgar/pkg/lame/trunk/work/install-isa-sparcv8/opt/csw/sbin:/opt/csw/bin:/opt/csw/bin:/opt/csw/sbin:/opt/
csw/sbin:/opt/studio/SOS11/SUNWspro/bin:/home/dam/mgar/pkg/lame/trunk/gar/bin:/usr/bin:/usr/sbin:/usr/java/bin:/
usr/ccs/bin:/usr/openwin/bin
PKG_CONFIG_PATH = /opt/csw/lib/pkgconfig
         CFLAGS = -xO3 -xarch=v8 -I/opt/csw/include
       CXXFLAGS = -xO3 -xarch=v8 -I/opt/csw/include
       CPPFLAGS = -I/opt/csw/include
        LDFLAGS = -xarch=v8 -L/opt/csw/lib
     LD_OPTIONS = -R/opt/csw/lib/$ISALIST -R/opt/csw/lib
        ASFLAGS =
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 (work-in-progress)


Build platform for each modulation
must be specified in the package
manifest (work-in-progress)
How does ISAEXEC relate to multi-ISA?
Modulation
                      over version
GARNAME = automake
GARVERSION = 1.11
...
EXTRA_MODULATORS = GARVERSION
MODULATIONS_GARVERSION = 1.6.3 1.7.9 1.8.5 1.9.6 1.10.2 1.11
...
SOURCEFILES =   $(foreach VERSION,$(MODULATIONS_GARVERSION),
                    $(GARNAME)-$(VERSION).tar.gz
                  )
DISTFILES = $(SOURCEFILES)
...
NOEXTRACT = $(filter-out $(GARNAME)-$(GARVERSION).tar.gz, $(SOURCEFILES))
...
$(foreach VERSION,$(MODULATIONS_GARVERSION),
  $(eval MERGE_SCRIPTS_isa-$(ISA)-garversion-$(VERSION) = copy-all)
)
Modulation
                      over version
GARNAME = automake                   Adds modulator with
GARVERSION = 1.11                         this name
...
EXTRA_MODULATORS = GARVERSION
MODULATIONS_GARVERSION = 1.6.3 1.7.9 1.8.5 1.9.6 1.10.2 1.11
...
SOURCEFILES =   $(foreach VERSION,$(MODULATIONS_GARVERSION),
                    $(GARNAME)-$(VERSION).tar.gz
                  )
DISTFILES = $(SOURCEFILES)
...
NOEXTRACT = $(filter-out $(GARNAME)-$(GARVERSION).tar.gz, $(SOURCEFILES))
...
$(foreach VERSION,$(MODULATIONS_GARVERSION),
  $(eval MERGE_SCRIPTS_isa-$(ISA)-garversion-$(VERSION) = copy-all)
)
Modulation
                       over version
GARNAME = automake                   Adds modulator with
GARVERSION = 1.11                         this name
...
EXTRA_MODULATORS = GARVERSION                                     One file per
MODULATIONS_GARVERSION = 1.6.3 1.7.9 1.8.5 1.9.6 1.10.2 1.11   modulated version
...
SOURCEFILES =   $(foreach VERSION,$(MODULATIONS_GARVERSION),
                    $(GARNAME)-$(VERSION).tar.gz
                  )
DISTFILES = $(SOURCEFILES)
...
NOEXTRACT = $(filter-out $(GARNAME)-$(GARVERSION).tar.gz, $(SOURCEFILES))
...
$(foreach VERSION,$(MODULATIONS_GARVERSION),
  $(eval MERGE_SCRIPTS_isa-$(ISA)-garversion-$(VERSION) = copy-all)
)
Modulation
                         over version
GARNAME = automake                   Adds modulator with
GARVERSION = 1.11                         this name
...
EXTRA_MODULATORS = GARVERSION                                     One file per
MODULATIONS_GARVERSION = 1.6.3 1.7.9 1.8.5 1.9.6 1.10.2 1.11   modulated version
...
SOURCEFILES =   $(foreach VERSION,$(MODULATIONS_GARVERSION),
                    $(GARNAME)-$(VERSION).tar.gz
                  )                                                              Make sure only the needed file is
DISTFILES = $(SOURCEFILES)                                                        extracted in each modulation
...
NOEXTRACT = $(filter-out $(GARNAME)-$(GARVERSION).tar.gz, $(SOURCEFILES))
...
$(foreach VERSION,$(MODULATIONS_GARVERSION),
  $(eval MERGE_SCRIPTS_isa-$(ISA)-garversion-$(VERSION) = copy-all)
)
Modulation
                         over version
GARNAME = automake                   Adds modulator with
GARVERSION = 1.11                         this name
...
EXTRA_MODULATORS = GARVERSION                                     One file per
MODULATIONS_GARVERSION = 1.6.3 1.7.9 1.8.5 1.9.6 1.10.2 1.11   modulated version
...
SOURCEFILES =   $(foreach VERSION,$(MODULATIONS_GARVERSION),
                    $(GARNAME)-$(VERSION).tar.gz
                  )                                                              Make sure only the needed file is
DISTFILES = $(SOURCEFILES)                                                        extracted in each modulation
...
NOEXTRACT = $(filter-out $(GARNAME)-$(GARVERSION).tar.gz, $(SOURCEFILES))
...
$(foreach VERSION,$(MODULATIONS_GARVERSION),
  $(eval MERGE_SCRIPTS_isa-$(ISA)-garversion-$(VERSION) = copy-all)
)


       Merge-rules needed!
      We‘ll see about this later
Modulation
over static/dynamic linking
 GARNAME = wget
 ...
 EXTRA_MODULATORS = STATIC
 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
Modulation
over static/dynamic linking
                                 Adds modulator with
 GARNAME = wget                       this name
 ...
 EXTRA_MODULATORS = STATIC
 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
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
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
                                                        Why is this a bad idea?
      MERGE_SCRIPTS_isa-i386-static-enable = rename-wget copy-only
         MERGE_DIRS_isa-i386-static-enable = $(bindir) Think gmake remerge
 merge-rename-wget:
         @mv $(DESTDIR)$(bindir)/wget $(DESTDIR)$(bindir)/wget.static
 ...
 include gar/category.mk
Modulation
over static/dynamic linking
Modulation
over static/dynamic linking
Modulation
over static/dynamic linking
 GARNAME = wget
 ...
 EXTRA_MODULATORS = STATIC
 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 = copy-static-wget-only

    MERGE_SCRIPTS_isa-i386-static-disable = copy-all
     MERGE_SCRIPTS_isa-i386-static-enable = copy-static-wget-only from one phase
                                                          Always copy
                                                                  to another
 merge-copy-static-wget-only:
         ginstall $(INSTALLISADIR)$(bindir)/wget $(PKGROOT)$(bindir)/wget.static
            ...
 include gar/category.mk
Modulation
        over parameter size
GARNAME = nrpe
...
EXTRA_MODULATORS = SIZE
MODULATIONS_SIZE = 1k 8k
...
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)
Modulation
         over parameter size
                            Ok, I guess you understood
GARNAME = nrpe                    how this works
...
EXTRA_MODULATORS = SIZE
MODULATIONS_SIZE = 1k 8k
...
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)
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)
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
Topic:


Merging
Merging
                    Why is this needed?
                Libraries may be located elsewhere in the package
                than they were configured
                32 and 64 bit need different install locations to
                have sane pkgconfig-files
build-isa-sparcv8/opt/csw/bin/myapp
build-isa-sparcv9/opt/csw/bin/64/myapp



                    pkgroot/opt/csw/bin/myapp
          Install
                    pkgroot/opt/csw/bin/sparcv9/myapp



                                     /opt/csw/bin/myapp -> isaexec
                         Package     /opt/csw/bin/sparcv8/myapp
                                     /opt/csw/bin/sparcv9/myapp
Merging
                default rules
copy-all
Copy all files and put them in standard locations (e. g. /csw/bin)

copy-only
Copy only the files to be relocated and also put them in standard locations

copy-relocate
Copy all files and relocate the locations to the ISA-subdirs
(e. g. /csw/bin/sparcv9/)

copy-relocated-only
Copy only the files to be relocated and also relocate the locations to the ISA-
subdirs
Merging
                          default rules
          copy-all
          Copy all files and put them in standard locations (e. g. /csw/bin)
                                    Copy all                 Copy only relocated
          copy-only
          Copy only the files to be relocated and also put them in standard locations

         copy-relocate
Do   not Copy all files and relocate the locations to the ISA-subdirs
          relocate              copy-all                       copy-only
         (e. g. /csw/bin/sparcv9/)

         copy-relocated-only
         Copy only the files to be relocated and also relocate the locations to the ISA-
 Do    relocate
         subdirs
                               copy-relocate                   copy-relocated-only
Merging
            and renaming
Rename files on-the-fly during merge
See curl

EXTRA_PAX_ARGS_32 = -s ",^.$(includedir)/curl/curlbuild.h$$,
                           .$(includedir)/curl/curlbuild-32.h,p"
EXTRA_PAX_ARGS_64 = -s ",^.$(includedir)/curl/curlbuild.h$$,
                           .$(includedir)/curl/curlbuild-64.h,p"
EXTRA_PAX_ARGS_isa-sparcv8 = $(EXTRA_PAX_ARGS_32)
EXTRA_PAX_ARGS_isa-sparcv9 = $(EXTRA_PAX_ARGS_64)
EXTRA_PAX_ARGS_isa-i386    = $(EXTRA_PAX_ARGS_32)
EXTRA_PAX_ARGS_isa-amd64   = $(EXTRA_PAX_ARGS_64)
Merging
            and renaming
Rename files on-the-fly during merge
See curl                                                    From here


EXTRA_PAX_ARGS_32 = -s ",^.$(includedir)/curl/curlbuild.h$$,
                           .$(includedir)/curl/curlbuild-32.h,p"
EXTRA_PAX_ARGS_64 = -s ",^.$(includedir)/curl/curlbuild.h$$,
                           .$(includedir)/curl/curlbuild-64.h,p"
EXTRA_PAX_ARGS_isa-sparcv8 = $(EXTRA_PAX_ARGS_32)
EXTRA_PAX_ARGS_isa-sparcv9 = $(EXTRA_PAX_ARGS_64)
EXTRA_PAX_ARGS_isa-i386    = $(EXTRA_PAX_ARGS_32)
EXTRA_PAX_ARGS_isa-amd64   = $(EXTRA_PAX_ARGS_64)
Merging
            and renaming
Rename files on-the-fly during merge
See curl                                                    From here

                                                                    To here
EXTRA_PAX_ARGS_32 = -s ",^.$(includedir)/curl/curlbuild.h$$,
                           .$(includedir)/curl/curlbuild-32.h,p"
EXTRA_PAX_ARGS_64 = -s ",^.$(includedir)/curl/curlbuild.h$$,
                           .$(includedir)/curl/curlbuild-64.h,p"
EXTRA_PAX_ARGS_isa-sparcv8 = $(EXTRA_PAX_ARGS_32)
EXTRA_PAX_ARGS_isa-sparcv9 = $(EXTRA_PAX_ARGS_64)
EXTRA_PAX_ARGS_isa-i386    = $(EXTRA_PAX_ARGS_32)
EXTRA_PAX_ARGS_isa-amd64   = $(EXTRA_PAX_ARGS_64)
Merging
            and renaming
Rename files on-the-fly during merge
See curl

EXTRA_PAX_ARGS_32 = -s ",^.$(includedir)/curl/curlbuild.h$$,
                           .$(includedir)/curl/curlbuild-32.h,p"
                             This is the modulation where the
EXTRA_PAX_ARGS_64 = -s ",^.$(includedir)/curl/curlbuild.h$$,
                               PAX args should be applied
                           .$(includedir)/curl/curlbuild-64.h,p"
EXTRA_PAX_ARGS_isa-sparcv8 = $(EXTRA_PAX_ARGS_32)
EXTRA_PAX_ARGS_isa-sparcv9 = $(EXTRA_PAX_ARGS_64)
EXTRA_PAX_ARGS_isa-i386    = $(EXTRA_PAX_ARGS_32)
EXTRA_PAX_ARGS_isa-amd64   = $(EXTRA_PAX_ARGS_64)
Merging
      with custom rules
  Only merge specific files
  See nrpe
GARNAME = nrpe
...
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)
Merging
      with custom rules
  Only merge specific files
  See nrpe
                                                       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

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)
Merging
      with custom rules
  Only merge specific files
  See nrpe
                                                       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

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)
Merging
      with custom rules
  Only merge specific files
  See nrpe
GARNAME = nrpe
...
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
                                              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)
Questions?
Bueller? Anybody?

Contenu connexe

Tendances

Groovy 2.0 update at Devoxx 2012
Groovy 2.0 update at Devoxx 2012Groovy 2.0 update at Devoxx 2012
Groovy 2.0 update at Devoxx 2012
Guillaume Laforge
 
Lecture 20 presentation
Lecture 20 presentationLecture 20 presentation
Lecture 20 presentation
Asif
 
Groovy 1.8 and 2.0 at GR8Conf Europe 2012
Groovy 1.8 and 2.0 at GR8Conf Europe 2012Groovy 1.8 and 2.0 at GR8Conf Europe 2012
Groovy 1.8 and 2.0 at GR8Conf Europe 2012
Guillaume Laforge
 
Vmware management-with-vcli-5.0
Vmware management-with-vcli-5.0Vmware management-with-vcli-5.0
Vmware management-with-vcli-5.0
Sathishkumar A
 
Riak Operations
Riak OperationsRiak Operations
Riak Operations
gschofield
 

Tendances (14)

Groovy 2.0 update at Devoxx 2012
Groovy 2.0 update at Devoxx 2012Groovy 2.0 update at Devoxx 2012
Groovy 2.0 update at Devoxx 2012
 
Lecture 20 presentation
Lecture 20 presentationLecture 20 presentation
Lecture 20 presentation
 
Groovy 1.8 and 2.0 at GR8Conf Europe 2012
Groovy 1.8 and 2.0 at GR8Conf Europe 2012Groovy 1.8 and 2.0 at GR8Conf Europe 2012
Groovy 1.8 and 2.0 at GR8Conf Europe 2012
 
Groovy 2.0 update - Cloud Foundry Open Tour Moscow - Guillaume Laforge
Groovy 2.0 update - Cloud Foundry Open Tour Moscow - Guillaume LaforgeGroovy 2.0 update - Cloud Foundry Open Tour Moscow - Guillaume Laforge
Groovy 2.0 update - Cloud Foundry Open Tour Moscow - Guillaume Laforge
 
Ten common mistakes made in Function Java
Ten common mistakes made in Function JavaTen common mistakes made in Function Java
Ten common mistakes made in Function Java
 
Ten common mistakes made in Function Java - iSense Java Summit
Ten common mistakes made in Function Java - iSense Java SummitTen common mistakes made in Function Java - iSense Java Summit
Ten common mistakes made in Function Java - iSense Java Summit
 
Oracle on Solaris
Oracle on SolarisOracle on Solaris
Oracle on Solaris
 
Vmware management-with-vcli-5.0
Vmware management-with-vcli-5.0Vmware management-with-vcli-5.0
Vmware management-with-vcli-5.0
 
Oracle11g On Fedora14
Oracle11g On Fedora14Oracle11g On Fedora14
Oracle11g On Fedora14
 
Centos config
Centos configCentos config
Centos config
 
ARM Trusted FirmwareのBL31を単体で使う!
ARM Trusted FirmwareのBL31を単体で使う!ARM Trusted FirmwareのBL31を単体で使う!
ARM Trusted FirmwareのBL31を単体で使う!
 
Ansible - simple it automation
Ansible - simple it automationAnsible - simple it automation
Ansible - simple it automation
 
Diving into SWUpdate: adding new platform support in 30minutes with Yocto/OE !
Diving into SWUpdate: adding new platform support in 30minutes with Yocto/OE !Diving into SWUpdate: adding new platform support in 30minutes with Yocto/OE !
Diving into SWUpdate: adding new platform support in 30minutes with Yocto/OE !
 
Riak Operations
Riak OperationsRiak Operations
Riak Operations
 

En vedette

ใบงานที่ 2 เรื่อง ความหมายและความสำคัญของโครงงาน
ใบงานที่ 2 เรื่อง ความหมายและความสำคัญของโครงงานใบงานที่ 2 เรื่อง ความหมายและความสำคัญของโครงงาน
ใบงานที่ 2 เรื่อง ความหมายและความสำคัญของโครงงาน
Justice MengKing
 
4.drama & horror
4.drama & horror4.drama & horror
4.drama & horror
gia1995
 
Baile milespowerpoints.com
Baile milespowerpoints.comBaile milespowerpoints.com
Baile milespowerpoints.com
laurayytamara
 
dont download it!!
dont download it!!dont download it!!
dont download it!!
Nikhil Tanni
 
5S Alicia civilization
5S Alicia civilization5S Alicia civilization
5S Alicia civilization
gsbSS
 
Who would be the audience for your media honica
Who would be the audience for your media honicaWho would be the audience for your media honica
Who would be the audience for your media honica
carolinebirksatwork
 
Collateral: Cast Iron for BigMachines
Collateral: Cast Iron for BigMachinesCollateral: Cast Iron for BigMachines
Collateral: Cast Iron for BigMachines
Sean O'Connell
 

En vedette (19)

OpenCSW - What is the project about?
OpenCSW - What is the project about?OpenCSW - What is the project about?
OpenCSW - What is the project about?
 
Dare Ireland presentation
Dare Ireland presentationDare Ireland presentation
Dare Ireland presentation
 
Gruppo 8 tirapelle_sean
Gruppo 8 tirapelle_seanGruppo 8 tirapelle_sean
Gruppo 8 tirapelle_sean
 
ใบงานที่ 2 เรื่อง ความหมายและความสำคัญของโครงงาน
ใบงานที่ 2 เรื่อง ความหมายและความสำคัญของโครงงานใบงานที่ 2 เรื่อง ความหมายและความสำคัญของโครงงาน
ใบงานที่ 2 เรื่อง ความหมายและความสำคัญของโครงงาน
 
Administaff Overview
Administaff OverviewAdministaff Overview
Administaff Overview
 
supernatural
supernaturalsupernatural
supernatural
 
Excite
ExciteExcite
Excite
 
4.drama & horror
4.drama & horror4.drama & horror
4.drama & horror
 
Hong kong and Macaywww.Tripmart.com
Hong kong and Macaywww.Tripmart.comHong kong and Macaywww.Tripmart.com
Hong kong and Macaywww.Tripmart.com
 
Vehicle
VehicleVehicle
Vehicle
 
Baile milespowerpoints.com
Baile milespowerpoints.comBaile milespowerpoints.com
Baile milespowerpoints.com
 
dont download it!!
dont download it!!dont download it!!
dont download it!!
 
Computer components =d
Computer components =dComputer components =d
Computer components =d
 
5S Alicia civilization
5S Alicia civilization5S Alicia civilization
5S Alicia civilization
 
7 simplesteps
7 simplesteps7 simplesteps
7 simplesteps
 
Who would be the audience for your media honica
Who would be the audience for your media honicaWho would be the audience for your media honica
Who would be the audience for your media honica
 
собрание ОГЭ 2015
собрание ОГЭ 2015собрание ОГЭ 2015
собрание ОГЭ 2015
 
Collateral: Cast Iron for BigMachines
Collateral: Cast Iron for BigMachinesCollateral: Cast Iron for BigMachines
Collateral: Cast Iron for BigMachines
 
Stacey savrasova
Stacey savrasovaStacey savrasova
Stacey savrasova
 

Similaire à Advanced GAR

2005_Structures and functions of Makefile
2005_Structures and functions of Makefile2005_Structures and functions of Makefile
2005_Structures and functions of Makefile
NakCheon Jung
 
Continuous Delivery with Maven, Puppet and Tomcat - ApacheCon NA 2013
Continuous Delivery with Maven, Puppet and Tomcat - ApacheCon NA 2013Continuous Delivery with Maven, Puppet and Tomcat - ApacheCon NA 2013
Continuous Delivery with Maven, Puppet and Tomcat - ApacheCon NA 2013
Carlos Sanchez
 
Reducing Risk When Upgrading MySQL
Reducing Risk When Upgrading MySQLReducing Risk When Upgrading MySQL
Reducing Risk When Upgrading MySQL
Kenny Gryp
 
Railsconf2011 deployment tips_for_slideshare
Railsconf2011 deployment tips_for_slideshareRailsconf2011 deployment tips_for_slideshare
Railsconf2011 deployment tips_for_slideshare
tomcopeland
 

Similaire à Advanced GAR (20)

Spring into rails
Spring into railsSpring into rails
Spring into rails
 
OSGi and Eclipse RCP
OSGi and Eclipse RCPOSGi and Eclipse RCP
OSGi and Eclipse RCP
 
2005_Structures and functions of Makefile
2005_Structures and functions of Makefile2005_Structures and functions of Makefile
2005_Structures and functions of Makefile
 
Fighting Fear-Driven-Development With PHPUnit
Fighting Fear-Driven-Development With PHPUnitFighting Fear-Driven-Development With PHPUnit
Fighting Fear-Driven-Development With PHPUnit
 
Frontend JS workflow - Gulp 4 and the like
Frontend JS workflow - Gulp 4 and the likeFrontend JS workflow - Gulp 4 and the like
Frontend JS workflow - Gulp 4 and the like
 
From Zero to Application Delivery with NixOS
From Zero to Application Delivery with NixOSFrom Zero to Application Delivery with NixOS
From Zero to Application Delivery with NixOS
 
Automated Java Deployments With Rpm
Automated Java Deployments With RpmAutomated Java Deployments With Rpm
Automated Java Deployments With Rpm
 
Deploying Symfony | symfony.cat
Deploying Symfony | symfony.catDeploying Symfony | symfony.cat
Deploying Symfony | symfony.cat
 
Rails Engine | Modular application
Rails Engine | Modular applicationRails Engine | Modular application
Rails Engine | Modular application
 
Continuous Delivery with Maven, Puppet and Tomcat - ApacheCon NA 2013
Continuous Delivery with Maven, Puppet and Tomcat - ApacheCon NA 2013Continuous Delivery with Maven, Puppet and Tomcat - ApacheCon NA 2013
Continuous Delivery with Maven, Puppet and Tomcat - ApacheCon NA 2013
 
Functional Programming in Groovy
Functional Programming in GroovyFunctional Programming in Groovy
Functional Programming in Groovy
 
Continuous Delivery: The Next Frontier
Continuous Delivery: The Next FrontierContinuous Delivery: The Next Frontier
Continuous Delivery: The Next Frontier
 
Reducing Risk When Upgrading MySQL
Reducing Risk When Upgrading MySQLReducing Risk When Upgrading MySQL
Reducing Risk When Upgrading MySQL
 
Railsconf2011 deployment tips_for_slideshare
Railsconf2011 deployment tips_for_slideshareRailsconf2011 deployment tips_for_slideshare
Railsconf2011 deployment tips_for_slideshare
 
Maven2交流
Maven2交流Maven2交流
Maven2交流
 
Design Summit - Migrating to Ruby 2 - Joe Rafaniello
Design Summit - Migrating to Ruby 2 - Joe RafanielloDesign Summit - Migrating to Ruby 2 - Joe Rafaniello
Design Summit - Migrating to Ruby 2 - Joe Rafaniello
 
Hadoop
HadoopHadoop
Hadoop
 
Making the most of your gradle build - Gr8Conf 2017
Making the most of your gradle build - Gr8Conf 2017Making the most of your gradle build - Gr8Conf 2017
Making the most of your gradle build - Gr8Conf 2017
 
Instrumentación de entrega continua con Gitlab
Instrumentación de entrega continua con GitlabInstrumentación de entrega continua con Gitlab
Instrumentación de entrega continua con Gitlab
 
Antons Kranga Building Agile Infrastructures
Antons Kranga   Building Agile InfrastructuresAntons Kranga   Building Agile Infrastructures
Antons Kranga Building Agile Infrastructures
 

Dernier

Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
WSO2
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Victor Rentea
 

Dernier (20)

Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
 
AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
 
Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdf
 
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
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
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
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
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...
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with Milvus
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
 
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
 

Advanced GAR

  • 1. GAR Advanced Topics OpenCSW Technical Summercamp Oslo 2009 Dagobert Michelsen dam@opencsw.org
  • 3. „A Modulation is the process of varying one waveform in relation to another waveform“
  • 4. „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“
  • 17. Phases Prerequisites Executed Fetch globally Checksum Extract Patch Configure Executed inside Build Test modulation Install Merge Package Executed globally
  • 18. Phases Prerequisites Executed Fetch globally Checksum Extract Patch Configure Executed inside Build Test modulation Install Merge Package Executed globally
  • 19. Phases Prerequisites Executed One Fetch modulation globally Checksum Extract Patch Configure Executed inside Build Test modulation Install Merge Package Executed globally
  • 20. Modulations and pre-/post-phases When is pre-build called? Technically ran before first build, but after every configure Problem: each phase should be runnable independently Often sufficient: To be run per modulation pre-build-modulated pre-/post-<phase> is likely to be replaced with pre-/post-<phase>-modulated
  • 21. Modulations and pre-/post-phases When is pre-build called? Technically ran before first build, but after every configure Problem: each phase should be runnable independently Often sufficient: To be run per modulation pre-build-modulated pre-/post-<phase> is likely to be replaced with pre-/post-<phase>-modulated
  • 22. Modulations and pre-/post-phases When is pre-build called? Technically ran before first build, but after every configure Synchronisation needed Problem: each phase should be runnable independently Often sufficient: To be run per modulation pre-build-modulated pre-/post-<phase> is likely to be replaced with pre-/post-<phase>-modulated
  • 23. Modulations and pre-/post-phases When is pre-build called? Technically ran before first build, but after every configure Problem: each phase should be runnable independently Often sufficient: To be run per modulation pre-build-modulated pre-/post-<phase> is likely to be replaced with pre-/post-<phase>-modulated
  • 24. 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
  • 25. 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
  • 26. Verify modulations over ISA build8s% gmake modenv Arch: sparc Kernel: sparcv9 Default ISA 32: sparcv8 Default ISA 64: sparcv9 Requested ISAs: sparcv8 sparcv9 i386 amd64 sparcv8plus+vis pentium_pro Needed ISAs: sparcv8 sparcv9 sparcv8plus+vis Build ISAs: sparcv8 sparcv9 sparcv8plus+vis ISAEXEC dirs: /opt/csw/bin /opt/csw/sbin /opt/csw/libexec ISAEXEC files: /opt/csw/bin/lame Merge include: Merge exclude: /opt/csw/share/info/dir /opt/csw/lib/.*.la .*~ /opt/csw/lib/.*.a Modulators: ISA Modulations: isa-sparcv8 isa-sparcv9 isa-sparcv8plus+vis Requested compiler flags: * Modulation isa-sparcv8: ISA=sparcv8 PATH = /home/dam/mgar/pkg/lame/trunk/work/install-isa-sparcv8/opt/csw/bin:/home/dam/mgar/pkg/lame/ trunk/work/install-isa-sparcv8/opt/csw/bin:/home/dam/mgar/pkg/lame/trunk/work/install-isa-sparcv8/opt/csw/sbin:/ home/dam/mgar/pkg/lame/trunk/work/install-isa-sparcv8/opt/csw/sbin:/opt/csw/bin:/opt/csw/bin:/opt/csw/sbin:/opt/ csw/sbin:/opt/studio/SOS11/SUNWspro/bin:/home/dam/mgar/pkg/lame/trunk/gar/bin:/usr/bin:/usr/sbin:/usr/java/bin:/ usr/ccs/bin:/usr/openwin/bin PKG_CONFIG_PATH = /opt/csw/lib/pkgconfig CFLAGS = -xO3 -xarch=v8 -I/opt/csw/include CXXFLAGS = -xO3 -xarch=v8 -I/opt/csw/include CPPFLAGS = -I/opt/csw/include LDFLAGS = -xarch=v8 -L/opt/csw/lib LD_OPTIONS = -R/opt/csw/lib/$ISALIST -R/opt/csw/lib ASFLAGS =
  • 27. 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 (work-in-progress) Build platform for each modulation must be specified in the package manifest (work-in-progress) How does ISAEXEC relate to multi-ISA?
  • 28. Modulation over version GARNAME = automake GARVERSION = 1.11 ... EXTRA_MODULATORS = GARVERSION MODULATIONS_GARVERSION = 1.6.3 1.7.9 1.8.5 1.9.6 1.10.2 1.11 ... SOURCEFILES = $(foreach VERSION,$(MODULATIONS_GARVERSION), $(GARNAME)-$(VERSION).tar.gz ) DISTFILES = $(SOURCEFILES) ... NOEXTRACT = $(filter-out $(GARNAME)-$(GARVERSION).tar.gz, $(SOURCEFILES)) ... $(foreach VERSION,$(MODULATIONS_GARVERSION), $(eval MERGE_SCRIPTS_isa-$(ISA)-garversion-$(VERSION) = copy-all) )
  • 29. Modulation over version GARNAME = automake Adds modulator with GARVERSION = 1.11 this name ... EXTRA_MODULATORS = GARVERSION MODULATIONS_GARVERSION = 1.6.3 1.7.9 1.8.5 1.9.6 1.10.2 1.11 ... SOURCEFILES = $(foreach VERSION,$(MODULATIONS_GARVERSION), $(GARNAME)-$(VERSION).tar.gz ) DISTFILES = $(SOURCEFILES) ... NOEXTRACT = $(filter-out $(GARNAME)-$(GARVERSION).tar.gz, $(SOURCEFILES)) ... $(foreach VERSION,$(MODULATIONS_GARVERSION), $(eval MERGE_SCRIPTS_isa-$(ISA)-garversion-$(VERSION) = copy-all) )
  • 30. Modulation over version GARNAME = automake Adds modulator with GARVERSION = 1.11 this name ... EXTRA_MODULATORS = GARVERSION One file per MODULATIONS_GARVERSION = 1.6.3 1.7.9 1.8.5 1.9.6 1.10.2 1.11 modulated version ... SOURCEFILES = $(foreach VERSION,$(MODULATIONS_GARVERSION), $(GARNAME)-$(VERSION).tar.gz ) DISTFILES = $(SOURCEFILES) ... NOEXTRACT = $(filter-out $(GARNAME)-$(GARVERSION).tar.gz, $(SOURCEFILES)) ... $(foreach VERSION,$(MODULATIONS_GARVERSION), $(eval MERGE_SCRIPTS_isa-$(ISA)-garversion-$(VERSION) = copy-all) )
  • 31. Modulation over version GARNAME = automake Adds modulator with GARVERSION = 1.11 this name ... EXTRA_MODULATORS = GARVERSION One file per MODULATIONS_GARVERSION = 1.6.3 1.7.9 1.8.5 1.9.6 1.10.2 1.11 modulated version ... SOURCEFILES = $(foreach VERSION,$(MODULATIONS_GARVERSION), $(GARNAME)-$(VERSION).tar.gz ) Make sure only the needed file is DISTFILES = $(SOURCEFILES) extracted in each modulation ... NOEXTRACT = $(filter-out $(GARNAME)-$(GARVERSION).tar.gz, $(SOURCEFILES)) ... $(foreach VERSION,$(MODULATIONS_GARVERSION), $(eval MERGE_SCRIPTS_isa-$(ISA)-garversion-$(VERSION) = copy-all) )
  • 32. Modulation over version GARNAME = automake Adds modulator with GARVERSION = 1.11 this name ... EXTRA_MODULATORS = GARVERSION One file per MODULATIONS_GARVERSION = 1.6.3 1.7.9 1.8.5 1.9.6 1.10.2 1.11 modulated version ... SOURCEFILES = $(foreach VERSION,$(MODULATIONS_GARVERSION), $(GARNAME)-$(VERSION).tar.gz ) Make sure only the needed file is DISTFILES = $(SOURCEFILES) extracted in each modulation ... NOEXTRACT = $(filter-out $(GARNAME)-$(GARVERSION).tar.gz, $(SOURCEFILES)) ... $(foreach VERSION,$(MODULATIONS_GARVERSION), $(eval MERGE_SCRIPTS_isa-$(ISA)-garversion-$(VERSION) = copy-all) ) Merge-rules needed! We‘ll see about this later
  • 33. Modulation over static/dynamic linking GARNAME = wget ... EXTRA_MODULATORS = STATIC 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
  • 34. Modulation over static/dynamic linking Adds modulator with GARNAME = wget this name ... EXTRA_MODULATORS = STATIC 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
  • 35. 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
  • 36. 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 Why is this a bad idea? MERGE_SCRIPTS_isa-i386-static-enable = rename-wget copy-only MERGE_DIRS_isa-i386-static-enable = $(bindir) Think gmake remerge merge-rename-wget: @mv $(DESTDIR)$(bindir)/wget $(DESTDIR)$(bindir)/wget.static ... include gar/category.mk
  • 39. Modulation over static/dynamic linking GARNAME = wget ... EXTRA_MODULATORS = STATIC 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 = copy-static-wget-only MERGE_SCRIPTS_isa-i386-static-disable = copy-all MERGE_SCRIPTS_isa-i386-static-enable = copy-static-wget-only from one phase Always copy to another merge-copy-static-wget-only: ginstall $(INSTALLISADIR)$(bindir)/wget $(PKGROOT)$(bindir)/wget.static ... include gar/category.mk
  • 40. Modulation over parameter size GARNAME = nrpe ... EXTRA_MODULATORS = SIZE MODULATIONS_SIZE = 1k 8k ... 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)
  • 41. Modulation over parameter size Ok, I guess you understood GARNAME = nrpe how this works ... EXTRA_MODULATORS = SIZE MODULATIONS_SIZE = 1k 8k ... 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)
  • 42. 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)
  • 43. 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
  • 45. Merging Why is this needed? Libraries may be located elsewhere in the package than they were configured 32 and 64 bit need different install locations to have sane pkgconfig-files build-isa-sparcv8/opt/csw/bin/myapp build-isa-sparcv9/opt/csw/bin/64/myapp pkgroot/opt/csw/bin/myapp Install pkgroot/opt/csw/bin/sparcv9/myapp /opt/csw/bin/myapp -> isaexec Package /opt/csw/bin/sparcv8/myapp /opt/csw/bin/sparcv9/myapp
  • 46. Merging default rules copy-all Copy all files and put them in standard locations (e. g. /csw/bin) copy-only Copy only the files to be relocated and also put them in standard locations copy-relocate Copy all files and relocate the locations to the ISA-subdirs (e. g. /csw/bin/sparcv9/) copy-relocated-only Copy only the files to be relocated and also relocate the locations to the ISA- subdirs
  • 47. Merging default rules copy-all Copy all files and put them in standard locations (e. g. /csw/bin) Copy all Copy only relocated copy-only Copy only the files to be relocated and also put them in standard locations copy-relocate Do not Copy all files and relocate the locations to the ISA-subdirs relocate copy-all copy-only (e. g. /csw/bin/sparcv9/) copy-relocated-only Copy only the files to be relocated and also relocate the locations to the ISA- Do relocate subdirs copy-relocate copy-relocated-only
  • 48. Merging and renaming Rename files on-the-fly during merge See curl EXTRA_PAX_ARGS_32 = -s ",^.$(includedir)/curl/curlbuild.h$$, .$(includedir)/curl/curlbuild-32.h,p" EXTRA_PAX_ARGS_64 = -s ",^.$(includedir)/curl/curlbuild.h$$, .$(includedir)/curl/curlbuild-64.h,p" EXTRA_PAX_ARGS_isa-sparcv8 = $(EXTRA_PAX_ARGS_32) EXTRA_PAX_ARGS_isa-sparcv9 = $(EXTRA_PAX_ARGS_64) EXTRA_PAX_ARGS_isa-i386 = $(EXTRA_PAX_ARGS_32) EXTRA_PAX_ARGS_isa-amd64 = $(EXTRA_PAX_ARGS_64)
  • 49. Merging and renaming Rename files on-the-fly during merge See curl From here EXTRA_PAX_ARGS_32 = -s ",^.$(includedir)/curl/curlbuild.h$$, .$(includedir)/curl/curlbuild-32.h,p" EXTRA_PAX_ARGS_64 = -s ",^.$(includedir)/curl/curlbuild.h$$, .$(includedir)/curl/curlbuild-64.h,p" EXTRA_PAX_ARGS_isa-sparcv8 = $(EXTRA_PAX_ARGS_32) EXTRA_PAX_ARGS_isa-sparcv9 = $(EXTRA_PAX_ARGS_64) EXTRA_PAX_ARGS_isa-i386 = $(EXTRA_PAX_ARGS_32) EXTRA_PAX_ARGS_isa-amd64 = $(EXTRA_PAX_ARGS_64)
  • 50. Merging and renaming Rename files on-the-fly during merge See curl From here To here EXTRA_PAX_ARGS_32 = -s ",^.$(includedir)/curl/curlbuild.h$$, .$(includedir)/curl/curlbuild-32.h,p" EXTRA_PAX_ARGS_64 = -s ",^.$(includedir)/curl/curlbuild.h$$, .$(includedir)/curl/curlbuild-64.h,p" EXTRA_PAX_ARGS_isa-sparcv8 = $(EXTRA_PAX_ARGS_32) EXTRA_PAX_ARGS_isa-sparcv9 = $(EXTRA_PAX_ARGS_64) EXTRA_PAX_ARGS_isa-i386 = $(EXTRA_PAX_ARGS_32) EXTRA_PAX_ARGS_isa-amd64 = $(EXTRA_PAX_ARGS_64)
  • 51. Merging and renaming Rename files on-the-fly during merge See curl EXTRA_PAX_ARGS_32 = -s ",^.$(includedir)/curl/curlbuild.h$$, .$(includedir)/curl/curlbuild-32.h,p" This is the modulation where the EXTRA_PAX_ARGS_64 = -s ",^.$(includedir)/curl/curlbuild.h$$, PAX args should be applied .$(includedir)/curl/curlbuild-64.h,p" EXTRA_PAX_ARGS_isa-sparcv8 = $(EXTRA_PAX_ARGS_32) EXTRA_PAX_ARGS_isa-sparcv9 = $(EXTRA_PAX_ARGS_64) EXTRA_PAX_ARGS_isa-i386 = $(EXTRA_PAX_ARGS_32) EXTRA_PAX_ARGS_isa-amd64 = $(EXTRA_PAX_ARGS_64)
  • 52. Merging with custom rules Only merge specific files See nrpe GARNAME = nrpe ... 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)
  • 53. Merging with custom rules Only merge specific files See nrpe 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 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)
  • 54. Merging with custom rules Only merge specific files See nrpe 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 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)
  • 55. Merging with custom rules Only merge specific files See nrpe GARNAME = nrpe ... 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 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)