Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

APT package source #341

Open
stemann opened this issue Oct 30, 2023 · 0 comments
Open

APT package source #341

stemann opened this issue Oct 30, 2023 · 0 comments

Comments

@stemann
Copy link
Contributor

stemann commented Oct 30, 2023

The purpose of this issue is to discuss the possibility of adding support for an APT package source to BinaryBuilder(Base).

An APT package source would allow piggy-backing on APT distributions of packages - to get files from one or more APT-packages, in addition to the dependencies of said packages.

A proof-of-concept was parked at https://github.com/IHPSystems/Yggdrasil/blob/stemann/cuda_10.2_aarch64-linux-gnu_with_apt_pkg_source, in the commit stemann/Yggdrasil@19e4f4d.

An APT package source in https://github.com/IHPSystems/Yggdrasil/blob/stemann/cuda_10.2_aarch64-linux-gnu_with_apt_pkg_source/C/CUDA/CUDA_full%4010.2/build_tarballs.jl#L23-L36 is defined as follows:

    AptPkgSource(
        [
            AptSource("https://repo.download.nvidia.com/jetson/common", "r32.6", ["main"])
        ],
        [
            AptKey("http://repo.download.nvidia.com/jetson/jetson-ota-public.asc", "3C6D1FF3100C8C3ABB0869C0E6543461A9996195"),
        ],
        [
            AptPkgSpec("cuda-toolkit-10-2", v"10.2.460-1", "4c047e83b805ce9d76cbc5a2de2177548d8a63cd025e03f944705bf653e82828")
        ],
        "aarch64-linux-gnu";
        selections = [
            AptPkgSpec("build-essential")
        ]
    )

where the positional arguments:

  1. AptSource is a source for APT.
  2. AptKey is a public key for APT.
  3. AptPkgSpec is an APT package spec. that defines the APT package name, the APT package version, and a hash for the (top-level) dpkg-file.
  4. Is the platform target for which packages are retrieved... (the definition of this is a bit vague at this point in time...)

and selections is a list of APT packages assumed to already be provided (installed).

I.e., the AptPkgSource should include all packages defined by the list of AptPkgSpec (the 3rd arg.) and their dependencies, excluding the list of packages defined by selections (and their dependencies).

As mentioned in JuliaPackaging/Yggdrasil#4349 (comment), a proper implementation would likely require separate Apt.jl package and AptPkgSources.jl packages:

Separate Apt.jl package, with a companion AptPkgSources.jl package to bridge Apt.jl to BinaryBuilder(Base) (at some point adding AptPkgSources to Yggdrasil build env.)

where Apt.jl could start out as a simple, pure-Julia version (i.e. an adapted form of the POC), but would likely at some point need to instead use and wrap libapt to get the dependency resolution properly done.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant