Skip to content

Commit

Permalink
Remove 32-bit build from KfW installer
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
greghudson committed Jan 13, 2025
1 parent 4ed7da3 commit 3891a4a
Show file tree
Hide file tree
Showing 12 changed files with 169 additions and 498 deletions.
93 changes: 10 additions & 83 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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
53 changes: 15 additions & 38 deletions src/windows/README
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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:
-----------------------
Expand Down
1 change: 0 additions & 1 deletion src/windows/installer/wix/config.wxi
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@
<?endif?>

<?define KfwRegRoot="SOFTWARE\MIT\Kerberos"?>
<?define KfwRegWow6432Root="SOFTWARE\Wow6432Node\MIT\Kerberos"?>

<?define DocDir="$(var.TargetDir)doc\"?>
<?define IncDir="$(var.TargetDir)include\"?>
Expand Down
1 change: 0 additions & 1 deletion src/windows/installer/wix/custom/custom.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
34 changes: 8 additions & 26 deletions src/windows/installer/wix/features.wxi
Original file line number Diff line number Diff line change
Expand Up @@ -56,21 +56,16 @@
<?include runtime_debug.wxi?>
</Feature>
<?endif?>
<?if $(sys.BUILDARCH)="x64"?>
<ComponentRef Id="cmf_comerr64_dll" />
<ComponentRef Id="cmf_gssapi64_dll" />
<ComponentRef Id="cmf_k5sprt64_dll" />
<ComponentRef Id="cmf_krb5_64_dll" />
<ComponentRef Id="cmf_krbcc64_dll" />
<ComponentRef Id="cmf_leashw64_dll" />
<ComponentRef Id="cmf_xpprof64_dll" />
<ComponentRef Id="cmf_spake64_dll" />
<?endif?>

<ComponentRef Id="cmf_comerr32_dll" />
<ComponentRef Id="cmf_comerr64_dll" />
<ComponentRef Id="cmf_gssapi64_dll" />
<ComponentRef Id="cmf_k5sprt64_dll" />
<ComponentRef Id="cmf_krb5_64_dll" />
<ComponentRef Id="cmf_krbcc64_dll" />
<ComponentRef Id="cmf_leashw64_dll" />
<ComponentRef Id="cmf_xpprof64_dll" />
<ComponentRef Id="cmf_spake64_dll" />
<ComponentRef Id="cmf_gss_client_exe" />
<ComponentRef Id="cmf_gss_server_exe" />
<ComponentRef Id="cmf_gssapi32_dll" />
<ComponentRef Id="cmf_kdestroy_exe" />
<ComponentRef Id="cmf_kcpytkt_exe" />
<ComponentRef Id="cmf_kdeltkt_exe" />
Expand All @@ -79,19 +74,10 @@
<ComponentRef Id="cmf_kpasswd_exe" />
<ComponentRef Id="cmf_kswitch_exe" />
<ComponentRef Id="cmf_kvno_exe" />
<ComponentRef Id="cmf_krb5_32_dll" />
<ComponentRef Id="cmf_k5sprt32_dll" />
<ComponentRef Id="cmf_krbcc32_dll" />
<ComponentRef Id="cmf_ccapiserver_exe" />
<ComponentRef Id="cmf_ms2mit_exe" />
<ComponentRef Id="cmf_mit2ms_exe" />
<ComponentRef Id="cmf_xpprof32_dll" />
<ComponentRef Id="cmf_spake32_dll" />

<ComponentRef Id="cmf_leashw32_dll" />

<ComponentRef Id="cmf_leash_exe" />
<!-- <ComponentRef Id="csc_leash32_exe" /> -->
<ComponentRef Id="cmf_kfwlogon_DLL" />
<ComponentRef Id="cmf_kfwcpcc_EXE" />

Expand Down Expand Up @@ -145,11 +131,7 @@
Level="130"
Title="!(loc.KerberosSDKTitle)">

<?if $(sys.BUILDARCH) = "x86" ?>
<ComponentRef Id="cmp_dirlib_i386" />
<?else?>
<ComponentRef Id="cmp_dirlib_amd64" />
<?endif?>
<ComponentRef Id="cmp_dirinc_krb5_gssapi" />
<ComponentRef Id="cmp_dirinc_krb5_krb5" />
<ComponentRef Id="cmp_dirinc_krb5" />
Expand Down
Loading

0 comments on commit 3891a4a

Please sign in to comment.