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

Bug#536790: debian-policy: please clarify 'required target' in section 4.9



Package: debian-policy
Severity: wishlist

Section 4.9 of http://www.debian.org/doc/debian-policy/ch-source.html
states that there a number of required targets for debian/rules.
Specifically:

"This file must be an executable makefile, and contains the
package-specific recipes for compiling the package and building binary
package(s) from the source.
....
At a minimum, required targets are the ones called by dpkg-buildpackage,
namely, clean, binary, binary-arch, binary-indep, and build."

If the policy is to be read very strictly, then all of the required
targets must be present in debian/rules, however, this is either against
the spirit of certain helper programs (eg CDBS and debhelper 7), or
breaks the functionality of the helper (eg, using a .PHONY line will
cause debhelper 7 to skip the target entirely). For someone new to
CDBS, debhleper 7, or any other existing or future package helper,
the reader of policy must either ignore the violations from this strict
reading or relax the interpretation of policy in such a way to infer
that helper programs provide these targets even though they are not
explicitly listed. This is ambiguous.

A specific example occurred recently when reviewing a package with a
debian/rules file similar to /usr/share/doc/debhelper/examples/rules.tiny
and running an older lintian on it. Lintian complained about the
targets, so policy was consulted, and a strict reading shows that the
rules file was in violation of policy. A discussion ensued and quite a
bit of developer time was lost.

Adding something like the following would greatly reduce the ambiguity
of section 4.9:

"A required target is one that is either explicitly listed in
debian/rules or supplied by a helper program."

A possible rewording of paragragh 3 is:
"Since an interactive debian/rules script makes it impossible to
auto-compile that package and also makes it hard for other people to
reproduce the same binary package, all required targets MUST be
non-interactive. A required target is one that is either explicitly
listed in debian/rules or supplied by a helper program. At a minimum,
required targets are the ones called by dpkg-buildpackage, namely,
clean, binary, binary-arch, binary-indep, and build. It also follows
that any target that these targets depend on must also be
non-interactive."

Thanks,

Jamie

-- System Information:
Debian Release: squeeze/sid
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.28-13-generic (SMP w/2 CPU cores)
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968)
Shell: /bin/sh linked to /bin/bash



Reply to: