From 3891a4a3259a6d3bbdd1a20882fdd14a20f94214 Mon Sep 17 00:00:00 2001 From: Greg Hudson Date: Wed, 18 Dec 2024 14:52:28 -0500 Subject: [PATCH] Remove 32-bit build from KfW installer In src/windows/README, document only the steps for a 64-bit build. In the installer, expect only 64-bit binaries. In the CI, perform only a 64-bit Windows build, and split up the build into three steps so that build failures are easier to understand. --- .github/workflows/build.yml | 93 +------ src/windows/README | 53 ++-- src/windows/installer/wix/config.wxi | 1 - src/windows/installer/wix/custom/custom.cpp | 1 - src/windows/installer/wix/features.wxi | 34 +-- src/windows/installer/wix/files.wxi | 199 ++++---------- src/windows/installer/wix/kfw.wxs | 6 +- .../installer/wix/lang/config_1033.wxi | 11 +- .../installer/wix/lang/strings_1033.wxl | 6 +- .../installer/wix/msi-deployment-guide.txt | 5 - src/windows/installer/wix/platform.wxi | 247 ++++++------------ src/windows/installer/wix/runtime.wxi | 11 +- 12 files changed, 169 insertions(+), 498 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 8d7d02e74d8..5d976e34f8f 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -6,66 +6,6 @@ on: jobs: - unix: - runs-on: ${{ matrix.os }} - strategy: - fail-fast: false - matrix: - name: [linux-clang, linux-clang-openssl, linux-gcc] - include: - - name: linux-clang - os: ubuntu-latest - compiler: clang - makevars: CPPFLAGS=-Werror - configureopts: --enable-asan - - name: linux-clang-openssl - os: ubuntu-latest - compiler: clang - makevars: CPPFLAGS=-Werror - configureopts: --with-crypto-impl=openssl - - name: linux-gcc - os: ubuntu-latest - compiler: gcc - makevars: CPPFLAGS=-D_FORTIFY_SOURCE=3 - steps: - - name: Checkout repository - uses: actions/checkout@v1 - - name: Linux setup - if: startsWith(matrix.os, 'ubuntu') - run: | - sudo apt-get update -qq - sudo apt-get install -y bison gettext keyutils ldap-utils libcmocka-dev libldap2-dev libkeyutils-dev libsasl2-dev libssl-dev python3-kdcproxy python3-pip slapd tcsh yasm softhsm2 opensc - pip3 install pyrad - - name: Build - env: - CC: ${{ matrix.compiler }} - MAKEVARS: ${{ matrix.makevars }} - CONFIGURE_OPTS: ${{ matrix.configureopts }} - run: | - # For the ksu tests, allow homedir access from other users. - umask 022 - chmod a+rx $HOME - chmod -R a+rX src - cd src - autoreconf - ./configure --enable-maintainer-mode --with-ldap $CONFIGURE_OPTS --prefix=$HOME/inst - make $MAKEVARS - make check - make install - (cd clients/ksu && make check-ksu) - - name: Display skipped tests - run: cat src/skiptests - - name: Check for files unexpectedly not removed by make distclean - run: | - cd src - make distclean - rm -rf autom4te.cache configure include/autoconf.h.in - if [ -n "$(git ls-files -o)" ]; then - echo "Files not removed by make distclean:" - git ls-files -o - exit 1 - fi - windows: runs-on: windows-latest env: @@ -79,32 +19,19 @@ jobs: mkdir %KRB_INSTALL_DIR% - uses: ilammy/msvc-dev-cmd@v1 with: - arch: x86 - - name: Build 32-bit - shell: cmd + arch: x64 + - name: Build + working-directory: src run: | - cd src - set - set PATH=%PATH%;%wix%bin + $env:Path += ';' + $env:WindowsSdkVerBinPath + '\\x86' nmake -f Makefile.in prep-windows nmake - nmake install - cd windows\installer\wix - nmake - rename kfw.msi kfw32.msi - - uses: ilammy/msvc-dev-cmd@v1 - with: - arch: x64 - - name: Build 64-bit - shell: cmd + - name: Populate install dir + working-directory: src run: | - cd src - set - set PATH=%PATH%;%wix%bin;"%WindowsSdkVerBinPath%"\x86 - nmake clean - nmake nmake install - cd windows\installer\wix - nmake clean + - name: Build installer + working-directory: src\windows\installer\wix + run: | + $env:Path += ';' + $env:wix + 'bin' nmake - rename kfw.msi kfw64.msi diff --git a/src/windows/README b/src/windows/README index 2d57f0dd1d1..3a2521c5445 100644 --- a/src/windows/README +++ b/src/windows/README @@ -51,12 +51,9 @@ checking out the sources with git and are using the Git BASH Perl, make sure to set git's core.autocrlf variable to "input" or "false" to avoid translating newlines. -After Visual Studio is installed, you should be able to invoke 32-bit -and 64-bit command prompts via the start menu (Visual Studio 2017 -> -x86 Native Tools Command Prompt and x64 Native Tools Command Prompt). -At the current time, Kerberos 5 can only be built for the x64 target -if the host platform is also 64-bit, because it compiles and runs -programs during the build. +After Visual Studio is installed, you should be able to invoke command +prompts via the start menu (Visual Studio 2017 -> x64 Native Tools +Command Prompt). IMPORTANT NOTE: By default, the sources are built with debug information and linked against the debug version of the Microsoft C @@ -75,45 +72,25 @@ First, make sure you have sed, (g)awk, cat, and cp. You must also define KRB_INSTALL_DIR either in the environment or on the command line (for nmake install). If you are proceeding to build the MSI installer, this directory should be a temporary staging area in or -near your build tree. The directory must exist before nmake install -is run. The 64-bit installer provides 32-bit libraries, so a 32-bit build -and install must be performed before the 64-bit build. +near your build tree. To skip building the graphical ticket manager, run "set NO_LEASH=1" before building, and do not build the installers. -In a 32-bit command shell: - - 1) set KRB_INSTALL_DIR=\path\to\dir # Where bin/include/lib lives - 2) cd xxx\src # Go to where source lives - 3) nmake -f Makefile.in prep-windows # Create Makefile for Windows - 4) nmake [NODEBUG=1] # Build the sources - 5) nmake install [NODEBUG=1] # Copy headers, libs, executables - 6) cd windows\installer\wix # Go to where the installer source is - 7) nmake [NODEBUG=1] # Build the installer - 8) rename kfw.msi kfw32.msi # Save the 32-bit installer - -In a 64-bit command shell: - - 9) set PATH=%PATH%;"%WindowsSdkVerBinPath%"\x86 # To get uicc.exe -10) set KRB_INSTALL_DIR=\path\to\dir # Where bin/include/lib lives -11) cd xxx\src # Go to where source lives -12) nmake clean # Clean up the 32-bit objects -13) nmake [NODEBUG=1] # Build the sources for 64-bit -14) nmake install [NODEBUG=1] # Copy 64-bit lib/executables -15) cd windows\installer\wix # Back to the installer source -16) nmake clean # Remove 32-bit leavings -17) nmake [NODEBUG=1] # Build the 64-bit installer -18) rename kfw.msi kfw64.msi # And name it usefully - -Step 9 may be skipped if uicc is already in the command-line path (try +Run the following commands in a Visual Studio command prompt: + + 1) set PATH=%PATH%;"%WindowsSdkVerBinPath%"\x86 # To get uicc.exe + 2) set KRB_INSTALL_DIR=\path\to\dir # Where bin/include/lib lives + 3) cd xxx\src # Go to where source lives + 5) nmake [NODEBUG=1] # Build the sources + 6) nmake install [NODEBUG=1] # Copy libraries/executables + 7) cd windows\installer\wix # Go to the installer source + 8) nmake [NODEBUG=1] # Build the installer + +Step 1 may be skipped if uicc is already in the command-line path (try running "uicc" to see if you get a usage message or a not-found error), or if you are not building the graphical ticket manager. -Visual Studio 2013 and 2015 provide only a single command prompt. -Within this prompt, use "vcvarsall.bat x86" and "vcvarsall.bat amd64" -to switch to 32-bit and 64-bit mode. - Running Kerberos 5 Apps: ----------------------- diff --git a/src/windows/installer/wix/config.wxi b/src/windows/installer/wix/config.wxi index 579de4399a6..ea6e610a01a 100644 --- a/src/windows/installer/wix/config.wxi +++ b/src/windows/installer/wix/config.wxi @@ -58,7 +58,6 @@ - diff --git a/src/windows/installer/wix/custom/custom.cpp b/src/windows/installer/wix/custom/custom.cpp index 3460def692a..27e056fb0fb 100644 --- a/src/windows/installer/wix/custom/custom.cpp +++ b/src/windows/installer/wix/custom/custom.cpp @@ -541,7 +541,6 @@ UINT KillRunningProcessesWorker( MSIHANDLE hInstall, BOOL bKill ) static bool IsNSISInstalled() { HKEY nsisKfwKey = NULL; - // Note: check Wow6432 node if 64 bit build HRESULT res = RegOpenKeyEx(HKEY_LOCAL_MACHINE, "SOFTWARE\\Microsoft\\Windows\\CurrentVersion" "\\Uninstall\\Kerberos for Windows", diff --git a/src/windows/installer/wix/features.wxi b/src/windows/installer/wix/features.wxi index 5b0747a6a9d..3405dc4827e 100644 --- a/src/windows/installer/wix/features.wxi +++ b/src/windows/installer/wix/features.wxi @@ -56,21 +56,16 @@ - - - - - - - - - - - - + + + + + + + + - @@ -79,19 +74,10 @@ - - - - - - - - - @@ -145,11 +131,7 @@ Level="130" Title="!(loc.KerberosSDKTitle)"> - - - - diff --git a/src/windows/installer/wix/files.wxi b/src/windows/installer/wix/files.wxi index 947bed565f4..805856eae29 100644 --- a/src/windows/installer/wix/files.wxi +++ b/src/windows/installer/wix/files.wxi @@ -80,9 +80,6 @@ KRB5PRESERVEIDENTITY - - - @@ -93,9 +90,6 @@ - - - @@ -136,29 +130,6 @@ - - - - - - kerberos.mit.edu - kerberos-1.mit.edu - kerberos-2.mit.edu - - - - - kerberos-1.csail.mit.edu - kerberos-2.csail.mit.edu - - - - - - - - - @@ -194,10 +165,6 @@ - - - - @@ -270,53 +237,52 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + kerberos.mit.edu + kerberos-1.mit.edu + kerberos-2.mit.edu + + + + + kerberos-1.csail.mit.edu + kerberos-2.csail.mit.edu + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - + + + + + + + @@ -336,21 +302,12 @@ - - + + - - - - - - - - - - + @@ -401,19 +358,6 @@ - - - - - - - - - - - - - @@ -424,7 +368,6 @@ - @@ -460,20 +403,6 @@ - - - - - - - - - - - - - - @@ -554,38 +483,16 @@ - - - - - + - - - - - - - - - - - - - - - - + + + + - - - - - - - - - + + + diff --git a/src/windows/installer/wix/kfw.wxs b/src/windows/installer/wix/kfw.wxs index d150a61fdbd..1f1417dd986 100755 --- a/src/windows/installer/wix/kfw.wxs +++ b/src/windows/installer/wix/kfw.wxs @@ -64,11 +64,7 @@ (Not (VersionNT = 600)) Or (ServicePackLevel >= 2) USELEASH Or USENETIDMGR Not (USELEASH And USENETIDMGR) - - - - - + diff --git a/src/windows/installer/wix/lang/config_1033.wxi b/src/windows/installer/wix/lang/config_1033.wxi index 3dbaaf54be1..2f1f4ab51ff 100644 --- a/src/windows/installer/wix/lang/config_1033.wxi +++ b/src/windows/installer/wix/lang/config_1033.wxi @@ -27,15 +27,8 @@ - - - - - - - - - + + diff --git a/src/windows/installer/wix/lang/strings_1033.wxl b/src/windows/installer/wix/lang/strings_1033.wxl index 7207e9a8d87..e38da59bb34 100644 --- a/src/windows/installer/wix/lang/strings_1033.wxl +++ b/src/windows/installer/wix/lang/strings_1033.wxl @@ -25,10 +25,8 @@ or implied warranty. --> - Kerberos for Windows (64-bit) - KFW64 - Kerberos for Windows (32-bit) - KFW32 + Kerberos for Windows (64-bit) + KFW64 MIT Debug/Checked Beta diff --git a/src/windows/installer/wix/msi-deployment-guide.txt b/src/windows/installer/wix/msi-deployment-guide.txt index 2d3bb866e2a..73cb93873fe 100644 --- a/src/windows/installer/wix/msi-deployment-guide.txt +++ b/src/windows/installer/wix/msi-deployment-guide.txt @@ -825,11 +825,6 @@ Kerberos for Windows means that group policy based deployments will fail on machines that have the "Kerberos for Windows" NSIS package installed. - Note that the NSIS package is only available for 32-bit i386. - You cannot install both the 32-bit NSIS and 64-bit amd64 MSI - packages on the same machine. To install both 32-bit and 64-bit - KFW, you must use the MSI packages of both. - If you have used a different MSI package to install Kerberos for Windows and wish to upgrade it you can author rows into the 'Upgrade' table to have the "Kerberos for Windows" MSI replace these diff --git a/src/windows/installer/wix/platform.wxi b/src/windows/installer/wix/platform.wxi index 8d21fd233d4..006e3554409 100644 --- a/src/windows/installer/wix/platform.wxi +++ b/src/windows/installer/wix/platform.wxi @@ -1,175 +1,82 @@ - - - - - - - - - - - - - - - - - - - - - + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/windows/installer/wix/runtime.wxi b/src/windows/installer/wix/runtime.wxi index 3d5c1dfea7d..48cf2e131fe 100644 --- a/src/windows/installer/wix/runtime.wxi +++ b/src/windows/installer/wix/runtime.wxi @@ -1,17 +1,8 @@ - + - - - - - - - - -