dotnet / arcade

Tools that provide common build infrastructure for multiple .NET Foundation projects.
MIT License
657 stars 331 forks source link

Inline apt source generation in rootfs script #14849

Closed am11 closed 2 weeks ago

am11 commented 3 weeks ago

All our supported distros support deb822 format (circa 2015 onwards). Inline the contents of those redundant files and simplify code.

cc @akoeplinger @sbomer needs a few more tests on raspberry pi etc. help would be appreciated. :)

akoeplinger commented 2 weeks ago

These scripts are mainly for our own usage so if all of the distros we support can handle it I'm fine :)

am11 commented 2 weeks ago

Yup, these days we can use this script to also setup a cross-builder image for nativeaot https://github.com/dotnet/runtime/issues/97729#issuecomment-2050701956. With this change,

RUN mkdir /dev/arm; \
  curl -sSL https://raw.githubusercontent.com/dotnet/arcade/main/eng/common/cross/arm/sources.list.jammy -o /dev/arm/sources.list.jammy; \
  curl -sSL https://raw.githubusercontent.com/dotnet/arcade/main/eng/common/cross/build-rootfs.sh |\
    bash /dev/stdin arm jammy llvm15 lldb15

will shrink down to:

RUN mkdir /dev/arm; \
  curl -sSL https://raw.githubusercontent.com/dotnet/arcade/main/eng/common/cross/build-rootfs.sh |\
    bash /dev/stdin arm jammy llvm15 lldb15
am11 commented 2 weeks ago

Testing in CI https://github.com/dotnet/dotnet-buildtools-prereqs-docker/pull/1102.

am11 commented 2 weeks ago

https://github.com/dotnet/dotnet-buildtools-prereqs-docker/pull/1102 is green, so it's working as before. Needed to make some adjustments here to make it work.

@akoeplinger, @janvorli, @sbomer, PTAL.

am11 commented 2 weeks ago

@gbalykov, FYI. We can also inline Tizen script and using heredoc syntax, the patches could be inlined as well (to make this script completely freestanding).

gbalykov commented 1 week ago

FYI. We can also inline Tizen script and using heredoc syntax, the patches could be inlined as well (to make this script completely freestanding).

@am11 Thanks for sharing information! We'll probably work on this a bit later, busy with other tasks right now, cc @dotnet/samsung