CP-16068: Pick up new RPU hotfixes

- XenCenter build system picks up the RPU hotfixes from Artifactory
- RPU001 and RPU002 replace XS62E006 and XS65ESP1006
- Removed hotfixes from the solution, moved  XS60E001 to Branding folder
- also cleaned up code in the HotfixFactory class, removing MNR and Cowley hotfixes (not supported anymore)

Signed-off-by: Mihaela Stoica <mihaela.stoica@citrix.com>
This commit is contained in:
Mihaela Stoica 2016-02-11 22:18:06 +00:00
parent efe9c807b3
commit 7a46698141
19 changed files with 57 additions and 109 deletions

View File

@ -28,17 +28,8 @@
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
# SUCH DAMAGE.
--- XenCenter.wxs 2016-02-02 09:43:41.049833000 +0800
+++ XenCenter.l10n.wxs 2016-02-02 09:43:24.009129100 +0800
@@ -38,7 +38,7 @@
<?define UpgradeCode="{[BRANDING_XENCENTER_UPGRADE_CODE_GUID]}"?>
<?define ProductCode="{65AE1345-A520-456D-8A19-2F52D43D3A09}"?>
<Product Id="$(var.ProductCode)" Name="[Citrix] [XenCenter]" Language="$(env.WixLangId)" Version="$(var.ProductVersion)" Manufacturer="[BRANDING_COMPANY_NAME_LEGAL]" UpgradeCode="$(var.UpgradeCode)">
- <Package Description="[Citrix] [XenCenter]" Comments="none." InstallerVersion="200" Compressed="yes" />
+ <Package Description="[Citrix] [XenCenter]" Comments="none." InstallerVersion="200" Compressed="yes" />
<Media Id="1" Cabinet="XenCenter.cab" EmbedCab="yes" />
<Directory Id="TARGETDIR" Name="SourceDir">
<Directory Id="ProgramFilesFolder">
--- XenCenter.wxs Thu Feb 11 17:06:22 2016
+++ XenCenter.l10n.wxs Thu Feb 11 17:00:41 2016
@@ -86,64 +86,64 @@
<File Id="XslicIcon" Source="..\Branding\Images\file_license.ico" />
<File Id="XkbIcon" Source="..\Branding\Images\file_backup.ico" />
@ -173,8 +164,8 @@
- <ComponentRef Id="ReportViewer" />
+ <ComponentRef Id="JaResources" />
+ <ComponentRef Id="ScResources" />
<ComponentRef Id="UpdateFiles" />
<?if "$(env.Branding)"="XenCenter"?>
<ComponentRef Id="xsupdatesfiles" />
<ComponentRef Id="TestResources" />
<?else?>
<ComponentRef Id="readmefile" />

View File

@ -147,17 +147,17 @@
</Extension>
</ProgId>
</Component>
<?if "$(env.Branding)"="XenCenter"?>
<Component Id="xsupdatesfiles" Guid="[BRANDING_XSUPDATE_FILE_GUID]">
<File Id="hotfixCowley" Source="..\XenAdmin\XS56EFP1002.xsupdate" />
<File Id="hotfixMNR" Source="..\XenAdmin\XS56E008.xsupdate" />
<File Id="hotfixBoston" Source="..\XenAdmin\XS60E001.xsupdate" />
<File Id="hotfixBostonSource" Source="..\XenAdmin\XS60E001-src-pkgs.tar.gz" />
<File Id="hotfixSanibelToClearwater" Source="..\XenAdmin\XS62E006.xsupdate" />
<File Id="hotfixSanibelToClearwaterSource" Source="..\XenAdmin\XS62E006-src-pkgs.tar.gz" />
<File Id="hotfixCreedence" Source="..\XenAdmin\XS65ESP1006.xsupdate" />
<Component Id="UpdateFiles" Guid="[BRANDING_XSUPDATE_FILE_GUID]">
<?if "$(env.Branding)"="XenCenter"?>
<File Id="hotfixBoston" Source="..\Branding\Hotfixes\XS60E001.xsupdate" />
<File Id="hotfixBostonSource" Source="..\Branding\Hotfixes\XS60E001-src-pkgs.tar.gz" />
<File Id="hotfixSanibelToClearwater" Source="..\Branding\Hotfixes\RPU001.xsupdate" />
<File Id="hotfixSanibelToClearwaterSource" Source="..\Branding\Hotfixes\RPU001-src-pkgs.tar.gz" />
<?endif?>
<File Id="hotfixCreedence" Source="..\Branding\Hotfixes\RPU002.[xsupdate]" />
</Component>
<!-- TestResources -->
<?if "$(env.Branding)"="XenCenter"?>
<!-- TestResources -->
<Directory Id="TestReso" ShortName="TestReso" Name="TestResources">
<Component Id="TestResources" Guid="[BRANDING_TEST_RESOURCES_GUID]">
<File Source="..\XenAdmin\bin\Release\TestResources\credits.xml" />
@ -270,8 +270,8 @@
<ComponentRef Id="MainExecutable" />
<ComponentRef Id="HelpFiles" />
<ComponentRef Id="ReportViewer" />
<ComponentRef Id="UpdateFiles" />
<?if "$(env.Branding)"="XenCenter"?>
<ComponentRef Id="xsupdatesfiles" />
<ComponentRef Id="TestResources" />
<?else?>
<ComponentRef Id="readmefile" />

View File

@ -40,52 +40,38 @@ namespace XenAdmin.Diagnostics.Hotfixing
{
public enum HotfixableServerVersion
{
MNR,
Cowley,
Boston,
SanibelToClearwater,
Creedence
}
private readonly Hotfix mnrHotfix = new SingleHotfix
{
Filename = "XS56E008.xsupdate",
UUID = "e2cb047b-66ed-4fa0-882a-67ff1726f4b9"
};
private readonly Hotfix cowleyHotfix = new SingleHotfix
{
Filename = "XS56EFP1002.xsupdate",
UUID = "ca0ca2c6-cc96-4e4b-946b-39ebe6652fd6"
};
private readonly Hotfix bostonHotfix = new MultipleHotfix()
{
ComponentHotfixes = new List<Hotfix>
{
new SingleHotfix
{
Filename = "XS60E001.xsupdate",
Filename = "XS60E001",
UUID = "95ac709c-e408-423f-8d22-84b8134a149e"
},
new SingleHotfix
{
Filename = "XS62E006.xsupdate",
UUID = "b412a910-0453-42ed-bae0-982cc48b00d6"
Filename = "RPU001",
UUID = "591d0209-531e-4ed8-9ed2-98df2a1a445c"
}
}
};
private readonly Hotfix sanibelToClearwaterHotfix = new SingleHotfix
{
Filename = "XS62E006.xsupdate",
UUID = "b412a910-0453-42ed-bae0-982cc48b00d6"
Filename = "RPU001",
UUID = "591d0209-531e-4ed8-9ed2-98df2a1a445c"
};
private readonly Hotfix creedenceHotfix = new SingleHotfix
{
Filename = "XS65ESP1006.xsupdate",
UUID = "0c8accf4-060f-47fb-85a1-3470f815fd88"
Filename = "RPU002",
UUID = "3f92b111-0a90-4ec6-b85a-737f241a3fc1 "
};
public Hotfix Hotfix(Host host)
@ -108,10 +94,6 @@ namespace XenAdmin.Diagnostics.Hotfixing
return sanibelToClearwaterHotfix;
if (version == HotfixableServerVersion.Boston)
return bostonHotfix;
if (version == HotfixableServerVersion.Cowley)
return cowleyHotfix;
if (version == HotfixableServerVersion.MNR)
return mnrHotfix;
throw new ArgumentException("A version was provided for which there is no hotfix filename");
}

View File

@ -49,7 +49,6 @@ namespace XenAdmin.Diagnostics.Hotfixing
get
{
List<string> uuids = ComponentHotfixes.Select(hotfix => hotfix.UUID).ToList();
uuids.Sort();
return String.Join(";", uuids.ToArray());
}
set { throw new NotImplementedException("Multiple hotfix string does not implement a setter"); }
@ -64,7 +63,6 @@ namespace XenAdmin.Diagnostics.Hotfixing
get
{
List<string> filenames = ComponentHotfixes.Select(h => h.Filename).ToList();
filenames.Sort();
return String.Join(";", filenames.ToArray());
}
set { throw new NotImplementedException("Multiple hotfix string does not implement a setter"); }

View File

@ -50,7 +50,7 @@ namespace XenAdmin.Diagnostics.Hotfixing
if (patch == null)
{
var master = Helpers.GetMaster(host.Connection);
var action = new Actions.UploadPatchAction(master.Connection, Path.Combine(Program.AssemblyDir, Filename));
var action = new Actions.UploadPatchAction(master.Connection, Path.Combine(Program.AssemblyDir, String.Format("{0}.{1}", Filename, Branding.Update)));
action.RunExternal(session);
patch = action.PatchRefs[master];
}

View File

@ -98,7 +98,7 @@ namespace XenAdmin.Wizards.PatchingWizard
Uri address = new Uri(patchUri);
string tempFile = Path.GetTempFileName();
downloadAction = new DownloadAndUnzipXenServerPatchAction(SelectedUpdateAlert.Name, address, tempFile);
downloadAction = new DownloadAndUnzipXenServerPatchAction(SelectedUpdateAlert.Name, address, tempFile, Branding.Update);
if (downloadAction != null)
{

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -2405,18 +2405,6 @@
<DependentUpon>Settings.settings</DependentUpon>
<DesignTimeSharedInput>True</DesignTimeSharedInput>
</Compile>
<None Include="XS60E001-src-pkgs.tar.gz">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="XS62E006-src-pkgs.tar.gz">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="XS62E006.xsupdate">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="XS65ESP1006.xsupdate">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
</ItemGroup>
<ItemGroup>
<Content Include="..\Branding\Images\AppIcon.ico" />
@ -6701,15 +6689,6 @@
<None Include="TestResources\vmexport.bin">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="XS56E008.xsupdate">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="XS56EFP1002.xsupdate">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="XS60E001.xsupdate">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\XenCenterLib\XenCenterLib.csproj">

View File

@ -59,7 +59,7 @@ namespace XenAdminTests.UnitTests.Diagnostics
string[] enumNames = Enum.GetNames(typeof (HotfixFactory.HotfixableServerVersion));
Array.Sort(enumNames);
string[] expectedNames = new []{"Cowley", "MNR", "Boston", "SanibelToClearwater", "Creedence"};
string[] expectedNames = new []{"Boston", "SanibelToClearwater", "Creedence"};
Array.Sort(expectedNames);
CollectionAssert.AreEqual(expectedNames, enumNames, "Expected contents of HotfixableServerVersion enum");
@ -68,23 +68,15 @@ namespace XenAdminTests.UnitTests.Diagnostics
[Test]
public void UUIDLookedUpFromEnum()
{
Assert.AreEqual("95ac709c-e408-423f-8d22-84b8134a149e;b412a910-0453-42ed-bae0-982cc48b00d6",
Assert.AreEqual("95ac709c-e408-423f-8d22-84b8134a149e;591d0209-531e-4ed8-9ed2-98df2a1a445c",
factory.Hotfix(HotfixFactory.HotfixableServerVersion.Boston).UUID,
"Boston UUID lookup from enum");
Assert.AreEqual("ca0ca2c6-cc96-4e4b-946b-39ebe6652fd6",
factory.Hotfix(HotfixFactory.HotfixableServerVersion.Cowley).UUID,
"Cowley UUID lookup from enum");
Assert.AreEqual("e2cb047b-66ed-4fa0-882a-67ff1726f4b9",
factory.Hotfix(HotfixFactory.HotfixableServerVersion.MNR).UUID,
"MNR UUID lookup from enum");
Assert.AreEqual("b412a910-0453-42ed-bae0-982cc48b00d6",
Assert.AreEqual("591d0209-531e-4ed8-9ed2-98df2a1a445c",
factory.Hotfix(HotfixFactory.HotfixableServerVersion.SanibelToClearwater).UUID,
"SanibelToClearwater UUID lookup from enum");
Assert.AreEqual("0c8accf4-060f-47fb-85a1-3470f815fd88",
Assert.AreEqual("3f92b111-0a90-4ec6-b85a-737f241a3fc1 ",
factory.Hotfix(HotfixFactory.HotfixableServerVersion.Creedence).UUID,
"Creedence UUID lookup from enum");
}
@ -92,23 +84,15 @@ namespace XenAdminTests.UnitTests.Diagnostics
[Test]
public void FilenameLookedUpFromEnum()
{
Assert.AreEqual("XS60E001.xsupdate;XS62E006.xsupdate",
Assert.AreEqual("XS60E001;RPU001",
factory.Hotfix(HotfixFactory.HotfixableServerVersion.Boston).Filename,
"Boston Filename lookup from enum");
Assert.AreEqual("XS56EFP1002.xsupdate",
factory.Hotfix(HotfixFactory.HotfixableServerVersion.Cowley).Filename,
"Cowley Filename lookup from enum");
Assert.AreEqual("XS56E008.xsupdate",
factory.Hotfix(HotfixFactory.HotfixableServerVersion.MNR).Filename,
"MNR Filename lookup from enum");
Assert.AreEqual("XS62E006.xsupdate",
Assert.AreEqual("RPU001",
factory.Hotfix(HotfixFactory.HotfixableServerVersion.SanibelToClearwater).Filename,
"SanibelToClearwater Filename lookup from enum");
Assert.AreEqual("XS65ESP1006.xsupdate",
Assert.AreEqual("RPU002",
factory.Hotfix(HotfixFactory.HotfixableServerVersion.Creedence).Filename,
"Creedence Filename lookup from enum");
}
@ -124,8 +108,8 @@ namespace XenAdminTests.UnitTests.Diagnostics
}
[Test]
[TestCase("6.0.2", "XS62E006.xsupdate", Description = "Sanibel")]
[TestCase("6.0.0", "XS60E001.xsupdate;XS62E006.xsupdate", Description = "Boston")]
[TestCase("6.0.2", "RPU001", Description = "Sanibel")]
[TestCase("6.0.0", "XS60E001;RPU001", Description = "Boston")]
public void TestProductVersionNumbersWithHotfixes(string productVersion, string filenames)
{
Mock<Host> host = ObjectManager.NewXenObject<Host>(id);

View File

@ -49,6 +49,7 @@ namespace XenAdmin.Actions
private readonly Uri address;
private readonly string outFileName;
private readonly string updateName;
private readonly string updateFileExtension;
private DownloadState patchDownloadState;
private Exception patchDownloadError;
@ -58,11 +59,16 @@ namespace XenAdmin.Actions
}
public DownloadAndUnzipXenServerPatchAction(string patchName, Uri uri, string outputFileName)
: this(patchName, uri, outputFileName, InvisibleMessages.XEN_UPDATE)
{ }
public DownloadAndUnzipXenServerPatchAction(string patchName, Uri uri, string outputFileName, string updateFileExtension)
: base(null, string.Format(Messages.DOWNLOAD_AND_EXTRACT_ACTION_TITLE, patchName), string.Empty, false)
{
updateName = patchName;
address = uri;
outFileName = outputFileName;
this.updateFileExtension = updateFileExtension;
}
private void DownloadFile()
@ -117,7 +123,7 @@ namespace XenAdmin.Actions
while (iterator.HasNext())
{
if (Path.GetExtension(iterator.CurrentFileName()) == "."+InvisibleMessages.XEN_UPDATE)
if (Path.GetExtension(iterator.CurrentFileName()) == "." + updateFileExtension)
{
string path = Path.Combine(Path.GetDirectoryName(outFileName), iterator.CurrentFileName());
@ -152,7 +158,7 @@ namespace XenAdmin.Actions
if (string.IsNullOrEmpty(PatchPath))
{
MarkCompleted(new Exception(Messages.DOWNLOAD_AND_EXTRACT_ACTION_FILE_NOT_FOUND));
log.DebugFormat("File '{0}{1}' could not be located in downloaded archive", updateName, ".xsupdate");
log.DebugFormat("File '{0}.{1}' could not be located in downloaded archive", updateName, updateFileExtension);
}
}

View File

@ -82,6 +82,8 @@ then
fi
fi
if test -z "${XC_BRANDING}"; then XC_BRANDING=citrix; fi
git ls-remote git://hg.uk.xensource.com/carbon/${XS_BRANCH}/xenadmin-branding.git &>-
if [ "$?" -eq 0 ]; then
if [ -d "xenadmin-branding" ]
@ -89,8 +91,10 @@ if [ "$?" -eq 0 ]; then
rm -rf xenadmin-branding
fi
git clone git://hg.uk.xensource.com/carbon/${XS_BRANCH}/xenadmin-branding.git
if test -z "${XC_BRANDING}"; then XC_BRANDING=citrix; fi
cp -rf ${BRAND_REPO}/${XC_BRANDING}/* ${REPO}/Branding/
if [ -d ${BRAND_REPO}/${XC_BRANDING} ]; then
echo "Overwriting Branding folder"
cp -rf ${BRAND_REPO}/${XC_BRANDING}/* ${REPO}/Branding/
fi
fi
# overwrite archive-push.sh file, if it exists in Branding folder

View File

@ -169,6 +169,9 @@ BUILD_TOOLS_REPO=git://admin/git/closed/windows/buildtools.git
BUILD_TOOLS=${SCRATCH_DIR}/buildtools.git
STORE_FILES=${BUILD_TOOLS}/scripts/storefiles.py
# this is where the build will find the RPU hotfixes
WEB_HOTFIXES=https://repo.citrite.net/builds/xs/hotfixes/${XS_BRANCH}
#check there are xenserver builds on this branch before proceeding
wget -T 10 -N -q --spider ${WEB_XE_PHASE_1}/globals || { echo 'FATAL: Unable to locate globals, xenadmin cannot be built if there is no succesfull build of xenserver published for the same branch.' ; exit 1; }

View File

@ -99,6 +99,14 @@ wget ${WGET_OPT} -P ${SCRATCH_DIR} ${WEB_LIB}/{wix39-sources-debug.zip,wix39-bin
source ${REPO}/Branding/branding.sh
source ${REPO}/mk/re-branding.sh
#bring RPU hotfixes
if [ "${BRANDING_UPDATE}" = "xsupdate" ]
then
wget ${WGET_OPT} -P ${REPO}/Branding/Hotfixes ${WEB_HOTFIXES}/RPU001/1.0/RPU001.xsupdate
wget ${WGET_OPT} -P ${REPO}/Branding/Hotfixes ${WEB_HOTFIXES}/RPU001/1.0/RPU001-src-pkgs.tar && cd ${REPO}/Branding/Hotfixes && gzip RPU001-src-pkgs.tar
wget ${WGET_OPT} -P ${REPO}/Branding/Hotfixes ${WEB_HOTFIXES}/RPU002/1.0/RPU002.xsupdate
fi
#build
MSBUILD="MSBuild.exe /nologo /m /verbosity:minimal /p:Configuration=Release /p:TargetFrameworkVersion=v4.5 /p:VisualStudioVersion=13.0"
@ -209,13 +217,6 @@ cd ${REPO}/XenAdmin/TestResources && tar -cf ${OUTPUT_DIR}/XenCenterTestResource
cp ${REPO}/XenAdminTests/bin/XenAdminTests.tgz ${OUTPUT_DIR}/XenAdminTests.tgz
cp ${REPO}/CFUValidator/bin/CFUValidator.tgz ${OUTPUT_DIR}/CFUValidator.tgz
if [ "${XC_BRANDING}" = "citrix" ]
then
cp ${REPO}/XenAdmin/bin/Release/{XS56EFP1002,XS56E008,XS60E001,XS62E006,XS65ESP1006}.xsupdate \
${REPO}/XenAdmin/bin/Release/{XS60E001-src-pkgs,XS62E006-src-pkgs}.tar.gz \
${OUTPUT_DIR}
fi
cp ${REPO}/XenAdmin/bin/Release/{CommandLib.pdb,${BRANDING_BRAND_CONSOLE}.pdb,XenCenterLib.pdb,XenCenterMain.pdb,XenCenterVNC.pdb,XenModel.pdb,XenOvf.pdb,XenOvfTransport.pdb} \
${REPO}/xe/bin/Release/xe.pdb \
${REPO}/xva_verify/bin/Release/xva_verify.pdb \