-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
SLEPIC: Issues with Winrepo #32831
Comments
I've spent the last couple of weeks packaging software, the biggest problem I've found so far is incorrect detection of state based on name collisions. As an example, Visual C++ 2005 runtime packages will install together, but state checks will fail based on the identical full_name:
I've found that I can work around the downgrade issue with state dependencies, effectively pinning package versions at a minimum level:
For packages upgrades that use a patch file, perhaps the best option would be to allow the cache path to be set manually (to a file or a directory) rather than always inferred from the installer path. Letting you control the caching yourself would let you do whatever you like for any type of installer and I think this would solve a lot of issues where caching is conflicting with install options (while still retaining backwards compatibility):
Apologies for the lengthy comment... |
The pkg manage updates I am doing , have been always striping the version string out of the name. I will add code so that if the package needs the version string like the above C++ examples it will add version missing string to the name, this way you will see all of them installed instead of just one being reported back. e.g. Microsoft Visual C++ 2005 Redistributable (x64) will become |
@twangboy what does By now I have quite a (mental) long collection of issues with winrepo-ng, is this issue here an attempt to list them in one place and pull these things together? Or is it only a certain 'SLEPIC' (whatever that means) related category of issues ? Do you know if the conversations I had with @UtahDave that feels like about a year or so ago but was less in reality, it was actually as "recent" as in the runn-up to releasing 2015.8 with jinja2 winrepo-ng support he was thinking at the time about starting a 'proper' discussion on the future of winrepo-ng and how to add some of the missing pieces etc etc. Is this conversation ever going to actually happen ...? |
@damon-atkins sorry but I can't follow your logic understanding why you want to or need to remove the version numbers from the windows pkg_fullname anywhere. can you explain to me why you think that would be good or what you hope (or need to) gain by this? |
@TheBigBear Git hub started doing epics so I have been trying it out. To keep my epics from getting lost in the other epics, I prefixed all mine with SL (Shane Lee), hence the SLEPIC. Yeah, I'm trying to group together all the issues. It just seems they keep coming in and I don't want to lose them between now and the time I can actually start working winrepo again. |
@twangboy so should I add mine to this list or keep a list of my own ones and at the right time point you to it, or do one link here to my list on winrepo issues ? what would you prefer? |
@TheBigBear That would be great. Hopefully we can address as much as possible. As far as a time frame here, we will be talking to our project manager to get a handle on priorities and a roadmap. The trick is going to be implementing new features without breaking it for older minions. I don't want to have to create a salt-winrepo-ng-v2. :) |
please, no, not salt-winrepo-ng-v2! 😛 |
Version are not required as part of the application name, because they are an attribute not the title. There are a few exceptions such as C++ runtime... As per unix you do not place the version in the name, its an attribute of what version you want to install. |
Oh! I just installed the zenhub.io extension for Chrome. Now I get the epic thing. Nifty! |
@eliasp I can see that this would work where the package display name stays the same on upgrade, but if the name changes isn't it going to be seen as a completely different application? I think where installers are known to be inconstant there needs some more generic way of identifying them, maybe options to regex match the name and version, as well as yield control of it? I installed an Adobe Air application today and the version number of the underlying MSI package actually went backwards on upgrade... |
I agree and understand, but it might be a tad early to promise that, I think. |
@TheBigBear We are want to avoid a v2. Everything that happens within the .sls file must be compatible with win_pkg as it stands now. |
Sorry to add to the pile, but I think I found the issue that made the version number go backwards... |
So the code I have written is different, but works with existing, as long as you do not manage the same item with both. The only way to solve the problems with existing is to change it...... e.g. You should not have to edit the file every-time a new version of the software comes out. This is the number 1 priority of the code I am writing. esp. salt/http/etc source has a version number. |
#35943 |
@damon-atkins @morganwillcock "You should not have to edit the file every-time a new version of the software comes out." Exactly! I love the local cache idea/option documented as well. We actually do that here without using salt (we have our own scripts that automatically detect and download the latest versions of windows programs). So we are just starting with saltstack here (we are on the 2016.3.4). It seems that to automate this completely with 2016.3.4 we need to take our downloaded local/cache file://application.msi path, update the application.sls with the corrected local location then run salt '*' pkg.refresh_db. My gut to achieve this for each .sls would be to use simple bash scripting, but I suspect there's a better way that would help other salt users accomplish the same (or perhaps not?). We are very interested in learning how we can help with salt/winrepo to achieve this... |
What I was hoping to do is have a slp (Salt Package) file. The file describes how to install the software but also describes how to download it to the salt master (or maybe something else) This is on the TODO list. Because direct download from the internet onto server is not really best practice and the github sls all do this. And so makes it a bit hard to use the sls "as is". Currently the sls files are processed once as a template before creating winrepo. The slp file is effectively stored as a mini template within the winrepo (not template processed first like sls), and when a install or remove is action the version string is provided and the mini template is process on the fly to generate the final yaml optionally using the version passed from pkg.install. So no need to list every version in the file. When the refresh_db it does process the slp as a template but only to check that the slp file is valid with a fake version string (if valid its added to the winrepo [different structure to the existing sls files so they can exist at the same time]) Also does not need a sls or slp definition to give a consistent package name between versions. Also pkg.list_pkgs output is more like yum version of pkg.list_pkgs, and supports software reporting of software installed by users . It also detects more software and removes the existing hard coded ignoring of few software titles and also tries to detect the installer software (e.g. msi, install shield, etc) I spent a lot of time working out how the software is recorded in the registry and looking at how different installers set values in the registry. (It's painful) Some of the recent change I did in 2016.11 release was to allow this code to be added with small change to existing code. So that merging forward changes for 2016.11 releases would still be possible and clean. Need to find the time to merge it into the 2016.11 code which is structure different to previous release I developed the code for. It's a very very large change I suspect it will be a year before it makes it into a release as anything other than experimental. Assume saltstack accepts the code. |
Some of the above has changed. |
Can auto detect/scan available version of software from http/https/ftp/salt:// sources |
Description of Issue/Question
There are many issues that need to be addressed in winrepo
.msp
file when installing an.msi
Also look at overriding from a state file: saltstack/salt-winrepo#813 (comment)
Option to remove out of date software (previous versions)
saltstack/salt-winrepo-ng#398
saltstack/salt-winrepo-ng#350
saltstack/salt-winrepo-ng#336
saltstack/salt-winrepo-ng#144
The text was updated successfully, but these errors were encountered: