mirror of
https://github.com/saltstack/salt.git
synced 2025-04-16 09:40:20 +00:00
Update urls to deps so windows pkgs will build
This commit is contained in:
parent
a5594e7bd2
commit
c4a1a6eeba
5 changed files with 4 additions and 234 deletions
|
@ -176,13 +176,10 @@ $BUILD_DIR = "$SCRIPT_DIR\buildenv"
|
|||
$RELENV_DIR = "${env:LOCALAPPDATA}\relenv"
|
||||
$SYS_PY_BIN = (python -c "import sys; print(sys.executable)")
|
||||
$BLD_PY_BIN = "$BUILD_DIR\Scripts\python.exe"
|
||||
$SALT_DEP_URL = "https://repo.saltproject.io/windows/dependencies"
|
||||
|
||||
if ( $Architecture -eq "x64" ) {
|
||||
$SALT_DEP_URL = "$SALT_DEP_URL/64"
|
||||
$ARCH = "amd64"
|
||||
} else {
|
||||
$SALT_DEP_URL = "$SALT_DEP_URL/32"
|
||||
$ARCH = "x86"
|
||||
}
|
||||
|
||||
|
@ -249,7 +246,7 @@ if ( $env:VIRTUAL_ENV ) {
|
|||
#-------------------------------------------------------------------------------
|
||||
# Installing Relenv
|
||||
#-------------------------------------------------------------------------------
|
||||
Write-Host "Installing Relenv: " -NoNewLine
|
||||
Write-Host "Installing Relenv ($RelenvVersion): " -NoNewLine
|
||||
pip install relenv==$RelenvVersion --disable-pip-version-check | Out-Null
|
||||
$output = pip list --disable-pip-version-check
|
||||
if ("relenv" -in $output.split()) {
|
||||
|
|
|
@ -68,7 +68,7 @@ if ( Test-Path -Path "$check_file" ) {
|
|||
Write-Result "Missing" -ForegroundColor Yellow
|
||||
|
||||
Write-Host "Downloading NSIS: " -NoNewline
|
||||
$url = "$DEPS_URL/nsis-3.03-setup.exe"
|
||||
$url = "$DEPS_URL/nsis-3.10-setup.exe"
|
||||
$file = "$env:TEMP\install_nsis.exe"
|
||||
Invoke-WebRequest -Uri $url -OutFile "$file"
|
||||
if ( Test-Path -Path "$file" ) {
|
||||
|
|
|
@ -81,11 +81,6 @@ $ARCH = $(. $PYTHON_BIN -c "import platform; print(platform.architectur
|
|||
# Script Variables
|
||||
$PROJECT_DIR = $(git rev-parse --show-toplevel)
|
||||
$SALT_DEPS = "$PROJECT_DIR\requirements\static\pkg\py$PY_VERSION\windows.txt"
|
||||
if ( $ARCH -eq "64bit" ) {
|
||||
$SALT_DEP_URL = "https://repo.saltproject.io/windows/dependencies/64"
|
||||
} else {
|
||||
$SALT_DEP_URL = "https://repo.saltproject.io/windows/dependencies/32"
|
||||
}
|
||||
|
||||
if ( ! $SkipInstall ) {
|
||||
#-------------------------------------------------------------------------------
|
||||
|
|
|
@ -65,7 +65,6 @@ if ( $BuildDir ) {
|
|||
$SCRIPTS_DIR = "$BUILD_DIR\Scripts"
|
||||
$BUILD_CONF_DIR = "$BUILD_DIR\configs"
|
||||
$SITE_PKGS_DIR = "$BUILD_DIR\Lib\site-packages"
|
||||
$BUILD_SALT_DIR = "$SITE_PKGS_DIR\salt"
|
||||
$PYTHON_BIN = "$SCRIPTS_DIR\python.exe"
|
||||
$PY_VERSION = [Version]((Get-Command $PYTHON_BIN).FileVersionInfo.ProductVersion)
|
||||
$PY_VERSION = "$($PY_VERSION.Major).$($PY_VERSION.Minor)"
|
||||
|
@ -73,12 +72,10 @@ $ARCH = $(. $PYTHON_BIN -c "import platform; print(platform.architectu
|
|||
|
||||
if ( $ARCH -eq "64bit" ) {
|
||||
$ARCH = "AMD64"
|
||||
$ARCH_X = "x64"
|
||||
$SALT_DEP_URL = "https://github.com/saltstack/salt-windows-deps/raw/refs/heads/main/ssm/64/"
|
||||
$SALT_DEP_URL = "https://github.com/saltstack/salt-windows-deps/raw/refs/heads/main/ssm/64"
|
||||
} else {
|
||||
$ARCH = "x86"
|
||||
$ARCH_X = "x86"
|
||||
$SALT_DEP_URL = "https://github.com/saltstack/salt-windows-deps/raw/refs/heads/main/ssm/32/"
|
||||
$SALT_DEP_URL = "https://github.com/saltstack/salt-windows-deps/raw/refs/heads/main/ssm/32"
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
|
|
|
@ -1,219 +0,0 @@
|
|||
:: ############################################################################
|
||||
::
|
||||
:: FILE: sign.bat
|
||||
::
|
||||
:: DESCRIPTION: Signing and Hashing script for Salt builds on Windows.
|
||||
:: Requires an official Code Signing Certificate and drivers
|
||||
:: installed to sign the files. Generates hashes in MD5 and
|
||||
:: SHA256 in a file of the same name with a `.md5` or
|
||||
:: `.sha256` extension.
|
||||
::
|
||||
:: NOTE: This script is used internally by SaltStack to sign and
|
||||
:: hash Windows Installer builds and uses resources not
|
||||
:: available to the community, such as SaltStack's Code
|
||||
:: Signing Certificate. It is placed here for version
|
||||
:: control.
|
||||
::
|
||||
:: COPYRIGHT: (c) 2012-2018 by the SaltStack Team
|
||||
::
|
||||
:: LICENSE: Apache 2.0
|
||||
:: ORGANIZATION: SaltStack, Inc (saltstack.com)
|
||||
:: CREATED: 2017
|
||||
::
|
||||
:: ############################################################################
|
||||
::
|
||||
:: USAGE: The script must be located in a directory that has the installer
|
||||
:: files in a sub-folder named with the major version, ie: `2018.3`.
|
||||
:: Insert the key fob that contains the code signing certificate. Run
|
||||
:: the script passing the full version: `.\sign.bat 2018.3.1`.
|
||||
::
|
||||
:: The script will sign the installers and generate the corresponding
|
||||
:: hash files. These can then be uploaded to the salt repo.
|
||||
::
|
||||
:: The files must be in the following format:
|
||||
:: <Series>\Salt-Minion-<Version>-<Python Version>-<System Architecture>-Setup.exe
|
||||
:: So, for a Salt Minion installer for 2018.3.1 on AMD64 for Python 3
|
||||
:: file would be placed in a subdirectory named `2018.3` and the file
|
||||
:: would be named: `Salt-Minion-2018.3.1-Py3-AMD64-Setup.exe`. This
|
||||
:: is how the file is created by the NSI Script anyway.
|
||||
::
|
||||
:: You can test the timestamp server with the following command:
|
||||
:: curl -i timestamp.digicert.com/timestamp/health
|
||||
::
|
||||
:: REQUIREMENTS: This script requires the ``signtool.exe`` binary that is a part
|
||||
:: of the Windows SDK. To install just the ``signtool.exe``:
|
||||
::
|
||||
:: OPTION 1:
|
||||
:: 1. Download the Windows 10 SDK ISO:
|
||||
:: https://developer.microsoft.com/en-us/windows/downloads/windows-sdk/
|
||||
:: 2. Mount the ISO and browse to the ``Installers`` directory
|
||||
:: 3. Run the ``Windows SDK Signing Tools-x86_en-us.msi``
|
||||
::
|
||||
:: OPTION 2:
|
||||
:: 1. Download the Visual Studio BUild Tools:
|
||||
:: https://aka.ms/vs/15/release/vs_buildtools.exe
|
||||
:: 2. Run the following command:
|
||||
:: vs_buildtools.exe --quiet --add Microsoft.Component.ClickOnce.MSBuild
|
||||
::
|
||||
:: ############################################################################
|
||||
@ echo off
|
||||
if [%1]==[] (
|
||||
echo You must pass a version
|
||||
goto quit
|
||||
) else (
|
||||
set "Version=%~1"
|
||||
)
|
||||
|
||||
set Series=%Version:~0,4%
|
||||
|
||||
if not exist .\%Series%\ (
|
||||
echo - Series %Series% is not valid
|
||||
exit 1
|
||||
)
|
||||
|
||||
:: Sign Installer Files
|
||||
echo ===========================================================================
|
||||
echo Signing...
|
||||
echo ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
signtool.exe sign /a /t http://timestamp.digicert.com ^
|
||||
"%Series%\Salt-Minion-%Version%-AMD64-Setup.exe" ^
|
||||
"%Series%\Salt-Minion-%Version%-x86-Setup.exe" ^
|
||||
"%Series%\Salt-%Version%-AMD64-Setup.exe" ^
|
||||
"%Series%\Salt-%Version%-x86-Setup.exe" ^
|
||||
"%Series%\Salt-%Version%-Py2-AMD64-Setup.exe" ^
|
||||
"%Series%\Salt-%Version%-Py2-x86-Setup.exe" ^
|
||||
"%Series%\Salt-%Version%-Py3-AMD64-Setup.exe" ^
|
||||
"%Series%\Salt-%Version%-Py3-x86-Setup.exe" ^
|
||||
"%Series%\Salt-Minion-%Version%-Py2-AMD64-Setup.exe" ^
|
||||
"%Series%\Salt-Minion-%Version%-Py2-x86-Setup.exe" ^
|
||||
"%Series%\Salt-Minion-%Version%-Py3-AMD64-Setup.exe" ^
|
||||
"%Series%\Salt-Minion-%Version%-Py3-x86-Setup.exe" ^
|
||||
"%Series%\Salt-Minion-%Version%-Py3-AMD64.msi" ^
|
||||
"%Series%\Salt-Minion-%Version%-Py3-x86.msi"
|
||||
|
||||
echo %ERRORLEVEL%
|
||||
echo ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
echo Signing Complete
|
||||
echo ===========================================================================
|
||||
|
||||
:: Create Hash files
|
||||
echo ===========================================================================
|
||||
echo Creating Hashes...
|
||||
echo ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
set "file_name=Salt-Minion-%Version%-AMD64-Setup.exe"
|
||||
set "file=.\%Series%\%file_name%"
|
||||
if exist "%file%" (
|
||||
echo - %file_name%
|
||||
powershell -c "$hash = (Get-FileHash -Algorithm MD5 \"%file%\").Hash; Out-File -InputObject $hash\" %file_name%\" -FilePath \"%file%.md5\" -NoNewLine -Encoding ASCII"
|
||||
powershell -c "$hash = (Get-FileHash -Algorithm SHA256 \"%file%\").Hash; Out-File -InputObject $hash\" %file_name%\" -FilePath \"%file%.sha256\" -NoNewLine -Encoding ASCII"
|
||||
)
|
||||
|
||||
set "file_name=Salt-Minion-%Version%-x86-Setup.exe"
|
||||
set "file=.\%Series%\%file_name%"
|
||||
if exist "%file%" (
|
||||
echo - %file_name%
|
||||
powershell -c "$hash = (Get-FileHash -Algorithm MD5 \"%file%\").Hash; Out-File -InputObject $hash\" %file_name%\" -FilePath \"%file%.md5\" -NoNewLine -Encoding ASCII"
|
||||
powershell -c "$hash = (Get-FileHash -Algorithm SHA256 \"%file%\").Hash; Out-File -InputObject $hash\" %file_name%\" -FilePath \"%file%.sha256\" -NoNewLine -Encoding ASCII"
|
||||
)
|
||||
|
||||
set "file_name=Salt-%Version%-AMD64-Setup.exe"
|
||||
set "file=.\%Series%\%file_name%"
|
||||
if exist "%file%" (
|
||||
echo - %file_name%
|
||||
powershell -c "$hash = (Get-FileHash -Algorithm MD5 \"%file%\").Hash; Out-File -InputObject $hash\" %file_name%\" -FilePath \"%file%.md5\" -NoNewLine -Encoding ASCII"
|
||||
powershell -c "$hash = (Get-FileHash -Algorithm SHA256 \"%file%\").Hash; Out-File -InputObject $hash\" %file_name%\" -FilePath \"%file%.sha256\" -NoNewLine -Encoding ASCII"
|
||||
)
|
||||
|
||||
set "file_name=Salt-%Version%-x86-Setup.exe"
|
||||
set "file=.\%Series%\%file_name%"
|
||||
if exist "%file%" (
|
||||
echo - %file_name%
|
||||
powershell -c "$hash = (Get-FileHash -Algorithm MD5 \"%file%\").Hash; Out-File -InputObject $hash\" %file_name%\" -FilePath \"%file%.md5\" -NoNewLine -Encoding ASCII"
|
||||
powershell -c "$hash = (Get-FileHash -Algorithm SHA256 \"%file%\").Hash; Out-File -InputObject $hash\" %file_name%\" -FilePath \"%file%.sha256\" -NoNewLine -Encoding ASCII"
|
||||
)
|
||||
|
||||
set "file_name=Salt-%Version%-Py2-AMD64-Setup.exe"
|
||||
set "file=.\%Series%\%file_name%"
|
||||
if exist "%file%" (
|
||||
echo - %file_name%
|
||||
powershell -c "$hash = (Get-FileHash -Algorithm MD5 \"%file%\").Hash; Out-File -InputObject $hash\" %file_name%\" -FilePath \"%file%.md5\" -NoNewLine -Encoding ASCII"
|
||||
powershell -c "$hash = (Get-FileHash -Algorithm SHA256 \"%file%\").Hash; Out-File -InputObject $hash\" %file_name%\" -FilePath \"%file%.sha256\" -NoNewLine -Encoding ASCII"
|
||||
)
|
||||
|
||||
set "file_name=Salt-%Version%-Py2-x86-Setup.exe"
|
||||
set "file=.\%Series%\%file_name%"
|
||||
if exist "%file%" (
|
||||
echo - %file_name%
|
||||
powershell -c "$hash = (Get-FileHash -Algorithm MD5 \"%file%\").Hash; Out-File -InputObject $hash\" %file_name%\" -FilePath \"%file%.md5\" -NoNewLine -Encoding ASCII"
|
||||
powershell -c "$hash = (Get-FileHash -Algorithm SHA256 \"%file%\").Hash; Out-File -InputObject $hash\" %file_name%\" -FilePath \"%file%.sha256\" -NoNewLine -Encoding ASCII"
|
||||
)
|
||||
|
||||
set "file_name=Salt-%Version%-Py3-AMD64-Setup.exe"
|
||||
set "file=.\%Series%\%file_name%"
|
||||
if exist "%file%" (
|
||||
echo - %file_name%
|
||||
powershell -c "$hash = (Get-FileHash -Algorithm MD5 \"%file%\").Hash; Out-File -InputObject $hash\" %file_name%\" -FilePath \"%file%.md5\" -NoNewLine -Encoding ASCII"
|
||||
powershell -c "$hash = (Get-FileHash -Algorithm SHA256 \"%file%\").Hash; Out-File -InputObject $hash\" %file_name%\" -FilePath \"%file%.sha256\" -NoNewLine -Encoding ASCII"
|
||||
)
|
||||
|
||||
set "file_name=Salt-%Version%-Py3-x86-Setup.exe"
|
||||
set "file=.\%Series%\%file_name%"
|
||||
if exist "%file%" (
|
||||
echo - %file_name%
|
||||
powershell -c "$hash = (Get-FileHash -Algorithm MD5 \"%file%\").Hash; Out-File -InputObject $hash\" %file_name%\" -FilePath \"%file%.md5\" -NoNewLine -Encoding ASCII"
|
||||
powershell -c "$hash = (Get-FileHash -Algorithm SHA256 \"%file%\").Hash; Out-File -InputObject $hash\" %file_name%\" -FilePath \"%file%.sha256\" -NoNewLine -Encoding ASCII"
|
||||
)
|
||||
|
||||
set "file_name=Salt-Minion-%Version%-Py2-AMD64-Setup.exe"
|
||||
set "file=.\%Series%\%file_name%"
|
||||
if exist "%file%" (
|
||||
echo - %file_name%
|
||||
powershell -c "$hash = (Get-FileHash -Algorithm MD5 \"%file%\").Hash; Out-File -InputObject $hash\" %file_name%\" -FilePath \"%file%.md5\" -NoNewLine -Encoding ASCII"
|
||||
powershell -c "$hash = (Get-FileHash -Algorithm SHA256 \"%file%\").Hash; Out-File -InputObject $hash\" %file_name%\" -FilePath \"%file%.sha256\" -NoNewLine -Encoding ASCII"
|
||||
)
|
||||
|
||||
set "file_name=Salt-Minion-%Version%-Py2-x86-Setup.exe"
|
||||
set "file=.\%Series%\%file_name%"
|
||||
if exist "%file%" (
|
||||
echo - %file_name%
|
||||
powershell -c "$hash = (Get-FileHash -Algorithm MD5 \"%file%\").Hash; Out-File -InputObject $hash\" %file_name%\" -FilePath \"%file%.md5\" -NoNewLine -Encoding ASCII"
|
||||
powershell -c "$hash = (Get-FileHash -Algorithm SHA256 \"%file%\").Hash; Out-File -InputObject $hash\" %file_name%\" -FilePath \"%file%.sha256\" -NoNewLine -Encoding ASCII"
|
||||
)
|
||||
|
||||
set "file_name=Salt-Minion-%Version%-Py3-AMD64-Setup.exe"
|
||||
set "file=.\%Series%\%file_name%"
|
||||
if exist "%file%" (
|
||||
echo - %file_name%
|
||||
powershell -c "$hash = (Get-FileHash -Algorithm MD5 \"%file%\").Hash; Out-File -InputObject $hash\" %file_name%\" -FilePath \"%file%.md5\" -NoNewLine -Encoding ASCII"
|
||||
powershell -c "$hash = (Get-FileHash -Algorithm SHA256 \"%file%\").Hash; Out-File -InputObject $hash\" %file_name%\" -FilePath \"%file%.sha256\" -NoNewLine -Encoding ASCII"
|
||||
)
|
||||
|
||||
set "file_name=Salt-Minion-%Version%-Py3-x86-Setup.exe"
|
||||
set "file=.\%Series%\%file_name%"
|
||||
if exist "%file%" (
|
||||
echo - %file_name%
|
||||
powershell -c "$hash = (Get-FileHash -Algorithm MD5 \"%file%\").Hash; Out-File -InputObject $hash\" %file_name%\" -FilePath \"%file%.md5\" -NoNewLine -Encoding ASCII"
|
||||
powershell -c "$hash = (Get-FileHash -Algorithm SHA256 \"%file%\").Hash; Out-File -InputObject $hash\" %file_name%\" -FilePath \"%file%.sha256\" -NoNewLine -Encoding ASCII"
|
||||
)
|
||||
|
||||
set "file_name=Salt-Minion-%Version%-Py3-AMD64.msi"
|
||||
set "file=.\%Series%\%file_name%"
|
||||
if exist "%file%" (
|
||||
echo - %file_name%
|
||||
powershell -c "$hash = (Get-FileHash -Algorithm MD5 \"%file%\").Hash; Out-File -InputObject $hash\" %file_name%\" -FilePath \"%file%.md5\" -NoNewLine -Encoding ASCII"
|
||||
powershell -c "$hash = (Get-FileHash -Algorithm SHA256 \"%file%\").Hash; Out-File -InputObject $hash\" %file_name%\" -FilePath \"%file%.sha256\" -NoNewLine -Encoding ASCII"
|
||||
)
|
||||
|
||||
set "file_name=Salt-Minion-%Version%-Py3-x86.msi"
|
||||
set "file=.\%Series%\%file_name%"
|
||||
if exist "%file%" (
|
||||
echo - %file_name%
|
||||
powershell -c "$hash = (Get-FileHash -Algorithm MD5 \"%file%\").Hash; Out-File -InputObject $hash\" %file_name%\" -FilePath \"%file%.md5\" -NoNewLine -Encoding ASCII"
|
||||
powershell -c "$hash = (Get-FileHash -Algorithm SHA256 \"%file%\").Hash; Out-File -InputObject $hash\" %file_name%\" -FilePath \"%file%.sha256\" -NoNewLine -Encoding ASCII"
|
||||
)
|
||||
|
||||
echo ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
echo Hashing Complete
|
||||
echo ===========================================================================
|
||||
|
||||
:quit
|
Loading…
Add table
Reference in a new issue