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)

0001-adjust-version-check.sh-to-accept-uutils-coreutils.patch (1010 bytes ) - added by Zhang Wen 9 days ago.

Download all attachments as: .zip

Change History (13)

comment:1 by Bruce Dubbs, 12 days ago

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:

if rust_coreutils && version >= 0.8 then return OK
else if coreutils sort >= 8.1 then return OK
else bail()

comment:2 by Zhang Wen, 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?

Last edited 9 days ago by Zhang Wen (previous) (diff)

in reply to:  2 ; comment:3 by pierre, 9 days ago

Owner: changed from lfs-book to pierre
Status: newassigned

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 Xi Ruoyao, 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.

comment:5 by Xi Ruoyao, 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.

in reply to:  3 ; comment:6 by Zhang Wen, 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

in reply to:  6 comment:7 by pierre, 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.

comment:8 by Xi Ruoyao, 9 days ago

The INSTALL file in the LFS source tree already lists all the dependencies anyway.

Last edited 9 days ago by Xi Ruoyao (previous) (diff)

in reply to:  5 comment:9 by pierre, 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...

in reply to:  8 ; comment:10 by Zhang Wen, 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.

in reply to:  10 comment:11 by pierre, 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.

comment:12 by pierre, 9 days ago

Resolution: fixed
Status: assignedclosed

Fixed at 290bcae69

Note: See TracTickets for help on using tickets.