mirror of
https://github.com/saltstack/salt.git
synced 2025-04-15 17:20:19 +00:00
Merge branch '3007.x' of github.com:saltstack/salt into hotfix/merge-forward-into-3007.x
This commit is contained in:
commit
15f9f585f0
20 changed files with 129 additions and 65 deletions
1
changelog/66260.fixed.md
Normal file
1
changelog/66260.fixed.md
Normal file
|
@ -0,0 +1 @@
|
|||
Fixed `aptpkg.remove` "unable to locate package" error for non-existent package
|
|
@ -250,11 +250,9 @@ IMCAC - Immediate Custom Action - It's immediate
|
|||
<DirectoryRef Id="TARGETDIR">
|
||||
<!-- Visual C++ runtimes depend on the target platform -->
|
||||
<?if $(var.WIN64)=yes ?>
|
||||
<Merge Id="MSM_VC120_CRT" SourceFile="$(var.WEBCACHE_DIR)\Microsoft_VC120_CRT_x64.msm" DiskId="1" Language="0" />
|
||||
<Merge Id="MSM_VC140_CRT" SourceFile="$(var.WEBCACHE_DIR)\Microsoft_VC140_CRT_x64.msm" DiskId="1" Language="0" />
|
||||
<Merge Id="MSM_VC143_CRT" SourceFile="$(var.WEBCACHE_DIR)\Microsoft_VC143_CRT_x64.msm" DiskId="1" Language="0" />
|
||||
<?else ?>
|
||||
<Merge Id="MSM_VC120_CRT" SourceFile="$(var.WEBCACHE_DIR)\Microsoft_VC120_CRT_x86.msm" DiskId="1" Language="0" />
|
||||
<Merge Id="MSM_VC140_CRT" SourceFile="$(var.WEBCACHE_DIR)\Microsoft_VC140_CRT_x86.msm" DiskId="1" Language="0" />
|
||||
<Merge Id="MSM_VC143_CRT" SourceFile="$(var.WEBCACHE_DIR)\Microsoft_VC143_CRT_x86.msm" DiskId="1" Language="0" />
|
||||
<?endif ?>
|
||||
</DirectoryRef>
|
||||
<!-- Add INSTALLDIR to the system Path -->
|
||||
|
@ -269,8 +267,7 @@ IMCAC - Immediate Custom Action - It's immediate
|
|||
<!-- Leaving registry keys would mean the product is still installed -->
|
||||
<Feature Id="ProductFeature" Title="Minion" Level="1">
|
||||
<ComponentGroupRef Id="ProductComponents" />
|
||||
<Feature Id="VC120" Title="VC++ 2013" AllowAdvertise="no" Display="hidden"><MergeRef Id="MSM_VC120_CRT" /></Feature>
|
||||
<Feature Id="VC140" Title="VC++ 2015" AllowAdvertise="no" Display="hidden"><MergeRef Id="MSM_VC140_CRT" /></Feature>
|
||||
<Feature Id="VC143" Title="VC++ 2022" AllowAdvertise="no" Display="hidden"><MergeRef Id="MSM_VC143_CRT" /></Feature>
|
||||
</Feature>
|
||||
|
||||
<!-- Get the config file template from the msi store only if no config is present -->
|
||||
|
|
|
@ -10,10 +10,8 @@ You need
|
|||
- .Net 3.5 SDK (for WiX)<sup>*</sup>
|
||||
- [Wix 3](http://wixtoolset.org/releases/)<sup>**</sup>
|
||||
- [Build tools 2015](https://www.microsoft.com/en-US/download/confirmation.aspx?id=48159)<sup>**</sup>
|
||||
- Microsoft_VC140_CRT_x64.msm from Visual Studio 2015<sup>**</sup>
|
||||
- Microsoft_VC140_CRT_x86.msm from Visual Studio 2015<sup>**</sup>
|
||||
- Microsoft_VC120_CRT_x64.msm from Visual Studio 2013<sup>**</sup>
|
||||
- Microsoft_VC120_CRT_x86.msm from Visual Studio 2013<sup>**</sup>
|
||||
- Microsoft_VC143_CRT_x64.msm from Visual Studio 2015<sup>**</sup>
|
||||
- Microsoft_VC143_CRT_x86.msm from Visual Studio 2015<sup>**</sup>
|
||||
|
||||
Notes:
|
||||
- <sup>*</sup> `build.cmd` will open `optionalfeatures` if necessary.
|
||||
|
|
|
@ -51,11 +51,14 @@ function VerifyOrDownload ($local_file, $URL, $SHA256) {
|
|||
$filename = Split-Path $local_file -leaf
|
||||
if ( Test-Path -Path $local_file ) {
|
||||
Write-Host "Verifying hash for $filename`: " -NoNewline
|
||||
if ( (Get-FileHash $local_file).Hash -eq $SHA256 ) {
|
||||
$hash = (Get-FileHash $local_file).Hash
|
||||
if ( $hash -eq $SHA256 ) {
|
||||
Write-Result "Verified" -ForegroundColor Green
|
||||
return
|
||||
} else {
|
||||
Write-Result "Failed Hash" -ForegroundColor Red
|
||||
Write-Host "Found Hash: $hash"
|
||||
Write-Host "Expected Hash: $SHA256"
|
||||
Remove-Item -Path $local_file -Force
|
||||
}
|
||||
}
|
||||
|
@ -161,10 +164,8 @@ if ( ! "$env:WIX" ) {
|
|||
#-------------------------------------------------------------------------------
|
||||
|
||||
$RUNTIMES = @(
|
||||
("Microsoft_VC120_CRT_x64.msm", "64", "15FD10A495287505184B8913DF8D6A9CA461F44F78BC74115A0C14A5EDD1C9A7"),
|
||||
("Microsoft_VC120_CRT_x86.msm", "32", "26340B393F52888B908AC3E67B935A80D390E1728A31FF38EBCEC01117EB2579"),
|
||||
("Microsoft_VC140_CRT_x64.msm", "64", "E1344D5943FB2BBB7A56470ED0B7E2B9B212CD9210D3CC6FA82BC3DA8F11EDA8"),
|
||||
("Microsoft_VC140_CRT_x86.msm", "32", "0D36CFE6E9ABD7F530DBAA4A83841CDBEF9B2ADCB625614AF18208FDCD6B92A4")
|
||||
("Microsoft_VC143_CRT_x64.msm", "64", "F209B8906063A79B0DFFBB55D3C20AC0A676252DD4F5377CFCD148C409C859EC"),
|
||||
("Microsoft_VC143_CRT_x86.msm", "32", "B187BD73C7DC0BA353C5D3A6D9D4E63EF72435F8E68273466F30E5496C1A86F7")
|
||||
)
|
||||
$RUNTIMES | ForEach-Object {
|
||||
$name, $arch, $hash = $_
|
||||
|
|
|
@ -602,9 +602,9 @@ Section -install_ucrt
|
|||
SectionEnd
|
||||
|
||||
|
||||
# Check and install Visual C++ redist 2013 packages
|
||||
# Check and install Visual C++ redist 2022 packages
|
||||
# Hidden section (-) to install VCRedist
|
||||
Section -install_vcredist_2013
|
||||
Section -install_vcredist_2022
|
||||
|
||||
Var /GLOBAL VcRedistName
|
||||
Var /GLOBAL VcRedistReg
|
||||
|
@ -613,11 +613,11 @@ Section -install_vcredist_2013
|
|||
# Use RunningX64 here to get the Architecture for the system running the
|
||||
# installer.
|
||||
${If} ${RunningX64}
|
||||
StrCpy $VcRedistName "vcredist_x64_2013"
|
||||
StrCpy $VcRedistReg "SOFTWARE\WOW6432Node\Microsoft\VisualStudio\12.0\VC\Runtimes\x64"
|
||||
StrCpy $VcRedistName "vcredist_x64_2022"
|
||||
StrCpy $VcRedistReg "SOFTWARE\WOW6432Node\Microsoft\VisualStudio\14.0\VC\Runtimes\x64"
|
||||
${Else}
|
||||
StrCpy $VcRedistName "vcredist_x86_2013"
|
||||
StrCpy $VcRedistReg "SOFTWARE\Microsoft\VisualStudio\12.0\VC\Runtimes\x86"
|
||||
StrCpy $VcRedistName "vcredist_x86_2022"
|
||||
StrCpy $VcRedistReg "SOFTWARE\Microsoft\VisualStudio\14.0\VC\Runtimes\x86"
|
||||
${EndIf}
|
||||
|
||||
# Detecting VCRedist Installation
|
||||
|
|
|
@ -70,10 +70,8 @@ $directories | ForEach-Object {
|
|||
# Create binaries
|
||||
#-------------------------------------------------------------------------------
|
||||
|
||||
$prereq_files = "vcredist_x86_2013.exe",
|
||||
"vcredist_x64_2013.exe",
|
||||
"ucrt_x86.zip",
|
||||
"ucrt_x64.zip"
|
||||
$prereq_files = "vcredist_x86_2022.exe",
|
||||
"vcredist_x64_2022.exe",
|
||||
$prereq_files | ForEach-Object {
|
||||
Write-Host "Creating $_`: " -NoNewline
|
||||
Set-Content -Path "$PREREQS_DIR\$_" -Value "binary"
|
||||
|
|
|
@ -183,21 +183,10 @@ $scripts | ForEach-Object {
|
|||
}
|
||||
}
|
||||
|
||||
# Copy VCRedist 2013 to the prereqs directory
|
||||
# Copy VCRedist 2022 to the prereqs directory
|
||||
New-Item -Path $PREREQ_DIR -ItemType Directory | Out-Null
|
||||
Write-Host "Copying VCRedist 2013 $ARCH_X to prereqs: " -NoNewline
|
||||
$file = "vcredist_$ARCH_X`_2013.exe"
|
||||
Invoke-WebRequest -Uri "$SALT_DEP_URL/$file" -OutFile "$PREREQ_DIR\$file"
|
||||
if ( Test-Path -Path "$PREREQ_DIR\$file" ) {
|
||||
Write-Result "Success" -ForegroundColor Green
|
||||
} else {
|
||||
Write-Result "Failed" -ForegroundColor Red
|
||||
exit 1
|
||||
}
|
||||
|
||||
# Copy Universal C Runtimes to the prereqs directory
|
||||
Write-Host "Copying Universal C Runtimes $ARCH_X to prereqs: " -NoNewline
|
||||
$file = "ucrt_$ARCH_X.zip"
|
||||
Write-Host "Copying VCRedist 2022 $ARCH_X to prereqs: " -NoNewline
|
||||
$file = "vcredist_$ARCH_X`_2022.exe"
|
||||
Invoke-WebRequest -Uri "$SALT_DEP_URL/$file" -OutFile "$PREREQ_DIR\$file"
|
||||
if ( Test-Path -Path "$PREREQ_DIR\$file" ) {
|
||||
Write-Result "Success" -ForegroundColor Green
|
||||
|
|
|
@ -30,10 +30,11 @@ cryptography>=42.0.0
|
|||
rpm-vercmp; sys_platform == 'linux'
|
||||
|
||||
# From old windows.txt requirements file
|
||||
pywin32>=305; sys_platform == 'win32'
|
||||
wmi>=1.5.1; sys_platform == 'win32'
|
||||
pythonnet>=3.0.1; sys_platform == 'win32'
|
||||
gitpython>=3.1.37; sys_platform == 'win32'
|
||||
lxml>=4.6.3; sys_platform == 'win32'
|
||||
pymssql>=2.2.1; sys_platform == 'win32'
|
||||
pymysql>=1.0.2; sys_platform == 'win32'
|
||||
lxml>=4.6.3; sys_platform == 'win32'
|
||||
pythonnet>=3.0.1; sys_platform == 'win32'
|
||||
pywin32>=305; sys_platform == 'win32'
|
||||
wmi>=1.5.1; sys_platform == 'win32'
|
||||
xmltodict>=0.13.0; sys_platform == 'win32'
|
||||
|
|
|
@ -138,9 +138,14 @@ genshi==0.7.7
|
|||
geomet==0.2.1.post1
|
||||
# via cassandra-driver
|
||||
gitdb==4.0.11
|
||||
# via gitpython
|
||||
gitpython==3.1.41
|
||||
# via -r requirements/static/ci/common.in
|
||||
# via
|
||||
# -c requirements/static/ci/../pkg/py3.10/windows.txt
|
||||
# gitpython
|
||||
gitpython==3.1.42 ; sys_platform == "win32"
|
||||
# via
|
||||
# -c requirements/static/ci/../pkg/py3.10/windows.txt
|
||||
# -r requirements/base.txt
|
||||
# -r requirements/static/ci/common.in
|
||||
google-auth==2.27.0
|
||||
# via kubernetes
|
||||
idna==3.4
|
||||
|
@ -439,7 +444,9 @@ six==1.15.0
|
|||
# textfsm
|
||||
# websocket-client
|
||||
smmap==5.0.1
|
||||
# via gitdb
|
||||
# via
|
||||
# -c requirements/static/ci/../pkg/py3.10/windows.txt
|
||||
# gitdb
|
||||
sqlparse==0.4.4
|
||||
# via -r requirements/static/ci/common.in
|
||||
strict-rfc3339==0.7
|
||||
|
|
|
@ -135,9 +135,14 @@ genshi==0.7.7
|
|||
geomet==0.2.1.post1
|
||||
# via cassandra-driver
|
||||
gitdb==4.0.11
|
||||
# via gitpython
|
||||
gitpython==3.1.41
|
||||
# via -r requirements/static/ci/common.in
|
||||
# via
|
||||
# -c requirements/static/ci/../pkg/py3.11/windows.txt
|
||||
# gitpython
|
||||
gitpython==3.1.42 ; sys_platform == "win32"
|
||||
# via
|
||||
# -c requirements/static/ci/../pkg/py3.11/windows.txt
|
||||
# -r requirements/base.txt
|
||||
# -r requirements/static/ci/common.in
|
||||
google-auth==2.27.0
|
||||
# via kubernetes
|
||||
idna==3.4
|
||||
|
@ -440,7 +445,9 @@ six==1.15.0
|
|||
# textfsm
|
||||
# websocket-client
|
||||
smmap==5.0.1
|
||||
# via gitdb
|
||||
# via
|
||||
# -c requirements/static/ci/../pkg/py3.11/windows.txt
|
||||
# gitdb
|
||||
sqlparse==0.4.4
|
||||
# via -r requirements/static/ci/common.in
|
||||
strict-rfc3339==0.7
|
||||
|
|
|
@ -135,9 +135,14 @@ genshi==0.7.7
|
|||
geomet==0.2.1.post1
|
||||
# via cassandra-driver
|
||||
gitdb==4.0.11
|
||||
# via gitpython
|
||||
gitpython==3.1.41
|
||||
# via -r requirements/static/ci/common.in
|
||||
# via
|
||||
# -c requirements/static/ci/../pkg/py3.12/windows.txt
|
||||
# gitpython
|
||||
gitpython==3.1.42 ; sys_platform == "win32"
|
||||
# via
|
||||
# -c requirements/static/ci/../pkg/py3.12/windows.txt
|
||||
# -r requirements/base.txt
|
||||
# -r requirements/static/ci/common.in
|
||||
google-auth==2.27.0
|
||||
# via kubernetes
|
||||
idna==3.4
|
||||
|
@ -440,7 +445,9 @@ six==1.15.0
|
|||
# textfsm
|
||||
# websocket-client
|
||||
smmap==5.0.1
|
||||
# via gitdb
|
||||
# via
|
||||
# -c requirements/static/ci/../pkg/py3.12/windows.txt
|
||||
# gitdb
|
||||
sqlparse==0.4.4
|
||||
# via -r requirements/static/ci/common.in
|
||||
strict-rfc3339==0.7
|
||||
|
|
|
@ -138,9 +138,14 @@ genshi==0.7.7
|
|||
geomet==0.2.1.post1
|
||||
# via cassandra-driver
|
||||
gitdb==4.0.11
|
||||
# via gitpython
|
||||
gitpython==3.1.41
|
||||
# via -r requirements/static/ci/common.in
|
||||
# via
|
||||
# -c requirements/static/ci/../pkg/py3.8/windows.txt
|
||||
# gitpython
|
||||
gitpython==3.1.42 ; sys_platform == "win32"
|
||||
# via
|
||||
# -c requirements/static/ci/../pkg/py3.8/windows.txt
|
||||
# -r requirements/base.txt
|
||||
# -r requirements/static/ci/common.in
|
||||
google-auth==2.27.0
|
||||
# via kubernetes
|
||||
idna==3.4
|
||||
|
@ -444,7 +449,9 @@ six==1.15.0
|
|||
# textfsm
|
||||
# websocket-client
|
||||
smmap==5.0.1
|
||||
# via gitdb
|
||||
# via
|
||||
# -c requirements/static/ci/../pkg/py3.8/windows.txt
|
||||
# gitdb
|
||||
sqlparse==0.4.4
|
||||
# via -r requirements/static/ci/common.in
|
||||
strict-rfc3339==0.7
|
||||
|
|
|
@ -138,9 +138,14 @@ genshi==0.7.7
|
|||
geomet==0.2.1.post1
|
||||
# via cassandra-driver
|
||||
gitdb==4.0.11
|
||||
# via gitpython
|
||||
gitpython==3.1.41
|
||||
# via -r requirements/static/ci/common.in
|
||||
# via
|
||||
# -c requirements/static/ci/../pkg/py3.9/windows.txt
|
||||
# gitpython
|
||||
gitpython==3.1.42 ; sys_platform == "win32"
|
||||
# via
|
||||
# -c requirements/static/ci/../pkg/py3.9/windows.txt
|
||||
# -r requirements/base.txt
|
||||
# -r requirements/static/ci/common.in
|
||||
google-auth==2.27.0
|
||||
# via kubernetes
|
||||
idna==3.4
|
||||
|
@ -440,7 +445,9 @@ six==1.15.0
|
|||
# textfsm
|
||||
# websocket-client
|
||||
smmap==5.0.1
|
||||
# via gitdb
|
||||
# via
|
||||
# -c requirements/static/ci/../pkg/py3.9/windows.txt
|
||||
# gitdb
|
||||
sqlparse==0.4.4
|
||||
# via -r requirements/static/ci/common.in
|
||||
strict-rfc3339==0.7
|
||||
|
|
|
@ -40,6 +40,10 @@ frozenlist==1.4.1
|
|||
# via
|
||||
# aiohttp
|
||||
# aiosignal
|
||||
gitdb==4.0.11
|
||||
# via gitpython
|
||||
gitpython==3.1.42 ; sys_platform == "win32"
|
||||
# via -r requirements/base.txt
|
||||
idna==3.4
|
||||
# via
|
||||
# requests
|
||||
|
@ -125,6 +129,8 @@ setproctitle==1.3.2
|
|||
# via -r requirements/base.txt
|
||||
six==1.15.0
|
||||
# via python-dateutil
|
||||
smmap==5.0.1
|
||||
# via gitdb
|
||||
tempora==5.3.0
|
||||
# via portend
|
||||
timelib==0.3.0
|
||||
|
|
|
@ -40,6 +40,10 @@ frozenlist==1.4.1
|
|||
# via
|
||||
# aiohttp
|
||||
# aiosignal
|
||||
gitdb==4.0.11
|
||||
# via gitpython
|
||||
gitpython==3.1.42 ; sys_platform == "win32"
|
||||
# via -r requirements/base.txt
|
||||
idna==3.4
|
||||
# via
|
||||
# requests
|
||||
|
@ -127,6 +131,8 @@ setproctitle==1.3.2
|
|||
# via -r requirements/base.txt
|
||||
six==1.15.0
|
||||
# via python-dateutil
|
||||
smmap==5.0.1
|
||||
# via gitdb
|
||||
tempora==5.3.0
|
||||
# via portend
|
||||
timelib==0.3.0
|
||||
|
|
|
@ -40,6 +40,10 @@ frozenlist==1.4.1
|
|||
# via
|
||||
# aiohttp
|
||||
# aiosignal
|
||||
gitdb==4.0.11
|
||||
# via gitpython
|
||||
gitpython==3.1.42 ; sys_platform == "win32"
|
||||
# via -r requirements/base.txt
|
||||
idna==3.4
|
||||
# via
|
||||
# requests
|
||||
|
@ -127,6 +131,8 @@ setproctitle==1.3.2
|
|||
# via -r requirements/base.txt
|
||||
six==1.15.0
|
||||
# via python-dateutil
|
||||
smmap==5.0.1
|
||||
# via gitdb
|
||||
tempora==5.3.0
|
||||
# via portend
|
||||
timelib==0.3.0
|
||||
|
|
|
@ -40,6 +40,10 @@ frozenlist==1.4.1
|
|||
# via
|
||||
# aiohttp
|
||||
# aiosignal
|
||||
gitdb==4.0.11
|
||||
# via gitpython
|
||||
gitpython==3.1.42 ; sys_platform == "win32"
|
||||
# via -r requirements/base.txt
|
||||
idna==3.4
|
||||
# via
|
||||
# requests
|
||||
|
@ -128,6 +132,8 @@ setproctitle==1.3.2
|
|||
# via -r requirements/base.txt
|
||||
six==1.15.0
|
||||
# via python-dateutil
|
||||
smmap==5.0.1
|
||||
# via gitdb
|
||||
tempora==5.3.0
|
||||
# via portend
|
||||
timelib==0.3.0
|
||||
|
|
|
@ -40,6 +40,10 @@ frozenlist==1.4.1
|
|||
# via
|
||||
# aiohttp
|
||||
# aiosignal
|
||||
gitdb==4.0.11
|
||||
# via gitpython
|
||||
gitpython==3.1.42 ; sys_platform == "win32"
|
||||
# via -r requirements/base.txt
|
||||
idna==3.4
|
||||
# via
|
||||
# requests
|
||||
|
@ -126,6 +130,8 @@ setproctitle==1.3.2
|
|||
# via -r requirements/base.txt
|
||||
six==1.15.0
|
||||
# via python-dateutil
|
||||
smmap==5.0.1
|
||||
# via gitdb
|
||||
tempora==5.3.0
|
||||
# via portend
|
||||
timelib==0.3.0
|
||||
|
|
|
@ -1071,9 +1071,17 @@ def _uninstall(action="remove", name=None, pkgs=None, **kwargs):
|
|||
|
||||
old = list_pkgs()
|
||||
old_removed = list_pkgs(removed=True)
|
||||
targets = salt.utils.pkg.match_wildcard(old, pkg_params)
|
||||
targets = [
|
||||
_pkg for _pkg in salt.utils.pkg.match_wildcard(old, pkg_params) if _pkg in old
|
||||
]
|
||||
if action == "purge":
|
||||
targets.update(salt.utils.pkg.match_wildcard(old_removed, pkg_params))
|
||||
targets.extend(
|
||||
[
|
||||
_pkg
|
||||
for _pkg in salt.utils.pkg.match_wildcard(old_removed, pkg_params)
|
||||
if _pkg in old_removed
|
||||
]
|
||||
)
|
||||
if not targets:
|
||||
return {}
|
||||
cmd = ["apt-get", "-q", "-y", action]
|
||||
|
|
|
@ -398,3 +398,9 @@ def test_aptpkg_remove_wildcard():
|
|||
assert ret["nginx-light"]["old"]
|
||||
assert not ret["nginx-doc"]["new"]
|
||||
assert ret["nginx-doc"]["old"]
|
||||
|
||||
|
||||
@pytest.mark.skip_if_not_root
|
||||
def test_aptpkg_remove_unknown_package():
|
||||
ret = aptpkg.remove(name="thispackageistotallynotthere")
|
||||
assert not ret
|
||||
|
|
Loading…
Add table
Reference in a new issue