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

Enable building image on Debian #34

Merged
merged 1 commit into from
Nov 6, 2024
Merged

Enable building image on Debian #34

merged 1 commit into from
Nov 6, 2024

Conversation

nekorouter
Copy link
Contributor

Enable building image on Debian, since all the tools used for building image can be installed on Debian and chroot also work.

Tools dependency list has been separated and check_deps() will check this script is running on Arch or Debian, more host-distro can be supported in the future.

@sehraf
Copy link
Owner

sehraf commented Nov 5, 2024

Thanks for the contribution!

I'm wondering if the ID variable is the best approach, since it differs for derivatives like Arch Linux ARM (ID=archarm) or Ubuntu (ID=ubuntu). Maybe using using ID_LIKE is better? Though I also don't know of the packages are always available / have the same name.

(Disclaimer: I don't know if I've ever tested the scripts on Arch Linux ARM)

@nekorouter
Copy link
Contributor Author

Using ID from /etc/os-release may not the most complete solution, but it should be able to work on a lot of cases.
also some Arch-like distros (alarm, manjaro, cachyos) may require special handling... (e.g. alarm has no riscv64-gcc available)

(Maybe this can be improved in future, but for now I don't want to think this problem too much, so I choose using this way to handle distro detection...)

(Links that gave me headache: https://unix.stackexchange.com/questions/6345/how-can-i-get-distribution-name-and-version-number-in-a-simple-shell-script )

@sehraf
Copy link
Owner

sehraf commented Nov 6, 2024

I see (and agree). Thanks again!

@sehraf sehraf merged commit 8195227 into sehraf:main Nov 6, 2024
1 check failed
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.

2 participants