[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Quilt patch for patching things in the debian folder



On Wed, 07 Mar 2012 16:53:00 +0800
Thomas Goirand <zigo@debian.org> wrote:

> I've just seen an (ugly) instance of many quilt patches in
> debian/patches that are patching things inside the debian/ folder. I am
> wondering if it would be wise to forbid this entirely, and write about
> it in the policy (maybe it is there already?). There's no sane reason
> why this would happen: our package_<version>.debian.tar.gz should come
> patched already, and shouldn't need any quilt patch.
> 
> Thoughts anyone? Is there reasons why this would be a valid way to do
> things?

Not within Debian uploads and buildd's, true, but there are good reasons
for this to remain technically possible for derivatives. The ability for
someone downstream of Debian to patch debian/control[.in] and
particularly maintainer scripts and debian/*.install files would be
useful at times. Lots of conditional downstream rebuild work can be
done with DEB_BUILD_OPTIONS and conditionals in debian/rules but there
are problems when a rebuild wants to / has to remove certain files from
the packaging. There are -N and -X options but these act globally and
sometimes it just comes down to having to modify the relevant .install
file. Maintainer scripts are classics for this problem too - e.g. when
trying to get packages to install correctly using only the busybox
shell. How else are people meant to be able to experiment with building
Debian packages against uClibc or without perl and without coreutils,
as with Emdebian Crush?

There are other ways of doing this but as it will remain necessary for
someone to modify files in debian/ for a customised / embedded rebuild
of any package in Debian, is it preferable to require this to be done
using sed and awk or to allow a clean patch-based mechanism which is a
lot easier for the relevant Debian maintainers to understand?

Turn the problem around - if someone (me) comes to you about one of
your packages with a set of changes which are necessary to be able to
rebuild your package, say, without perl or without SSL or without LDAP
support - how would you prefer that to be explained and debugged? A set
of sed and awk lines for debian/rules or a clean set of patches to
debian/ files?

This isn't so much of a problem with small packages but the typical
packages where this is necessary are the large, complex packages where
there are lots of ./configure options which can be turned on or off and
a lot of binary packages which would have their contents modified /
removed by rebuilding with certain options turned off. Typical examples
are cairo, curl, gcc, eglibc, qt4 ... there's an old list at [0] but
there will be others...

Overall, I would hate to see quilt patches to debian/ files in Debian
packages in the main archive - but *only* because I want to do that
downstream of Debian and having someone else doing it already makes my
life harder! ;-)

[0] http://www.emdebian.org/trac/browser/current/target

-- 


Neil Williams
=============
http://www.linux.codehelp.co.uk/

Attachment: pgpEUiAiSB620.pgp
Description: PGP signature


Reply to: