Xymon Mailing List Archive search

Xymon 4.3.0 - Build RPMs

12 messages in this thread

list Leonardo Bozi · Thu, 17 Mar 2011 10:55:31 -0700 (PDT) ·

 Hi,

The Xymon 4.3.0 was released and has anyone already tried to build RPMs for CentOS 5?

Thanks in advance.


Leonardo Bozi
user-bb28df2d311e@xymon.invalid
list Francois Herbert · Fri, 18 Mar 2011 09:42:49 +1300 ·
Hi

I have built the rpms for rhel5 and rhel6. Had to extract the tar file and rpmbuild using the specfile (rpmbuild -bb) rather than build from tar file as the xymon.spec file gave me some errors.
I ended up doing the following to get it building:

Untar the source file.

1. Edit rpm/xymon.spec:
a. set the version number (Version: @VER@ changed to Version: 4.3.0)
  b. set the Source (Source: xymon- at user-7db5f491bf0a@xymon.invalid to Source: xymon-4.3.0.tar.gz)
c. Remove the line (in the files section) %attr(644, root, root) %config /var/lib/xymon/www/menu/xymonmenu.css as this gives an error when building rpm (xymonmenu.css is not found). Not sure what impact this will have on the server rpm as I've only used the resulting xymon-client rpm that was created.

2. Put edited rpm/xymon.spec into /usr/src/redhat/SPECS
3. Copy rpm/xymon-client.default, /rpm/xymon-client.init, rpm/xymon-init.d  and rpm/xymon.logrotate to /usr/src/redhat/SOURCES
4. Copy tar file (xymon-4.3.0.tar.gz) to /usr/src/redhat/SOURCES
5. cd /usr/src/redhat/  and run rpmbuild -bb SPECS/xymon.spec

There might be a better way to do it, but this got it building rpms for me :-)

Hope this helps

Francois Herbert
Systems Engineer
ITS
Massey University
New Zealand
quoted from Leonardo Bozi

On 18/03/2011, at 6:55 AM, Leonardo Bozi wrote:


 Hi,

The Xymon 4.3.0 was released and has anyone already tried to build RPMs for CentOS 5?

Thanks in advance.

Leonardo Bozi
list Jason Kincl · Thu, 17 Mar 2011 15:57:12 -0500 ·
These are basically the exact same I did and it worked however instead of commenting out the xymonmenu.css, this will work also:
%attr(644, root, root) %config /var/lib/xymon/www/menu/xymonmenu-blue.css
%attr(644, root, root) %config /var/lib/xymon/www/menu/xymonmenu-grey.css

I would also add that in: /usr/lib/xymon/client/etc/xymonclient.cfg on the server once the RPM is installed you need to replace the include statement with the below text:
XYMSRV=""          # IP address of the Xymon server
XYMSERVERS=""                   # IP of multiple Xymon servers. XYMSRV must be "0.0.0.0".

This is because the init script for the client correctly uses the /etc/default/xymon-client to create a file /var/run/xymonclient-runtime.cfg that is what is included, but the server init script does not do these things. 
Francois, did you have to do the above to make your servers client work?
quoted from Francois Herbert

On Mar 17, 2011, at 3:42 PM, Herbert, Francois wrote:
Hi

I have built the rpms for rhel5 and rhel6. Had to extract the tar file and rpmbuild using the specfile (rpmbuild -bb) rather than build from tar file as the xymon.spec file gave me some errors.
I ended up doing the following to get it building:

Untar the source file.

1. Edit rpm/xymon.spec:
a. set the version number (Version: @VER@ changed to Version: 4.3.0)
 b. set the Source (Source: xymon- at user-7db5f491bf0a@xymon.invalid to Source: xymon-4.3.0.tar.gz)
c. Remove the line (in the files section) %attr(644, root, root) %config /var/lib/xymon/www/menu/xymonmenu.css as this gives an error when building rpm (xymonmenu.css is not found). Not sure what impact this will have on the server rpm as I've only used the resulting xymon-client rpm that was created.

2. Put edited rpm/xymon.spec into /usr/src/redhat/SPECS
3. Copy rpm/xymon-client.default, /rpm/xymon-client.init, rpm/xymon-init.d  and rpm/xymon.logrotate to /usr/src/redhat/SOURCES
4. Copy tar file (xymon-4.3.0.tar.gz) to /usr/src/redhat/SOURCES
5. cd /usr/src/redhat/  and run rpmbuild -bb SPECS/xymon.spec

There might be a better way to do it, but this got it building rpms for me :-)

Hope this helps

Francois Herbert
Systems Engineer
ITS
Massey University
New Zealand

On 18/03/2011, at 6:55 AM, Leonardo Bozi wrote:


Hi,

The Xymon 4.3.0 was released and has anyone already tried to build RPMs for CentOS 5?

Thanks in advance.

Leonardo Bozi

user-bb28df2d311e@xymon.invalid<mailto:user-bb28df2d311e@xymon.invalid>

Jason Kincl
list Francois Herbert · Fri, 18 Mar 2011 10:03:20 +1300 ·
That's another step I left out, I hard coded my server ip into rpm/xymon.spec:

XYMONHOSTIP=myxymonserverIP

That way when I installed the rpm, all I had to do was start the xymon-client and I no more configuration was required on the client (/etc/default/xymon-client was preconfigured in the rpm)
quoted from Jason Kincl


On 18/03/2011, at 9:57 AM, Jason Kincl wrote:
These are basically the exact same I did and it worked however instead of commenting out the xymonmenu.css, this will work also:
%attr(644, root, root) %config /var/lib/xymon/www/menu/xymonmenu-blue.css
%attr(644, root, root) %config /var/lib/xymon/www/menu/xymonmenu-grey.css

I would also add that in: /usr/lib/xymon/client/etc/xymonclient.cfg on the server once the RPM is installed you need to replace the include statement with the below text:
XYMSRV=""          # IP address of the Xymon server
XYMSERVERS=""                   # IP of multiple Xymon servers. XYMSRV must be "0.0.0.0".

This is because the init script for the client correctly uses the /etc/default/xymon-client to create a file /var/run/xymonclient-runtime.cfg that is what is included, but the server init script does not do these things. 
Francois, did you have to do the above to make your servers client work?

On Mar 17, 2011, at 3:42 PM, Herbert, Francois wrote:
Hi

I have built the rpms for rhel5 and rhel6. Had to extract the tar file and rpmbuild using the specfile (rpmbuild -bb) rather than build from tar file as the xymon.spec file gave me some errors.
I ended up doing the following to get it building:

Untar the source file.

1. Edit rpm/xymon.spec:
a. set the version number (Version: @VER@ changed to Version: 4.3.0)
b. set the Source (Source: xymon- at user-7db5f491bf0a@xymon.invalid to Source: xymon-4.3.0.tar.gz)
c. Remove the line (in the files section) %attr(644, root, root) %config /var/lib/xymon/www/menu/xymonmenu.css as this gives an error when building rpm (xymonmenu.css is not found). Not sure what impact this will have on the server rpm as I've only used the resulting xymon-client rpm that was created.

2. Put edited rpm/xymon.spec into /usr/src/redhat/SPECS
3. Copy rpm/xymon-client.default, /rpm/xymon-client.init, rpm/xymon-init.d  and rpm/xymon.logrotate to /usr/src/redhat/SOURCES
4. Copy tar file (xymon-4.3.0.tar.gz) to /usr/src/redhat/SOURCES
5. cd /usr/src/redhat/  and run rpmbuild -bb SPECS/xymon.spec

There might be a better way to do it, but this got it building rpms for me :-)

Hope this helps

Francois Herbert
Systems Engineer
ITS
Massey University
New Zealand

On 18/03/2011, at 6:55 AM, Leonardo Bozi wrote:


Hi,

The Xymon 4.3.0 was released and has anyone already tried to build RPMs for CentOS 5?

Thanks in advance.

Leonardo Bozi
user-bb28df2d311e@xymon.invalid<mailto:user-bb28df2d311e@xymon.invalid>

Jason Kincl

list Japheth Cleaver · Thu, 17 Mar 2011 15:30:35 -0700 ·
quoted from Francois Herbert
-----Original Message-----
From: xymon-bounces at xymon.com [mailto:xymon-bounces at xymon.com] On Behalf Of Herbert, Francois
Sent: Thursday, March 17, 2011 2:03 PM
To: xymon at xymon.com
Subject: Re: [Xymon] Xymon 4.3.0 - Build RPMs
I would also add that in: /usr/lib/xymon/client/etc/xymonclient.cfg on the server once the RPM is
installed you need to replace the include statement with the below text:
XYMSRV=""          # IP address of the Xymon server
XYMSERVERS=""                   # IP of multiple Xymon servers. XYMSRV must be "0.0.0.0".

This is because the init script for the client correctly uses the /etc/default/xymon-client to
create a file /var/run/xymonclient-runtime.cfg that is what is included, but the server init script
does not do these things.
It's a lot easier if you hardcode XYMSRV=0.0.0.0 across the board and deal only with XYMSERVERS -- then you can bypass the whole runtime.cfg thing and just "include /etc/sysconfig/xymon-client" on both your client and server configs.

-jc
list Buchan Milne · Fri, 18 Mar 2011 08:45:42 +0200 (SAST) ·
quoted from Francois Herbert
----- "Francois Herbert" <user-796032f63edb@xymon.invalid> wrote:
Hi

I have built the rpms for rhel5 and rhel6. Had to extract the tar file
and rpmbuild using the specfile (rpmbuild -bb) rather than build from
tar file as the xymon.spec file gave me some errors.
I ended up doing the following to get it building:

Untar the source file.

1. Edit rpm/xymon.spec:
a. set the version number (Version: @VER@ changed to Version: 4.3.0)
  b. set the Source (Source: xymon- at user-7db5f491bf0a@xymon.invalid to Source:
xymon-4.3.0.tar.gz)
c. Remove the line (in the files section) %attr(644, root, root)
%config /var/lib/xymon/www/menu/xymonmenu.css as this gives an error
when building rpm (xymonmenu.css is not found). Not sure what impact
this will have on the server rpm as I've only used the resulting
xymon-client rpm that was created.

2. Put edited rpm/xymon.spec into /usr/src/redhat/SPECS
3. Copy rpm/xymon-client.default, /rpm/xymon-client.init,
rpm/xymon-init.d  and rpm/xymon.logrotate to /usr/src/redhat/SOURCES
4. Copy tar file (xymon-4.3.0.tar.gz) to /usr/src/redhat/SOURCES
5. cd /usr/src/redhat/  and run rpmbuild -bb SPECS/xymon.spec

Unfortunately, there are some problems with the spec file supplied. While they should not be issues for users, the resulting packages won't pass most distributions package quality checks.

So, my aim is to make a lot of the changes that are present in the RPMS I maintain for Mandriva, which I rebuild for RHEL2/3/4/5 (due to RH not backporting rpm 4.6.x. to RHEL5, I currently don't have a RHEL6 build environment).

I will try and ensure that 'rpm -ta xymon-4.3.1.tar.gz' works correctly.

However, now I have even more upgrade issues to worry about (hobbit->xymon, xymon-4.2.x->xymon-4.3.x, as well as xymon->xymon+xymon-client).

Either way, I will try and provide packages in my repo by next week.

Regards,
Buchan
list Buchan Milne · Fri, 18 Mar 2011 08:48:54 +0200 (SAST) ·
quoted from Francois Herbert
----- "Francois Herbert" <user-796032f63edb@xymon.invalid> wrote:
That's another step I left out, I hard coded my server ip into
rpm/xymon.spec:

XYMONHOSTIP=myxymonserverIP

That way when I installed the rpm, all I had to do was start the
xymon-client and I no more configuration was required on the client
(/etc/default/xymon-client was preconfigured in the rpm)
If you want repos, or xymon to be included in the distributions you use, you should rather populate /etc/sysconfig/xymon-client (my RPMS use this as it is the more standard location on RH-based distros). So, there is not much benefit in doing it in your spec file.

Regards,
Buchan
list Tom Georgoulias · Fri, 18 Mar 2011 08:38:11 -0400 ·
quoted from Buchan Milne
On 03/18/2011 02:45 AM, Buchan Milne wrote:
Unfortunately, there are some problems with the spec file supplied.
While they should not be issues for users, the resulting packages
won't pass most distributions package quality checks.
I ran into another when working on a spec file for centos 5 (which I sent to the xymon-devel list with the hope of working with others to create a single, community approved & used rpm spec file).  If you build the RPMs on an x86_64 system, /usr/lib64 is used for the filepaths in the RPMs instead of /usr/lib and this breaks the hardcoded /usr/lib paths in the init scripts.

I think we should work towards creating a new spec file that will produce a SRPM and RPMs that build cleanly in any arch, in any Redhat flavored environment.

Tom
list Japheth Cleaver · Fri, 18 Mar 2011 11:31:05 -0700 ·
quoted from Tom Georgoulias
-----Original Message-----
From: xymon-bounces at xymon.com [mailto:xymon-bounces at xymon.com] On Behalf Of Tom Georgoulias
Sent: Friday, March 18, 2011 5:38 AM
To: xymon at xymon.com
Subject: Re: [Xymon] Xymon 4.3.0 - Build RPMs

I think we should work towards creating a new spec file that will
produce a SRPM and RPMs that build cleanly in any arch, in any Redhat
flavored environment.

Tom
Along those lines... :)

I've got an updated 4.3.0 .spec (with patches) for an RPM I've been using for a while now. Since this is the first post-rename release, I'd appreciate if others could take a look at it, rebuild, poke and prod, etc... It was based originally off the released spec file a while back, but has a lot of changes. In addition to heavy FHS mods, it has replacement init scripts that bypass xymon.sh/runclient.sh.

I've built it internally on from RH 7, 8, and 9, and CentOS 3, 4, and 5 (i386 and x86_64), but there may be other places it doesn't build -- if so, let me know. (If anyone can test on RHEL6 and a recent Fedora I'd appreciate it.)

I've done basic sanity checks on the resulting systems, but haven't run them through really intensive testing. If anyone notices any problems that result from the pathname mods, let me know too.

(Upgrade note: There are too many issues on the server  side to safely upgrade from 4.2.0 by package IMHO, but the client-side should include a variable rename in /etc/sysconfig/xymon-client in a %post scriptlet.)

-jc


spec: http://terabithia.org/rpms/xymon.spec
SRPM: http://terabithia.org/rpms/xymon-4.3.0-0.956.src.rpm

CentOS5-i386 RPMS:
  http://terabithia.org/rpms/xymon-4.3.0-0.956.i386.rpm
  http://terabithia.org/rpms/xymon-client-4.3.0-0.956.i386.rpm

Note: The SRPM builds two superfluous binary packages as well -- you can ignore those unless you need them.
list Ralph Mitchell · Tue, 22 Mar 2011 15:48:17 -0400 ·
On Fedora 14 I get:

   Patch #53 (xymon430.client_uses_sysconfig.patch):
   + /usr/bin/patch -s -p0 -b --suffix .client_uses_sysconfig.patch --fuzz=0
   + /bin/cat /root/rpmbuild/SOURCES/xymon430.client_uses_sysconfig.patch
   1 out of 1 hunk FAILED -- saving rejects to file
client/xymonclient.cfg.DIST.rej
   error: Bad exit status from /var/tmp/rpm-tmp.bSi2vb (%prep)

With patch 53 commented out in the spec file, it goes a little further, then
I get:

   Patch #102 (xymon430.pagegen.summariesonnongreen):
   + /usr/bin/patch -s -p0 -b --suffix .pagegen.summariesonnongreen --fuzz=0
   + /bin/cat /root/rpmbuild/SOURCES/xymon430.pagegen.summariesonnongreen
   1 out of 1 hunk FAILED -- saving rejects to file xymongen/pagegen.c.rej
   error: Bad exit status from /var/tmp/rpm-tmp.NGwGru (%prep)

Then patch 54 fails:

   Patch #54 (xymon430.Makefile-initdvars.patch):
   + /bin/cat /root/rpmbuild/SOURCES/xymon430.Makefile-initdvars.patch
   + /usr/bin/patch -s -p0 -b --suffix .initdvars --fuzz=0
   1 out of 1 hunk FAILED -- saving rejects to file client/Makefile.rej
   error: Bad exit status from /var/tmp/rpm-tmp.UH0Ona (%prep)

BTW, I also saw that gcc-c++ is a dependency, but I have previously built
xymon-4.3.0 from the source tar without having gcc-c++ installed.

Anyway, with  those three patches commented out in the SPEC file, it did at
least build, all the way to here:

   + install -d
/root/rpmbuild/BUILDROOT/xymon-4.3.0-0.956.fc14.x86_64/etc/rc.d/init.d
   + install -m 755 rpm/xymon-init.d
/root/rpmbuild/BUILDROOT/xymon-4.3.0-0.956.fc14.x86_64/etc/rc.d/init.d/xymon
   install: cannot stat `rpm/xymon-init.d': No such file or directory
   error: Bad exit status from /var/tmp/rpm-tmp.vxmhpk (%install)

I guess that's a result of patch54 not being applied.  I poke at it some
more later.

Ralph Mitchell
quoted from Japheth Cleaver


On Fri, Mar 18, 2011 at 2:31 PM, Cleaver, Japheth <user-2a1212dafc7b@xymon.invalid>wrote:
-----Original Message-----
From: xymon-bounces at xymon.com [mailto:xymon-bounces at xymon.com] On Behalf
Of Tom Georgoulias
Sent: Friday, March 18, 2011 5:38 AM
To: xymon at xymon.com
Subject: Re: [Xymon] Xymon 4.3.0 - Build RPMs

I think we should work towards creating a new spec file that will
produce a SRPM and RPMs that build cleanly in any arch, in any Redhat
flavored environment.

Tom
Along those lines... :)

I've got an updated 4.3.0 .spec (with patches) for an RPM I've been using
for a while now. Since this is the first post-rename release, I'd appreciate
if others could take a look at it, rebuild, poke and prod, etc... It was
based originally off the released spec file a while back, but has a lot of
changes. In addition to heavy FHS mods, it has replacement init scripts that
bypass xymon.sh/runclient.sh.

I've built it internally on from RH 7, 8, and 9, and CentOS 3, 4, and 5
(i386 and x86_64), but there may be other places it doesn't build -- if so,
let me know. (If anyone can test on RHEL6 and a recent Fedora I'd appreciate
it.)

I've done basic sanity checks on the resulting systems, but haven't run
them through really intensive testing. If anyone notices any problems that
result from the pathname mods, let me know too.

(Upgrade note: There are too many issues on the server  side to safely
upgrade from 4.2.0 by package IMHO, but the client-side should include a
variable rename in /etc/sysconfig/xymon-client in a %post scriptlet.)

-jc


spec: http://terabithia.org/rpms/xymon.spec
SRPM: http://terabithia.org/rpms/xymon-4.3.0-0.956.src.rpm

CentOS5-i386 RPMS:
 http://terabithia.org/rpms/xymon-4.3.0-0.956.i386.rpm
 http://terabithia.org/rpms/xymon-client-4.3.0-0.956.i386.rpm

Note: The SRPM builds two superfluous binary packages as well -- you can
ignore those unless you need them.

list Japheth Cleaver · Wed, 23 Mar 2011 23:09:05 -0700 ·
quoted from Ralph Mitchell
From: Ralph Mitchell [mailto:user-00a5e44c48c0@xymon.invalid] 
Sent: Tuesday, March 22, 2011 12:48 PM
To: Cleaver, Japheth
Cc: xymon at xymon.com
Subject: Re: [Xymon] New spec file (beta test request) (was RE: Xymon 4.3.0 - Build RPMs)

On Fedora 14 I get:
   
   Patch #53 (xymon430.client_uses_sysconfig.patch):
   + /usr/bin/patch -s -p0 -b --suffix .client_uses_sysconfig.patch --fuzz=0
   + /bin/cat /root/rpmbuild/SOURCES/xymon430.client_uses_sysconfig.patch
   1 out of 1 hunk FAILED -- saving rejects to file client/xymonclient.cfg.DIST.rej
   error: Bad exit status from /var/tmp/rpm-tmp.bSi2vb (%prep)

With patch 53 commented out in the spec file, it goes a little further, then I get:

   Patch #102 (xymon430.pagegen.summariesonnongreen):
   + /usr/bin/patch -s -p0 -b --suffix .pagegen.summariesonnongreen --fuzz=0
   + /bin/cat /root/rpmbuild/SOURCES/xymon430.pagegen.summariesonnongreen
   1 out of 1 hunk FAILED -- saving rejects to file xymongen/pagegen.c.rej
   error: Bad exit status from /var/tmp/rpm-tmp.NGwGru (%prep)

Then patch 54 fails:

   Patch #54 (xymon430.Makefile-initdvars.patch):
   + /bin/cat /root/rpmbuild/SOURCES/xymon430.Makefile-initdvars.patch
   + /usr/bin/patch -s -p0 -b --suffix .initdvars --fuzz=0
   1 out of 1 hunk FAILED -- saving rejects to file client/Makefile.rej
   error: Bad exit status from /var/tmp/rpm-tmp.UH0Ona (%prep)

BTW, I also saw that gcc-c++ is a dependency, but I have previously built xymon-4.3.0 from the source tar without having gcc-c++ installed.

Anyway, with  those three patches commented out in the SPEC file, it did at least build, all the way to here:

   + install -d /root/rpmbuild/BUILDROOT/xymon-4.3.0-0.956.fc14.x86_64/etc/rc.d/init.d
   + install -m 755 rpm/xymon-init.d /root/rpmbuild/BUILDROOT/xymon-4.3.0-0.956.fc14.x86_64/etc/rc.d/init.d/xymon
   install: cannot stat `rpm/xymon-init.d': No such file or directory
   error: Bad exit status from /var/tmp/rpm-tmp.vxmhpk (%install)

I guess that's a result of patch54 not being applied.  I poke at it some more later.

Ralph Mitchell
Thanks for the bug reports. It appears as though recent versions of Fedora have a stricter macro in use when applying %patch'es. Looks like some of those patches were succeeding only due to relaxed fuzziness factors.

Anyway, I've got a new SRPM rebuilding cleanly on clean F14 boxes. Can you try it and let me know if you've got any add'l problems?

http://terabithia.org/rpms/xymon-4.3.0-0.958.src.rpm

I've also posted the .spec file and the two init.d scripts (one for client, one for server) in that directory if anyone else would like to comment!

Regards,

-jc
list Buchan Milne · Thu, 24 Mar 2011 12:50:32 +0200 (SAST) ·
quoted from Japheth Cleaver
Thanks for the bug reports. It appears as though recent versions of
Fedora have a stricter macro in use when applying %patch'es. Looks
like some of those patches were succeeding only due to relaxed
fuzziness factors.

Anyway, I've got a new SRPM rebuilding cleanly on clean F14 boxes. Can
you try it and let me know if you've got any add'l problems?

http://terabithia.org/rpms/xymon-4.3.0-0.958.src.rpm

I've also posted the .spec file and the two init.d scripts (one for
client, one for server) in that directory if anyone else would like to
comment!
Can we please move discussion of this topic to the development list, until the necessary decisions have been taken.

Proliferation of more diverging packages is not going to make life easier.

(Yes, I know you have some patches outstanding in the tracker as well, I have them open but have been quite busy in the past few weeks ...)

Regards,
Buchan