Skip to content

Conversation

userid0x0
Copy link

netcat is a virtual package on Ubuntu 24.04
Install netcat-openbsd as preferred by Ubuntu

This should fix #147

netcat is a virtual package on Ubuntu 24.04
Install `netcat-openbsd` as preferred by Ubuntu
&& mv "/tmp/toolset.new.json" "/imagegeneration/toolset.json"
;;
*) ;;
esac
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think all Ubuntu releases onward have this new package name:

Suggested change
esac
UBUNTU_MAJOR=${VERSION_ID%%.*}
if (( UBUNTU_MAJOR >= 24 )); then
jq '.apt.cmd_packages |= map(if . == "netcat" then "netcat-openbsd" else . end)' "/imagegeneration/toolset.json" > "/tmp/toolset.new.json" \
&& mv "/tmp/toolset.new.json" "/imagegeneration/toolset.json"
fi

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unfortunately GitHub still has bugs, even when I select the correct lines 🤷

UBUNTU_MAJOR=${VERSION_ID%%.*}
if (( UBUNTU_MAJOR >= 24 )); then
  jq '.apt.cmd_packages |= map(if . == "netcat" then "netcat-openbsd" else . end)' "/imagegeneration/toolset.json" > "/tmp/toolset.new.json" \
    && mv "/tmp/toolset.new.json" "/imagegeneration/toolset.json"
fi

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That is fine for me as well - do you want me to integrate this patch?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you want to, yes, then Ubuntu 25+ would be working too 😄

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

Successfully merging this pull request may close these issues.

basic.sh installation broken due to netcat package
2 participants