New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added dub/dmd spec files for rpmbuild #245
Conversation
deleted: dmd_x64.spec renamed: dub_x64.spec -> installer/dub.spec
You can test this on a fedora 18/19 install, you'll need some devel dependencies for it. $ yum groupinstall "development tools" if built on a i386 platform this will be ~/rpmbuild/RPMS/i386/dub*.rpm I'm not sure about building i386 on a x86_64 platform, this spec file uses build.sh so I think you'd need to add a -m32 compiler command there. |
Actually I think you should use something even older like fedora 12 |
Thanks! I was looking at CentOS, because it has a minimal installer, which is better suited for a VM, and it should be compatible with Fedora. Do you by chance have any idea how their versions correspond to Fedora/RHEL releases or kernel/libc versions? I would opt for CentOS 5.5 (from 2010) and hope that the result will still be compatible with the most current releases. |
echo prep | ||
cd $RPM_BUILD_DIR | ||
rm -fr $RPM_BUILD_DIR/rejectedsoftware-dub*/ | ||
wget --no-check-certificate -O %{SOURCE1} https://github.com/rejectedsoftware/dub/tarball/%{commit} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would anything speak against copying "../source/" and "../build.sh" instead? It would fit better with the build process than to download from github every time.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good idea
modified: installer/dub.spec
CentOS is the norm so you'll never go wrong with it. I had to upgrade from CentOS because DMD and DUB was built against too recent library versions, so it would be amazing to start releasing those for it. |
If you pick the netinst version of an linux distro you'll always end up with something < 250mb where you can pick what you want. |
Okay, I'll try to get some time to install a VM tonight and test this. |
You'll find it hard to find a dmd version that works on it though so you should use the dmd spec file as well to generate a centos rpm for dmd first. |
Don't waste your time on centos 5, I just tried and none of the spec files work. I'll let you know when I find something that works. |
Yep, discovered that already the hard way ;) I've installed 6.5 now in the hopes that the binaries will be backwards compatible enough (nothing really set up yet, though). |
Yes, the dub.spec file also has windows line endings so you should run them in vim and use
The real reason CentOS 5 wouldn't have worked though is that it only has libcurl.so.3 but phobos needed libcurl.so.4 I'll try it on centos 6.5 and send you a shell script if you'd like |
All should be good. Line endings are fixed too. If you need to install centos 6.5 on vmware don't use the built-in script, just use daemon tools and introduce it as a cd-rom like a generic linux install. With the firstinstall script It'll download dependencies and build the dub & dmd rpm successfully on centos 6.5, the hard dependencies will be >=GLIBC 2.12, >=libcurl.so.4 |
If you're having problems with internet you may need to run |
new file: installer/dub-0.9.21-rc4.x86_64.rpm
new file: installer/dub_0.9.21-1_amd64.deb
On debian 6 I managed to make deb files from the rpms using |
Thanks, we are continuing the setup now on 6.5 and will then test the scripts. One question left - after reading up on the "rel" field, it seems like the |
Well yes, though I can't think of an easy way to put this in the repository headers from the shell scripts in the spec file. I'm not so sure rpm-build would even understand "rc" characters correctly, because it uses the version + release to compare to the currently installed version and plan an update of an outdated package. |
Thanks @etcimon for the initial version of the RPM spec file.
Thanks for your support! Closing the issue. See https://github.com/rejectedsoftware/dub/blob/master/installer/rpm/make_installer.sh for how the version is handled how. |
Thanks, I saw that and noted, it's a great way of automating those defines. |
With this you can generate an RPM for dmd / dub from github master with
$ rpmbuild -ba dmd_x64.spec
$ rpmbuild -ba dub_x64.spec
You'll need to update the version at the top of the file when you build a newer rpm. There's no i386 version tested. This worked flawless for me on fedora 20. but you might need some dependencies
$ yum install rpm-build binutils libstdc++-devel wget gcc gcc-c++ make openssl libcurl libcurl-devel tar kernel-devel