Tag Archives: package

Cleanup of cruft in Debian

Cleanup of unused, left-over old configuration files

aptitude search '~c'

In aptitude: filter ~c

Cleanup of transitional packages

deborphan

Find manually installed packages

Filter: !~M~i

Find non-maintained files

cruft

Find modified configuration files

https://serverfault.com/questions/90400/how-to-check-for-modified-config-files-on-a-debian-system#90401

dpkg-query -W -f='${Conffiles}\n' '*' | awk 'OFS=" "{print $2,$1}' | LANG=C md5sum -c 2>/dev/null | awk -F': ' '$2 !~ /OK$/{print $1}' | sort | less

debsums -ce

Prepare a package (Pioneers) for a Debian i18n-release

Pioneers needs an i18n update, but Debian is in deep freeze, so only i18n related patches (and security patches) will be accepted.

  • Get all patches:
    gawk 'BEGIN { i=1812; while (i < 1844) { print "svn diff -r " (i-1) ":" i " > svn" i ".patch"; i++ }}' | sh
  • Review the patches and remove all non-i18n, non-security related patches
  • Prepare the repository, go to the moment of the last release:
    svn update -r 1812
  • Fetch all updates to the debian packaging:
    cd debian;svn update
  • Prepare quilt as instructed in the Debian wiki:
    export QUILT_PATCHES=debian/patches
    export QUILT_REFRESH_ARGS="-p ab --no-timestamps --no-index"
  • Prepare quilt:
    quilt push -a
  • Apply each relevant patch:
    quilt new svn1819.diff
    lsdiff svn1819.patch | xargs quilt add
    quilt remove ChangeLog
    patch -p0 -i svn1819.patch
    quilt refresh
    quilt header --dep3 -e
      Description: as in the ChangeLog
      Author: as in the ChangeLog
      Origin: upstream
      Applied-upstream: svn revision 1819
  • End quilt:
    quilt pop -a
  • Add all patches to svn
  • Start the release cycle

Create package with build dependencies

Howto create a package that contains the build dependencies of the package you want to test:

Using equivs

  1. Download the source package of the package you want to test:
    $ apt-get source [packagename]
  2. Create a dummy package:
    $ equivs-control [packagename]-builddep
  3. In the file [packagename]-builddep do the following:
    1. Set the field Package to [packagename]-builddep
    2. Set the field Version to the version of the package
    3. Copy the Build-Depends lines from debian/control to the Depends section
    4. Change the word Build-Depends to Depends
  4. Build the *.deb file:
    $ equivs-build [packagename]-builddep
  5. Add the package to the list of known packages:
    $ sudo dpkg -i *.deb
  6. Install the dependencies:
    $ sudo aptitude install [packagename]-builddep

Using devscripts

Alternative: mk-build-deps and then continue from step 5.