www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.announce - Fedora RPMs

reply Dejan Lekic <dejan.lekic gmail.com> writes:
Hello everybody.

I have just committed few changes to https://www.gitorious.org/dejan-
fedora that allow you to build functional RPMs on your Fedora 19 systems. 
I will aim for now to support F19, F20, EL5 and EL6. If someone needs 
support for something else, please send patches or just simply come to IRC 
and let me know what is the problem. :)

Few remarks - SPEC file expects source files to be on http://ddn.so/
files/ . I hope our release manager, or so-called "build master" will 
make sure dlang.org provides source tarballs of dmd, phobos, druntime and 
tools the same or similar way I have them on http://ddn.so/files/ (btw, 
you can't browse it yet, but you can download files).

I use the simple get-files.sh (located in the dmd directory in the dejan-
fedora repo) to get those release tarballs from GitHub.

Finally, I decided to be little bit adventurous and made the SPEC file 
generate dmd.conf with -defaultlib=libphobos2.so flag in DFLAGS.

Following Fedora package guidelines, I provide static library in the 
libphobos-static package instead.

So far it all works fine. I did not test the i686 packages yet, they 
should work. :)

Kind regards, and I hope you find this useful as much as I do.
Nov 18 2013
next sibling parent reply Dejan Lekic <dejan.lekic gmail.com> writes:
Just to clarify one thing - I do not intend to distribute DMD, this work 
is part of the bugzilla issue regarding curl, plus it is an attempt to 
make better Fedora/RedHat/CentOS packages.

Once it is all on dlang.org maintained by our build-master, I will gladly 
remove all tarballs from ddn.so , and certainly hope that is going to be 
really soon! :)
Nov 18 2013
parent reply Martin Nowak <code dawg.eu> writes:
On 11/19/2013 02:28 AM, Dejan Lekic wrote:
 Just to clarify one thing - I do not intend to distribute DMD, this work
 is part of the bugzilla issue regarding curl, plus it is an attempt to
 make better Fedora/RedHat/CentOS packages.

 Once it is all on dlang.org maintained by our build-master, I will gladly
 remove all tarballs from ddn.so , and certainly hope that is going to be
 really soon!:)
I saw you were struggling with obtaining source tarballs from github. There is a fairly simple trick to do this. While the "official" URL for a tag is https://github.com/D-Programming-Language/dmd/archive/v2.064.2.tar.gz you can put another patch component after the tag name and before the .tar.gz. So the following will work with github and allows you to name the donwloaded file dmd-2.064.2.tar.gz as required by spec. https://github.com/D-Programming-Language/dmd/archive/v2.064.2/dmd-2.064.2.tar.gz They will all redirect you to https://codeload.github.com/D-Programming-Language/dmd/tar.gz/v2.064.2. Using spectool -R will download a dmd-2.064.2.tar.gz and the archive root is also named dmd-2.064.2.
Dec 05 2013
parent Martin Nowak <code dawg.eu> writes:
Also see
https://github.com/dawgfoto/installer/blob/ab222c3880928547354b2941200b7c06ba03ccf9/linux/dmd_fedora.sh#L138
https://github.com/dawgfoto/installer/blob/ab222c3880928547354b2941200b7c06ba03ccf9/linux/dmd_fedora.sh#L269
Dec 05 2013
prev sibling next sibling parent reply Ellery Newcomer <ellery-newcomer utulsa.edu> writes:
On 11/18/2013 05:11 PM, Dejan Lekic wrote:
 Hello everybody.

 I have just committed few changes to https://www.gitorious.org/dejan-
 fedora that allow you to build functional RPMs on your Fedora 19 systems.
 I will aim for now to support F19, F20, EL5 and EL6. If someone needs
 support for something else, please send patches or just simply come to IRC
 and let me know what is the problem. :)
this is pretty nice setup you got here.
 Few remarks - SPEC file expects source files to be on http://ddn.so/
 files/ . I hope our release manager, or so-called "build master" will
 make sure dlang.org provides source tarballs of dmd, phobos, druntime and
 tools the same or similar way I have them on http://ddn.so/files/ (btw,
 you can't browse it yet, but you can download files).
would it be possible to link to appropriate github repo changesets using git submodule, and then generate the tarballs from those?
 I use the simple get-files.sh (located in the dmd directory in the dejan-
 fedora repo) to get those release tarballs from GitHub.

 Finally, I decided to be little bit adventurous and made the SPEC file
 generate dmd.conf with -defaultlib=libphobos2.so flag in DFLAGS.
by gum, I think you did it right too. I can build a shared lib straight out of the box. Well, unittests seem not to be running, and I'm sure they were a release or two ago. we'll see.
 Following Fedora package guidelines, I provide static library in the
 libphobos-static package instead.
lovely. wait, 42 megabytes? there's one file in that package.. wow.
 So far it all works fine. I did not test the i686 packages yet, they
 should work. :)

 Kind regards, and I hope you find this useful as much as I do.
Me too, I'm sick of maintaining my own buildscripts. A few suggestions: /usr/share/d/samples is in dmd-...-{architecture???}, shouldn't they be in a noarch package, like libphobos-devel? shouldn't dmd require libphobos-devel rather than libphobos? libphobos installs libphobos.so.2.064; shouldn't it have also installed libphobos2.so.2.064.2, cuz you know, this is dmd 2.064.2, and also most libs in my /usr/lib seem to follow the format libname.so.x.y.z no dustmite? waaa.. ok fine. From my own experience, I believe you are going to want Requires: glibc-devel(x86-32) Requires: glibc-devel(x86-64) in the dmd package to ensure -m32/-m64 work properly feel free to take any more from https://bitbucket.org/ariovistus/rpm-buildscripts/src/21921c736116a51f60db4ab9cb5852fc0ae0b63c/dmd-git2rpm I don't know if those Provides are necessary, but I do remember it took me a frustrating amount of time to get the 64 bit one right.
Nov 18 2013
parent reply Dejan Lekic <dejan.lekic gmail.com> writes:
 
 would it be possible to link to appropriate github repo changesets using
 git submodule, and then generate the tarballs from those?
 
There is a way to actually use GitHub straight, but the directory names contain SHA1 hashes then, and I would have to store hashes of all 4 projects. Honestly, too much work for me. The way it works now is just not human friendly. They could really generate {dmd|phobos|druntime| tools}-2.064.2.tar.gz files, not v2.064.2.tar.gz ... But hey, I can't change the way GitHub works!
 by gum, I think you did it right too. I can build a shared lib straight
 out of the box. Well, unittests seem not to be running, and I'm sure
 they were a release or two ago. we'll see.
I did not check unittests to be honest, will do that later.
 
 A few suggestions:
 
 /usr/share/d/samples is in dmd-...-{architecture???}, shouldn't they be
 in a noarch package, like libphobos-devel?
Good catch, I will do that!
 
 shouldn't dmd require libphobos-devel rather than libphobos?
Safest is to install all of them for now. :) I will polish those dependencies in time.
 
 libphobos installs libphobos.so.2.064; shouldn't it have also installed
 libphobos2.so.2.064.2, cuz you know, this is dmd 2.064.2, and also most
 libs in my /usr/lib seem to follow the format libname.so.x.y.z
I am puzzled by the soname libphobos generates anyway (read my SPEC comment about it). Libphobos makefile creates ... I would rather see libphobos.so.2.064.2 instead. If someone wants to install DMD 1, then we would have something like libphobos.so.1.073.1, and libphobos.so.1 link to it... I can surely make a libphobos2.so.2.064.2 symbolic link to libphobos2.so.0.64 but quite frankly, that should be done by the makefile itself, not by the SPEC file.
 
 no dustmite? waaa.. ok fine.
Dustmite is not there simply because makefile does not install it. Perhaps I should patch the makefile. But hey, this small project is basically to improve the SPEC file of the DMD installer. Once everything works I hope installer's SPEC file will be replaced with this one.
 
  From my own experience, I believe you are going to want
 
 Requires:	glibc-devel(x86-32)
 Requires:	glibc-devel(x86-64)
Yep! Definitely.
 
 in the dmd package to ensure -m32/-m64 work properly
 
 feel free to take any more from
 
 https://bitbucket.org/ariovistus/rpm-buildscripts/
src/21921c736116a51f60db4ab9cb5852fc0ae0b63c/dmd-git2rpm
 
 I don't know if those Provides are necessary, but I do remember it took
 me a frustrating amount of time to get the 64 bit one right.
Thanks, I will check that later!
Nov 19 2013
parent Ellery Newcomer <ellery-newcomer utulsa.edu> writes:
On 11/19/2013 12:14 AM, Dejan Lekic wrote:
 by gum, I think you did it right too. I can build a shared lib straight
 out of the box. Well, unittests seem not to be running, and I'm sure
 they were a release or two ago. we'll see.
I did not check unittests to be honest, will do that later.
Well, don't worry too much; I'm doing Unsupported Things: https://bitbucket.org/ariovistus/pyd/src/32cf9709d711bd447941be4e11e09727d8747b7c/examples/misc/dmd_sharedlibs/?at=default But I checked, the unittest definitely ran in dmd 2.063.2 with my build at least. I also noticed some odd compilation failures so had to revert to above build. When I get done with my custodial work on pyd (which might take a while), I'll switch back to your rpms and poke around more.
Nov 19 2013
prev sibling parent reply Martin Nowak <code dawg.eu> writes:
On 11/19/2013 02:11 AM, Dejan Lekic wrote:
 Hello everybody.

 I have just committed few changes to https://www.gitorious.org/dejan-
 fedora that allow you to build functional RPMs on your Fedora 19 systems.
 I will aim for now to support F19, F20, EL5 and EL6. If someone needs
 support for something else, please send patches or just simply come to IRC
 and let me know what is the problem. :)
Great, will you take the honour to submit this to Fedora?
 Few remarks - SPEC file expects source files to be on http://ddn.so/
 files/ . I hope our release manager, or so-called "build master" will
 make sure dlang.org provides source tarballs of dmd, phobos, druntime and
 tools the same or similar way I have them on http://ddn.so/files/ (btw,
 you can't browse it yet, but you can download files).

 I use the simple get-files.sh (located in the dmd directory in the dejan-
 fedora repo) to get those release tarballs from GitHub.

 Finally, I decided to be little bit adventurous and made the SPEC file
 generate dmd.conf with -defaultlib=libphobos2.so flag in DFLAGS.
It would be better to stick to the current dlang state.
 Following Fedora package guidelines, I provide static library in the
 libphobos-static package instead.
Splitting in different packages is needed to comply with RPM guidelines, but it's a bad fit for a single binary installer on dlang.org. I'm working on a spec file for the latter. https://github.com/dawgfoto/installer/tree/fedoraSPEC
Dec 05 2013
next sibling parent reply "Dejan Lekic" <dejan.lekic gmail.com> writes:
On Thursday, 5 December 2013 at 11:46:37 UTC, Martin Nowak wrote:
 On 11/19/2013 02:11 AM, Dejan Lekic wrote:
 Hello everybody.

 I have just committed few changes to 
 https://www.gitorious.org/dejan-
 fedora that allow you to build functional RPMs on your Fedora 
 19 systems.
 I will aim for now to support F19, F20, EL5 and EL6. If 
 someone needs
 support for something else, please send patches or just simply 
 come to IRC
 and let me know what is the problem. :)
Great, will you take the honour to submit this to Fedora?
 Few remarks - SPEC file expects source files to be on 
 http://ddn.so/
 files/ . I hope our release manager, or so-called "build 
 master" will
 make sure dlang.org provides source tarballs of dmd, phobos, 
 druntime and
 tools the same or similar way I have them on 
 http://ddn.so/files/ (btw,
 you can't browse it yet, but you can download files).

 I use the simple get-files.sh (located in the dmd directory in 
 the dejan-
 fedora repo) to get those release tarballs from GitHub.

 Finally, I decided to be little bit adventurous and made the 
 SPEC file
 generate dmd.conf with -defaultlib=libphobos2.so flag in 
 DFLAGS.
It would be better to stick to the current dlang state.
 Following Fedora package guidelines, I provide static library 
 in the
 libphobos-static package instead.
Splitting in different packages is needed to comply with RPM guidelines, but it's a bad fit for a single binary installer on dlang.org. I'm working on a spec file for the latter. https://github.com/dawgfoto/installer/tree/fedoraSPEC
Btw, I forgot to tell you... I talked to fedora people about having dmd in Fedora. They said it will probably be rejected because of the backend license, because they are not allowed to freely distribute the software. So I guess we will most likely have to setup our own YUM repository on dlang.org - that is probably the best course of action. If someone has better idea, please share it.
Dec 09 2013
next sibling parent reply Russel Winder <russel winder.org.uk> writes:
On Mon, 2013-12-09 at 15:54 +0100, Dejan Lekic wrote:
[…]
 
 Btw, I forgot to tell you... I talked to fedora people about 
 having dmd in Fedora. They said it will probably be rejected 
 because of the backend license, because they are not allowed to 
 freely distribute the software. So I guess we will most likely 
 have to setup our own YUM repository on dlang.org - that is 
 probably the best course of action. If someone has better idea, 
 please share it.
RPM Fusion seems to be the place for RPMs that cannot be part of the Fedora distribution. -- 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
Dec 10 2013
parent reply "Dejan Lekic" <dejan.lekic gmail.com> writes:
On Tuesday, 10 December 2013 at 12:23:21 UTC, Russel Winder wrote:
 On Mon, 2013-12-09 at 15:54 +0100, Dejan Lekic wrote:
 […]
 
 Btw, I forgot to tell you... I talked to fedora people about 
 having dmd in Fedora. They said it will probably be rejected 
 because of the backend license, because they are not allowed 
 to freely distribute the software. So I guess we will most 
 likely have to setup our own YUM repository on dlang.org - 
 that is probably the best course of action. If someone has 
 better idea, please share it.
RPM Fusion seems to be the place for RPMs that cannot be part of the Fedora distribution.
Russel, I am aware of that, but RPM Fusion is an unofficial (although admittedly often used) repository. If RPMFusion is our only choice I would rather use RPM directly from www.dlang.org .
Jan 03 2014
parent Russel Winder <russel winder.org.uk> writes:
On Fri, 2014-01-03 at 15:32 +0000, Dejan Lekic wrote:
[…]
 Russel, I am aware of that, but RPM Fusion is an unofficial 
 (although admittedly often used) repository. If RPMFusion is our 
 only choice I would rather use RPM directly from www.dlang.org .
Can't we do both? For myself, I am not really wanting to explicitly download RPMs and put them in my own local RPM store, though I do do this, I'd prefer them to appear (magically :-). I already have RPM Fusion in my Yum search list – Nvidia put all their non-free things in there, ditto AMD. The alternative is to set up an RPM database of all the D things as there is for Debian debs. Then people can just add the repository and Yum does the rest. -- 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
Jan 03 2014
prev sibling parent "Joakim" <joakim airpost.net> writes:
On Monday, 9 December 2013 at 14:54:29 UTC, Dejan Lekic wrote:
 On Thursday, 5 December 2013 at 11:46:37 UTC, Martin Nowak 
 wrote:
 On 11/19/2013 02:11 AM, Dejan Lekic wrote:
 Hello everybody.

 I have just committed few changes to 
 https://www.gitorious.org/dejan-
 fedora that allow you to build functional RPMs on your Fedora 
 19 systems.
 I will aim for now to support F19, F20, EL5 and EL6. If 
 someone needs
 support for something else, please send patches or just 
 simply come to IRC
 and let me know what is the problem. :)
Great, will you take the honour to submit this to Fedora?
 Few remarks - SPEC file expects source files to be on 
 http://ddn.so/
 files/ . I hope our release manager, or so-called "build 
 master" will
 make sure dlang.org provides source tarballs of dmd, phobos, 
 druntime and
 tools the same or similar way I have them on 
 http://ddn.so/files/ (btw,
 you can't browse it yet, but you can download files).

 I use the simple get-files.sh (located in the dmd directory 
 in the dejan-
 fedora repo) to get those release tarballs from GitHub.

 Finally, I decided to be little bit adventurous and made the 
 SPEC file
 generate dmd.conf with -defaultlib=libphobos2.so flag in 
 DFLAGS.
It would be better to stick to the current dlang state.
 Following Fedora package guidelines, I provide static library 
 in the
 libphobos-static package instead.
Splitting in different packages is needed to comply with RPM guidelines, but it's a bad fit for a single binary installer on dlang.org. I'm working on a spec file for the latter. https://github.com/dawgfoto/installer/tree/fedoraSPEC
Btw, I forgot to tell you... I talked to fedora people about having dmd in Fedora. They said it will probably be rejected because of the backend license, because they are not allowed to freely distribute the software. So I guess we will most likely have to setup our own YUM repository on dlang.org - that is probably the best course of action. If someone has better idea, please share it.
When I got dmd into FreeBSD ports a couple years back, I asked Walter for permission for them to redistribute the compiler and backend source and he gave it. If the Fedora guys are okay with that arrangement, I'm guessing Walter will give his permission again.
Jan 03 2014
prev sibling parent "Dejan Lekic" <dejan.lekic gmail.com> writes:
On Thursday, 5 December 2013 at 11:46:37 UTC, Martin Nowak wrote:
 Splitting in different packages is needed to comply with RPM 
 guidelines, but it's a bad fit for a single binary installer on 
 dlang.org.
 I'm working on a spec file for the latter.
 https://github.com/dawgfoto/installer/tree/fedoraSPEC
It is not a requirement for no reason. You do not want to force users of your D application to install a D compiler, runtime source, etc, on every client machine, do you? Instead you would probably install just the runtime itself as a package. I have followed your recommendation regarding GitHub - now there is no need to host source packages elsewhere. Thanks for that.
Jan 11 2014