• norust profile, and setting it by default on alpha, hppa, m68k, sh4, x3

    From Julian Andres Klode@21:1/5 to All on Fri Dec 20 12:30:01 2024
    (CC me, I'm not subscribed to debian-devel or maintain ports :D)

    Hi,

    # norust build profile

    I propose we add a `norust` build profile such that packages
    building Rust parts or integrating with Rust parts can
    disable those parts.

    For example, if apt gains sqv support, we can define a
    pkg.apt.nosqv buildprofile, but it would be nice to just
    use norust too.

    The norust profile must NOT be used by packages building
    exclusively Rust pieces, that is, it should be possible
    to bootstrap a Rust toolchain and package set with the
    profile set (and potentially you need externally built
    cargo idk).

    # setting the profile

    I then propose we inject the

    DEB_BUILD_PROFILES=norust

    in the buildds for the ports architectures that do not have
    a rustc.

    This would allow them to build packages with optional Rust
    parts with reduced functionality. The same can be applied
    to other toolchains.

    This avoids having to encode entire lists of architectures
    for those packages.

    ## caveats

    There is a caveat in that local builds do not know about
    the profiles the buildds have set. This means that you
    may not easily be able to build packages locally that
    are available in the ports archive.

    This could be solved by encoding the build profiles in the
    dpkg vendor module instead, but it may also be beneficial
    to be able to experiment more and have local builds try
    to build with everything.
    --
    debian developer - deb.li/jak | jak-linux.org - free software dev
    ubuntu core developer i speak de, en

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Samuel Thibault@21:1/5 to All on Fri Dec 20 13:00:01 2024
    Hello,

    Julian Andres Klode, le ven. 20 déc. 2024 12:21:37 +0100, a ecrit:
    # setting the profile

    I then propose we inject the

    DEB_BUILD_PROFILES=norust

    in the buildds for the ports architectures that do not have
    a rustc.

    wanna-build would also need to be told to drop <!norust> build-deps.

    Samuel

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Helmut Grohne@21:1/5 to Helmut Grohne on Thu Jan 2 08:20:01 2025
    Hi Julian,

    On Sat, Dec 28, 2024 at 08:57:18AM +0100, Helmut Grohne wrote:
    As a result, my preliminary conclusion here is to NACK your request
    barring further insight.

    I pondered your use case in my head a bit more and am less and less
    convinced that build profiles are the right hammer for your screw.

    Earlier, I suggested copying the valgrind-if-available approach and you
    took issue with that. Unfortunately, that is now lost to IRC history.
    Maybe you could summarize it here?

    I also did not flesh out how I would transfer valgrind-if-available to
    the problem at hand. The better model may be mysql/mariadb where we now
    have src:mysql-defaults. Similarly, we could have a gpgv-defaults source package building a default-gpgv package whose dependency depends on the architecture. I remember that you took issue with encoding the
    availability of Rust into a source package and there definitely is a
    cost to this approach if it is needed for more packages. At a later
    point, we may reconsider a profile based approach and use it in the
    proposed gpgv-defaults package. The upshot is that this works today
    without any changes to our buildd infrastructure. From an apt point of
    view, you end up having a build dependency on default-gpgv. At build
    time, you need to branch on what implementation actually got installed.

    In the event that you move forward with this, I'd still appreciate a pkg.apt.nosqv build profile that reverts back to gnupg for all
    architectures, because I don't see a good way to add Rust to the
    architecture cross bootstrap due to unresolvable disagreement with llvm toolchain maintainers. It could also be a profile of gpgv-defaults. I'd
    really like us to benefit from Rust implementations in more areas, but
    the current way its requirements are packaged pose road blocks.

    Helmut

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From John Paul Adrian Glaubitz@21:1/5 to Helmut Grohne on Thu Jan 2 12:10:01 2025
    Hello,

    On Sat, 2024-12-28 at 10:29 +0100, Helmut Grohne wrote:
    In the event that you move forward with this, I'd still appreciate a pkg.apt.nosqv build profile that reverts back to gnupg for all
    architectures, because I don't see a good way to add Rust to the
    architecture cross bootstrap due to unresolvable disagreement with llvm toolchain maintainers. It could also be a profile of gpgv-defaults. I'd really like us to benefit from Rust implementations in more areas, but
    the current way its requirements are packaged pose road blocks.

    With both gccrs and rustc_codegen_gcc in the works, I am expecting that this problem will be eventually resolved and Rust can be deployed universally like C/C++ or other languages supported by GCC.

    The GCC backend rustc_codegen_gcc was supposed to be usable for several years now, but it seems that upstream integration in the official Rust compiler is rather slow unfortunately.

    Adrian

    --
    .''`. John Paul Adrian Glaubitz
    : :' : Debian Developer
    `. `' Physicist
    `- GPG: 62FF 8A75 84E0 2956 9546 0006 7426 3B37 F5B5 F913

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Helmut Grohne@21:1/5 to John Paul Adrian Glaubitz on Thu Jan 2 21:50:02 2025
    Hi Adrian,

    On Thu, Jan 02, 2025 at 12:03:17PM +0100, John Paul Adrian Glaubitz wrote:
    With both gccrs and rustc_codegen_gcc in the works, I am expecting that this problem will be eventually resolved and Rust can be deployed universally like C/C++ or other languages supported by GCC.

    The GCC backend rustc_codegen_gcc was supposed to be usable for several years now, but it seems that upstream integration in the official Rust compiler is rather slow unfortunately.

    Even though that is very welcome news, gcc-15 now Build-Depends on cargo
    rustc -> llvm. I do not see how rustc_codegen_gcc is going to resolve
    this dependency chain. I also do not see us wanting to break it.
    Realistically, we cannot keep all pieces that transitively depend on
    llvm out of essential forever. At some point, llvm will need to be
    fixed.

    llvm support practically is a requirement for full ports already. It
    will be a hard requirement before too long. The Python JIT now also
    relies on llvm.

    Helmut

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Helmut Grohne@21:1/5 to Julian Andres Klode on Sat Dec 28 09:00:01 2024
    Hi Julian,

    On Fri, Dec 20, 2024 at 12:21:37PM +0100, Julian Andres Klode wrote:
    # norust build profile

    I propose we add a `norust` build profile such that packages
    building Rust parts or integrating with Rust parts can
    disable those parts.

    Thanks for taking this to the appropriate place.

    For example, if apt gains sqv support, we can define a
    pkg.apt.nosqv buildprofile, but it would be nice to just
    use norust too.

    Contrary to what we earlier chatted on IRC, I am no longer convinced
    that "norust" is a useful profile name for your use case. If you look at
    the other language-specific profiles, they're all about bindings into
    other languages. A common theme applicable to multiple languages is a C
    library that also provides a Python and Perl extension to interface
    with. The language is the addon to something that can exist without that language. In case of Rust, it tends to go in reverse. The thing is
    implemented in Rust and you interface with other ecosystems via various mechanisms - CLI in this case.

    The norust profile must NOT be used by packages building
    exclusively Rust pieces, that is, it should be possible
    to bootstrap a Rust toolchain and package set with the
    profile set (and potentially you need externally built
    cargo idk).

    I suggested this restriction for a very different reason. I don't see a
    reason to want to bootstrap a Rust toolchain with a norust profile set
    yet. My reason was to avoid excessive churn in lots of Rust libraries
    where removing Rust removes the reason for existence. In keeping with
    the spirit of other no$LANG profiles, norust has a place, but it is
    bindings bolted onto other packages. However, this is not how bindings
    are typically packaged. Unlike other languages Rust tends to put them
    into separate crates and package them as separate Debian source packages rendering the utility of a norust profile minimal here.

    The no$LANG profiles are all (but nogir) marked as "reproducible"
    profiles. That is, if you enable the profile, you do not expect output artifacts to change (but you expect the set of output artifacts to
    change). This is very much not how you intend to use norust.

    Conversely, we would not expect a nopython build profile to skip
    building documentation generated using sphxindoc. We would not expect a
    noperl profile to skip generating pod2man documentation. I think your
    use case warrants a different approach and as a result a different
    naming pattern.

    What you are concerned with is availability (being ported) of a
    software. It's not about whether you can interface with it using that
    language but about whether you can use anything that uses it. It's a
    different level of not wanting something.

    As a result, my preliminary conclusion here is to NACK your request
    barring further insight.

    My intuition now is to add a separate concept "unavailable" to the
    profile naming scheme. Beyond Rust, valgrind, ebpf and llvm are fairly
    obvious candidates for things you may want to integrate with but that
    are not universally available on all architectures.

    I then propose we inject the

    DEB_BUILD_PROFILES=norust

    in the buildds for the ports architectures that do not have
    a rustc.

    I think this is a separate matter to defining the meaning of the
    profile. I defer to port maintainers (e.g. Samuel) on this matter but
    suggest that more work may be needed.

    This could be solved by encoding the build profiles in the
    dpkg vendor module instead, but it may also be beneficial
    to be able to experiment more and have local builds try
    to build with everything.

    Please add detail here. I don't think a change to dpkg is sufficient
    here. For instance, sbuild would have to somehow discover the
    per-architecture profiles and apply them to installing Build-Depends.
    We likely need to update Debian policy here.

    Helmut

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)