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

Re: debian/rules "make -f" restriction



On Wed, Oct 28 2009, Tobi wrote:

> Hello!
>
> Debian Policy 4.9 says about debian/rules:
>
> "It must start with the line #!/usr/bin/make -f, so that it can be
> invoked by saying its name rather than invoking make explicitly."
>
> In the VDR and VDR plugin packages, we use something like this:
>
> /bin/sh debian/make-special-vdr.sh
>
> make-special-vdr.sh [1] normally simply does a '/usr/bin/make -f "$@"'.
> But when a special environment variable is set, it modifies the source
> package to build binaries with a different name.

        I am pretty sure this can easily be done in a make file, and I
 suspect it is fairly trivial to do so.

> The reason for this is, that this allows us to build VDR and VDR
> plugin packages for the current development version of VDR, which can
> be installed side-by-side to the normal VDR packages, allowing the
> development version to be easily tested without needing to replace the
> stable VDR packages.

        I do not see why this needs a indirection using a shell script.

> This makes it easier for users to take a peek at newer VDR versions,
> before they become stable and will be released in Debian, which we
> believe is good, because it helps to improve the code quality.

        Can you show us a technical reason why this can't be done using
 a makefile?  This smacks much more of a personal preference than a
 technical need.

> Until now, we silently ignored the Lintian warning about this possible
> policy violation, because the condition "so that it can be invoked by
> saying its name rather than invoking make explicitly." still is true.
> And it still can be built by invoking make explicitly.
>
> Manoj Srivastava now filed some (automatic) bug reports about this,
> so I'm seeking advice on what to do.

        They were all manually filed, with checks.

> Should the policy be changed to something like:
>
> "It must be able to be invoked by saying its name or by invoking make
> explicitly. This can usually be done by using #!/usr/bin/make -f" as
> the shebang line."
>
> Or should we just add a Linitan override? Or do we really need to use
> "#!/usr/bin/make -f" as the shebang line in debian/rules?
>
> Personally I would vote for dropping the make requirement from the
> policy all together. I might be mistaken, but I think none of the
> build tools calls make explicitly with debian/rules. A debian/rules
> might even be a Python or Rake script.

        There are a number of features that one may rely on if
 ./debian/rules is a Makefile. It has a uniform calling convention, you
 can specify -n, -d, -p, and -t and get consistent results, you may pass
 options using MAKEFLAGS, other Maekfiles may include debian/rules for
 debugging and statistical  purposes (Yes, I have done that).

        There is also a clear way of passing in variable values, and
 overriding internal variables on the command line.

        Finally, most of the source packages already conform to this
 policy rule, with the vdr packages being the major standouts. To change
 policy, especially one which the project mostly complies with, you must
 come up  with a more compelling reason than "We like doing things our
 way".


> [1]:
> http://svn.opensourcefactory.com/svn/vdr/trunk/debian/make-special-vdr.sh

        This seems to want a user name and password.

        manoj
-- 
Every journalist has a novel in him, which is an excellent place for it.
Manoj Srivastava <srivasta@debian.org> <http://www.debian.org/~srivasta/>  
1024D/BF24424C print 4966 F272 D093 B493 410B  924B 21BA DABB BF24 424C


Reply to: