Skip to content
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

spec-file #92

Merged
merged 3 commits into from
May 21, 2017
Merged

spec-file #92

merged 3 commits into from
May 21, 2017

Conversation

oeboema
Copy link
Contributor

@oeboema oeboema commented Feb 28, 2017

Hi,

I've fixed the pimd.spec file. It now builds correctly on my CentOS 6.7 machine.

Best regards,
Sjoerd Boomstra,
Telecats.

redhat/pimd.spec Outdated
@@ -24,6 +24,7 @@ RFC 2362 with a few noted exceptions (see the RELEASE.NOTES for details).


%build
./autogen.sh
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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"?

redhat/pimd.spec Outdated
@@ -45,7 +46,7 @@ make %{?_smp_mflags}

%files
%defattr(-,root,root,-)
%doc AUTHORS CREDITS FAQ INSTALL LICENSE LICENSE.mrouted README README.config README.config.jp README.debug RELEASE.NOTES TODO
%doc AUTHORS CREDITS LICENSE LICENSE.mrouted RELEASE.NOTES
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can drop CREDITS and RELEASE.NOTES as well, and include the ChangeLog PDF and/or .org file instead.

@troglobit
Copy link
Owner

Looks good.

I can merge it as soon as you've addressed the comments I made :)

@oeboema
Copy link
Contributor Author

oeboema commented Mar 1, 2017 via email

@troglobit
Copy link
Owner

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 ...

@troglobit
Copy link
Owner

troglobit commented Mar 2, 2017

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

@troglobit
Copy link
Owner

@oeboema What do you think of my proposal, do you think you could add it to your pull-request?

@oeboema
Copy link
Contributor Author

oeboema commented Mar 10, 2017 via email

@oeboema
Copy link
Contributor Author

oeboema commented Mar 10, 2017

Hi,

I've added the check you've requested. My rpm still builds succesful.

Best regards,
Sjoerd.

@troglobit
Copy link
Owner

@oeboema Great! 👍

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 :)

@troglobit troglobit merged commit 8cb84bb into troglobit:master May 21, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants