Opened 14 years ago

Closed 13 years ago

#26175 closed submission (fixed)

xymon server

Reported by: fclaire@… Owned by: macports-tickets@…
Priority: Normal Milestone:
Component: ports Version: 1.9.1
Keywords: Cc: raimue (Rainer Müller), anddam (Andrea D'Amore)
Port: xymon-server

Description

Here's a port of the xymon server

Thanks for checking it.

Attachments (7)

INSTALL.macports.xymon-server (3.0 KB) - added by fclaire@… 14 years ago.
patch-build-Makefile.rules.diff (313 bytes) - added by fclaire@… 14 years ago.
patch-client-hobbitclient-darwin.sh.diff (580 bytes) - added by fclaire@… 14 years ago.
patch-lib-Makefile.diff (299 bytes) - added by fclaire@… 14 years ago.
Portfile (8.3 KB) - added by fclaire@… 13 years ago.
org.macports.xymon-server.plist (627 bytes) - added by fclaire@… 13 years ago.
patch-client-xymonclient-darwin.sh.diff (578 bytes) - added by fclaire@… 13 years ago.

Download all attachments as: .zip

Change History (23)

Changed 14 years ago by fclaire@…

Changed 14 years ago by fclaire@…

Changed 14 years ago by fclaire@…

Changed 14 years ago by fclaire@…

Attachment: patch-lib-Makefile.diff added

comment:1 Changed 14 years ago by jmroot (Joshua Root)

Are this and #26174 meant to supersede #26040?

comment:2 Changed 14 years ago by fclaire@…

Yes, they are.

comment:3 Changed 14 years ago by raimue (Rainer Müller)

Some comments while reading the Portfile:

  • You should set dist_subdir ${shortname} so xymon and xymon-server can share the file. This avoids downloading the file twice.
  • addgroup/adduser should not be used unconditionally, as they add the group/user as it is called. It's an action, not an option. Move it to (pre-)destroot phase.
  • As you figured already, it's not possible to use external files for notes. The notes section is so long now, I suggest to move its content to the HOWTO section in the wiki and include a link only. Same for INSTALL.macports.xymon-server.

comment:4 Changed 14 years ago by raimue (Rainer Müller)

Keywords: xymon removed
Port: xymon-server added; xymon removed

comment:5 Changed 14 years ago by fclaire@…

I've uploaded a new Portfile with your 3 points implemented.

I left a small notes at the end as well as a link to http://trac.macports.org/wiki/howto/SetupXymonServer

I hope those changes will make xymon-server port accepted.

comment:6 Changed 14 years ago by raimue (Rainer Müller)

Cc: raimue@… added

This time, my comments on xymon (client) apply to this one, too.

comment:7 Changed 13 years ago by fclaire@…

I'm finally back.

DESTDIR isn't used in the original source package. I may report this to the xymon mailing list to have it fixed in future releases. I tried destroot.destdir and it didn't worked so I kept destroot.env-append.

For the symlinks, I moved them in post-destroot. Unfortunately, one symlink remains when the port is uninstalled:

thepearl:xymon-server fclaire$ sudo port uninstall
--->  Deactivating xymon-server @4.3.0-beta2_0
--->  Uninstalling xymon-server @4.3.0-beta2_0
thepearl:xymon-server fclaire$ ll /opt/local/lib/xymon/client/
ls: /opt/local/lib/xymon/client/: No such file or directory
thepearl:xymon-server fclaire$ ll /Library/LaunchDaemons/
…
lrwxr-xr-x   1 root  wheel    86  8 oct 23:10 org.macports.xymon-server.plist -> /opt/local/etc/LaunchDaemons/org.macports.xymon-server/org.macports.xymon-server.plist

It's not a very big problem: it's an "ln -sf" so next time it is installed the link is overwritten.

When installed, a "port contents" doesn't show the symlinks:

thepearl:xymon-server fclaire$ port contents
Port xymon-server contains:
  /opt/local/etc/LaunchDaemons/org.macports.xymon-server/org.macports.xymon-server.plist
…

I updated the notes section to use ${xymonuser} and I modified the startup script to have the right xymon user set into it with a reinplace command. I've also improved the WiKi page.

I'm now praying to get it accepted...

comment:8 in reply to:  7 Changed 13 years ago by raimue (Rainer Müller)

Replying to fclaire@…:

For the symlinks, I moved them in post-destroot. Unfortunately, one symlink remains when the port is uninstalled:

The problem is that post-destroot is writing directly to the system instead of adding the symlink to the destroot. This would result in problems when creating archives or packages of this port.

The (untested) fix would be:

xinstall -d -m 755 ${destroot}/Library/LaunchDaemons
ln -sf ${prefix}/etc/LaunchDaemons/org.macports.${name}/org.macports.${name}.plist ${destroot}/Library/LaunchDaemons/

comment:9 Changed 13 years ago by fclaire@…

OK, the startup symlink is now fixed. Thanks for the help.

comment:10 Changed 13 years ago by anddam (Andrea D'Amore)

Cc: and.damore@… added

Notice that xymon-server seems to build xlient components too

--->  Activating xymon @4.3.0-beta2_0 Error: Target org.macports.activate
returned: Image error: /opt/local/lib/xymon/client/bin/bb is being used by the
active xymon-server port.  Please deactivate this port first, or use 'port -f
activate xymon' to force the activation. Log for xymon is at:
/opt/local/var/macports/logs/_opt_local_var_macports_sources_svn.macports.
org_trunk_dports_net_xymon/main.log

Maybe you can prevent xymon-server from creating client components or you can remove those after destroot or set a different suffix or path for server and client.

comment:11 Changed 13 years ago by fclaire@…

As I wrote in my answer to ryandesign -> https://trac.macports.org/ticket/26040#comment:2 the Xymon server is including the client part to report status to itself. This is how this software works and how the server installs itself. I don't think it's easilly possible to completely separate the server and client parts (I'd like to stay as close as possible to how it is installed on other unix-like systems and keep the client and server directories under ${prefix}/lib/xymon/).

The fact the server includes the client part was the main motivation to do a single port simply named "xymon" with 2 variants as it was submitted in ticket #26040.

Is there a way to inform the user he shouldn't install the xymon client port on a machine where the xymon server is installed ? For me this error message would be enough to prevent xymon-server and xymon ports installed together on the same machine (but maybe you'll tell me there's always someone to do 'port -f').

comment:12 Changed 13 years ago by anddam (Andrea D'Amore)

You can use the conflicts keyword, it's not in the Guide, check dsniff and dsniff-devel portfiles in net category.

You may consider building both client and server, a single port that offers the whole package.

comment:13 Changed 13 years ago by fclaire@…

OK, I've added a conflicts line in the Portfile

comment:14 Changed 13 years ago by fclaire@…

According to the xymon mailing list, a new beta or release-candidate for v 4.3.0 is going to be released in the coming days.

I would be worth waiting for it before releasing out the xymon ports. I'll update the Portfiles with it once successfully tested on my environment.

Changed 13 years ago by fclaire@…

Attachment: Portfile added

Changed 13 years ago by fclaire@…

Changed 13 years ago by fclaire@…

comment:15 Changed 13 years ago by fclaire@…

So here we go with the new xymon beta version 4.3.0.beta3.

This is a quite major release as all renaming to move away from "Hobbit" has been implemented. This has an impact on most of the config files as well as some internal variables.

The Portfile has been adapted to those changes and has been improved. A new patch needs to be used: patch-client-xymonclient-darwin.sh.diff

The files patch-client-hobbitclient-darwin.sh.diff and INSTALL.macports.xymon-server are now useless and shouldn't be included in the port files directory.

Thanks for checking it.

comment:16 Changed 13 years ago by anddam (Andrea D'Amore)

Resolution: fixed
Status: newclosed

Committed r73752

Note: See TracTickets for help on using tickets.