Bug#706160: general: it should be easier for ordinary developers to work with Debian packages
Package: general
Severity: wishlist
Introduction:
This is my attempt at explaining exactly what frustrations prevent me from
doing anything with Debian packages, and how another distro (Gentoo) does
it better. The fact that Gentoo is a source-based distro is irrelevant.
I hope you will seriously consider the issues here for jessie, rather than
replying "we understand our system, if others don't that's their problem".
First some definitions:
Ordinary Developer:
A debian user who is comfortable enough with command-line to install
programs in /usr/local. They want to perform Simple Tasks.
Simple Tasks:
quick:
Given a program that is not packaged for Debian and is not
sufficiently useful to the general public to be worth the maintenance
burden, install it such that the package manager knows about it.
distribute:
Given a completed set of package information for such a package,
distribute it in a way that is easy for others to install.
patch:
Given a program with a buggy upstream release, apply a patch.
revert:
Given a program with buggy Debian packaging, revert a patch.
upgrade:
Given a program that is packaged in Debian, upgrade to an unpackaged
version.
The problems with the way Debian does it are:
- debian/ is a subdirectory of the extracted source tree.
- Because of the above, debian/rules tries to know about backwards steps.
- There are too many files that need to be modified.
- There are too many arcane commands that have to be called.
- It's not obvious how to build except from apt-get source.
- It's not obvious how to modify the patch set directly.
- There is no attempt at managing multiple source versions.
How Simple Tasks are approached:
quick:
Debian:
- checkinstall is buggy, quirky, and has no upgrade path.
- I still haven't figured out how to do this easily. Based on the
'hello' package, which is the simplest possible package, this
requires writing a hundred lines of voodoo. A random sampling of
existing package I've looked at agrees with this as a lower bound.
Gentoo:
- vim foo-1.ebuild; ebuild foo-1.ebuild manifest; emerge foo
- That may look like oversimplification, but the contents of
foo-1.ebuild really are very simple.
distribute:
Debian:
- Still haven't figured out the right way.
- I did find the 'dget' command that does some things. How was I
supposed to know about this obscure command for a common use case?
- You probably have to ship the whole huge .orig.tar.gz file, even
though it's available on the internet under a different name, or
even if it's really a git snapshot.
Gentoo:
- Put foo-1.ebuild somewhere online (typically in a git repo)
- foo-1.ebuild contains the URL of the upstream tarball or git repo.
patch:
Debian:
- After trying to make local changes, it said: dpkg-source --commit
- But it is tedious when you already have a full patch from upstream.
Gentoo:
- Assume that you're competent enough to get ahold of a patch.
- Add the patch to files/ (which is shared between all versions of
the package, though you can of course use a different name).
- Add the filename to the PATCHES=() variable, remanifest.
revert:
Debian:
- no clue, it keeps trying to readd the changes and it's not obvious
how to wipe the working tree.
Gentoo:
- Remove the filename from the PATCHES=() variable, remanifest.
upgrade:
Debian:
- Hope it's in experimental.
- Hope its experimental package is not broken.
- Hope adding an experimental package won't break dependencies in the
rest of your system.
Gentoo:
- cp foo-1.ebuild foo-2.ebuild; ebuild foo-2.ebuild manifest
- Typically, the source URL will automatically change based on the
version number. If this is not the case, it is very obvious to fix.
In conclusion:
The current Debian way is complicated. The Gentoo way is simple. This is
not tied to the fact that Gentoo is a source-based distribution, although
that does encourage the right mindset.
For evidence, look at the simplicity of:
- http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/app-misc/hello/hello-2.8.ebuild?view=markup
- http://devmanual.gentoo.org/eclass-reference/ebuild/index.html
Do NOT add yet another packaging tutorial or yet another set of helper
scripts. There are too many as it is - they are just confusing and long.
For the things that I'm talking about, Gentoo gets along just fine with a
manpage - though they have a slightly longer guide for official packages.
Reply to: