Closed oeboema closed 7 years ago
Looks good.
I can merge it as soon as you've addressed the comments I made :)
Hi Joachim,
If you build the rpm (with rpmbuild -ba pimd.spec) the source is retrieved from github and build in a temporary directory.
Because the source is always freshly downloaded, the autogen.sh needs always to be run. I've just tested it and commented the autogen.sh line out and then the rpmbuild fails.
Best regards,
Sjoerd.
From: Joachim Nilsson notifications@github.com Sent: Tuesday, February 28, 2017 5:45 PM To: troglobit/pimd Cc: oeboema; Author Subject: Re: [troglobit/pimd] spec-file (#92)
@troglobit commented on this pull request.
In redhat/pimd.spechttps://github.com/troglobit/pimd/pull/92#discussion_r103499178:
@@ -24,6 +24,7 @@ RFC 2362 with a few noted exceptions (see the RELEASE.NOTES for details).
%build +./autogen.sh
The autogen.sh script should only be run when building directly from GIT. In released versions the configure script and Makefile.in files exist in the tarball. Could you add some sort of "if configure does not exist; then autogen"?
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/troglobit/pimd/pull/92#pullrequestreview-24287510, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AY4hrbGLkMc8waWTR8vXR-IpbC9m6Xf4ks5rhE8ugaJpZM4MOnBN.
I was merely questioning whether a packager normally builds from a released version of a software or from raw GIT directly?
In a released version, when downloading a pimd-1.2.3.tar.gz, there is already a configure script.
This because a user should not have to have automake/autoconf/libtool et al installed. So if the
.spec file by default always regenerates the configure script it would also require the user to have
the autotools installed as well, not just make and a $CC
...
OK, I've checked now how this is handled in other projects. If the configure
script does not exist then autogen.sh
is called, like this:
%build
[ -x configure ] || ./autogen.sh
This would make it possible to build .rpm
's both from GIT and from a released tarball.
Furthermore, it also seems to be recommended to use %configure
instead of ./configure
, because
then the OS can add its proper --prefix
et al. So maybe the %build
section should be changed to
something like this:
%build
[ -x configure ] || NOCONFIGURE=1 ./autogen.sh
%configure
%make_build
@oeboema What do you think of my proposal, do you think you could add it to your pull-request?
Hi Joachim,
I will give this a try.
Best regards,
Sjoerd.
From: Joachim Nilsson notifications@github.com Sent: Tuesday, March 7, 2017 10:05 PM To: troglobit/pimd Cc: oeboema; Mention Subject: Re: [troglobit/pimd] spec-file (#92)
@oeboemahttps://github.com/oeboema What do you think of my proposal, do you think you could add it to your pull-request?
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/troglobit/pimd/pull/92#issuecomment-284858761, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AY4hrefuYeTFXD2-0nF-BlzGeKk1Wkjnks5rjcangaJpZM4MOnBN.
Hi,
I've added the check you've requested. My rpm still builds succesful.
Best regards, Sjoerd.
@oeboema Great! :+1:
How about the recommended %configure
and %make_build
, which handles system specific paths etc?
Would be neat to get the .spec file really up to snuff for all .rpm based systems :)
Hi,
I've fixed the pimd.spec file. It now builds correctly on my CentOS 6.7 machine.
Best regards, Sjoerd Boomstra, Telecats.