Skip to content

Commit

Permalink
Update dependencies from https://github.com/dotnet/arcade build 20250…
Browse files Browse the repository at this point in the history
…106.1 (#2706)

[main] Update dependencies from dotnet/arcade
  • Loading branch information
dotnet-maestro[bot] authored Jan 6, 2025
1 parent 3dd7696 commit f9f2236
Show file tree
Hide file tree
Showing 7 changed files with 55 additions and 46 deletions.
12 changes: 6 additions & 6 deletions eng/Version.Details.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,17 @@
<ProductDependencies>
</ProductDependencies>
<ToolsetDependencies>
<Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="10.0.0-beta.25053.3">
<Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="10.0.0-beta.25056.1">
<Uri>https://github.com/dotnet/arcade</Uri>
<Sha>05d4d46d438eec2d012a0dae7a9118e5fab947af</Sha>
<Sha>e58820063a8754d418518bce69ca2df0e3b4ac25</Sha>
</Dependency>
<Dependency Name="Microsoft.DotNet.Helix.Sdk" Version="10.0.0-beta.25053.3">
<Dependency Name="Microsoft.DotNet.Helix.Sdk" Version="10.0.0-beta.25056.1">
<Uri>https://github.com/dotnet/arcade</Uri>
<Sha>05d4d46d438eec2d012a0dae7a9118e5fab947af</Sha>
<Sha>e58820063a8754d418518bce69ca2df0e3b4ac25</Sha>
</Dependency>
<Dependency Name="Microsoft.DotNet.XUnitExtensions" Version="10.0.0-beta.25053.3">
<Dependency Name="Microsoft.DotNet.XUnitExtensions" Version="10.0.0-beta.25056.1">
<Uri>https://github.com/dotnet/arcade</Uri>
<Sha>05d4d46d438eec2d012a0dae7a9118e5fab947af</Sha>
<Sha>e58820063a8754d418518bce69ca2df0e3b4ac25</Sha>
</Dependency>
</ToolsetDependencies>
</Dependencies>
2 changes: 1 addition & 1 deletion eng/Versions.props
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<MicrosoftBclTimeProviderVersion>8.0.0</MicrosoftBclTimeProviderVersion>
<MicrosoftAspNetCoreTestHostVersion>6.0.36</MicrosoftAspNetCoreTestHostVersion>
<MicrosoftCrankEventSourcesVersion>0.2.0-alpha.24576.2</MicrosoftCrankEventSourcesVersion>
<MicrosoftDotNetXUnitExtensionsPackageVersion>10.0.0-beta.25053.3</MicrosoftDotNetXUnitExtensionsPackageVersion>
<MicrosoftDotNetXUnitExtensionsPackageVersion>10.0.0-beta.25056.1</MicrosoftDotNetXUnitExtensionsPackageVersion>
<CoverletCollectorVersion>6.0.0</CoverletCollectorVersion>
<MoqVersion>4.18.4</MoqVersion>
<AutofacVersion>4.9.4</AutofacVersion>
Expand Down
6 changes: 6 additions & 0 deletions eng/common/core-templates/post-build/post-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,11 @@ parameters:
displayName: Publish installers and checksums
type: boolean
default: true

- name: requireDefaultChannels
displayName: Fail the build if there are no default channel(s) registrations for the current build
type: boolean
default: false

- name: SDLValidationParameters
type: object
Expand Down Expand Up @@ -312,5 +317,6 @@ stages:
-PublishingInfraVersion ${{ parameters.publishingInfraVersion }}
-AzdoToken '$(System.AccessToken)'
-WaitPublishingFinish true
-RequireDefaultChannels ${{ parameters.requireDefaultChannels }}
-ArtifactsPublishingAdditionalParameters '${{ parameters.artifactsPublishingAdditionalParameters }}'
-SymbolPublishingAdditionalParameters '${{ parameters.symbolPublishingAdditionalParameters }}'
2 changes: 1 addition & 1 deletion eng/common/cross/build-rootfs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -800,7 +800,7 @@ elif [[ -n "$__CodeName" ]]; then
PYTHON=${PYTHON_EXECUTABLE:-python3}

# shellcheck disable=SC2086,SC2046
echo running "$PYTHON" "$__CrossDir/install-debs.py" --arch "$__UbuntuArch" --rootfsdir "$__RootfsDir" --artool "$AR" \
echo running "$PYTHON" "$__CrossDir/install-debs.py" --arch "$__UbuntuArch" --mirror "$__UbuntuRepo" --rootfsdir "$__RootfsDir" --artool "$AR" \
$(echo $suites | xargs -n 1 | xargs -I {} echo -n "--suite {} ") \
$__UbuntuPackages

Expand Down
68 changes: 33 additions & 35 deletions eng/common/cross/install-debs.py
Original file line number Diff line number Diff line change
Expand Up @@ -162,23 +162,35 @@ def parse_package_index(content):
packages = {}
aliases = {}
entries = re.split(r'\n\n+', content)

for entry in entries:
fields = dict(re.findall(r'^(\S+): (.+)$', entry, re.MULTILINE))
if "Package" in fields:
package_name = fields["Package"]
packages[package_name] = {
"Version": fields.get("Version"),
"Filename": fields.get("Filename"),
"Depends": fields.get("Depends")
}
if "Provides" in fields:
provides_list = [x.strip() for x in fields["Provides"].split(",")]
for alias in provides_list:
# strip version specifiers
alias_name = re.sub(r'\s*\(=.*\)', '', alias)
if alias_name not in aliases:
aliases[alias_name] = []
aliases[alias_name].append(package_name)
version = fields.get("Version")
filename = fields.get("Filename")
depends = fields.get("Depends")
provides = fields.get("Provides", None)

# Only update if package_name is not in packages or if the new version is higher
if package_name not in packages or compare_debian_versions(version, packages[package_name]["Version"]) > 0:
packages[package_name] = {
"Version": version,
"Filename": filename,
"Depends": depends
}

# Update aliases if package provides any alternatives
if provides:
provides_list = [x.strip() for x in provides.split(",")]
for alias in provides_list:
# Strip version specifiers
alias_name = re.sub(r'\s*\(=.*\)', '', alias)
if alias_name not in aliases:
aliases[alias_name] = []
if package_name not in aliases[alias_name]:
aliases[alias_name].append(package_name)

return packages, aliases

def install_packages(mirror, packages_info, aliases, tmp_dir, extract_dir, ar_tool, desired_packages):
Expand All @@ -189,27 +201,13 @@ def install_packages(mirror, packages_info, aliases, tmp_dir, extract_dir, ar_to
packages_to_download = {}

for pkg in resolved_packages:
available_versions = [pkg]
if pkg in packages_info:
packages_to_download[pkg] = packages_info[pkg]

if pkg in aliases:
available_versions.extend(aliases[pkg])

# Choose the package with the latest version
if available_versions:
best_package = max(
(p for p in available_versions if p in packages_info),
key=lambda p: (
1 if p == pkg else 0,
cmp_to_key(lambda p1, p2: compare_debian_versions(
packages_info[p1]["Version"],
packages_info[p2]["Version"]
))(p)
),
default=None
)

if best_package:
packages_to_download[best_package] = packages_info[best_package]
for alias in aliases[pkg]:
if alias in packages_info:
packages_to_download[alias] = packages_info[alias]

asyncio.run(download_deb_files_parallel(mirror, packages_to_download, tmp_dir))

Expand All @@ -225,11 +223,11 @@ def install_packages(mirror, packages_info, aliases, tmp_dir, extract_dir, ar_to
for pkg in reversed(resolved_packages):
deb_file = package_to_deb_file_map.get(pkg)
if deb_file and os.path.exists(deb_file):
extract_deb_file_using_dpkg(deb_file, tmp_dir, extract_dir, ar_tool)
extract_deb_file(deb_file, tmp_dir, extract_dir, ar_tool)

print("All done!")

def extract_deb_file_using_dpkg(deb_file, tmp_dir, extract_dir, ar_tool):
def extract_deb_file(deb_file, tmp_dir, extract_dir, ar_tool):
"""Extract .deb file contents"""

os.makedirs(extract_dir, exist_ok=True)
Expand Down Expand Up @@ -270,7 +268,7 @@ def extract_deb_file_using_dpkg(deb_file, tmp_dir, extract_dir, ar_tool):
raise ValueError(f"Unsupported compression format: {file_extension}")

with tarfile.open(tar_file_path, mode) as tar:
tar.extractall(path=extract_dir, filter=None)
tar.extractall(path=extract_dir, filter='fully_trusted')

def finalize_setup(rootfsdir):
lib_dir = os.path.join(rootfsdir, 'lib')
Expand Down
7 changes: 6 additions & 1 deletion eng/common/post-build/publish-using-darc.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ param(
[Parameter(Mandatory=$false)][string] $MaestroApiEndPoint = 'https://maestro.dot.net',
[Parameter(Mandatory=$true)][string] $WaitPublishingFinish,
[Parameter(Mandatory=$false)][string] $ArtifactsPublishingAdditionalParameters,
[Parameter(Mandatory=$false)][string] $SymbolPublishingAdditionalParameters
[Parameter(Mandatory=$false)][string] $SymbolPublishingAdditionalParameters,
[Parameter(Mandatory=$false)][string] $RequireDefaultChannels
)

try {
Expand Down Expand Up @@ -33,6 +34,10 @@ try {
if ("false" -eq $WaitPublishingFinish) {
$optionalParams.Add("--no-wait") | Out-Null
}

if ("true" -eq $RequireDefaultChannels) {
$optionalParams.Add("--default-channels-required") | Out-Null
}

& $darc add-build-to-channel `
--id $buildId `
Expand Down
4 changes: 2 additions & 2 deletions global.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
}
},
"msbuild-sdks": {
"Microsoft.DotNet.Arcade.Sdk": "10.0.0-beta.25053.3",
"Microsoft.DotNet.Helix.Sdk": "10.0.0-beta.25053.3"
"Microsoft.DotNet.Arcade.Sdk": "10.0.0-beta.25056.1",
"Microsoft.DotNet.Helix.Sdk": "10.0.0-beta.25056.1"
}
}

0 comments on commit f9f2236

Please sign in to comment.