This page will cover how to rebuild a package which does not comply with the FSDG (The Free System Distribution Guidelines.)

Setting up your workspace

Packages you will need to install:

I have a directory called gns/working

find the package

Search 'non free' (or similar) on the bug tracker:

Finding the source

Choose the version which relates to the package you are building. If you are building for metad, you want the lenny packages. If you are building for parkes, you should get squeeze packages.

You will probably be looking at a URL like this:

If so, the dsc link is on the right hand side under 'Download Source Package'.

Alternatively, if you know the release and package name, you can enter the URL like this:

The .dsc link is near the bottom of the page

Getting the source

The tool 'dget' can download the dsc and its associated files (dget is in the devscripts package).

An example using the version in squeeze:

You will have a couple of files in your working directory, in this example:

~/gns/all-branches-new/working $ ls
total 180K
-rw-r--r-- 1 kgoetz kgoetz  19K Mar 12 09:20 psutils_1.17-27.diff.gz
-rw-r--r-- 1 kgoetz kgoetz 1015 Mar 12 10:58 psutils_1.17-27.dsc
-rw-r--r-- 1 kgoetz kgoetz  64K Mar 12 10:58 psutils_1.17.orig.tar.gz

These are the files you will be basing your work off.

Confusing mess time

 mkdir clean-files
 cp * clean-files

 dpkg-source -x psutils_1.17-27.dsc

NOTE! All these steps will need to be run in the get-orig-source target of the rules file in future. (See other documentation)

# dch step

# second extraction

mv psutils-1.17 psutils-1.17.debian
tar xf psutils_1.17.orig.tar.gz
rm psutils-1.17/{list,of,non-free,files}
vi psutils-1.17/{Makefile,and,other,files,needing,editing}

tar czf psutils_1.17+fsdg.orig.tar.gz psutils-1.17+fsdg

cd psutils-1.17+fsdg

# This should be run with options, specifiy others?

debuild --lintian -S

The rebuild flow is likethis

11:11:13 kgoetz@epicfail: ~/gns/all-branches-new/working $ mv psutils-1.17+fsdg/debian/ .
11:11:20 kgoetz@epicfail: ~/gns/all-branches-new/working $ rm -r psutils-1.17+fsdg/ 2psutils-1.17+fsdg/
11:11:25 kgoetz@epicfail: ~/gns/all-branches-new/working $ tar xf psutils_1.17+fsdg.orig.tar.gz
11:11:31 kgoetz@epicfail: ~/gns/all-branches-new/working $ sed -i -e 's/install.include//g' psutils-1.17+fsdg/Makefile
11:12:12 kgoetz@epicfail: ~/gns/all-branches-new/working $ tar czf psutils_1.17+fsdg.orig.tar.gz psutils-1.17+fsdg
11:12:20 kgoetz@epicfail: ~/gns/all-branches-new/working $ vi psutils_1.17+fsdg.orig.tar.gz
11:12:27 kgoetz@epicfail: ~/gns/all-branches-new/working $ mv debian/ psutils-1.17+fsdg/

Writing the watchfile

- needs to download from debian - same version, +/- fsdg bit

writing the get-orig-source rules target

This target needs to be able perform all freeing actions required on the package. If it eases maintainance, you can create a gnewsense/ directory beside the debian/ directory and put files (or patches) in there.

using bzr

CategoryDevelopment CategoryPackaging

kgoetz/FSDGPackageRebuild (last edited 2013-06-23 19:32:23 by samgee2)