|  | 
| 148 | 148 |       <ExeBundleInstallerFile>$(PackageOutputPath)$(InstallerFileNameWithoutExtension).exe</ExeBundleInstallerFile> | 
| 149 | 149 |       <ExeBundleInstallerEngineFile>$(PackageOutputPath)$(InstallerFileNameWithoutExtension)-engine.exe</ExeBundleInstallerEngineFile> | 
| 150 | 150 |     </PropertyGroup> | 
|  | 151 | +  </Target> | 
| 151 | 152 | 
 | 
| 152 |  | -    <PropertyGroup Condition="'$(GenerateRpm)' == 'true'"> | 
| 153 |  | -      <CreateRPMForCblMariner>true</CreateRPMForCblMariner> | 
| 154 |  | -      <!-- PackageTargetOS is a distro-specific version suffix, used for deps packages, including the one for CBL Mariner. | 
| 155 |  | -           We do not want to create additional CBL Mariner named RPMs of those packages. --> | 
| 156 |  | -      <CreateRPMForCblMariner Condition="'$(PackageTargetOS)' != ''">false</CreateRPMForCblMariner> | 
| 157 |  | -    </PropertyGroup> | 
| 158 |  | - | 
| 159 |  | -    <PropertyGroup Condition="'$(CreateRPMForCblMariner)' == 'true'"> | 
|  | 153 | +   | 
|  | 154 | +  <!-- | 
|  | 155 | +    Packages produced for CBL-Mariner must be signed with a special certificate. | 
|  | 156 | +    Additionally, some distros use old keys (SHA-1 based) so there's a different cert for new packages. | 
|  | 157 | +    RPM v4 doesn't support multiple signatures, so we must have two separate copies of the RPM for us to sign. | 
|  | 158 | +    To solve this, we make copies of the packages with special names (which the Arcade SDK will sign with the correct certificate). | 
|  | 159 | +    PackageTargetOS is a distro-specific version suffix, used for deps packages, including the one for CBL-Mariner. | 
|  | 160 | +    As a result, we don't need to create a separate copy of the package for CBL-Mariner, but we do need to create a copy with the new key (unless the target is CBL-Mariner). | 
|  | 161 | +  --> | 
|  | 162 | +  <Target Name="_BuildMarinerRpm" | 
|  | 163 | +          AfterTargets="GenerateRpm" | 
|  | 164 | +          Condition="'$(PackageTargetOS)' != ''"> | 
|  | 165 | +    <!-- CBL-Mariner --> | 
|  | 166 | +    <PropertyGroup> | 
| 160 | 167 |       <!-- CBL-Mariner 1.0 --> | 
| 161 | 168 |       <_CblMarinerVersionSuffix>cm.1</_CblMarinerVersionSuffix> | 
| 162 | 169 |       <_InstallerBuildPartCblMariner>$(Version)-$(_CblMarinerVersionSuffix)-$(InstallerTargetArchitecture)</_InstallerBuildPartCblMariner> | 
|  | 
| 168 | 175 |       <_InstallerFileNameWithoutExtensionCblMariner2>$(InstallerName)-$(_InstallerBuildPartCblMariner2)$(CrossArchContentsBuildPart)</_InstallerFileNameWithoutExtensionCblMariner2> | 
| 169 | 176 |       <_InstallerFileCblMariner2>$(PackageOutputPath)$(_InstallerFileNameWithoutExtensionCblMariner2)$(InstallerExtension)</_InstallerFileCblMariner2> | 
| 170 | 177 |     </PropertyGroup> | 
|  | 178 | +    <Copy SourceFiles="$(_InstallerFile)" | 
|  | 179 | +          DestinationFiles="$(_InstallerFileCblMariner)" | 
|  | 180 | +          OverwriteReadOnlyFiles="True" | 
|  | 181 | +          SkipUnchangedFiles="False" | 
|  | 182 | +          UseHardlinksIfPossible="False" /> | 
|  | 183 | + | 
|  | 184 | +    <Message Text="$(MSBuildProjectName) -> $(_InstallerFileCblMariner)" Importance="high" /> | 
|  | 185 | +    <Copy SourceFiles="$(_InstallerFile)" | 
|  | 186 | +          DestinationFiles="$(_InstallerFileCblMariner2)" | 
|  | 187 | +          OverwriteReadOnlyFiles="True" | 
|  | 188 | +          SkipUnchangedFiles="False" | 
|  | 189 | +          UseHardlinksIfPossible="False" /> | 
|  | 190 | + | 
|  | 191 | +    <Message Text="$(MSBuildProjectName) -> $(_InstallerFileCblMariner2)" Importance="high" /> | 
|  | 192 | +  </Target> | 
|  | 193 | + | 
|  | 194 | +  <Target Name="_BuildNewKeyLinuxPackage" | 
|  | 195 | +          AfterTargets="GenerateRpm;GenerateDeb" | 
|  | 196 | +          Condition="'$(PackageTargetOS)' != 'cm.1' and '$(PackageTargetOS)' != 'cm.2'"> | 
|  | 197 | +    <!-- Packages to be signed with the new key --> | 
|  | 198 | +    <PropertyGroup> | 
|  | 199 | +      <_NewKeyVersionSuffix>newkey</_NewKeyVersionSuffix> | 
|  | 200 | +      <_InstallerBuildPartNewKey>$(Version)-$(_NewKeyVersionSuffix)-$(_InstallerArchSuffix)</_InstallerBuildPartNewKey> | 
|  | 201 | +      <_InstallerBuildPartNewKey Condition="'$(PackageTargetOS)' != ''">$(Version)-$(PackageTargetOS)-$(_NewKeyVersionSuffix)-$(_InstallerArchSuffix)</_InstallerBuildPartNewKey> | 
|  | 202 | +      <_InstallerFileNameWithoutExtensionNewKey>$(InstallerName)-$(_InstallerBuildPartNewKey)$(CrossArchContentsBuildPart)</_InstallerFileNameWithoutExtensionNewKey> | 
|  | 203 | +      <_InstallerFileNewKey>$(PackageOutputPath)$(_InstallerFileNameWithoutExtensionNewKey)$(InstallerExtension)</_InstallerFileNewKey> | 
|  | 204 | +    </PropertyGroup> | 
|  | 205 | +    <Copy SourceFiles="$(_InstallerFile)" | 
|  | 206 | +          DestinationFiles="$(_InstallerFileNewKey)" | 
|  | 207 | +          OverwriteReadOnlyFiles="True" | 
|  | 208 | +          SkipUnchangedFiles="False" | 
|  | 209 | +          UseHardlinksIfPossible="False" /> | 
|  | 210 | + | 
|  | 211 | +    <Message Text="$(MSBuildProjectName) -> $(_InstallerFileNewKey)" Importance="high" /> | 
| 171 | 212 |   </Target> | 
| 172 | 213 | 
 | 
| 173 | 214 |   <!-- | 
|  | 
| 330 | 371 |           UseHardlinksIfPossible="False" /> | 
| 331 | 372 | 
 | 
| 332 | 373 |     <Message Text="$(MSBuildProjectName) -> $(_InstallerFile)" Importance="high" /> | 
| 333 |  | - | 
| 334 |  | -    <!-- CBL-Mariner 1.0 --> | 
| 335 |  | -    <Copy Condition="'$(CreateRPMForCblMariner)' == 'true'" | 
| 336 |  | -          SourceFiles="@(GeneratedRpmFiles)" | 
| 337 |  | -          DestinationFiles="$(_InstallerFileCblMariner)" | 
| 338 |  | -          OverwriteReadOnlyFiles="True" | 
| 339 |  | -          SkipUnchangedFiles="False" | 
| 340 |  | -          UseHardlinksIfPossible="False" /> | 
| 341 |  | - | 
| 342 |  | -    <Message Text="$(MSBuildProjectName) -> $(_InstallerFileCblMariner)" Importance="high" /> | 
| 343 |  | - | 
| 344 |  | -    <!-- CBL-Mariner 2.0 --> | 
| 345 |  | -    <Copy Condition="'$(CreateRPMForCblMariner)' == 'true'" | 
| 346 |  | -          SourceFiles="@(GeneratedRpmFiles)" | 
| 347 |  | -          DestinationFiles="$(_InstallerFileCblMariner2)" | 
| 348 |  | -          OverwriteReadOnlyFiles="True" | 
| 349 |  | -          SkipUnchangedFiles="False" | 
| 350 |  | -          UseHardlinksIfPossible="False" /> | 
| 351 |  | - | 
| 352 |  | -    <Message Text="$(MSBuildProjectName) -> $(_InstallerFileCblMariner2)" Importance="high" /> | 
| 353 | 374 |   </Target> | 
| 354 | 375 | 
 | 
| 355 | 376 |   <Target Name="GetRpmInstallerJsonProperties" | 
|  | 
0 commit comments