Top Banner

of 26

57_PBIPresentation

Apr 06, 2018

Download

Documents

danutzit
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
  • 8/3/2019 57_PBIPresentation

    1/26

    Building self-containedBuilding self-contained

    PBIs from PortsPBIs from Ports(Automagically)(Automagically)

  • 8/3/2019 57_PBIPresentation

    2/26

    What is a PBI?What is a PBI?

    A self-installing, self-A self-installing, self-

    contained software packagecontained software packagefor PC-BSD.for PC-BSD.

    PBI OverviewPBI Overview

  • 8/3/2019 57_PBIPresentation

    3/26

    PBI Features

    Graphical and text based installers.

    Self-contained package, which reduces oreliminates problems with dependencies

    Self-contained directory structure allowsprograms to be installed to other locations on thesystem.

    Shell-scripting support for installation / removalroutines.

    Variety of options for menu icon placement and

    settings.

  • 8/3/2019 57_PBIPresentation

    4/26

    From an end userFrom an end userperspective:perspective:

  • 8/3/2019 57_PBIPresentation

    5/26

    The PBI format Technical

    Perspective

  • 8/3/2019 57_PBIPresentation

    6/26

    The PBI format Technical

    Perspective

  • 8/3/2019 57_PBIPresentation

    7/26

    The PBI format TechnicalPerspective

  • 8/3/2019 57_PBIPresentation

    8/26

    The PBI format TechnicalPerspective

  • 8/3/2019 57_PBIPresentation

    9/26

    The PBI format Technical

    Perspective

  • 8/3/2019 57_PBIPresentation

    10/26

    The PBI Install Process

    PBI loader binary, written in C, parsesflags and launches correct installer.

    Text based installer allows script installsof PBIs, including -accept flag to agreeto license terms.

    At startup of PBI installer, checksum iscalculated to confirm integrity ofprogram data.

  • 8/3/2019 57_PBIPresentation

    11/26

    The PBI Install Process

    User selects particular options, then

    starts lzma decompression and installsapplication.

    PBI executes any included PBI scripts.

    Creation of any Menu / Desktop icons.

  • 8/3/2019 57_PBIPresentation

    12/26

    PBI Scripting Support

    PBI.FirstRun.sh

    Executed before the PBI is installed.

    Allows halting of the installation.

    Often used for system or requirementchecks.

  • 8/3/2019 57_PBIPresentation

    13/26

    PBI Scripting Support

    PBI.SetupScript.sh

    Executed after the PBI is installed.

    Allows for post-install setup of application.

    Normally used to create sym-links for

    program binaries.

  • 8/3/2019 57_PBIPresentation

    14/26

    PBI Scripting Support

    PBI.RemoveScript.sh

    Performs any additional cleanup requiredfor deinstall.

    Often used to remove sym-links created

    with PBI.SetupScript.sh.

  • 8/3/2019 57_PBIPresentation

    15/26

    PBI Builder

  • 8/3/2019 57_PBIPresentation

    16/26

    PBI Builder - Overview

    Program which compiles a port and converts toa PBI file.

    Builds port in a clean chroot environment.

    Uses drop-in module configurations for thebuilding of a specific port / PBI.

    Can monitor a port, triggering a rebuildwhenever the port Makefile is updated.

  • 8/3/2019 57_PBIPresentation

    17/26

    PBI Builder - Installation

    Download from www .pbidir.com -Development PBI Builder

    # tar xvpjf pbibuild-1.4.tbz# ln -s `pwd`/pbi-build /pbi-build

    # cd /pbi-build/cron

    # ./cvsup-nightly.sh (wait a while)

  • 8/3/2019 57_PBIPresentation

    18/26

    PBI Builder - Usage

    Download a module and place it in/pbi-build/modules/

    Modules can be obtained fromsubversion repository, or from examples/directory.

    # cd /pbi-build# ./buildpbi.shor# ./buildpbi.sh

  • 8/3/2019 57_PBIPresentation

    19/26

    PBI Builder - Usage

    (Wait a long time)

    (Wait VERY a long time) Finished PBI will appear in

    outgoing//

  • 8/3/2019 57_PBIPresentation

    20/26

    PBI Builder ModuleStructure

    pbi.conf- Main configuration file

    copy-files - Listing of files to copy from

    installed port

    build.sh Script run after copying PBI files

    preportmake.sh Script run beforebuilding port

  • 8/3/2019 57_PBIPresentation

    21/26

    PBI Builder ModuleStructure

    kmenu-dir Directory of menu entries

    mime-dir Directory of mime entries

    overlay-dir Files copied into PBI

    directory, location of scripts, graphics, andmore.

  • 8/3/2019 57_PBIPresentation

    22/26

    PBI Builder pbi.conf details

    # Program NamePROGNAME="Skype"

    # Program WebsitePROGWEB="http://www.skype.com/"

    # Default Icon (Relative to overlay-dir)PROGICON="SkypeBlue_48x48.png"

    # Port we want to buildPBIPORT="/usr/ports/net/skype"

    # Other Ports we need built (One per line)OTHERPORT=""

    # Enter your custom make options hereMAKEOPTS=""

  • 8/3/2019 57_PBIPresentation

    23/26

    PBI Builder copy-filesdetails

    /usr/local/bin/skype* bin//usr/local/share/skype* share//compat/linux/lib/libas* autolibs/

  • 8/3/2019 57_PBIPresentation

    24/26

    PBI Builder Tricks

    /pbi-build/pbisandbox chrootenvironment of created PBI

    /pbi-build/scripts/3.makepbi.sh Canbe run directly to rebuild a PBI withoutrecompiling

    # ./3.makepbi.sh skype

  • 8/3/2019 57_PBIPresentation

    25/26

    PBI Autobuild Server

    Rebuilds ports that have been updated inCVS.

    Rebuilds PBIs flagged in SVN to rebuild.

    Uploads log & PBI to ftp .pcbsd.org

    Sends email notification to mailing list.

  • 8/3/2019 57_PBIPresentation

    26/26

    PBI Builder Additional Info

    www .pcbsd.org - Developer Docs

    lists .pcbsd.org - Mailing lists for PBI devsand autobuild results.