[CentOS] Can anyone compile mtr source RPM on CentOS 6.7?

Tue Mar 8 16:36:11 UTC 2016
James Hogarth <james.hogarth at gmail.com>

On 8 March 2016 at 16:15, Digimer <lists at alteeve.ca> wrote:

> On 08/03/16 07:11 AM, James Hogarth wrote:
> > On 8 March 2016 at 10:07, Leon Fauster <leonfauster at googlemail.com>
> wrote:
> >
> >> Am 08.03.2016 um 01:50 schrieb Digimer <lists at alteeve.ca>:
> >>> I'm not surprised, given that it is in the repo. That's why I was
> asking
> >>> if anyone tried building it themselves and, if so, did they have the
> >>> same issue as I describe below?
> >>>
> >>> Alternatively, any tips/advice on solving my build issue would be
> >> helpful.
> >>
> >>
> >>
> >> what says /var/tmp/rpm-tmp.gu9Ds0?
> >>
> >> all dependencies installed?
> >>
> >>
> >>
> > No need to check that .... the error is clear "make: *** No rule to make
> > target `install'.  Stop." ... that mini Makefile he posted doesn't
> include
> > an install: section
> >
> > Of course what the OP is missing is *that* makefile does not get used.
> >
> > In the tarball there is a Makefile.in that gets processed into the actual
> > makefile by ./configure (well %configure in the spec but you get the
> point)
> >
> > So we come back round the houses to the key point - Digimer what are you
> > *actually* trying to do?
> >
> > You obviously aren't building from the spec in that src.rpm or using mock
> > as those have configure which would generate the valid makefile with the
> > make install target... so what are you doing and what do you want to
> > achieve?
> >
> > The %install phase you posted is really not of interest to your 'problem'
> > but rather the %build phase would be telling.
>
> As I've done with several other RPMs, I did the following;
>
> ===
> yumdownloader --source mtr-gtk
>
> rpm -Uvh mtr-0.75-5.el6.src.rpm
>
> cd rpmbuild/SPECS/
>
> # Change "Release"
>
> rpmbuild -ba mtr.spec
> ===
>
> If you're asking a more generic "why are you doing this?" question; I am
> including the RPM in a project we're working on and I don't want to risk
> running fould of the CentOS project by directly redistributing their
> (and RHEL's) rpms.
>
>
I'm sure Karanbir and Johnny can weigh in here more but so long as you are
not claiming to be CentOS and using their trademarks (see the modified ones
with centos in the name) I'm pretty certain that you are safe building an
appliance on CentOS and can ship the RPMs on that ...

Regardless of that issue what you've described above should work (or freak
out if a build dependency was missing ... unless one isn't defined as a
BuildRequires but is in the default mock root and is causing %configure
 not to generate the Makefile).

Again the right answer here is "use mock" ...

yumdownloader --source mtr-gtk

rpm -Uvh mtr-0.75-5.el6.src.rpm

cd rpmbuild

vi SPECS/mtr.spec (change release etc ... bear in mind that bumping release
may not help you when a centos update happens ... may not care for an
appliance)

rpmbuild -bs SPECS/mtr.spec

mock -r epel-6-x86_64 SRPMS/mtr-*.src.rpm

====================

That will get you a reproducible clean build environment in a way not
dependent on the state of your workstation and avoid any accidental
depednencies etc popping up