-
Notifications
You must be signed in to change notification settings - Fork 7.6k
Make Linux package universal. #15109
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 8000 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
Co-authored-by: Aditya Patwardhan <adityap@microsoft.com>
🎉 Handy links: |
[7.2.0-preview.5] - 2021-04-14 * Breaking Changes - Make PowerShell Linux deb and RPM packages u 8000 niversal (#15109) - Enforce AppLocker Deny configuration before Execution Policy Bypass configuration (#15035) - Disallow mixed dash and slash in command line parameter prefix (#15142) (Thanks @davidBar-On!) * Experimental Features - `PSNativeCommandArgumentPassing`: Use `ArgumentList` for native executable invocation (breaking change) (#14692) * Engine Updates and Fixes - Add `IArgumentCompleterFactory` for parameterized `ArgumentCompleters` (#12605) (Thanks @powercode!) * General Cmdlet Updates and Fixes - Fix SSH remoting connection never finishing with misconfigured endpoint (#15175) - Respect `TERM` and `NO_COLOR` environment variables for `$PSStyle` rendering (#14969) - Use `ProgressView.Classic` when Virtual Terminal is not supported (#15048) - Fix `Get-Counter` issue with `-Computer` parameter (#15166) (Thanks @krishnayalavarthi!) - Fix redundant iteration while splitting lines (#14851) (Thanks @hez2010!) - Enhance `Remove-Item -Recurse` to work with OneDrive (#14902) (Thanks @iSazonov!) - Change minimum depth to 0 for `ConvertTo-Json` (#14830) (Thanks @kvprasoon!) - Allow `Set-Clipboard` to accept empty string (#14579) - Turn on and off `DECCKM` to modify keyboard mode for Unix native commands to work correctly (#14943) - Fall back to `CopyAndDelete()` when `MoveTo()` fails due to an `IOException` (#15077) * Code Cleanup <details> <summary> <p>We thank the following contributors!</p> <p>@xtqqczze, @iSazonov, @ZhiZe-ZG</p> </summary> <ul> <li>Update .NET to <code>6.0.0-preview.3</code> (#15221)</li> <li>Add space before comma to hosting test to fix error reported by <code>SA1001</code> (#15224)</li> <li>Add <code>SecureStringHelper.FromPlainTextString</code> helper method for efficient secure string creation (#14124) (Thanks @xtqqczze!)</li> <li>Use static lambda keyword (#15154) (Thanks @iSazonov!)</li> <li>Remove unnecessary <code>Array</code> -> <code>List</code> -> <code>Array</code> conversion in <code>ProcessBaseCommand.AllProcesses</code> (#15052) (Thanks @xtqqczze!)</li> <li>Standardize grammar comments in Parser.cs (#15114) (Thanks @ZhiZe-ZG!)</li> <li>Enable <code>SA1001</code>: Commas should be spaced correctly (#14171) (Thanks @xtqqczze!)</li> <li>Refactor <code>MultipleServiceCommandBase.AllServices</code> (#15053) (Thanks @xtqqczze!)</li> </ul> </details> * Tools - Use Unix line endings for shell scripts (#15180) (Thanks @xtqqczze!) * Tests - Add the missing tag in Host Utilities tests (#14983) - Update `copy-props` version in `package.json` (#15124) * Build and Packaging Improvements <details> <summary> <p>We thank the following contributors!</p> <p>@JustinGrote</p> </summary> <ul> <li>Fix <code>yarn-lock</code> for <code>copy-props</code> (#15225)</li> <li>Make package validation regex accept universal Linux packages (#15226)</li> <li>Bump NJsonSchema from 10.4.0 to 10.4.1 (#15190)</li> <li>Make MSI and EXE signing always copy to fix daily build (#15191)</li> <li>Sign internals of EXE package so that it works correctly when signed (#15132)</li> <li>Bump Microsoft.NET.Test.Sdk from 16.9.1 to 16.9.4 (#15141)</li> <li>Update daily release tag format to work with new Microsoft Update work (#15164)</li> <li>Feature: Add Ubuntu 20.04 Support to install-powershell.sh (#15095) (Thanks @JustinGrote!)</li> <li>Treat rebuild branches like release branches (#15099)</li> <li>Update WiX to 3.11.2 (#15097)</li> <li>Bump NJsonSchema from 10.3.11 to 10.4.0 (#15092)</li> <li>Allow patching of preview releases (#15074)</li> <li>Bump Newtonsoft.Json from 12.0.3 to 13.0.1 (#15084, #15085)</li> <li>Update the <code>minSize</code> build package filter to be explicit (#15055)</li> <li>Bump NJsonSchema from 10.3.10 to 10.3.11 (#14965)</li> </ul> </details> * Documentation and Help Content - Merge `7.2.0-preview.4` changes to master (#15056) - Update `README` and `metadata.json` (#15046) - Fix broken links for `dotnet` CLI (#14937) [7.2.0-preview.5]: v7.2.0-preview.4...v7.2.0-preview.5
As a package maintainer, I'd like to lodge my dissent with making files (or symlinks, or permission changes) in postinst scripts. They can't be properly removed, the package manager doesn't know about them, and generally they circumvent the OS's mechanism for handling packaged data. 😄 |
Perhaps @heaths has thoughts how improve this. |
@DHowett Please open an issue. This objection needs to be reviewed. As these symlinks are for a feature that eventually will no longer work, my proposal would be to just remove the links, but that breaks that feature for everyone. Another alternative, to maintain compatibility, is to make a second package which this package has as an optional dependency on. |
Is this question in response to tools/packaging/packaging.strings.psd1? As for build scripts, I see no problems with that and changes should be isolated (i.e. don't mess with the host outside of the build directory), but if in relation to the aforementioned file I really don't know. All I can say is that I don't see symlinking other packages' files by scripts that don't own them. Seems wrong to mess with another system like that - like in the old days before SFC on Windows when third-parties would replace Windows' bits. |
@heaths I don't think this is the same as replacing windows bits. We are symlinking other packages INTO our folder, not the other way around. |
That's not true, the "universal" Linux build they have provided you are linked to the following OpenSSL libs
These are not absolute paths but library names that the loader checks in the various library paths on the host. You can see that in the following snippet, note I don't have OpenSSL 1.0.x installed and deleted the symlinks to show you what actual linked name so
Typically these libraries are just picked up in the normal load path like
But with the exception of EL7, which I go into below, you don't need the symlinks at all as
In a normal situation you should just be picking up these libraries as they are installed, this actually works just fine if you have OpenSSL 1.0.x installed with only 2 caveats
The other issue is that the PowerShell package for newer distributions have a symlink to point So ultimately what I think should happen is
I also think you should be consuming the newer releases from the omi repo where that team has actually provided an official "universal" OpenSSL 1.1.x build which you can use on newer distributions that don't ship OpenSSL 1.0.x (read mostly all of them). It also means that patched macOS is another problem and there's not much you can do there without recompling your own version of |
@jborean93 This issue is not to improve As for resolving this, I'll open a new issue for resolving creating the symlinks in the postscript. Thinking about it, I think the best approach is separate packages with the symlink. |
I would love to resolve the libmi but I know the team doesn’t want to look into it. My posts are talking about the issues with how the current libmi is packaged. The package has symlinks which is not needed all the time (only EL7). The package symlinks point to OpenSSL 1.1.x which causes seg faults in PowerShell whenever you try to use any of the TLS components in libmi. How is that not related to the packaging components and thus this PR. there are comments asking why things are done the way they are, I’m explaining the problem and why the existing packaging setup is wrong and giving possible fixes for it. I can’t really raise the PR myself because there are a lot of internal moving parts in the packaging process so my comments are a way of trying to stress what is wrong and hopefully illustrate what could be done to solve it. |
@jborean93 How about making the Please see the discussion topic #15310, and let's discuss the feasibility there. |
PR Summary
Make Linux package universal.
NON-GOAL: Improve libmi support.
PR Context
PR Checklist
.h
,.cpp
,.cs
,.ps1
and.psm1
files have the correct copyright headerWIP:
or[ WIP ]
to the beginning of the title (theWIP
bot will keep its status check atPending
while the prefix is present) and remove the prefix when the PR is ready.(which runs in a different PS Host).