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

[dev.icinga.com #4517] icinga.spec: different handling of ido2db.cfg in idoutils-libdbi-* packages #1325

Closed
icinga-migration opened this issue Aug 6, 2013 · 9 comments

Comments

@icinga-migration
Copy link

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

Created by mgruener on 2013-08-06 09:54:49 +00:00

Assignee: spstarr
Status: Closed (closed on 2015-02-14 16:13:50 +00:00)
Target Version: (none)
Last Update: 2015-02-14 16:13:50 +00:00 (in Redmine)


In the current icinga.spec the process to package the ido2db.cfg file for the idoutils-libdbi-* packages is as follows:

idoutils-libdbi-mysql: package as is
idoutils-libdbi-pgsql: package as is, but modify for postgres during post-installation (and do so everytime the package is updated)

This has some disadvantages:

  1. the file will always be shown as "modified" from a rpm point-of-view
  2. everytime a new version of the idoutils-libdbi-pgsql is installed, the file has to be modified again. As it is implemented right now this will leave the sysadmin with two new files (ido2db.cfg.pgsql, ido2db.cfg.rpmnew) if he has modified ido2db.cfg
  3. the idoutils-libdbi-pgsql rpm actually contains the configuration for idoutils-libdbi-mysql the necessary modifications are made during the post-install phase

I would like to propose the following procedure to handle the ido2db.cfg file

  1. during rpm buildtime, create two versions of the ido2db.cfg file, ido2db.cfg.mysql and ido2db.cfg.pgsql, each containing the already modified configuration for either mysql or postgres
  2. package ido2db.cfg.mysql with idoutils-libdbi-mysql and ido2db.cfg.pgsql with idoutils-libdbi-pqsql
  3. during post-install create a symlink "ido2db.cfg" either for ido2db.cfg.mysql or ido2db.cfg.pgsql depending on the installed package
  4. if available use the %ghost macro to assign the symlink to the package (it does not exist during rpm-build time, but it will exist as soon as the rpm is installed on a system)
  5. ensure that the symlink gets deleted during package uninstall (for systems not supporting %ghost)

This approach should circumvent the aforementioned disadvantages.

I have attached a patch containing the necessary changes.

Attachments

@icinga-migration
Copy link
Author

Updated by mfriedrich on 2013-10-11 10:17:19 +00:00

  • Priority changed from Normal to Low

@icinga-migration
Copy link
Author

Updated by elagon on 2013-10-11 10:26:52 +00:00

+1 for me
This is a much cleaner way

@icinga-migration
Copy link
Author

Updated by mfriedrich on 2014-07-19 13:11:01 +00:00

  • Category set to Packaging
  • 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 22:50:24 +00:00

  • Done % changed from 0 to 100

I've adapted this for the Fedora spec file thanks, it is now in.

@icinga-migration
Copy link
Author

Updated by spstarr on 2014-07-20 22:50:47 +00:00

  • Target Version set to 1.11.5

@icinga-migration
Copy link
Author

Updated by mfriedrich on 2014-07-21 07:58:53 +00:00

  • Target Version changed from 1.11.5 to 1.11.6

1.11.5 is already released, please use 1.11.6 as target version.

@icinga-migration
Copy link
Author

Updated by mfriedrich on 2014-08-06 19:16:57 +00:00

  • Status changed from Assigned to Feedback
  • Target Version changed from 1.11.6 to 1.12

@icinga-migration
Copy link
Author

Updated by mfriedrich on 2014-10-26 19:12:41 +00:00

  • Target Version deleted 1.12

@icinga-migration
Copy link
Author

Updated by mfriedrich on 2015-02-14 16:13:50 +00:00

  • Status changed from Feedback to Closed

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