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

[dev.icinga.com #5263] missing requirement in icinga-gui rpm package #1401

Closed
icinga-migration opened this issue Dec 5, 2013 · 8 comments
Closed
Milestone

Comments

@icinga-migration
Copy link

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

Created by mhoyer on 2013-12-05 09:13:06 +00:00

Assignee: mfriedrich
Status: Resolved (closed on 2014-01-03 20:03:46 +00:00)
Target Version: 1.11
Last Update: 2014-01-03 20:03:46 +00:00 (in Redmine)

Icinga Version: 1.10.1
OS Version: RHEL 6.4

Hello,

I found a small pidfall leading to installation errors for the icinga-gui rpm. In preinstall script the rpm tries to add apache to icingacmd group. So far so good. This group gets created in preinstall script of the icinga rpm. I think there should be a requirement for icinga in icinga-gui rpm.

Greets
Marco

rpm -q --scripts icinga-gui
preinstall scriptlet (using /bin/sh):

  1. Add apacheuser in the icingacmd group
    /usr/sbin/usermod -a -G icingacmd apache

rpm -q --requires icinga-gui
/bin/sh
httpd
icinga-classicui-config
icinga-doc
libc.so.6()(64bit)
libc.so.6(GLIBC_2.2.5)(64bit)
libc.so.6(GLIBC_2.3)(64bit)
libc.so.6(GLIBC_2.3.4)(64bit)
libc.so.6(GLIBC_2.4)(64bit)
libc.so.6(GLIBC_2.8)(64bit)
libgd.so.2()(64bit)
libjpeg.so.62()(64bit)
libm.so.6()(64bit)
libm.so.6(GLIBC_2.2.5)(64bit)
libpng12.so.0()(64bit)
libz.so.1()(64bit)
rpmlib(CompressedFileNames) <= 3.0.4-1
rpmlib(PayloadFilesHavePrefix) <= 4.0-1
rtld(GNU_HASH)
rpmlib(PayloadIsBzip2) <= 3.0.5-1

Changesets

2014-01-03 17:15:05 +00:00 by (unknown) 2a1228c

spec: Only add apache user to the icingacmd group if existing.

Refs #5263

2014-01-03 17:15:18 +00:00 by (unknown) 0419daa

Merge branch 'fix/spec-cmd-grp-5263' into next

Fixes #5263

2014-01-09 22:26:22 +00:00 by (unknown) 58cbf70

spec: Only add apache user to the icingacmd group if existing.

Refs #5263

Conflicts:
	Changelog

2014-01-23 15:15:33 +00:00 by (unknown) 144a0b7

Update Changelog.

Refs #4968
Refs #5434
Refs #4427
Refs #4825
Refs #5263
Refs #5545
@icinga-migration
Copy link
Author

Updated by ricardo on 2013-12-05 11:45:05 +00:00

  • Target Version deleted 1.10.2

@icinga-migration
Copy link
Author

Updated by mfriedrich on 2013-12-05 11:47:02 +00:00

impossible. then the icinga-gui would always pull icinga (1.x) and you cannot install it properly with icinga2-classicui-config.

possible solution - check for the existance of this group before trying to modify it. or let a new package named '-common' handle all the user/group stuff and depend on that.

@icinga-migration
Copy link
Author

Updated by mhoyer on 2013-12-06 08:53:15 +00:00

dnsmichi wrote:

impossible. then the icinga-gui would always pull icinga (1.x) and you cannot install it properly with icinga2-classicui-config.

ok, i missed this use-case. sounds logical.

possible solution - check for the existance of this group before trying to modify it. or let a new package named '-common' handle all the user/group stuff and depend on that.

i don't think that there is another package needed for this. Testing for existence of icingacmd seems to be a good idea.
My proposal for a preinstall script would be:

if grep -i "^icingacmd" /etc/group &> /dev/null;
/usr/sbin/usermod -a -G icingacmd apache
fi

@icinga-migration
Copy link
Author

Updated by mfriedrich on 2013-12-06 09:23:31 +00:00

I would fix that like it's done in icinga-web.spec using getent

%pre
# Add apacheuser in the icingacmd group
# If the group exists, add the apacheuser in the icingacmd group.
# It is not neccessary that icinga-web is installed on the same system as
# icinga and only on systems with icinga installed the icingacmd
# group exists. In all other cases the user used for ssh access has
# to be added to the icingacmd group on the remote icinga server.
getent group icingacmd > /dev/null

if [ $? -eq 0 ]; then
%{_sbindir}/usermod -a -G icingacmd %{apacheuser}
fi

@icinga-migration
Copy link
Author

Updated by mhoyer on 2013-12-06 09:26:04 +00:00

dnsmichi wrote:

I would fix that like it's done in icinga-web.spec using getent

nice

@icinga-migration
Copy link
Author

Updated by mfriedrich on 2013-12-07 16:54:07 +00:00

  • Target Version set to 1.10.3

@icinga-migration
Copy link
Author

Updated by mfriedrich on 2014-01-03 17:15:37 +00:00

  • Status changed from New to Assigned
  • Assigned to set to mfriedrich
  • Target Version changed from 1.10.3 to 1.11

@icinga-migration
Copy link
Author

Updated by Anonymous on 2014-01-03 20:03:46 +00:00

  • Status changed from Assigned to Resolved
  • Done % changed from 0 to 100

Applied in changeset 0419daa.

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