eatmydata hook faills on newer Ubuntu releases #35

Open
opened 1 year ago by Ghost · 0 comments
Ghost commented 1 year ago

The eatmydata hook has a hard-coded assumptions that packages carry a SHA256 digest. This is no longer true in later Ubuntu releases.

Here's the output of apt-get download --print-uris eatmydata libeatmydata1 from Ubuntu 22.10:

'http://archive.ubuntu.com/ubuntu/pool/main/libe/libeatmydata/eatmydata_130-2build1_all.deb' eatmydata_130-2build1_all.deb 5584 SHA512:34aa796f0b05480a0b1b80790d97af422fd2c88a2aeb0e69792560e13d3bd1562b145906dbab22954f55e0c610213791c6e209d870201ff9c91d6d5711c07c42
'http://archive.ubuntu.com/ubuntu/pool/main/libe/libeatmydata/libeatmydata1_130-2build1_amd64.deb' libeatmydata1_130-2build1_amd64.deb 7498 SHA512:74d51a682ea0c853b9e20bd8ce4d662abad843cf6b1e236f4b9a709ddb888922ec3c5beae958fc349091cce250e95b5cefdaee48651b2d8a8aeed6f89e923dac

On an mmdebstrap invocation with --hook-dir=/usr/share/mmdebstrap/hooks/eatmydata and a Ubuntu 22.10 (kinetic) repository, one is left with an obscure error message:

I: installing essential packages...
/usr/bin/dpkg: 2: exec: /usr/bin/eatmydata: not found

I would expect a proper fix to be:

  1. Agnostic to the digest preference of the distribution.
  2. Have the eatmydata hook fail more gracefully when the hook's sed expression fails to match.

As a workaround, we've successfully used the eatmydata with Ubuntu 22.10 after issuing the following command:

sed -i 's/SHA256/SHA[0-9]\\+/' /usr/share/mmdebstrap/hooks/eatmydata/extract.sh
The eatmydata hook has a hard-coded assumptions that packages carry a SHA256 digest. This is no longer true in later Ubuntu releases. Here's the output of `apt-get download --print-uris eatmydata libeatmydata1` from Ubuntu 22.10: ``` 'http://archive.ubuntu.com/ubuntu/pool/main/libe/libeatmydata/eatmydata_130-2build1_all.deb' eatmydata_130-2build1_all.deb 5584 SHA512:34aa796f0b05480a0b1b80790d97af422fd2c88a2aeb0e69792560e13d3bd1562b145906dbab22954f55e0c610213791c6e209d870201ff9c91d6d5711c07c42 'http://archive.ubuntu.com/ubuntu/pool/main/libe/libeatmydata/libeatmydata1_130-2build1_amd64.deb' libeatmydata1_130-2build1_amd64.deb 7498 SHA512:74d51a682ea0c853b9e20bd8ce4d662abad843cf6b1e236f4b9a709ddb888922ec3c5beae958fc349091cce250e95b5cefdaee48651b2d8a8aeed6f89e923dac ``` On an mmdebstrap invocation with `--hook-dir=/usr/share/mmdebstrap/hooks/eatmydata` and a Ubuntu 22.10 (kinetic) repository, one is left with an obscure error message: ``` I: installing essential packages... /usr/bin/dpkg: 2: exec: /usr/bin/eatmydata: not found ``` I would expect a proper fix to be: 1. Agnostic to the digest preference of the distribution. 2. Have the eatmydata hook fail more gracefully when the hook's sed expression fails to match. As a workaround, we've successfully used the eatmydata with Ubuntu 22.10 after issuing the following command: ```sh sed -i 's/SHA256/SHA[0-9]\\+/' /usr/share/mmdebstrap/hooks/eatmydata/extract.sh ```
Sign in to join this conversation.
No Label
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: josch/mmdebstrap#35
Loading…
There is no content yet.