Bug#553420: debian-policy: Please clarify what is the interface for building binary packages.

View: New views
7 Messages — Rating Filter:   Alert me  

Bug#553420: debian-policy: Please clarify what is the interface for building binary packages.

by Charles Plessy-12 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Package: debian-policy
Version: 3.8.3.0
Severity: normal

Dear Policy delegates,

there is currently a discussion on debian-devel@... with a strong
disagreement on what the Policy specifies for building binary packages, and
what it should specify.

http://lists.debian.org/msgid-search/4AE85D08.1050809@...
(I can prepare a summary if there is interest for this).

In a first step, I think that it would be very helpful to clarify what is the
build interface as of Policy 3.8.3. Currently the Policy specifies what the
debian/rules file is, gives a special role to dpkg-buildpackage, and the build
interface is extrapolated with conflicting interpretation among the developers.

In a second step, I propose to go forward and open the possibility of an
evolution of the constraints on the format of the debian/rules file, according
to the consensus on what the build interface should be (which can be different
from what it is as of version 3.8.3). This part is not independant from the
discussion whether debian/rules should be callable interactively with no
special environment variable set, or if dpkg-buildpackage should be the
canonical tool for this usage.

Have a nice week-end,

--
Charles Plessy,
Tsurumi, Kanagawa, Japan.



--
To UNSUBSCRIBE, email to debian-bugs-dist-REQUEST@...
with a subject of "unsubscribe". Trouble? Contact listmaster@...


Re: Bug#553420: debian-policy: Please clarify what is the interface for building binary packages.

by Manoj Srivastava :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

package debian-policy
user debian-policy@...

severity 553420 wishlist
usertag 553420 = normative issue

thanks

On Fri, Oct 30 2009, Charles Plessy wrote:

> there is currently a discussion on debian-devel@... with
> a strong disagreement on what the Policy specifies for building binary
> packages, and what it should specify.

        I fail to see a strong disagreement, but that is perhaps just me.


> http://lists.debian.org/msgid-search/4AE85D08.1050809@...
> (I can prepare a summary if there is interest for this).

> In a first step, I think that it would be very helpful to clarify what
> is the build interface as of Policy 3.8.3. Currently the Policy
> specifies what the debian/rules file is, gives a special role to
> dpkg-buildpackage, and the build interface is extrapolated with
> conflicting interpretation among the developers.

        The clarification has already been offered, and has one second:

--8<---------------cut here---------------start------------->8---
--- policy.sgml 2009-10-21 20:49:37 +0000
+++ policy.sgml 2009-10-31 01:10:42 +0000
@@ -1725,7 +1725,10 @@
        <p>
          It must start with the line <tt>#!/usr/bin/make -f</tt>,
          so that it can be invoked by saying its name rather than
-         invoking <prgn>make</prgn> explicitly.
+         invoking <prgn>make</prgn> explicitly. That is, invoking
+         either of <tt>make -f debian/rules <em>args...</em></tt>
+         or <tt>./debian/rules <em>args...</em></tt> must cause
+         identical behaviour in each case.
        </p>

        <p>
--8<---------------cut here---------------end--------------->8---

        Rationale: Since debian/rules must be a makefile, and policy has
 already specified that the interpreter the fle should be called with s
 make (it even specifies that the #! line), it follows that how the file
 is invoked should not change the behaviour of the build system.

        The clarifying language above was proposed by Ben Finney, and
 has been seconded by Manoj Srivastava.

        manoj

--
I can't complain, but sometimes I still do. Joe Walsh
Manoj Srivastava <srivasta@...> <http://www.debian.org/~srivasta/>  
1024D/BF24424C print 4966 F272 D093 B493 410B  924B 21BA DABB BF24 424C


--
To UNSUBSCRIBE, email to debian-policy-REQUEST@...
with a subject of "unsubscribe". Trouble? Contact listmaster@...


Processed: Re: Bug#553420: debian-policy: Please clarify what is the interface for building binary packages.

by Debian Bug Tracking System :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Processing commands for control@...:

> package debian-policy
Limiting to bugs with field 'package' containing at least one of 'debian-policy'
Limit currently set to 'package':'debian-policy'

> user debian-policy@...
Setting user to debian-policy@... (was srivasta@...).
> severity 553420 wishlist
Bug #553420 [debian-policy] debian-policy: Please clarify what is the interface for building binary packages.
Severity set to 'wishlist' from 'normal'

> usertag 553420 = normative issue
Bug#553420: debian-policy: Please clarify what is the interface for building binary packages.
There were no usertags set.
Usertags are now: normative issue.
> thanks
Stopping processing here.

Please contact me if you need assistance.

Debian bug tracking system administrator
(administrator, Debian Bugs database)


--
To UNSUBSCRIBE, email to debian-policy-REQUEST@...
with a subject of "unsubscribe". Trouble? Contact listmaster@...


Re: Bug#553420: debian-policy: Please clarify what is the interface for building binary packages.

by Charles Plessy-12 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Le Sat, Oct 31, 2009 at 01:01:57AM -0500, Manoj Srivastava a écrit :

>
>         The clarification has already been offered, and has one second:
>
> --8<---------------cut here---------------start------------->8---
> --- policy.sgml 2009-10-21 20:49:37 +0000
> +++ policy.sgml 2009-10-31 01:10:42 +0000
> @@ -1725,7 +1725,10 @@
>         <p>
>           It must start with the line <tt>#!/usr/bin/make -f</tt>,
>           so that it can be invoked by saying its name rather than
> -         invoking <prgn>make</prgn> explicitly.
> +         invoking <prgn>make</prgn> explicitly. That is, invoking
> +         either of <tt>make -f debian/rules <em>args...</em></tt>
> +         or <tt>./debian/rules <em>args...</em></tt> must cause
> +         identical behaviour in each case.
>         </p>
>
>         <p>
> --8<---------------cut here---------------end--------------->8---
>
>         Rationale: Since debian/rules must be a makefile, and policy has
>  already specified that the interpreter the fle should be called with s
>  make (it even specifies that the #! line), it follows that how the file
>  is invoked should not change the behaviour of the build system.
>
>         The clarifying language above was proposed by Ben Finney, and
>  has been seconded by Manoj Srivastava.

First of all, I would like to remind that seconding is not a vote, but a
statement that consensus was reached. In my opinion, it is prematurate to
declare consensus.

In my understanding of the Policy, the reason why it is specified that
debian/rules must start by ‘#!/usr/bin/make -f’ is to ensure the possibility to
call debian/rules directly (not by make -f debian/rules). Indeed, this is the
way the key components of our system are using to build binary packages.

§4.9 contains:

  ‘It [debian/rules] must start with the line #!/usr/bin/make -f, so that it can
  be invoked by saying its name rather than invoking make explicitly.’

This specification uses ‘rather than’, not ‘as well as’, which suggests that
the preferred way to run the rules file is to call ‘debian/rules’ and not ‘make
-f debian/rules’. Therefore I do not see the need to make extrapolations (the
equivalence between the two commands) part of the Policy.

The proposed patch puts additional constraints on the packages, that would make
more difficult refactor later the Policy towards make a clearer abstraction of
the build interface (which I think is desirable), by for instance speficying
that debian/rules is an executable program that must accept clean, binary,
binary-arch, binary-indep, and build as parameters and honor the options passed
by the DEB_BUILD_OPTIONS environment variable, and leave the implementation up
to the maintainer. (Another example, with which I disagree, would be to
completely deprecate debian/rules and specify that our packages must be built
by dpkg-buildpackage, but we must acknowledge that this is an open issue as
well).

Have a nice week-end,

--
Charles Plessy
Tsurumi, Kanagawa, Japan


--
To UNSUBSCRIBE, email to debian-policy-REQUEST@...
with a subject of "unsubscribe". Trouble? Contact listmaster@...


Re: Bug#553420: debian-policy: Please clarify what is the interface for building binary packages.

by Emilio Pozuelo Monfort :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,

Charles Plessy wrote:
> The proposed patch puts additional constraints on the packages, that would make
> more difficult refactor later the Policy towards make a clearer abstraction of
> the build interface (which I think is desirable), by for instance speficying
> that debian/rules is an executable program that must accept clean, binary,
> binary-arch, binary-indep, and build as parameters and honor the options passed
> by the DEB_BUILD_OPTIONS environment variable, and leave the implementation up
> to the maintainer.

I think there's consensus not to go in that direction. I personally would hate
it if there were debian/rules written in Perl, Python, shell, make, Ruby... So
I'm happy there are enough constraints in Policy in this area.

Cheers,
Emilio



signature.asc (205 bytes) Download Attachment

Bug#553420: debian-policy: Please clarify what is the interface for building binary packages.

by Russ Allbery-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Charles Plessy <plessy@...> writes:

> The proposed patch puts additional constraints on the packages, that
> would make more difficult refactor later the Policy towards make a
> clearer abstraction of the build interface (which I think is desirable),

I don't believe this is desirable at all, and therefore oppose this
proposal.  There is such a thing as too much freedom of choice.  Debian
already has a very complex package build system compared to RPM-based
Linux distributions, with a corresponding difficulty in learning curve.
Allowing people to write debian/rules in other languages, allowing unusual
make flags, or allowing tricky variable manipulation outside of the make
language such as in the vdr packages just adds to that complexity and
learning curve.  I think Debian suffers from that additional complexity.

--
Russ Allbery (rra@...)               <http://www.eyrie.org/~eagle/>



--
To UNSUBSCRIBE, email to debian-bugs-dist-REQUEST@...
with a subject of "unsubscribe". Trouble? Contact listmaster@...


Re: Bug#553420: debian-policy: Please clarify what is the interface for building binary packages.

by Charles Plessy-12 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Le Sat, Oct 31, 2009 at 12:44:28PM +0100, Emilio Pozuelo Monfort a écrit :
> I think there's consensus not to go in that direction. I personally would hate
> it if there were debian/rules written in Perl, Python, shell, make, Ruby... So
> I'm happy there are enough constraints in Policy in this area.

Le Sat, Oct 31, 2009 at 09:47:19AM -0700, Russ Allbery a écrit :
> Allowing people to write debian/rules in other languages, allowing unusual
> make flags, or allowing tricky variable manipulation outside of the make
> language such as in the vdr packages just adds to that complexity and
> learning curve.  I think Debian suffers from that additional complexity.

I will not argue much further, but isn't it is an illusion to think that the
build system stays simple by enforcing the use of GNU Make. This is completely
defeated by:

  #!/usr/bin/make -f
  %:
  dh $@

Therefore, to me it makes things clearer to emphasise that the key properties
of debian/rules is to be executable and to accept the build, clean, etc.
arguments, rather than emphasising that it is a Makefile, which is an
information on which little can be built.

Have a nice day,

--
Charles Plessy
Tsurumi, Kanagawa, Japan


--
To UNSUBSCRIBE, email to debian-policy-REQUEST@...
with a subject of "unsubscribe". Trouble? Contact listmaster@...