Build Provisioner From Source¶
The HIRS .NET Provisioner requires the .NET SDK version 10 or later. Please follow the instructions from Microsoft for installing the .NET SDK on your system.
Note
After installing the .NET SDK, you must restart your terminal for the environment variables to get updated.
Most of the build commands work the same way whether they are run from Windows or Linux. Location of where these commands are run matters. The directory the command should be run from is included in each section below.
Steps to Build¶
- Checkout HIRS from Github
git clone https://github.com/nsacyber/HIRS.git restoreto retrieve all dependencies required for building or testing source codecd <HIRS repository>/HIRS_Provisioner.NET/ dotnet restore- Build and Run Unit Tests
dotnet test -
Install a packaging library. Depending on your choice below, you might need to install a packaging library. This step is not needed to build an MSI installer.
dotnet tool install --global dotnet-rpm --allow-roll-forwarddotnet tool install --global dotnet-deb --allow-roll-forwarddotnet tool install --global dotnet-zip --allow-roll-forward -
cdto the directorycd <HIRS repository>/HIRS_Provisioner.NET/hirs -
Create installation package(s)
dotnet rpm install dotnet rpm -r linux-x64 -c Releasedotnet deb install dotnet deb -r linux-x64 -c Releasedotnet zip install dotnet zip -r linux-x64 -c Releasedotnet msbuild HIRS_Provisioner.NET.csproj /t:Msi /P:TargetFramework=net10.0 /p:RuntimeIdentifier=win-x64 /p:Configuration=Releasedotnet zip install dotnet zip -r win-x64 -c Release
Note
After building, you can find the generated file(s) in the relative path (from above):
/bin/Release/net10.0/< platform >/HIRS_Provisioner.NET.*
Installation Directory¶
The Provisioner is installed to the following directory:
C:\Program Files(x86)\HIRS_Provisioner.NET
/usr/share/hirs