Forum

Fix to build hiawatha rpm on fedora

SolSoCoG
16 February 2015, 11:48
So first you take the hiawatha.spec specfile from the hiawatha source in extra/redhat/.

You then switch the
Version = VERSION
with
Version = 9.12

after that, at the end of the file, you see a block:

%files
%attr(-, root, root) %{_bindir}/
%attr(-, root, root) %{_sbindir}/
%attr(-, root, root) %{_libdir}/hiawatha/
%attr(-, root, root) %{_mandir}/
%attr(-, root, root) %{_localstatedir}/log/hiawatha/
%attr(-, root, root) %{_localstatedir}/www/hiawatha/
%attr(-, root, root) %{_defaultdocdir}/hiawatha/
%attr(-, root, root) %{_initrddir}/
%config %{_sysconfdir}/hiawatha

since newer RPM versions, if I'm correct beginning at version "4.8"(I'm using RPM version 4.12.0.1), it doesnt like possible chmod changes to bindir or sbindir, so you have to explicitly define the current OS default for sbin and bin, or just don't touch it.
Rather new to the RPM business, so that might not be the best way, but it works.

Because if you use the default specfile, you get an error like
file /usr/bin from install of hiawatha-9.12.fc21.x86_64 conflicts with file from package filesystem-3.2-13.fc21.x86_64
file /usr/sbin from install of hiawatha-9.12.fc21.x86_64 conflicts with file from package filesystem-3.2-13.fc21.x86_64

So you change it to:

%files
%attr(555, root, root) %{_bindir}/
%attr(555, root, root) %{_sbindir}/
%attr(-, root, root) %{_libdir}/hiawatha/
%attr(-, root, root) %{_mandir}/
%attr(-, root, root) %{_localstatedir}/log/hiawatha/
%attr(-, root, root) %{_localstatedir}/www/hiawatha/
%attr(-, root, root) %{_defaultdocdir}/hiawatha/
%attr(-, root, root) %{_initrddir}/
%config %{_sysconfdir}/hiawatha

And voilà, it works.

Hiawatha version: 9.12
Operating System: Fedora Server 21
Hugo Leisink
16 February 2015, 12:18
Got it, fixed. Thanks!
This topic has been closed.