[java-identity-provider] 02/02: IDP-2024 85b31723a94ebd35700cbcd3f3ee655746f3868c Change
Rod Widdowson
rdw at steadingsoftware.com
Sat Jul 15 14:28:30 UTC 2023
This is an automated email from the git hooks/post-receive script.
rdw pushed a commit to branch main
in repository java-identity-provider.
View the commit online:
http://git.shibboleth.net/view/?p=java-identity-provider.git;a=commit;h=cac035b458f84bc3270df3485faef6eceeef67d2
commit cac035b458f84bc3270df3485faef6eceeef67d2
Author: Rod Widdowson <rdw at steadingsoftware.com>
AuthorDate: Sat Jul 15 15:05:11 2023 +0100
IDP-2024 85b31723a94ebd35700cbcd3f3ee655746f3868c Change
This reverts commit 85b31723a94ebd35700cbcd3f3ee655746f3868c
We cannot do it like this.
https://shibboleth.atlassian.net/browse/IDP-2024
---
idp-installer/src/main/wix/ShibbolethIdP-main.wxs | 2 +
.../src/main/wix/scripts/shib_write_configs.vbs | 82 ++++++++++++----------
2 files changed, 46 insertions(+), 38 deletions(-)
diff --git a/idp-installer/src/main/wix/ShibbolethIdP-main.wxs b/idp-installer/src/main/wix/ShibbolethIdP-main.wxs
index 71d1b98ab..76ffc51bc 100644
--- a/idp-installer/src/main/wix/ShibbolethIdP-main.wxs
+++ b/idp-installer/src/main/wix/ShibbolethIdP-main.wxs
@@ -151,6 +151,7 @@
<CustomAction Id="WriteConfigFiles" BinaryKey="WriteConfigFilesSrc" VBScriptCall="" Execute="deferred" Impersonate="no" />
<CustomAction Id="SetJavaIdpHome" BinaryKey="SetJavaIdpHomeSrc" VBScriptCall="" Execute="immediate" />
+ <CustomAction Id="SetWriteConfigFiles" Property="WriteConfigFiles" Value="[INSTALLDIR];@;[DNSNAME];@;[INSTALL_JETTY];@;[IDP_SCOPE];@;[DEBUG_INSTALL];@;[CONFIGURE_AD];@;[AD_DOMAIN];@;[AD_USER];@;[AD_PASS];@;[AD_USE_GC]" />
<CustomAction Id="SetDefaultInstallDir" Property="DefaultInstallDir" Value="[WindowsVolume]opt\shibboleth-idp\" />
@@ -249,6 +250,7 @@
<!-- Work -->
+ <Custom Action="SetWriteConfigFiles" After="CostFinalize">NOT Installed</Custom>
<Custom Action="WriteConfigFiles" After="InstallFiles">NOT Installed</Custom>
<Custom Action="SetIdpInstall1" After="WriteConfigFiles">NOT Installed</Custom>
<Custom Action="SetIdpInstall2" After="SetIdpInstall1">NOT Installed</Custom>
diff --git a/idp-installer/src/main/wix/scripts/shib_write_configs.vbs b/idp-installer/src/main/wix/scripts/shib_write_configs.vbs
index c84dda134..41bd25a0b 100644
--- a/idp-installer/src/main/wix/scripts/shib_write_configs.vbs
+++ b/idp-installer/src/main/wix/scripts/shib_write_configs.vbs
@@ -1,5 +1,8 @@
-Dim FileSystemObj, InstallerPropertyFile, ReplacePropsFile, JettyFile, LogFile
-Dim CustomData, InstallDir, IdPScope, DebugInstall, Domain
+'
+' Code taken from the Shib SP install
+'
+Dim FileSystemObj, AntFile, PropsFile, JettyFile, JettyAntFile, LogFile
+Dim CustomData, msiProperties, InstallDir, IdPScope, DebugInstall, Domain
Dim ConfigureAd, AdDomain, AdUser, AdPass, AdUseGC, LDAPFile, LDAPPort
Dim LDAPSearchPath
@@ -8,7 +11,10 @@ Set FileSystemObj = CreateObject("Scripting.FileSystemObject")
' Eek
on error resume next
-InstallDir = Session.Property("INSTALLDIR")
+'Get the Parameters values via CustomActionData
+CustomData = Session.Property("CustomActionData")
+msiProperties = split(CustomData,";@;")
+InstallDir = msiProperties(0)
'Remove all trailing backslashes to normalize
do while (mid(InstallDir,Len(InstallDir),1) = "\")
@@ -19,21 +25,21 @@ set LogFile=FileSystemObj.OpenTextFile(InstallDir & "\idp_installation.Log" , 2,
InstallDirJava = Replace(InstallDir, "\", "/")
InstallDirWindows = Replace(InstallDirJava, "/", "\\")
-IdPHostName = LCase(Session.Property("DNSNAME"))
-InstallJetty = LCase(Session.Property("INSTALL_JETTY"))
-IdPScope = LCase(Session.Property("IDP_SCOPE"))
+IdPHostName = LCase(msiProperties(1))
+InstallJetty = LCase(msiProperties(2))
+IdPScope = LCase(msiProperties(3))
if IdPScope = "" then
Domain = IdPHostName
else
Domain = IdPScope
end if
-DebugInstall = LCase(Session.Property("DEBUG_INSTALL"))
-ConfigureAd = LCase(Session.Property("CONFIGURE_AD"))
+DebugInstall = LCase(msiProperties(4))
+ConfigureAd = LCase(msiProperties(5))
if ConfigureAd = "true" then
- AdDomain = LCase(Session.Property("AD_DOMAIN"))
- AdUser = LCase(Session.Property("AD_USER"))
- AdPass = Session.Property("AD_PASS")
- AdUseGC = LCase(Session.Property("AD_USE_GC"))
+ AdDomain = LCase(msiProperties(6))
+ AdUser = LCase(msiProperties(7))
+ AdPass = msiProperties(8)
+ AdUseGC = LCase(msiProperties(9))
end if
LogFile.WriteLine "Installing to " & InstallDirJava
@@ -42,46 +48,46 @@ LogFile.WriteLine "Domain " & Domain
LogFile.WriteLine "Scope " & IdPScope
LogFile.WriteLine "IntallJetty" & InstallJetty
-set InstallerPropertyFile=FileSystemObj.OpenTextFile(InstallDir & "\idp.install.properties" , 2, True)
+set AntFile=FileSystemObj.OpenTextFile(InstallDir & "\idp.install.properties" , 2, True)
if (Err.Number = 0 ) then
- InstallerPropertyFile.WriteLine "#"
- InstallerPropertyFile.WriteLine "# File with properties the installer"
- InstallerPropertyFile.WriteLine "#"
- InstallerPropertyFile.WriteLine "idp.noprompt=yes"
- InstallerPropertyFile.WriteLine "idp.host.name=" & IdpHostName
- InstallerPropertyFile.WriteLine "idp.uri.subject.alt.name=https://" & Domain & "/idp"
- InstallerPropertyFile.WriteLine "idp.target.dir=" & InstallDirJava
- InstallerPropertyFile.WriteLine "idp.merge.properties=" & InstallDirJava & "/idp.install.replace.properties"
+ AntFile.WriteLine "#"
+ AntFile.WriteLine "# File with properties the installer"
+ AntFile.WriteLine "#"
+ AntFile.WriteLine "idp.noprompt=yes"
+ AntFile.WriteLine "idp.host.name=" & IdpHostName
+ AntFile.WriteLine "idp.uri.subject.alt.name=https://" & Domain & "/idp"
+ AntFile.WriteLine "idp.target.dir=" & InstallDirJava
+ AntFile.WriteLine "idp.merge.properties=" & InstallDirJava & "/idp.install.replace.properties"
if (IdPScope <> "") then
- InstallerPropertyFile.WriteLine "idp.scope=" & IdPScope
+ AntFile.WriteLine "idp.scope=" & IdPScope
end if
if ConfigureAd = "true" then
- InstallerPropertyFile.Writeline "idp.LDAP.credential=" & AdPass
- InstallerPropertyFile.WriteLine "ldap.merge.properties=ldap.mergeProperties"
+ AntFile.Writeline "idp.LDAP.credential=" & AdPass
+ AntFile.WriteLine "ldap.merge.properties=ldap.mergeProperties"
end if
- InstallerPropertyFile.WriteLine "#"
- InstallerPropertyFile.WriteLine "# Debug"
- InstallerPropertyFile.WriteLine "#"
+ AntFile.WriteLine "#"
+ AntFile.WriteLine "# Debug"
+ AntFile.WriteLine "#"
if (DebugInstall <> "") then
- InstallerPropertyFile.WriteLine "idp.no.tidy=true"
+ AntFile.WriteLine "idp.no.tidy=true"
else
- InstallerPropertyFile.WriteLine "#idp.no.tidy=true"
+ AntFile.WriteLine "#idp.no.tidy=true"
end if
- InstallerPropertyFile.Close
+ AntFile.Close
end if
-set ReplacePropsFile=FileSystemObj.OpenTextFile(InstallDir & "\idp.install.replace.properties" , 2, True)
+set PropsFile=FileSystemObj.OpenTextFile(InstallDir & "\idp.install.replace.properties" , 2, True)
if (Err.Number = 0 ) then
- ReplacePropsFile.WriteLine "#"
- ReplacePropsFile.WriteLine "# File to be merged into idp.properties"
- ReplacePropsFile.WriteLine "#"
- ReplacePropsFile.WriteLine "idp.entityID=https://" & Domain & "/idp"
+ PropsFile.WriteLine "#"
+ PropsFile.WriteLine "# File to be merged into idp.properties"
+ PropsFile.WriteLine "#"
+ PropsFile.WriteLine "idp.entityID=https://" & Domain & "/idp"
if (IdPScope <> "") then
- ReplacePropsFile.WriteLine "idp.scope=" & IdPScope
+ PropsFile.WriteLine "idp.scope=" & IdPScope
end if
- ReplacePropsFile.Close
+ PropsFile.Close
else
- LogFile.Writeline "ReplacePropsFile failed " & Err & " - " & ReplacePropsFile
+ LogFile.Writeline "PropsFile failed " & Err & " - " & PropsFile
end if
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the commits
mailing list