Coder Social home page Coder Social logo

marbx / salt-windows-msi Goto Github PK

View Code? Open in Web Editor NEW

This project forked from saltstack/salt-windows-msi

1.0 1.0 0.0 1.26 MB

Windows MSI installer build toolkit

License: Apache License 2.0

XSLT 3.92% C# 72.27% Batchfile 1.43% PowerShell 22.38%

salt-windows-msi's People

Contributors

berkut-174 avatar eliasp avatar marbx avatar mcd1992 avatar twangboy avatar utahdave avatar xeacott avatar

Stargazers

 avatar

Watchers

 avatar

salt-windows-msi's Issues

Should not again download PIP and SetupTools

http://stackoverflow.com/questions/25749621/whats-the-difference-between-pip-install-and-python-m-pip-install

 ----------------------------------------------------------------
 - build_env.ps1 :: Updating PIP and SetupTools . . .
 ----------------------------------------------------------------
Collecting pip==8.1.2 (from -r C:\git\salt\pkg\windows\req_pip.txt (line 1))
  Downloading pip-8.1.2-py2.py3-none-any.whl (1.2MB)
Collecting setuptools==25.1.3 (from -r C:\git\salt\pkg\windows\req_pip.txt (line 2))
  Downloading setuptools-25.1.3-py2.py3-none-any.whl (442kB)
Installing collected packages: pip, setuptools

Must get version equal to `salt --version`

Which git commands one must execute to download and print the correct version?

git describe reports higher commit counts (lesser minor version, 4th version number) than salt --version

Function __discover_version() in version.py uses many parameters:

$ git checkout 2016.11
$ git describe --tags --first-parent --match v[0-9]* --always
    v2016.11.1-96-g4913c4f
$ git describe
    v2016.11.1-444-g4913c4f

Even worse, the minor point (third version number) can differ:

$ git checkout 2016.11
$ git describe --tags --first-parent --match v[0-9]* --always
v2016.11.2-71-g99bfa7d
$ git describe
v2016.11.1-707-g99bfa7d

The minor point (third version number) is 2 or 1, while 3 has already been published/released.
How do I get minor point relase 3?

Which git command must I use to retrieve exactly the offical 2016.11.3 release?

rallytime writes at saltstack/salt#34535 (comment)
The last comment I have is that it would be good to mention that all of these sections with the various git tags are relative to your local git fetch. The salt --version command (and hence git checkout) looks for the most recent recognized tag on the system, which may not necessarily be the most recent tag up on GitHub.

Maybe replace nssm.exe with python.exe in Service

This python.exe Minion replies to the master:

C:\salt\bin>python.exe Scripts\salt-minion -c ..\conf -l quiet

<ServiceInstall> is in https://github.com/markuskramerIgitt/salt-windows-msi/blob/master/wix/MinionMSI/servicePython.wxs
The installer hangs forever, cancel manually.

Error from Event Viewer, Windows Log, System:

The service did not respond to the start or control request in a timely fashion.

After Googling python as windows service
maybe class DataTransToMongoService(win32serviceutil.ServiceFramework)

Preserve configuration of a previous NSIS installation

We must use the configuration and preserve the cache of a previous NSIS installation,
stored in salt/var and salt/conf.

We achieve this by deleting everything else:

  • stop and remove the salt-minion service
  • Remove the registry entries
  • delete C:\salt\uninstall.exe
  • delete C:\salt\nssm.exe
  • delete C:\salt\salt* (all the batch files)
  • delete the C:\salt\bin directory

My current understanding is that RemoveFolder only removes an empty folder, and RemoveFolderEx is difficult to handle, I also anticipate many WiX resrtrictions.
I therefore prefer to extend the CustomActions in MinionConfigurationExtension

Should unconfuse Version nominators

In the registry
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall{2ACF9B3F-1C86-4573-8CAC-9B16AA705470}
DisplayName == Salt Minion 2016.11.0
DisplayVersion == 16.11.0.461

in WiX
16.11.0.461 == InternalVersion

This is confusing

Must delete bin/*/*.pyc (etc) on uninstall or upgrade

During runtime,

  • Python writes files (*.pyc) in the program directory.
  • Salt write files in INSTALLDIR.

WiX does not know or assume that, so has to be told.
An msi does not remove file, unless the msi has created them.
I need to specify that bin must be removed recusivly.

RemoveFolderEx
https://www.hass.de/content/wix-how-use-removefolderex-your-xml-scripts
http://stackoverflow.com/questions/195919/removing-files-when-uninstalling-wix

CustomAction ExeCommand
http://stackoverflow.com/questions/17288914/wix-v3-7-how-to-remove-file-in-uninstall-that-was-created-after-installation

Must fix "another client exist"

CleanupBinFolder and CleanupVarFolderNo have Action Null
Why "another client exists"?

Probably because afer a non-working uninstall I removed registry and files manually.
\salt\bin only contains *.pyc files.
\salt\var only contains empty directories under \salt\var\run.
This means uninstalls removes all files known at install time.
nssm.exe remains, because it is unknown because no GUID.

How can I clean my machine?

Not helping link:
http://stackoverflow.com/questions/26739524/wix-toolset-complete-cleanup-after-disallowing-uninstallation-of-component-sin


MSI (s) (D0:B0) [21:44:47:603]: Dir (target): Key: VARFOLDER	, Object: C:\salt\var\
MSI (s) (D0:B0) [21:44:47:603]: Dir (target): Key: BINFOLDER	, Object: C:\salt\bin\
MSI (s) (D0:B0) [21:44:47:603]: PROPERTY CHANGE: Adding INSTALLLEVEL property. Its value is '1'.
MSI (s) (D0:B0) [21:44:47:608]: Disallowing uninstallation of component: {E27F3682-194D-4CC2-9F9B-F3E1D53ADCDB} since another client exists
MSI (s) (D0:B0) [21:44:47:608]: Disallowing uninstallation of component: {E27F3682-194D-4CC2-9F9B-F3E1D53ADCDB} since another client exists
MSI (s) (D0:B0) [21:44:47:608]: Disallowing uninstallation of component: {E27F3682-194D-4CC2-9F9B-F3E1D53ADCDB} since another client exists
MSI (s) (D0:B0) [21:44:48:853]: Disallowing uninstallation of component: {8B680C03-668E-5AAB-AE34-79B20583FDC0} since another client exists
MSI (s) (D0:B0) [21:44:48:853]: Disallowing uninstallation of component: {8B680C03-668E-5AAB-AE34-79B20583FDC0} since another client exists
MSI (s) (D0:B0) [21:44:48:853]: Disallowing uninstallation of component: {8B680C03-668E-5AAB-AE34-79B20583FDC0} since another client exists
MSI (s) (D0:B0) [21:44:48:854]: Disallowing uninstallation of component: {18C114AB-2F55-5235-85C1-65C82198CF9B} since another client exists
MSI (s) (D0:B0) [21:44:48:854]: Disallowing uninstallation of component: {18C114AB-2F55-5235-85C1-65C82198CF9B} since another client exists
MSI (s) (D0:B0) [21:44:48:854]: Disallowing uninstallation of component: {18C114AB-2F55-5235-85C1-65C82198CF9B} since another client exists
MSI (s) (D0:B0) [21:44:48:854]: Doing action: MigrateFeatureStates
Action ended 21:44:48: CostFinalize. Return value 1.
MSI (s) (D0:B0) [21:44:48:855]: Skipping MigrateFeatureStates action: not run in maintenance mode
Action start 21:44:48: MigrateFeatureStates.
MSI (s) (D0:B0) [21:44:48:855]: Doing action: InstallValidate
Action ended 21:44:48: MigrateFeatureStates. Return value 0.
MSI (s) (D0:B0) [21:44:48:855]: Feature: ProductFeature; Installed: Local;   Request: Absent;   Action: Absent
MSI (s) (D0:B0) [21:44:48:855]: Component: CleanupBinFolder; Installed: Local;   Request: Absent;   Action: Null
MSI (s) (D0:B0) [21:44:48:855]: Component: CleanupVarFolder; Installed: Local;   Request: Absent;   Action: Null

read conf/minion before using defaults or parameters

conf/minion is File.ReadAllLines is only in processConfigChange.
processConfigChange only stores parameters from the commandline or GUI into conf/minion.

There is no code that reads conf/minion into parameters.
conf/minion is not treated as an INI file.

Warning CNDL1150 WixUtilExtension ServiceConfig

C:\git\salt-windows-msi\wix.d\MinionMSI\service.wxs(9): warning CNDL1150: ServiceConfig functionality is documented in the Windows Installer SDK to "not [work] as expected." Consider replacing ServiceConfig with the WixUtilExtension ServiceConfig element. [C:\git\salt-windows-msi\wix.d\MinionMSI\MinionMSI.wixproj]

Should stop downloading PyYAML

build.bat :: Install Current Version of salt...
---------------------------------------------------------------------
2016.11.2-92-g070904b
Requirement already satisfied (use --upgrade to upgrade): wheel in c:\python27\lib\site-packages
Requirement already satisfied (use --upgrade to upgrade): pycrypto==2.6.1 from https://repo.saltstack.com/windows/dependencies/64/pycryp
You are using pip version 8.1.2, however version 9.0.1 is available.
You should consider upgrading via the 'python -m pip install --upgrade pip' command.
Downloading https://repo.saltstack.com/windows/dependencies/64/PyYAML-3.11.win-amd64-py2.7.exe

Observed once: Access to the path 'minion.pem' is denied.

MSI (s) (E4:48) [09:45:01:150]: Executing op: FolderRemove(Folder=C:\salt\conf\pki\minion\,Foreign=0)
MSI (s) (E4:48) [09:45:01:150]: Note: 1: 2318 2:  
MSI (s) (E4:48) [09:45:01:150]: Executing op: FolderRemove(Folder=C:\salt\var\cache\,Foreign=0)
MSI (s) (E4:48) [09:45:01:150]: Executing op: FolderRemove(Folder=C:\salt\var\cache\salt\,Foreign=0)
MSI (s) (E4:48) [09:45:01:150]: Executing op: FolderRemove(Folder=C:\salt\var\cache\salt\minion\,Foreign=0)
MSI (s) (E4:48) [09:45:01:150]: Executing op: FolderRemove(Folder=C:\salt\var\cache\salt\minion\extmods\,Foreign=0)
MSI (s) (E4:48) [09:45:01:150]: Executing op: FolderRemove(Folder=C:\salt\var\cache\salt\minion\extmods\grains\,Foreign=0)
MSI (s) (E4:48) [09:45:01:150]: Executing op: FolderRemove(Folder=C:\salt\var\cache\salt\minion\proc\,Foreign=0)
MSI (s) (E4:48) [09:45:01:150]: Executing op: FolderRemove(Folder=C:\salt\var\run\,Foreign=0)
MSI (s) (E4:48) [09:45:01:150]: Executing op: ActionStart(Name=MsiConfigureServices,,)
MSI (s) (E4:48) [09:45:01:150]: Executing op: ProgressTotal(Total=1,Type=1,ByteEquivalent=1300000)
MSI (s) (E4:48) [09:45:01:150]: Executing op: ActionStart(Name=PublishProduct,Description=Publishing product information,)
MSI (s) (E4:48) [09:45:01:150]: Executing op: CleanupConfigData()
MSI (s) (E4:48) [09:45:01:150]: Executing op: RegisterPatchOrder(Continue=0,SequenceType=0,Remove=1)
MSI (s) (E4:48) [09:45:01:150]: Note: 1: 1402 2: UNKNOWN\Installer\Products\5EBBC40246441C84694A40C427B7A9A7\Patches 3: 2 
MSI (s) (E4:48) [09:45:01:150]: Executing op: RegisterPatchOrder(Continue=0,SequenceType=1,Remove=1)
MSI (s) (E4:48) [09:45:01:150]: Executing op: CleanupConfigData(RemovingProduct=1)
MSI (s) (E4:48) [09:45:01:150]: Note: 1: 1402 2: HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Installer\UserData\S-1-5-18\Products\5EBBC40246441C84694A40C427B7A9A7\Patches 3: 2 
MSI (s) (E4:48) [09:45:01:150]: Executing op: End(Checksum=0,ProgressTotalHDWord=0,ProgressTotalLDWord=1956299400)
MSI (s) (E4:48) [09:45:01:150]: User policy value 'DisableRollback' is 0
MSI (s) (E4:48) [09:45:01:150]: Machine policy value 'DisableRollback' is 0
MSI (s) (E4:48) [09:45:07:873]: Note: 1: 2318 2:  
MSI (s) (E4:48) [09:45:08:326]: Note: 1: 2318 2:  
MSI (s) (E4:48) [09:45:08:326]: No System Restore sequence number for this installation.
MSI (s) (E4:48) [09:45:08:326]: Unlocking Server
MSI (s) (E4:48) [09:45:08:326]: PROPERTY CHANGE: Deleting UpdateStarted property. Its current value is '1'.
MSI (s) (E4:48) [09:45:08:326]: Doing action: CAC.NukeConf
Action ended 09:45:08: InstallFinalize. Return value 1.
MSI (s) (E4:18) [09:45:08:404]: Invoking remote custom action. DLL: C:\windows\Installer\MSI45FA.tmp, Entrypoint: CS_CUSTOM_ACTION_NUKE_CONF
Action start 09:45:08: CAC.NukeConf.
SFXCA: Extracting custom action to temporary directory: C:\windows\Installer\MSI45FA.tmp-\
SFXCA: Binding to CLR version v4.0.30319
Calling custom action MinionConfigurationExtension!MinionConfigurationExtension.MinionConfiguration.CS_CUSTOM_ACTION_NUKE_CONF
MinionConfiguration.cs:: Begin CS_CUSTOM_ACTION_NUKE_CONF
while deleting c:\salt\conf
Exception: Access to the path 'minion.pem' is denied.
   at System.IO.Directory.DeleteHelper(String fullPath, String userPath, Boolean recursive, Boolean throwOnTopLevelDirectoryNotFound)
   at System.IO.Directory.Delete(String fullPath, String userPath, Boolean recursive, Boolean checkHost)
   at MinionConfigurationExtension.MinionConfiguration.CS_CUSTOM_ACTION_NUKE_CONF(Session session)
CustomAction CAC.NukeConf returned actual error code 1603 (note this may not be 100% accurate if translation happened inside sandbox)
Action ended 09:45:09: CAC.NukeConf. Return value 3.
Action ended 09:45:09: INSTALL. Return value 3.
Property(S): UpgradeCode = {FC6FB3A2-65DE-41A9-AD91-D10A402BD641}
Property(S): BINFOLDER = C:\salt\bin\
Property(S): VARFOLDER = C:\salt\var\
Property(S): INSTALLFOLDER = C:\salt\


Maybe Ramirez ch 2 p 74: speeding up file installation

This would be an XSL exercise.

File Id = FILE_DIR_DIR_NAME

Currently

<Component Id="cmp2B355C72B6462C75D135196F9C4D53E9" Directory="INSTALLFOLDER" Guid="{B39D6FD8-655D-4476-86D1-C67A3B7D8B25}">
  <File Id="filFDE3C5D9253AF68B35B1F4B9359FC016" KeyPath="yes" Source="$(var.dist)\salt-call.bat" />
</Component>

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.