www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - D, Dub and distributions

reply Russel Winder <russel winder.org.uk> writes:
Has anyone investigated whether Dub is an acceptable tool for use by
Debian and Fedora packagers for building Debian and Fedora packages?

I would hate to start a D+GtkD project (*) using Dub only to find that
Debian and Fedora would refuse to package the project.


(*) Well actually rewrite a C++ + Gtk + Autotools project that is still
technically in Debian, but has been ejected from Fedora for lack of
development progress.

-- 
Russel.
=============================================================================
Dr Russel Winder      t: +44 20 7585 2200   voip: sip:russel.winder ekiga.net
41 Buckmaster Road    m: +44 7770 465 077   xmpp: russel winder.org.uk
London SW11 1EN, UK   w: www.russel.org.uk  skype: russel_winder
Mar 02 2014
next sibling parent "Dicebot" <public dicebot.lv> writes:
On Sunday, 2 March 2014 at 17:29:21 UTC, Russel Winder wrote:
 Has anyone investigated whether Dub is an acceptable tool for 
 use by
 Debian and Fedora packagers for building Debian and Fedora 
 packages?

I'd expect it to be rejected until it is in Debian repositories. It is a common practice to require build tools only available from main repos.
Mar 02 2014
prev sibling next sibling parent Russel Winder <russel winder.org.uk> writes:
On Sun, 2014-03-02 at 17:42 +0000, Dicebot wrote:
[…]
 I'd expect it to be rejected until it is in Debian repositories. 
 It is a common practice to require build tools only available 
 from main repos.

Waf is packaged by Fedora but not Debian. SCons and CMake are packaged by both. Many Debian packagers hate anything that isn't Autotools – which is packaged by both – loudly so :-( Looks like I work with a SCons build (*) and think of switching to Dub as and when Debian and Fedora package it. (*) which could be deemed somewhat ironic given I am driving the SCons D tool development. -- Russel. ============================================================================= Dr Russel Winder t: +44 20 7585 2200 voip: sip:russel.winder ekiga.net 41 Buckmaster Road m: +44 7770 465 077 xmpp: russel winder.org.uk London SW11 1EN, UK w: www.russel.org.uk skype: russel_winder
Mar 02 2014
prev sibling next sibling parent Joseph Rushton Wakeling <joseph.wakeling webdrake.net> writes:
On 02/03/14 19:55, Russel Winder wrote:
 Looks like I work with a SCons build (*) and think of switching to Dub
 as and when Debian and Fedora package it.

Why not both? I don't know about the complexity of your project, but it shouldn't be too much hassle to set up build scripts for both systems. This is what I did with Dgraph, albeit with very simple build requirements: https://github.com/WebDrake/Dgraph/blob/master/Makefile https://github.com/WebDrake/Dgraph/blob/master/package.json The main hassle I encountered was because dub brings with it certain expectations for where things are to be found and how the resulting executables and libraries will be named, although this can all be overridden -- I was lazy and decided to follow dub's naming schemes.
Mar 03 2014
prev sibling next sibling parent Russel Winder <russel winder.org.uk> writes:
On Mon, 2014-03-03 at 09:49 +0100, Joseph Rushton Wakeling wrote:
[…]
 Why not both?  I don't know about the complexity of your project, but it 
 shouldn't be too much hassle to set up build scripts for both systems.

Indeed, I do this for many project. […]
 The main hassle I encountered was because dub brings with it certain 
 expectations for where things are to be found and how the resulting
executables 
 and libraries will be named, although this can all be overridden -- I was lazy 
 and decided to follow dub's naming schemes.

The JVM-verse is effectively bound to the Maven 2 project structure, especially as Gradle uses it by default. SCons is easily able to cope with the Dub convention, so no problem there :-) -- Russel. ============================================================================= Dr Russel Winder t: +44 20 7585 2200 voip: sip:russel.winder ekiga.net 41 Buckmaster Road m: +44 7770 465 077 xmpp: russel winder.org.uk London SW11 1EN, UK w: www.russel.org.uk skype: russel_winder
Mar 03 2014
prev sibling next sibling parent "Francesco Cattoglio" <francesco.cattoglio gmail.com> writes:
On Sunday, 2 March 2014 at 18:55:46 UTC, Russel Winder wrote:
 Waf is packaged by Fedora but not Debian.

On a completely unrelated side note: Waf is NOT supposed to be packaged at all. Being distributed along with the sources is part of the design.
Mar 03 2014
prev sibling next sibling parent Russel Winder <russel winder.org.uk> writes:
On Mon, 2014-03-03 at 13:16 +0000, Francesco Cattoglio wrote:
 On Sunday, 2 March 2014 at 18:55:46 UTC, Russel Winder wrote:
 Waf is packaged by Fedora but not Debian.

On a completely unrelated side note: Waf is NOT supposed to be packaged at all. Being distributed along with the sources is part of the design.

That is indeed one mode of use, but not the only one. For example I only update the Waf instance in a project for a project release (ignoring any intermediate Waf releases) but I use Waf Git master day to day so as to ensure the Waf files work with the latest Waf. (For those unfamiliar: Waf is a Python implemented build system originally based on SCons but now very different from SCons. To have the build depend only on the presence of Python and nothing else, Waf and SCons allow for the entire build system to be shipped with a project. Waf does this far better than SCons. Gradle has a different approach with it's wrappers. NB build is fun.) -- Russel. ============================================================================= Dr Russel Winder t: +44 20 7585 2200 voip: sip:russel.winder ekiga.net 41 Buckmaster Road m: +44 7770 465 077 xmpp: russel winder.org.uk London SW11 1EN, UK w: www.russel.org.uk skype: russel_winder
Mar 03 2014
prev sibling next sibling parent Russel Winder <russel winder.org.uk> writes:
On Mon, 2014-03-03 at 14:35 +0000, Russel Winder wrote:
 On Mon, 2014-03-03 at 13:16 +0000, Francesco Cattoglio wrote:
 On Sunday, 2 March 2014 at 18:55:46 UTC, Russel Winder wrote:
 Waf is packaged by Fedora but not Debian.

On a completely unrelated side note: Waf is NOT supposed to be packaged at all. Being distributed along with the sources is part of the design.

That is indeed one mode of use, but not the only one.

But remember Debian consider having Waf as part of the project rather than a central resource as a problem rather than a benefit. For individuals downloading and building, Waf is good as it is carried with the project. For Debian packagers, they want something system-wide. This policy causes untold pain for JVM-based systems. Sometimes Debian can be a real pain. Fedora is not actually that much better. https://wiki.debian.org/UpstreamGuide https://wiki.debian.org/UnpackWaf https://wiki.debian.org/IntroDebianPackaging -- Russel. ============================================================================= Dr Russel Winder t: +44 20 7585 2200 voip: sip:russel.winder ekiga.net 41 Buckmaster Road m: +44 7770 465 077 xmpp: russel winder.org.uk London SW11 1EN, UK w: www.russel.org.uk skype: russel_winder
Mar 03 2014
prev sibling parent "Steve Teale" <steve.teale britseyeview.com> writes:
On Sunday, 2 March 2014 at 17:29:21 UTC, Russel Winder wrote:
 Has anyone investigated whether Dub is an acceptable tool for 
 use by
 Debian and Fedora packagers for building Debian and Fedora 
 packages?

 I would hate to start a D+GtkD project (*) using Dub only to 
 find that
 Debian and Fedora would refuse to package the project.

Have not quite got to that point yet, but as you know, I am skirting around it. I have built my own .deb files, but they rely on the user to make sure the dependencies are satisfied, so clearly I have to come up with something better. We should stay in touch on this. Two is often better than one! Steve
Mar 03 2014