-
Notifications
You must be signed in to change notification settings - Fork 584
On Windows, don't create C:\Program Files\Icinga2\var during MSI build #10137
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
Conversation
I'm not sure what this is trying to say? Is this good? Is it bad? Does it miss a negation? Anyway, doesn't that imply that all of these variables are set to broken paths on Windows in general as it should always be |
install(CODE "file(MAKE_DIRECTORY \"\$ENV{DESTDIR}${ICINGA2_FULL_DATADIR}/api/zones-stage\")") | ||
install(CODE "file(MAKE_DIRECTORY \"\$ENV{DESTDIR}${ICINGA2_FULL_DATADIR}/certs\")") | ||
install(CODE "file(MAKE_DIRECTORY \"\$ENV{DESTDIR}${ICINGA2_FULL_DATADIR}/certificate-requests\")") | ||
endif() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
misses any dirs listed in files changed here
I'm not sure what this is trying to say? Is this good? Is it bad? Does it miss a negation?
It means that I've "commented out" the certs dir here via NOT WIN32, but this didn't break my MSI. I.e. it still installs a certs dir where expected. That implies...
Anyway, doesn't that imply that all of these variables are set to broken paths on Windows in general as it should always be
C:\ProgramData\Icinga2\var
, notC:\Program Files\Icinga2\var
?
... that they're not just broken on Windows, they're pointless.
Test IIOn two independent machines w/o Icinga 2 installed, my non-admin could build this branch: $env:BITS = 64
$env:CMAKE_BUILD_TYPE = "RelWithDebInfo"
& .\tools\win32\load-vsenv.ps1
powershell.exe .\tools\win32\configure.ps1
& powershell.exe .\tools\win32\build.ps1
& powershell.exe .\tools\win32\test.ps1 👍 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is more of a quick-fix workaround though. To me, it's very questionable why install(CODE "file(MAKE_DIRECTORY ...)")
is even used when there is install(DIRECTORY ...)
. I'd also expect the latter to be picked up by the CPack MSI build process, so if this was done properly (that would also need fixing of the values of these variables, see #10137 (comment)), that might even make icinga-installer/icinga-installer.cpp (partially) obsolete.
Test
https://git.icinga.com/packaging/windows-icinga2/-/jobs/580745 neither created it in the build env, nor the MSI, installed on a separate VM, misses any dirs listed in files changed here. 👍