FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Debian > Debian Development

 
 
LinkBack Thread Tools
 
Old 12-13-2011, 11:23 AM
Thomas Koch
 
Default Binary blobs in source packages

Hi,

I just made a fool of myself on the simple-build-tool list by claiming that
Debian would build scala without scala. I only checked debian/rules and
debian/control and since scala is in main, I assumed that I must be right.

However scala comes with a bytecode-compiled scala compiler in lib/ which is
required only during build but not installed in the binary packages.

I already opened reportbug to fill a serious Debian Policy violation, but
actually I couldn't find anything in the policy about it.

So is it ok to ship binaries in the source package that are only required
during build? Can I do the same with simple-build-tool, which requires itself
to build?

Regards,

Thomas Koch, http://www.koch.ro


--
To UNSUBSCRIBE, email to debian-devel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 201112131323.26313.thomas@koch.ro">http://lists.debian.org/201112131323.26313.thomas@koch.ro
 
Old 12-13-2011, 11:34 AM
Reinhard Tartler
 
Default Binary blobs in source packages

On Di, Dez 13, 2011 at 13:23:25 (CET), Thomas Koch wrote:

> Hi,
>
> I just made a fool of myself on the simple-build-tool list by claiming that
> Debian would build scala without scala. I only checked debian/rules and
> debian/control and since scala is in main, I assumed that I must be right.
>
> However scala comes with a bytecode-compiled scala compiler in lib/ which is
> required only during build but not installed in the binary packages.
>
> I already opened reportbug to fill a serious Debian Policy violation, but
> actually I couldn't find anything in the policy about it.
>
> So is it ok to ship binaries in the source package that are only required
> during build? Can I do the same with simple-build-tool, which requires itself
> to build?

I had a similar situation in the aspectc++ package, which is a
source-to-source compiler (from AspectC++ to C++).

Background: AspectC++ requires a library called Puma for parsing C/C++
Code. While Puma itself is written in C++, the Visual C++ and Gnu
Extensions to the C++ language are written with aspects. This means that
you need the 'ac++' compiler to "weave" Puma.

Solution: Upstream provides so-called "woven" sources, which includes a
"pre-woven" Puma library. In the Debian package I use these sources to
compile a "boostrap" ac++ binary, then start over from start, weave Puma
with the "bootstrap" ac++ binary, recompile Puma, throw away the
boostrap ac++ binary, and finally compile ac++.

Additional benefit: I have now tested that the ac++ compiler actually
works on all architectures!

Implementation:
http://bazaar.launchpad.net/~siretart/aspectc++/debian/view/head:/debian/rules
(line 41-56)

I'm pretty sure that this approach can be appleid to both the
'simple-build-tool' and 'scala' packages.

Cheers,
Reinhard

--
Gruesse/greetings,
Reinhard Tartler, KeyID 945348A4


--
To UNSUBSCRIBE, email to debian-devel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 87iplkzm3l.fsf@faui43f.informatik.uni-erlangen.de">http://lists.debian.org/87iplkzm3l.fsf@faui43f.informatik.uni-erlangen.de
 
Old 12-13-2011, 05:03 PM
Mehdi Dogguy
 
Default Binary blobs in source packages

On 12/13/2011 01:23 PM, Thomas Koch wrote:
>
> So is it ok to ship binaries in the source package that are only
> required during build? Can I do the same with simple-build-tool,
> which requires itself to build?
>

Depends on the need. It is quite common for compilers to have some
binaries to do the bootstrapping. Scala uses that since some parts of
the compiler are written in scala. And, of course, I make sure that I
ship new binaries only in the Debian package. Another example is OCaml
which needs an ocamlc to bootstrap itself.

I'm not sure yet if it is really justified for simple-build-tool. I was
planning to have a look at it, but didn't find time to actually do that.
IIRC, another issue is that simple-build-tool requires network access
during the build… I guess it can be fooled somehow but didn't check yet.

Regards,

--
Mehdi Dogguy مهدي الدڤي
http://dogguy.org/


--
To UNSUBSCRIBE, email to debian-devel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 4EE7938B.2000609@dogguy.org">http://lists.debian.org/4EE7938B.2000609@dogguy.org
 
Old 12-13-2011, 05:26 PM
Steve Langasek
 
Default Binary blobs in source packages

On Tue, Dec 13, 2011 at 07:03:55PM +0100, Mehdi Dogguy wrote:
> On 12/13/2011 01:23 PM, Thomas Koch wrote:

> > So is it ok to ship binaries in the source package that are only
> > required during build? Can I do the same with simple-build-tool,
> > which requires itself to build?

> Depends on the need. It is quite common for compilers to have some
> binaries to do the bootstrapping. Scala uses that since some parts of
> the compiler are written in scala. And, of course, I make sure that I
> ship new binaries only in the Debian package. Another example is OCaml
> which needs an ocamlc to bootstrap itself.

I think the traditional expectation here is that compilers will do their
initial bootstrap using an out-of-archive binary, and that once in the
archive, they'll be maintained using a self-build-depends instead.

Shipping no-longer-needed bootstrap binaries in the source package is a
borderline case. It's probably ok if we have the source needed to build
that binary. But we ought not need to use it for the actual package build.

--
Steve Langasek Give me a lever long enough and a Free OS
Debian Developer to set it on, and I can move the world.
Ubuntu Developer http://www.debian.org/
slangasek@ubuntu.com vorlon@debian.org
 
Old 12-13-2011, 05:29 PM
Mehdi Dogguy
 
Default Binary blobs in source packages

On 12/13/2011 07:26 PM, Steve Langasek wrote:
> On Tue, Dec 13, 2011 at 07:03:55PM +0100, Mehdi Dogguy wrote:
>> On 12/13/2011 01:23 PM, Thomas Koch wrote:
>
>>> So is it ok to ship binaries in the source package that are only
>>> required during build? Can I do the same with simple-build-tool,
>>> which requires itself to build?
>
>> Depends on the need. It is quite common for compilers to have some
>> binaries to do the bootstrapping. Scala uses that since some parts
>> of the compiler are written in scala. And, of course, I make sure
>> that I ship new binaries only in the Debian package. Another
>> example is OCaml which needs an ocamlc to bootstrap itself.
>
> I think the traditional expectation here is that compilers will do
> their initial bootstrap using an out-of-archive binary, and that once
> in the archive, they'll be maintained using a self-build-depends
> instead.
>

You mean having a circular build-dependency? That isn't great :/
I've seen some packages doing that (don't recall which right now) but
didn't like it, tbh.

Regards,

--
Mehdi Dogguy مهدي الدڤي
http://dogguy.org/


--
To UNSUBSCRIBE, email to debian-devel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 4EE79983.2040209@dogguy.org">http://lists.debian.org/4EE79983.2040209@dogguy.org
 
Old 12-13-2011, 05:45 PM
Steve Langasek
 
Default Binary blobs in source packages

On Tue, Dec 13, 2011 at 07:29:23PM +0100, Mehdi Dogguy wrote:
> > I think the traditional expectation here is that compilers will do
> > their initial bootstrap using an out-of-archive binary, and that once
> > in the archive, they'll be maintained using a self-build-depends
> > instead.

> You mean having a circular build-dependency?

Yes.

> That isn't great :/

<shrug> It's how self-hosting compilers work. That's how the gcc package
works, too.

--
Steve Langasek Give me a lever long enough and a Free OS
Debian Developer to set it on, and I can move the world.
Ubuntu Developer http://www.debian.org/
slangasek@ubuntu.com vorlon@debian.org
 
Old 12-13-2011, 05:59 PM
Joachim Breitner
 
Default Binary blobs in source packages

Hi,

Am Dienstag, den 13.12.2011, 19:29 +0100 schrieb Mehdi Dogguy:
> You mean having a circular build-dependency? That isn't great :/
> I've seen some packages doing that (don't recall which right now) but
> didn't like it, tbh.

ghc does, for instance.

Greetings,
Joachim

--
Joachim "nomeata" Breitner
Debian Developer
nomeata@debian.org | ICQ# 74513189 | GPG-Keyid: 4743206C
JID: nomeata@joachim-breitner.de | http://people.debian.org/~nomeata
 
Old 12-13-2011, 06:30 PM
Adam Borowski
 
Default Binary blobs in source packages

On Tue, Dec 13, 2011 at 10:45:21AM -0800, Steve Langasek wrote:
> On Tue, Dec 13, 2011 at 07:29:23PM +0100, Mehdi Dogguy wrote:
> > > I think the traditional expectation here is that compilers will do
> > > their initial bootstrap using an out-of-archive binary, and that once
> > > in the archive, they'll be maintained using a self-build-depends
> > > instead.
>
> > You mean having a circular build-dependency?
>
> <shrug> It's how self-hosting compilers work. That's how the gcc package
> works, too.

GCC can be built using any other C compiler, though, so there's no freeness
or security issue (Ken Thompson can explain why this is important).

In some cases (like Smalltalk) this degenerates into a binary quine rather
than providing real source.


Do you remember my joke package "goodbye" a while ago? One of ideas in the
resulting discussion was to put a quoted ELF object into debian/rules, that
compiles itself from a provided source (so the letter of the Policy and DFSG
is fulfilled), doing some Ken Thompsonese modifications on the way -- hey,
these are allowed in the archive as required by compilers you're talking
about. Somehow, this idea met the most revulsion, I wonder why.

--
1KB // Yo momma uses IPv4!


--
To UNSUBSCRIBE, email to debian-devel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 20111213193017.GA25968@angband.pl">http://lists.debian.org/20111213193017.GA25968@angband.pl
 
Old 12-13-2011, 06:47 PM
Mehdi Dogguy
 
Default Binary blobs in source packages

On 12/13/2011 07:26 PM, Steve Langasek wrote:
> On Tue, Dec 13, 2011 at 07:03:55PM +0100, Mehdi Dogguy wrote:
>> On 12/13/2011 01:23 PM, Thomas Koch wrote:
>
>>> So is it ok to ship binaries in the source package that are only
>>> required during build? Can I do the same with simple-build-tool,
>>> which requires itself to build?
>
>> Depends on the need. It is quite common for compilers to have some
>> binaries to do the bootstrapping. Scala uses that since some
>> parts of the compiler are written in scala. And, of course, I make
>> sure that I ship new binaries only in the Debian package. Another
>> example is OCaml which needs an ocamlc to bootstrap itself.
>
> I think the traditional expectation here is that compilers will do
> their initial bootstrap using an out-of-archive binary, and that
> once in the archive, they'll be maintained using a
> self-build-depends instead.
>

oh, and actually, this is not guaranteed to always work… this is at
least the case with OCaml which performs rather strict checks during
compilation. (This happened already in the past where some core type
changed).

Regards,

--
Mehdi Dogguy مهدي الدڤي
http://dogguy.org/


--
To UNSUBSCRIBE, email to debian-devel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 4EE7ABDB.5020407@dogguy.org">http://lists.debian.org/4EE7ABDB.5020407@dogguy.org
 
Old 12-13-2011, 07:30 PM
Philipp Kern
 
Default Binary blobs in source packages

On 2011-12-13, Joachim Breitner <nomeata@debian.org> wrote:
> Am Dienstag, den 13.12.2011, 19:29 +0100 schrieb Mehdi Dogguy:
>> You mean having a circular build-dependency? That isn't great :/
>> I've seen some packages doing that (don't recall which right now) but
>> didn't like it, tbh.=20
> ghc does, for instance.

And we had some fun where it was about to disappear from the archive due
to a bad upload. It would've required manual pseudo-binNMUs on all
architectures to get it back.

But then I don't see how you could avoid circular build-dependencies
with compilers written in their own language. fpc/fp-compiler does the
same.

Kind regards
Philipp Kern


--
To UNSUBSCRIBE, email to debian-devel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: slrnjefdeu.6s1.trash@kelgar.0x539.de">http://lists.debian.org/slrnjefdeu.6s1.trash@kelgar.0x539.de
 

Thread Tools




All times are GMT. The time now is 11:57 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org