Packaging for gNewSense

Introduction

This page describes how to start working on gNewSense packages. That means either modifying Debian packages or creating new packages. The most common reasons for working on packages are

However, the difference with Debian should be kept minimal, because every change we do we have to maintain ourselves. That includes

Requirements

Environment setup

Set some environment variables that are used by the development tools by adding the following lines to your ~/.bashrc:

export DEBEMAIL="joe.black@domain.ext"
export DEBFULLNAME="Joe Black"
export EDITOR=emacs

You should fill in your own email address, name and editor of choice. Then run

$ . ~/.bashrc

for these to take effect (or start a new terminal). Then install the necessary packages:

$ sudo aptitude install devscripts quilt

Add the upstream distribution to your package sources by creating /etc/apt/sources.list.d/debian.list with these lines (please replace the URLs with a mirror close to you:

deb http://http.us.debian.org/debian/ squeeze main
deb-src http://http.us.debian.org/debian/ squeeze main
deb http://security.debian.org/ squeeze/updates main
deb-src http://security.debian.org/ squeeze/updates main

To prevent any Debian packages being installed you must configure pinning in /etc/apt/preferences:

Package: *
Pin: release n=squeeze
Pin-Priority: -1

Now update your package indexes:

sudo aptitude update

Next, set the tags lintian should ignore for modified packages. Put the following in $HOME/.lintiantags.

# Lintian tags to be ignored for gNewSense packages that are derived from
# Debian packages.
changelog-should-mention-nmu
source-nmu-has-incorrect-version-number
# original-maintainer
unknown-field-in-dsc
# bzr://
vcs-field-uses-unknown-uri-format

Make a quilt helper script runnable:

sudo cp /usr/share/doc/quilt/examples/dpatch2quilt.sh /usr/local/bin
sudo chmod a+x /usr/local/bin/dpatch2quilt.sh

Lastly, set the default options for quilt in the ~/.quiltrc file:

QUILT_PATCH_OPTS="--unified-reject-files"
QUILT_PATCHES=debian/patches
QUILT_REFRESH_ARGS="-p ab --no-timestamps --no-index"

Packaging types

New package

If you want to package software that is not yet available in Debian, then follow the guide to build a new package.

Changing a package

If you want to modify an existing package, you first have to know why you want to change it. If the package contains non-free code that needs to be removed, then you have to modify the original source.

On the other hand, if all the sources in the orig archive fall under a free license, but need to be changed anyway, then you follow the package patching tutorial.


CategoryDevelopment CategoryPackaging

Processes/Packaging (last edited 2014-02-01 00:46:45 by FelipeLopez)