simple tool for lazy Debian package maintainers
ìan
is essentially a frontend for several official Debian packaging tools.
Compiling a simple package with ian:
$ apt source hello $ cd hello-2.10 hello-2.10$ ian build -f ... a lot of stuff ... hello-2.10$ ls -la ../hello_* -rw-r--r-- 1 david david 1798 oct 31 16:02 ../hello_2.10-2_amd64.changes -rw-r--r-- 1 david david 50462 oct 31 16:02 ../hello_2.10-2_amd64.deb -rw-r--r-- 1 david david 8584 oct 31 16:02 ../hello_2.10-2.debian.tar.gz -rw-r--r-- 1 david david 793 oct 31 16:02 ../hello_2.10-2.dsc -rw-r--r-- 1 david david 730504 oct 31 16:02 ../hello_2.10.orig.tar.gz
NOTE: Your user should be a "sudoer" to easly complete several ian
tasks.
show help about the specified command.
if you just exec ian help
, you get a command summary:
prints information about the current directory Debian package:
hello-2.10$ ian summary source: hello upstream: 2.10 watch: 2.10 version: 2.10-2 orig: ../hello_2.10.orig.tar.gz orig methods: uscan from-local changes: ../hello_2.10-2_amd64.changes binaries: hello pkg vcs: none
create or download the .orig file.
ian chooses between these backends (all of them are commands too):
- orig-uscan: download latest upstream with
uscan
- orig-from-rule: execute the rule "get-orig" in the debian/rules
- orig-from-local: generates .orig from current directory files
compiles Debian sources to generate binary packages.
- applies quilt patches if present
- automatically install missing build depends
ian chooses between these backends:
- build-standard: compile with dpkg-buildpackage
- build-svn: compile with svn-buildpackage
there are several available options:
- -b: skip 'source' target. See 'dpkg-buildpackage -b'
- -c: run "ian clean" before "build"
- -f: force build
- -i: run "ian install" after "build"
- -l: creates orig with "ian orig-from-local"
- -m: merge ./debian with upstream .orig. bypassing directory contents
- -s: include full source. See 'dpkg-genchanges -sa'
removes all generated files and artifacts.
- reverts quilt patches if present
ian chooses between these backends:
- clean-common: remove deb, orig, changes, dsc, diff, upload, debian.tar.gz
- clean-svn: remove svn-buildpackage artifacts: tarballs/, build-area/
- clean-uscan: remove uscan downloaded files (available as "ian clean-uscan")
install all generated binary packages in the system.
creates a new debian package release. It opens your editor asking for comments.
- -i: increment final version component (like 'dch -i')
- -y: do not ask for release comments
- -m message: release message for debian/changelog entry
use a date based version format for the new package.
- -i: increment final version component (like 'dch -i')
- -y: do not ask for release comments
- -m message: release message for debian/changelog entry
upload binary packages to the configured package repository.
- run
debsign
- configure and run
dupload
remove package from the configured package repository.
- -y: do not ask for confirmation
list files on generated binary packages.
list all generated files
very basic wizard to create a new debian package
automatically try to fix some common lintian issues (after a successful build).
ian requires you define some environment variables. An example:
DEBFULLNAME="John Doe" DEBEMAIL=john.doe@email.com DEBSIGN_KEYID=D0FE7AFB DEBPOOL=john.doe@debian.repository.org/var/repo
Variables DEBPOOL
and DEBSIGN_KEYID
are required only if you want upload you package to a remote Debian
repository. DEBSIGN_KEYID
is your GPG key fingerprint (keyID).
ian
can load these variables from a ~/.config/ian/config.
ian may execute user provided shell functions at important events in the process. Allowed hooks are:
- ian-clean-hook
- ian-release-hook
- ian-build-start-hook
- ian-build-end-hook
- ian-install-hook
- ian-upload-start-hook
- ian-run ian-upload-end-hook
- ian-run ian-remove-hook
You may provide these functions in your ~/.config/ian file or the by-project .ian file.
$ ian vagrant-gen-files ian: generated: Vagrantfile playbook.yml $ ian vagrant-build vagrant up --provision amd64 vagrant ssh amd64 -c "cd /vagrant/<package-directory>; ian build -m" vagrant up --provision i386 vagrant ssh i386 -c "cd /vagrant/<package-directory>; ian build -bm" $ ian vagrant-clean
You may upload binaries compiled in a different architecture (ie: RPi armhf) from your desktop computer. You need:
- The same
debian
directory and samechangelog
version - Package compiled files in parent directory.
foo/ mypackage_0.20201223.orig.tar.gz mypackage_0.20201223-1_armhf.buildinfo mypackage_0.20201223-1_armhf.changes mypackage_0.20201223-1_armhf.deb mypackage_0.20201223-1_armhf.upload mypackage_0.20201223-1.debian.tar.gz mypackage_0.20201223-1.dsc mypackage_0.20201223.orig.tar.gz mypackage/ debian/
Then, at your desktop (amd64), just upload indicating package architecture:
foo/mypackage$ ian upload armhf
- gpg stalls for a while, then says "Timeout"
- gpg is asking for a password though gpg-agent. You may force tty asking adding
pinentry-program /usr/bin/pinentry-tty
to your~/.gnupg/gpg-agent.conf
. Also install packagepinentry-tty
.
- gpg is asking for a password though gpg-agent. You may force tty asking adding
You need a GPG key to sign and upload compiled debian packages. That's a brief recipe to create and publish your key. Create key:
$ gpg --gen-key
Key related files (and revocation certificate) are saved at ./gnupg
. You may export your private key for secure. Save both (private key and revocation certificate) in a private and secure place until your death:
$ gpg --export-secret-keys -a <your_key_id> > ~/private-key.asc
Your GPG public key must be uploaded to a key server:
$ gpg --keyserver keys.openpgp.org --send-key <your_key_id>