wiki:Internal/DPKG

Version 3 (modified by ssugrim, 10 years ago) ( diff )

Application Packaging

Debian (deb) packages for Orbit and Wimax are served out of packages.orbit-lab.org (which is a vhost and a CNAME pointing to external1.orbit-lab.org).

The steps to deploy the package are:

  • Compile and prepare your packages (debs)
  • Copy them to external1:
    scp *.deb external1:/tmp/.
    
  • As root on external1:
    cd /var/www/packages/ubuntu
    reprepro includedeb precise /tmp/*.deb
    

You need to provide admin passphrase to sign packages. In case of OMF Aggregate Managers, you should get output like this:

root@external1:/var/www/packages/ubuntu# reprepro includedeb precise /tmp/*.deb
/tmp/omf-aggmgr-bscontrol-5.4_5.4.3-ubuntu3_all.deb: component guessed as 'main'
/tmp/omf-aggmgr-cmc-5.4_5.4.3-ubuntu3_all.deb: component guessed as 'main'
/tmp/omf-aggmgr-common-5.4_5.4.3-ubuntu3_i386.deb: component guessed as 'main'
/tmp/omf-aggmgr-frisbee-5.4_5.4.3-ubuntu3_all.deb: component guessed as 'main'
/tmp/omf-aggmgr-full-5.4_5.4.3-ubuntu3_all.deb: component guessed as 'main'
/tmp/omf-aggmgr-instr-5.4_5.4.3-ubuntu3_all.deb: component guessed as 'main'
/tmp/omf-aggmgr-inventory-5.4_5.4.3-ubuntu3_all.deb: component guessed as 'main'
/tmp/omf-aggmgr-login-5.4_5.4.3-ubuntu3_all.deb: component guessed as 'main'
/tmp/omf-aggmgr-logincommon-5.4_5.4.3-ubuntu3_all.deb: component guessed as 'main'
/tmp/omf-aggmgr-network-5.4_5.4.3-ubuntu3_all.deb: component guessed as 'main'
/tmp/omf-aggmgr-nfs-5.4_5.4.3-ubuntu3_all.deb: component guessed as 'main'
/tmp/omf-aggmgr-pxe-5.4_5.4.3-ubuntu3_all.deb: component guessed as 'main'
/tmp/omf-aggmgr-result-5.4_5.4.3-ubuntu3_all.deb: component guessed as 'main'
/tmp/omf-aggmgr-saveimage-5.4_5.4.3-ubuntu3_all.deb: component guessed as 'main'
/tmp/omf-aggmgr-scheduler-5.4_5.4.3-ubuntu3_all.deb: component guessed as 'main'
/tmp/omf-aggmgr-status-5.4_5.4.3-ubuntu3_all.deb: component guessed as 'main'
/tmp/omf-aggmgr-wimaxrf-5.4_5.4.3-ubuntu3_all.deb: component guessed as 'main'
Exporting indices...
17AA4E38AA5E5231 ORBIT Administrator <admin@orbit-lab.org> needs a passphrase
Please enter passphrase:
17AA4E38AA5E5231 ORBIT Administrator <admin@orbit-lab.org> needs a passphrase
Please enter passphrase:

To remove OMF Aggregate Manager packages:

reprepro remove precise omf-aggmgr-common-5.4 omf-aggmgr-frisbee-5.4 omf-aggmgr-logincommon-5.4 omf-aggmgr-scheduler-5.4 omf-aggmgr-inventory-5.4 omf-aggmgr-pxe-5.4 omf-aggmgr-cmc-5.4 omf-aggmgr-saveimage-5.4 omf-aggmgr-result-5.4 omf-aggmgr-login-5.4 omf-aggmgr-network-5.4 omf-aggmgr-instr-5.4 omf-aggmgr-status-5.4 omf-aggmgr-wimaxrf-5.4 omf-aggmgr-bscontrol-5.4 omf-aggmgr-nfs-5.4 omf-common-5.4 omf-aggmgr-full-5.4

(needed in order to re-deploy same version packages)

The repository is signed with a key 1378CD67. This hey is stored in the root users keyring. If you are using sudo to assume root privilege, make sure to use the -H flag.

sudo -H -s

The key identifier is specified in the /var/www/packages/ubunut/conf/distributions file. The contents look like:

Origin: ORBIT
Label: ORBIT
Codename: precise
Architectures: i386 amd64 source
Components: main
Description: ORBIT apt repository
SignWith: 1378CD67 
DebOverride: override.precise
DscOverride: override.precise

for the precise branch.

Building packages

These are some steps you can follow to create your own debian package.
Make a folder for your application

mkdir app

Inside the folder please create a debian folder. The most import folder inside the debian folder are: rules and control files.

Example control file for OMF that has source tree with build (i.e. packages that have to be installed in order to build the target packages) dependencies and two packages: omf-aggmgr-common-5.4 (which is architecture dependent i.e. will have the same architecture as the platform at which it is built) and omf-aggmgr-inventory-5.4 (which has only ruby code and is thus architecture independent) is:

Source: omf-aggmgr-5.4
Section: science
Priority: extra
Maintainer: Christoph Dwertmann <christoph.dwertmann@nicta.com.au>
Build-Depends: debhelper (>= 5), ruby1.9.1-dev, libldap2-dev, libssl-dev, libsasl2-dev, libsqlite3-dev
Standards-Version: 3.7.2

Package: omf-aggmgr-common-5.4
Architecture: any
Multi-Arch: same
Depends: ruby1.9.1, libsqlite3-ruby1.9.1, sqlite3, omf-common-5.4
Description: OMF Aggregate Manager
 Provides core functions for Aggregate Managers in OMF

Package: omf-aggmgr-inventory-5.4
Architecture: all
Depends: libmysql-ruby1.9.1, omf-aggmgr-common-5.4, psmisc, nmap, netcat-openbsd, libmysqlclient-dev
Description: OMF Aggregate Manager
 Provides Inventory AM for OMF

Once these files are in place, the build process is initiated with:

debuild -uc -us -b
Note: See TracWiki for help on using the wiki.