Opened 2 weeks ago
Closed 9 days ago
#5938 closed task (fixed)
Accept new rust based utilities in host requirements
| Reported by: | pierre | Owned by: | pierre |
|---|---|---|---|
| Priority: | normal | Milestone: | 13.1 |
| Component: | Book | Version: | git |
| Severity: | normal | Keywords: | |
| Cc: |
Description
Some distros (presently at least ubuntu-26.04-LTS, but debian should follow) begin to use rust based utilities instead of original ones. The problem is the rust based utilities have versions different from (and usually lower than) the original ones. For example, some (but not all) of the core utilities from GNU coreutils have been replaced with the same utilities from uutils coreutils. I've verified that those utilities allow building LFS, but they don't pass our version check (version is 0.8.0).
(for the record, but it concerns only jhalfs, there is also a new rust based sudo-rs that is used by default on ubuntu, and which does not pass the version check either.)
I am not sure how this should be managed. GNU coreutils can be forced in Ubuntu, but not very easily (it's not just a matter of using the right alternative in the alternatives system of Ubuntu). And there is no reason to force it anyway, since the utilities are compatible.
Changing the text in "Host Requirements" should be easy. But we need to change the version-check.sh program too.
Attachments (1)
Change History (13)
comment:1 by , 12 days ago
by , 9 days ago
| Attachment: | 0001-adjust-version-check.sh-to-accept-uutils-coreutils.patch added |
|---|
follow-up: 3 comment:2 by , 9 days ago
I have a ubuntu-26.04 environment and this patch works fine on my machine.
BTW, what's the meaning of assign on this wiki, should i get commit permission before accept one ticket?
follow-up: 6 comment:3 by , 9 days ago
| Owner: | changed from to |
|---|---|
| Status: | new → assigned |
Replying to Zhang Wen:
I have a ubuntu-26.04 environment and this patch works fine on my machine.
BTW, what's the meaning of assign on this wiki, should i get commit permission before accept one ticket?
Thanks for the patch. First a little review: -E is not needed for grep, and I'd suggest adding "GNU" before "coreutils" for the GNU coreutils case.
For the ticket management: yes, you need to be able to commit if you accept the ticket, since the ticket is usually closed by a commit.
Unless you want to make another patch, I'll commit yours with the above modifications...
comment:4 by , 9 days ago
if sort --version |& grep -q 'uutils'; then ver_check Coreutils sort 0.8 || bail "Uutils Coreutils too old, stop" else ver_check Coreutils sort 8.1 || bail "GNU Coreutils too old, stop" fi
instead of redundantly using $?. |& is also a shorthand for 2>&1 |.
Also IMO the "sort" token should be aligned to executable names in other ver_check commands.
follow-up: 9 comment:5 by , 9 days ago
Of course the text also needs an update, with a priority even higher than the script. LFS is a book supposed to be read by humans.
follow-up: 7 comment:6 by , 9 days ago
Replying to pierre:
Thanks for the patch. First a little review: -E is not needed for grep, and I'd suggest adding "GNU" before "coreutils" for the GNU coreutils case.
For the ticket management: yes, you need to be able to commit if you accept the ticket, since the ticket is usually closed by a commit.
Unless you want to make another patch, I'll commit yours with the above modifications...
Thanks for the reply, please go ahead.
JFYI, ubuntu seems not contain docbook-xsl for the minimal install, and this lead to confusing error information like 'xsltproc failed to load external entity' when trying to create the html book from the git source. Expliciting install with following command can fix this.
sudo apt install docbook-xsl
comment:7 by , 9 days ago
Replying to Zhang Wen:
Replying to pierre:
Thanks for the patch. First a little review: -E is not needed for grep, and I'd suggest adding "GNU" before "coreutils" for the GNU coreutils case.
For the ticket management: yes, you need to be able to commit if you accept the ticket, since the ticket is usually closed by a commit.
Unless you want to make another patch, I'll commit yours with the above modifications...
Thanks for the reply, please go ahead.
JFYI, ubuntu seems not contain docbook-xsl for the minimal install, and this lead to confusing error information like 'xsltproc failed to load external entity' when trying to create the html book from the git source. Expliciting install with following command can fix this.
sudo apt install docbook-xsl
This is not the only thing you have to install, I think. IIRC, you also need libxml2-utils (for xmllint). But rendering the book is for advanced users, so they should be able to manage those.
follow-up: 10 comment:8 by , 9 days ago
The INSTALL file in the LFS source tree already lists all the dependencies anyway.
comment:9 by , 9 days ago
Replying to Xi Ruoyao:
Of course the text also needs an update, with a priority even higher than the script. LFS is a book supposed to be read by humans.
Yes, I was planning to change the "if ..." too. Also the 2>&1. And I have already a change in the text in my local repo...
follow-up: 11 comment:10 by , 9 days ago
Replying to Xi Ruoyao:
The INSTALL file in the LFS source tree already lists all the dependencies anyway.
The INSTALL file still says 'After downloading the SVN source', should this be changed?
I always get the source files from https://git.linuxfromscratch.org/lfs.
comment:11 by , 9 days ago
Replying to Zhang Wen:
Replying to Xi Ruoyao:
The INSTALL file in the LFS source tree already lists all the dependencies anyway.
The INSTALL file still says 'After downloading the SVN source', should this be changed?
yes, will do.
I always get the source files from https://git.linuxfromscratch.org/lfs.

I suppose we can add a ver_coreutils() function to test for either version of coreutils.
I haven't looked at ubuntu-26.04-LTS so I'm not sure how to check, but we need to do something like: