Skip to content
This repository has been archived by the owner on Jan 15, 2019. It is now read-only.

[dev.icinga.com #6710] Fix misspelled systemd configure options, added hint in Makefile #1498

Closed
icinga-migration opened this issue Jul 12, 2014 · 9 comments

Comments

@icinga-migration
Copy link

This issue has been migrated from Redmine: https://dev.icinga.com/issues/6710

Created by bear on 2014-07-12 09:31:28 +00:00

Assignee: spstarr
Status: Resolved (closed on 2014-08-06 19:03:04 +00:00)
Target Version: 1.11.6
Last Update: 2014-08-06 19:03:18 +00:00 (in Redmine)

Icinga Version: 1.11.5
OS Version: ArchLinux (latest)

Hi,

I've encountered some issues regarding the configuration of the systemd files that can be used on ArchLinux. I've shared my experience on the mailing list [1]. Meanwhile, I've figured out why ./configure complains. Please see the patch file 0001-Fixed-configure-description-for-systemd-unit-sysconf.patch.

Related, but not necessarily depending on it, the output of make (without parameters) didn't show the possibility for installing the systemd files. Additionally, maybe this was intended so the list doesn't get too long. For this, I've done a second patch file addressing the Makefile only, 0001-Added-install-systemd-hint-in-Makefile.patch.

Now I'm stuck. The systemd configuration files were copied to the right places after issuing "make install-systems". But there's still the ${exec_prefix} in /usr/lib/systemd/system/icinga.service and ${prefix} in /etc/sysconfig/icinga. I don't know when this should be substituted. Maybe someone could give me a hint? I've attached the resulting files (please see description field for absolute file path position).

Kind regards,
Bernd

(The patch files were created according to [2].)

[1] https://lists.icinga.org/pipermail/icinga-users/2014-April/008116.html
[2] https://wiki.icinga.org/display/Dev/Developer+Guidelines#DeveloperGuidelines-Patches

Attachments

Changesets

2014-08-06 18:15:47 +00:00 by (unknown) 53fef4c

Fixed configure description for systemd-{unit,sysconfig}-dir

The usage information didn't match the actual configuration variables.

For example, the following message was given by ./configure
--with-systemd-unitdir:
configure: WARNING: unrecognized options: --with-systemd-unitdir

Another option is called "--with-init-dir", so I've decided to add a
dash in front of "dir".

refs #6710

2014-08-06 18:16:48 +00:00 by (unknown) 75eab98

Added install-systemd hint in Makefile

When calling make without parameters, the "install-systemd" option wasn't shown.

refs #6710

Signed-off-by: Michael Friedrich <michael.friedrich@netways.de>

Relations:

@icinga-migration
Copy link
Author

Updated by mfriedrich on 2014-07-12 11:06:14 +00:00

  • Target Version set to 1.11.6

@icinga-migration
Copy link
Author

Updated by mfriedrich on 2014-07-19 13:32:18 +00:00

  • Status changed from New to Assigned
  • Assigned to set to spstarr

@shawn

Please have a look.

@icinga-migration
Copy link
Author

Updated by spstarr on 2014-07-20 23:17:50 +00:00

the generated .service files have:

[Unit]
Description=Icinga Open-Source Monitoring System
After=syslog.target network.target ido2db.service

[Service]
EnvironmentFile=systemd_sysconfig_dir/icinga
ExecStartPre=bindir/icinga $ICINGA_VERIFY_OPTS
ExecStart=bindir/icinga $ICINGA_OPTS
ExecReload=/bin/kill -HUP $MAINPID

[Install]
WantedBy=multi-user.target

Are those not the right macros? bindir /usr/bin, systemd_sysconfig_dir /etc/sysconfig

For the sysconfig file:

  1. Options for the icinga binary

ICINGA_OPTS="sysconfdir/icinga.cfg"
ICINGA_VERIFY_OPTS="-v sysconfdir/icinga.cfg"
ICINGA_LOCKFILE="lockfile"
ICINGA_USER="icinga_user"
ICINGA_GROUP="icinga_grp"

  1. ido2db options
    IDO2DB_OPTS="-c sysconfdir/ido2db.cfg"

This looks fine to me?

@icinga-migration
Copy link
Author

Updated by bear on 2014-07-22 12:25:14 +00:00

  • File added 0001-Added-substitution-of-systemd-config-files.patch

Thanks for joining in, Shawn.

You were right, the macros are okay. I think the problem was, that the ./configure script replaces the

@xxx@

variables with some other ${xxx} variables.

(I've wrapped the at-signs inside pre-tags so the text isn't mis-interpreted as "Inline Code".)

Here it is, a third patch handling the substitution only (0001-Added-substitution-of-systemd-config-files.patch).

I'm not familiar with the auto tools, so please have a look at configure and configure.in files. I've patched both files, but I don't know when the configure file is generated.

Having all three patches applied,

  • /usr/src/icinga-core/configure --with-command-group=icinga-cmd --disable-idoutils --with-systemd-unit-dir=/usr/lib/systemd/system --with-systemd-sysconfig-dir=/etc/sysconfig
  • make install-systemd

worked just fine for me and the icinga process can be controlled via systemctl (I've tested status, stop, start and reload).

I'm not using ido2db so I couldn't test that.

@icinga-migration
Copy link
Author

Updated by mfriedrich on 2014-08-06 18:50:02 +00:00

  • systemd hint in makefile and the renamed configure options make sense
  • the perl subst patch does not - AC_SUBST already generates the correct file paths from the *.in files (with the renamed configure options setting other values than the default detection)

@icinga-migration
Copy link
Author

Updated by mfriedrich on 2014-08-06 18:58:35 +00:00

  • Relates set to 6866

@icinga-migration
Copy link
Author

Updated by mfriedrich on 2014-08-06 19:01:42 +00:00

Works for me on fc20. Details in the linked doc issue.

@icinga-migration
Copy link
Author

Updated by mfriedrich on 2014-08-06 19:03:04 +00:00

  • Category set to Installation
  • Status changed from Assigned to Resolved
  • Done % changed from 0 to 100

@icinga-migration
Copy link
Author

Updated by mfriedrich on 2014-08-06 19:03:18 +00:00

  • Subject changed from Fix misspelled systemd configure options, added hint in Makefile, systemd service file issues to Fix misspelled systemd configure options, added hint in Makefile

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant