-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
Ubuntu 24.04: netcat is a virtual package #11028
Comments
O erro que você está vendo acontece porque o Ubuntu 24.04 não sabe qual versão do pacote netcat instalar, já que ele é um "pacote virtual", ou seja, depende de outras versões, como netcat-traditional ou netcat-openbsd. O gerenciador de pacotes precisa que você escolha uma delas. Como resolver:
Se você preferir o netcat-traditional, execute: Ou, se preferir o netcat-openbsd, execute:
Para instalar o netcat-traditional: Ou, para o netcat-openbsd: Resumo: |
Hi @GregoireW Thank you for bringing this issue to our attention. We are looking into this issue and will update you on this issue after investigating |
@RaviAkshintala |
Hi @GregoireW, We successfully reproduced the netcat package in Ubuntu 24. Our builds are successful.
Kindly try building with the latest image version 20241124.1. If the issues persist, please provide us with the error logs or the build details. |
I'm not sure to understand what you mean. My issue is to create a runner image, not to install netcat manually from a github action. Today the template execute
Which apt-install tools from the toolset file runner-images/images/ubuntu/scripts/build/install-apt-common.sh Lines 10 to 16 in 5a26302
and the toolset file contains the package named runner-images/images/ubuntu/toolsets/toolset-2404.json Lines 146 to 161 in 5a26302
It means the setup will try to execute Let say you want to replace 'netstat' by 'netcat-openbsd' in the toolset file then the test file will fail as it will test for a runner-images/images/ubuntu/scripts/tests/Apt.Tests.ps1 Lines 4 to 21 in 5a26302
|
Hi @GregoireW, The |
But your screenshot shows exactly the problem. Lines 2494-2498 |
I "set -e" to prevent not noticed error to sneak to production. in your screenshot, you have the issue, but you don't stop at the error and continue. I'm not clear why it is ok as the folowing test should have broken your test. (netcat is not installed) |
@GregoireW Aqui está como abordar isso:
Substitua netcat por netcat-openbsd (ou netcat-traditional, dependendo da necessidade). Edite o arquivo toolset-2404.json: Antes: "cmd_packages": [ Depois: "cmd_packages": [
O script install-apt-common.sh processa a instalação. Não precisa de alteração direta, mas certifique-se de que o novo pacote (netcat-openbsd) está disponível nos repositórios e não depende de outros pacotes virtuais.
A parte crítica aqui é ajustar os testes para validar netcat-openbsd ou outro equivalente. O script atualmente está configurado para netcat. Substitua as ocorrências: Antes: "net-tools" { $toolName = "netstat"; break } Depois: "net-tools" { $toolName = "netstat"; break } Se você deseja testar comandos específicos do netcat, como nc, adapte os testes para validar corretamente os comandos relacionados ao pacote instalado.
Certifique-se de que as alterações foram aplicadas corretamente: Construa a imagem novamente usando o pipeline apropriado. Verifique os logs para garantir que o pacote foi instalado sem erros. Execute os testes de validação e veja se eles passam.
Confirme que as dependências do pacote substituto (netcat-openbsd) atendem às necessidades do ambiente e outros scripts que dependem de netcat. Essa abordagem ajustará o conjunto de ferramentas, o script de instalação e os testes para substituir o pacote virtual e resolver o problema de instalação. |
@kleverson1988 There is no "netcat" specific today in the test, it is possible to just set
It is already bypassed on my setup but the question is more why is this happening in the first place, ( ok there is an error in the build on the apt install, but the test are ok, so netcat is installed another way on the runner) and is this worth a PR? |
Hi @GregoireW, Some CMD packages are already pre-installed, so no installation is necessary. We currently have no plans to modify the script. we are Closing this issue. Thank you. |
@hemanthmanga i guess you also need to modify the As long as you ignore the error builds depending on return code checks will fail at this point! @GIgako19929 fyi as you mentioned this issue in the PR |
The way I see that is either you think netcat is a mandatory package for GitHub runner and so the script has to be fixed to I can write a PR for that if you want, but need the way to go... Currently netcat is just setup on the runner by luck. |
Description
When I try to build a ubuntu 24.04 runner image from script in this repo, I got an issue with netcat:
not sure how to resolve this cleanly.
Platforms affected
Runner images affected
Image version and build link
24.04
Is it regression?
was succesful on 22.04
Expected behavior
toolset should install without error
Actual behavior
fail with
Repro steps
error is showing when
install-apt-common.sh
is executedThe text was updated successfully, but these errors were encountered: