Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[dev.icinga.com #6881] make install does not install the db-schema #1873

Closed
icinga-migration opened this issue Aug 11, 2014 · 8 comments
Closed
Labels
area/setup Installation, systemd, sample files bug Something isn't working
Milestone

Comments

@icinga-migration
Copy link

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

Created by bebehei on 2014-08-11 17:14:33 +00:00

Assignee: gbeutner
Status: Resolved (closed on 2014-08-17 11:39:00 +00:00)
Target Version: 2.1.0
Last Update: 2014-08-17 11:39:21 +00:00 (in Redmine)

Icinga Version: Icinga2 2.0.2
Package Repository: gbeutner

Hi,

when I run the code to compile and install icinga2, the schema-files for mysql and postresql are not exported into the installation directory.

mkdir build
cd build
cmake .. \
-DCMAKE_INSTALL_PREFIX=/usr/ \
-DICINGA2_USER=icinga \
-DICINGA2_GROUP=icinga \
-DICINGA2_COMMAND_USER=icinga \
-DICINGA2_COMMAND_GROUP=icingacmd \
-DICINGA2_PLUGIN_DIR=/usr/share/nagios/libexec \
-DCMAKE_INSTALL_SYSCONFDIR=/etc/ \
-DCMAKE_INSTALL_LOCALSTATEDIR=/var \
-DICINGA2_SYSCONFIGFILE=/etc/default/icinga2 \
-DUSE_SYSTEMD=ON
make -j 16
make DESTDIR=/tmp/icinga install

The command "find /tmp/icinga | grep schem" won't find any schema-file.

I don't know if it will be considered as a bug, but I think it is probably a good thing if there is an option to export/install the schemas with something like make install or with make install_pdo_mysql.

Changesets

2014-08-17 11:37:50 +00:00 by gbeutner 3da5568

Install DB schema files using cmake

fixes #6881
@icinga-migration
Copy link
Author

Updated by mfriedrich on 2014-08-11 17:53:51 +00:00

  • Project changed from Icinga 2 to 32

Imho packagers should decide whether they want to install it, or not. Source installs are not recommended, as there are packages for many distributions out there already. These should be used in the first place, rather than installing the source yourself.

For the issue itself - got a patch?

@icinga-migration
Copy link
Author

Updated by bebehei on 2014-08-11 18:51:03 +00:00

dnsmichi wrote:

Imho packagers should decide whether they want to install it, or not.
Full ACK. I have to install it into the package.

Source installs are not recommended, as there are packages for many distributions out there already. These should be used in the first place, rather than installing the source yourself.
I maintain the package in the ArchLinux AUR and today somebody told me, that the schemas are missing there. I copied them manually into the package.
That is only a quickfix and I think having something like make install/pdo is way better for package-maintainers to use. It may also prevent errors in the future.

For the issue itself - got a patch?
No, sorry. I know nothing about ©make.

@icinga-migration
Copy link
Author

Updated by mfriedrich on 2014-08-11 19:04:39 +00:00

  • Project changed from 32 to Icinga 2
  • Category set to Packages

bebehei wrote:

> Source installs are not recommended, as there are packages for many distributions out there already. These should be used in the first place, rather than installing the source yourself.
I maintain the package in the ArchLinux AUR

Are you maintaining 1.x as well, or is that a different person? I'm asking just because all upstream packagers are invited to join the icinga team for better communication and idea exchange (and we don't have any Archlinux packagers currently - https://www.icinga.org/community/team/team-packaging/). If you're interested, just send a short "whoami-apply-as-archlinux-pkger" to info(at)icinga.org and we'll handle the rest :)

and today somebody told me, that the schemas are missing there. I copied them manually into the package.
That is only a quickfix and I think having something like make install/pdo is way better for package-maintainers to use. It may also prevent errors in the future.

Hmm, yeah, well. Existing packages copying that manually should be changed then. At least RHEL/SUSE rpmbuild will fail once there are installed but not packaged files around. So it affects the packages themselves, rather than db_ido only.

@icinga-migration
Copy link
Author

Updated by bebehei on 2014-08-12 12:13:23 +00:00

dnsmichi wrote:

Are you maintaining 1.x as well, or is that a different person? I'm asking just because all upstream packagers are invited to join the icinga team for better communication and idea exchange (and we don't have any Archlinux packagers currently - https://www.icinga.org/community/team/team-packaging/). If you're interested, just send a short "whoami-apply-as-archlinux-pkger" to info(at)icinga.org and we'll handle the rest :)

I'm not maintaining 1.x. According to AUR Afwas is maintaining it. I don't know him/her.

I'm neither a Arch Trusted User neither I add official packages to the Arch-repo. I don't want to be considered as an Arch-packager. The AUR is quite similar to monitoringexchange.org where you upload your scripts and others download the PKGBUILD, execute it and have a finished package.

But surprisingly, the AUR-Package is already linked on the icinga-download-page.

@icinga-migration
Copy link
Author

Updated by bebehei on 2014-08-12 12:18:26 +00:00

dnsmichi wrote:

Imho packagers should decide whether they want to install it, or not. Source installs are not recommended, as there are packages for many distributions out there already. These should be used in the first place, rather than installing the source yourself.

For the issue itself - got a patch?
The only patch I could create is adding this to components/db_ido_mysql/CMakeLists.txt:

install(
DIRECTORY schema/
DESTINATION ${CMAKE_INSTALL_DATADIR}/icinga2/db_ido_mysql
FILES_MATCHING PATTERN "*.sql"
)

... and respectively for pgsql this to components/db_ido_pgsql/CMakeLists.txt:
install(
DIRECTORY schema/
DESTINATION ${CMAKE_INSTALL_DATADIR}/icinga2/db_ido_pgsql
FILES_MATCHING PATTERN "*.sql"
)

But then you have the "problem" that the schemas are copied by "make install", what you don't like as you said earlier.

@icinga-migration
Copy link
Author

Updated by gbeutner on 2014-08-17 11:21:29 +00:00

  • Assigned to set to gbeutner
  • Package Repository changed from __ to gbeutner

@icinga-migration
Copy link
Author

Updated by gbeutner on 2014-08-17 11:39:00 +00:00

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

Applied in changeset 3da5568.

@icinga-migration
Copy link
Author

Updated by gbeutner on 2014-08-17 11:39:21 +00:00

  • Target Version set to 2.1.0

@icinga-migration icinga-migration added bug Something isn't working area/setup Installation, systemd, sample files labels Jan 17, 2017
@icinga-migration icinga-migration added this to the 2.1.0 milestone Jan 17, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/setup Installation, systemd, sample files bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant