tis-dotnet8 icon

.NET Runtime 8

Paquet d'installation silencieuse pour .NET Runtime 8

8.0.34-2
Dependency
Dependency

  • package: tis-dotnet8
  • name: .NET Runtime 8
  • version: 8.0.34-2
  • categories: Dependency
  • maintainer: WAPT Team,Tranquil IT,Stan SALOMON
  • editor: Microsoft
  • licence: opensource_free,cpe:/a:mit:x11_license,wapt_public
  • locale: all
  • target_os: darwin
  • architecture: x64
  • signature_date:
  • size: 30.71 Mo
  • homepage : https://github.com/dotnet/runtime

package           : tis-dotnet8
version           : 8.0.34-2
architecture      : x64
section           : base
priority          : optional
name              : .NET Runtime 8
categories        : Dependency
maintainer        : WAPT Team,Tranquil IT,Stan SALOMON
description       : .NET Runtime is the free, cross-platform and open-source runtime from Microsoft required to run console applications, services and libraries built with .NET
depends           : 
conflicts         : 
maturity          : PROD
locale            : all
target_os         : darwin
min_wapt_version  : 2.5
sources           : https://github.com/dotnet/runtime
installed_size    : 
impacted_process  : 
description_fr    : .NET Runtime est l'environnement d'exécution gratuit, multiplateforme et open source de Microsoft, nécessaire pour faire fonctionner les applications console, services et bibliothèques développés en .NET
description_pl    : .NET Runtime to darmowe, wieloplatformowe środowisko uruchomieniowe firmy Microsoft o otwartym kodzie źródłowym, wymagane do uruchamiania aplikacji konsolowych, usług i bibliotek utworzonych w .NET
description_de    : .NET Runtime ist die kostenlose, plattformübergreifende Open-Source-Laufzeitumgebung von Microsoft, die zum Ausführen von mit .NET erstellten Konsolenanwendungen, Diensten und Bibliotheken erforderlich ist
description_es    : .NET Runtime es el entorno de ejecución gratuito, multiplataforma y de código abierto de Microsoft, necesario para ejecutar aplicaciones de consola, servicios y bibliotecas desarrollados con .NET
description_pt    : O .NET Runtime é o ambiente de execução gratuito, multiplataforma e de código aberto da Microsoft, necessário para executar aplicações de consola, serviços e bibliotecas desenvolvidos com .NET
description_it    : .NET Runtime è l'ambiente di esecuzione gratuito, multipiattaforma e open source di Microsoft, necessario per eseguire applicazioni console, servizi e librerie sviluppati con .NET
description_nl    : .NET Runtime is de gratis, platformonafhankelijke en open-source runtime van Microsoft die nodig is om met .NET gebouwde consoletoepassingen, services en bibliotheken uit te voeren
description_ru    : .NET Runtime — это бесплатная кроссплатформенная среда выполнения Microsoft с открытым исходным кодом, необходимая для запуска консольных приложений, служб и библиотек, созданных на .NET
audit_schedule    : 
editor            : Microsoft
keywords          : .net,desktop,windows,windowsdesktop,il,msil,clr,jit,fc,bcl,runtime,wpf,winforms,windows forms,Microsoft,net
licence           : opensource_free,cpe:/a:mit:x11_license,wapt_public
homepage          : https://github.com/dotnet/runtime
package_uuid      : e0e30aca-20bb-4c3f-95b9-9a246a743178
valid_from        : 
valid_until       : 
forced_install_on : 
changelog         : https://github.com/dotnet/core/tree/main/release-notes/8.0
min_os_version    : 10.15
max_os_version    : 
icon_sha256sum    : c13943b8f92a4717f46bad189c0b91d9003d76a0127a41459ec91693b263830c
signer            : Tranquil IT
signer_fingerprint: 8c5127a75392be9cc9afd0dbae1222a673072c308c14d88ab246e23832e8c6bb
signature_date    : 2026-11-18T18:14:11.000000
signed_attributes : package,version,architecture,section,priority,name,categories,maintainer,description,depends,conflicts,maturity,locale,target_os,min_wapt_version,sources,installed_size,impacted_process,description_fr,description_pl,description_de,description_es,description_pt,description_it,description_nl,description_ru,audit_schedule,editor,keywords,licence,homepage,package_uuid,valid_from,valid_until,forced_install_on,changelog,min_os_version,max_os_version,icon_sha256sum,signer,signer_fingerprint,signature_date,signed_attributes
signature         : J1atAgQp8hOptGVGcN2sG++slO9+Jxvm0FCm5/kGVficHkiFrBQde7WgovwNmNqbbPVzQYhtODPOTHhOXEvjg8VBAdpgrXJEjFKN5qIb7J2fqhYxGkr0WUF6CDNQVnOylQC11itx1P2R8jiMw+sTL69ADy0Sle5pz7Pcad8R5SXt63P6ed2sZ9XeAjXiblsDS9Q6a0WKzWqYpzuvzncAv1v+W+XWZx8czH0H3TXnH+0wyDurCpSZ3X9SRmd4ZLBC8BfQWzBzgsATyKIxvv2LRYEwGnQHV3BcsgskfxERc81IhY8rKrtAL6QbHZlMk+Gl4ggFrcDCISzyeoeh2Z9y+A==

# -*- coding: utf-8 -*-
from setuphelpers import *

arch = "x64"
dotnet_dir = "/usr/local/share/dotnet"
sharedhost_pkg = f"com.microsoft.dotnet.sharedhost.component.osx.{arch}"
runtime_prefixes = ("com.microsoft.dotnet.sharedframework.Microsoft.NETCore.App.", "com.microsoft.dotnet.hostfxr.")
pkg_suffix = f".component.osx.{arch}"


def runtime_pkg(version):
    return f"{runtime_prefixes[0]}{version}{pkg_suffix}"


def installed_runtime_pkgs():
    """Return {pkgid: version} of the installed runtime and hostfxr receipts of this major version.

    Each patch version installs side by side under its own versioned pkgid, so an upgrade leaves the previous one behind.
    """
    major = control.get_software_version().split(".")[0]
    pkgs = {}
    for pkg in get_installed_pkgs():
        for prefix in runtime_prefixes:
            if pkg.startswith(prefix) and pkg.endswith(pkg_suffix):
                version = pkg[len(prefix):-len(pkg_suffix)]
                if version.split(".")[0] == major:
                    pkgs[pkg] = version
    return pkgs


def install():
    version = control.get_software_version()
    for pkg, pkg_version in installed_runtime_pkgs().items():
        if pkg_version != version:
            print(f"Removing .NET {pkg_version}: {pkg}")
            uninstall_pkg(pkg)

    install_pkg(glob.glob(f"dotnet-runtime-*-osx-{arch}.pkg")[0], key=f"pkgid:{runtime_pkg(version)}")


def uninstall():
    for pkg in installed_runtime_pkgs():
        uninstall_pkg(pkg)

    # The "dotnet" command is shared by every .NET runtime (ASP.NET Core included): remove it only once none is left
    if not any(pkg.startswith("com.microsoft.dotnet.sharedframework.") for pkg in get_installed_pkgs()):
        uninstall_pkg(sharedhost_pkg)


def audit():
    version = control.get_software_version()
    if not uninstall_key_exists(f"pkgid:{runtime_pkg(version)}"):
        print(f"Missing receipt: {runtime_pkg(version)}")
        return "ERROR"
    try:
        runtimes = run(f"{dotnet_dir}/dotnet --list-runtimes")
    except Exception as e:
        print(f"dotnet does not start: {e}")
        return "ERROR"
    if f"Microsoft.NETCore.App {version}" not in runtimes:
        print(f"Microsoft.NETCore.App {version} not listed by dotnet --list-runtimes")
        return "ERROR"
    return "OK"

from setuphelpers import *
from setupdevhelpers import *

"""

https://builds.dotnet.microsoft.com/dotnet/release-metadata/{version}/releases.json

"""

dotnet_version = "8.0"

def update_package():
    # Declaring local variables
    package_updated = False
    proxies = get_proxies()

    os_dict = {
        "windows-x64": "win-x64",
        "windows-x86": "win-x86",
        "windows-arm64": "win-arm64",
        "debian(>=11),ubuntu(>=20),redhat_based(>=8)-x64": "linux-x64",
        "debian(>=11),ubuntu(>=20),redhat_based(>=8)-arm64": "linux-arm64",
        "darwin-x64": "osx-x64",
        "darwin-arm": "osx-arm64"
    }

    os_type = control.target_os + "-" + ensure_list(control.architecture)[0]

    if not proxies:
        proxies = get_proxies_from_wapt_console()

    data = wgets(f"https://builds.dotnet.microsoft.com/dotnet/release-metadata/{dotnet_version}/releases.json", proxies=proxies, as_json=True)
    runtime = data["releases"][0]["windowsdesktop"] if "windows" in control.target_os else data["releases"][0]["runtime"]
    version = runtime["version"]
    download_url = []
    for asset in runtime["files"]:
        if control.target_os == "windows":
            if asset["name"].endswith(".exe"):
                print("Found %s " % (asset["name"]))
                download_url.append({
                    "url": asset["url"],
                    "latest_bin": asset["url"].split("/")[-1]
                })
                # No need to break here, because we want to download all the runtimes for the different architectures (x86, x64, arm64)
        elif control.target_os == "darwin":
            if asset["rid"] == os_dict[os_type] and asset["name"].endswith(".pkg"):
                download_url = asset["url"]
                latest_bin = download_url.split("/")[-1]
                break
        elif control.target_os == "debian(>=11),ubuntu(>=20),redhat_based(>=8)" and asset["rid"] == os_dict[os_type]:
                download_url = asset["url"]
                latest_bin = download_url.split("/")[-1]
                break

    arch = ensure_list(control.architecture)
    print(arch)
    if "arm64" in arch:
        archs = ["arm64", "x64", "x86"]
    if "x64" in arch:
        archs = ["x64", "x86"]
    if "x86" in arch:
        archs = ["x86"]
    # Checking version from file
    if control.target_os == "windows":
        print(archs)
        print(download_url)
        for dl_info in download_url:
            if dl_info["latest_bin"].split("-")[-1].split(".exe")[0] in archs:
                print("Latest %s version is: %s" % (control.name, version))
                print("Download URL is: %s" % dl_info["url"])
                if not isfile(dl_info["latest_bin"]):
                    print("Downloading: %s" % dl_info["latest_bin"])
                    wget(dl_info["url"], dl_info["latest_bin"], proxies=proxies)
    else:
        print("Latest %s version is: %s" % (control.name, version))
        print("Download URL is: %s" % download_url)
        if not isfile(latest_bin):
            print("Downloading: %s" % latest_bin)
            wget(download_url, latest_bin, proxies=proxies)

    remove_outdated_binaries(version)

    # Changing version of the package
    if Version(version, 4) > Version(control.get_software_version(), 4):
        print("Software version updated (from: %s to: %s)" % (control.get_software_version(), Version(version)))
        package_updated = True
    else:
        print("Software version up-to-date (%s)" % Version(version))
    control.set_software_version(version)
    control.save_control_to_wapt()

    # Validating or not update-package-sources
    return package_updated

38d056ab130f7bf7c481c12636a4e9959de36561d3dfcbe54c6e3571bc0c1dc3 : WAPT/certificate.crt
d379aed53dda611b6f257f50d179b508c6941e6525a10d7543dbf423988ae07a : WAPT/control
c13943b8f92a4717f46bad189c0b91d9003d76a0127a41459ec91693b263830c : WAPT/icon.png
538a920653e17e2c5e04bfdf15a854ca40ce6cf84920c1b4237509c887f6b876 : dotnet-runtime-8.0.34-osx-x64.pkg
fb0d48a67b7f22ba90e117f8a0b54f8c7027288e6df8bb6bf2a1078bd58625f8 : luti.json
8bb6737fc1e4b4deaa7f8200faee7585bc3b7b5ae1433f16cb26780f5cf52ff0 : setup.py
e32e9eb5cb87b0ce17ccb85f57db3bcd7a2ee368ab1e0ae80fb25a14e48e720d : update_package.py