Building/Porting packages for Nexenta

Building/porting packages can be a simple or very complex task depending on the package you are porting. This is a getting started guide that outline the simple case. The more complex cases can be tackled once this outline is understood. To start, there is a little bit of setup to do before you begin porting packages.

Initial Configuration

1) You need to configure /etc/apt/sources.list with basic (recommended) or extended sources

Basic deb-src lines

deb-src http://archive.ubuntu.com/ubuntu dapper main
deb-src http://archive.ubuntu.com/ubuntu dapper-updates main
deb-src http://security.ubuntu.com/ubuntu dapper-security main

Extended deb-src lines

deb-src http://archive.ubuntu.com/ubuntu dapper main universe multiverse
deb-src http://archive.ubuntu.com/ubuntu dapper-updates main universe multiverse
deb-src http://security.ubuntu.com/ubuntu dapper-security main restricted

2) Create GPG Keys

3) Install some development packages

% sudo apt-get install devscripts

To know in advance if a package will be accepted, you can review the package policy for the main repository.

Porting a package

Now that you have completed the initial steps, you can port packages from Ubuntu sources. This can be an iterative process between testing and rebuilding a source. In the ideal case you will follow a pattern as outlined below:

1) get sources and build dependencies

% sudo -s
# apt-get build-dep package-name
# apt-get source package-name
# cd package-name-(version)

2) Modify package version to reflect that it is part of Nexenta TODO: add discussion of how nexenta packages are versioned from Ubuntu sources.

# dch -i
# dpkg-buildpackage -sa
  • NB: You need to make sure you change the name/email address to the name/email address matching your GPG key. This will ensure that built packages are signed by you and that we can email you if there is a problem with the package.

3) Check the contents in the new packages. Make sure nothing missed.

# dpkg-deb -c ../*.deb

4) Install and test new packages

# dpkg -i ../*.deb
# apt-get -f install

5) Upload the generated sources/binary .debs by referencing the .changes file.

# dput package-name*.changes

Now the package is well on it's way to the Nexenta repository. If it is not accepted you should receive an email outlining why it was not accepted.