Previously, when building DS from git checkout, pre-release version didn't contain git commit id, though supporting code existed.
This fix will generate pre-release version according to Fedora Naming Guidelines for snapshot packages [1]:
Before the change:
$ make srpm ... Wrote: /home/vashirov/build/rpmbuild/SRPMS/389-ds-base-1.3.5.13-20160822141927.fc24.src.rpm
After the change:
$ make srpm ... Wrote: /home/vashirov/build/rpmbuild/SRPMS/389-ds-base-1.3.5.13-20160822gite33a079.fc24.src.rpm
[1] https://fedoraproject.org/wiki/Packaging:Naming?rd=Packaging:NamingGuidelines#Snapshot_packages
attachment 0001-Ticket-48965-Fix-generation-of-the-pre-release-versi.patch
Reviewed by Mark.
Pushed to master on behalf of Viktor. 370a70c..9daee28 master -> master commit 9daee28
This breaks the rpm builds:
{{{ Resolving git.fedorahosted.org (git.fedorahosted.org)... 140.211.169.199 Connecting to git.fedorahosted.org (git.fedorahosted.org)|140.211.169.199|:443... connected. HTTP request sent, awaiting response... 200 OK Length: 365648 (357K) [application/x-xz] Saving to: ‘nunc-stans-0.1.8.tar.xz’
0K .......... .......... .......... .......... .......... 14% 99.6K 3s 50K .......... .......... .......... .......... .......... 28% 298K 2s
100K .......... .......... .......... .......... .......... 42% 298K 1s 150K .......... .......... .......... .......... .......... 56% 299K 1s 200K .......... .......... .......... .......... .......... 70% 298K 1s 250K .......... .......... .......... .......... .......... 84% 299K 0s 300K .......... .......... .......... .......... .......... 98% 156M 0s 350K ....... 100% 51.5M=1.3s
2016-08-22 20:05:14 (266 KB/s) - ‘nunc-stans-0.1.8.tar.xz’ saved [365648/365648]
cp dist/sources/389-ds-base-1.3.5.13.tar.bz2 /var/lib/jenkins/workspace/389-DS-CI/source/ds/rpmbuild/SOURCES/ if [ 1 -eq 1 ]; then \ cp dist/sources/nunc-stans-0.1.8.tar.xz /var/lib/jenkins/workspace/389-DS-CI/source/ds/rpmbuild/SOURCES/ ; \ fi cp rpm/389-ds-base- /var/lib/jenkins/workspace/389-DS-CI/source/ds/rpmbuild/SOURCES/ rpmbuild --define "_topdir /var/lib/jenkins/workspace/389-DS-CI/source/ds/rpmbuild" -ba /var/lib/jenkins/workspace/389-DS-CI/source/ds/rpmbuild/SPECS/389-ds-base.spec error: File /var/lib/jenkins/workspace/389-DS-CI/source/ds/rpmbuild/SOURCES/389-ds-base-1.3.5.13.20160822git9daee28.tar.bz2: No such file or directory rpm.mk:70: recipe for target 'rpms' failed make: ** [rpms] Error 1 }}}
The spec file needs to be updated to account for the new version naming
Hi Mark,
This breaks the rpm builds: do you use custom build script? make rpms works for me on a fresh checkout. The spec file needs to be updated to account for the new version naming I updated spec file with {{{ %global prerel VERSION_PREREL%{nil} }}} so it's expanded in {{{ Source0: http://port389.org/sources/%{name}-%{version}%{?prerel}.tar.bz2 }}} Do you have an updated spec file?
This breaks the rpm builds: do you use custom build script? make rpms works for me on a fresh checkout.
make rpms
The spec file needs to be updated to account for the new version naming I updated spec file with {{{ %global prerel VERSION_PREREL%{nil} }}} so it's expanded in {{{ Source0: http://port389.org/sources/%{name}-%{version}%{?prerel}.tar.bz2 }}} Do you have an updated spec file?
Thanks!
Replying to [comment:4 vashirov]:
Hi Mark, This breaks the rpm builds: do you use custom build script? make rpms works for me on a fresh checkout. The spec file needs to be updated to account for the new version naming I updated spec file with {{{ %global prerel VERSION_PREREL%{nil} }}} so it's expanded in {{{ Source0: http://port389.org/sources/%{name}-%{version}%{?prerel}.tar.bz2 }}} Do you have an updated spec file? Thanks!
It's broken for me when I run:
{{{ make -f rpm.mk rpms }}}
Replying to [comment:5 mreynolds]:
It's broken for me when I run: {{{ make -f rpm.mk rpms }}}
Ah, right. Sorry about that. Looking...
attachment 0002-Ticket-48965-Fix-building-rpms-using-rpm.mk.patch
Mark,
please take a look at the attached patch. I tested make with targets srpms, rpms, patch_srpms and patch_rpms, all of them completed successfully, both in git tree and outside of it.
Please let me know if that works for you.
Replying to [comment:7 vashirov]:
Mark, please take a look at the attached patch. I tested make with targets srpms, rpms, patch_srpms and patch_rpms, all of them completed successfully, both in git tree and outside of it. Please let me know if that works for you. Thanks!
Odd, on my system and the jenkins server (both fedora 24) I also had to add this as the first line in rpm.mk. Then, along with your new patch it works.
{{{ PWD ?= $(shell pwd) }}}
Can you add this line to your patch?
Thanks, Mark
Odd indeed, since $PWD is almost always set by shell. Anyway, here's the new patch.
attachment 0002-Ticket-48965-Fix-building-rpms-using-rpm.mk-v2.patch
Thanks, ack!
9daee28..f2ecfcc master -> master commit f2ecfcc Author: Viktor Ashirov vashirov@redhat.com Date: Tue Aug 23 16:44:20 2016 +0200
Metadata Update from @mreynolds: - Issue assigned to vashirov - Issue set to the milestone: 1.3.5.13
389-ds-base is moving from Pagure to Github. This means that new issues and pull requests will be accepted only in 389-ds-base's github repository.
This issue has been cloned to Github and is available here: - https://github.com/389ds/389-ds-base/issues/2024
If you want to receive further updates on the issue, please navigate to the github issue and click on subscribe button.
subscribe
Thank you for understanding. We apologize for all inconvenience.
Metadata Update from @spichugi: - Issue close_status updated to: wontfix (was: Fixed)
Login to comment on this ticket.