Bug 19755

Summary: eatmydata is broken
Product: Mageia Reporter: PC LX <mageia>
Component: RPM PackagesAssignee: Thierry Vignaud <thierry.vignaud>
Status: RESOLVED FIXED QA Contact:
Severity: minor    
Priority: Low    
Version: Cauldron   
Target Milestone: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Source RPM: eatmydata-105-1.mga6 CVE:
Status comment:

Description PC LX 2016-11-11 12:03:23 CET
Description of problem:

This bug is a regression from Mageia 5.

eatmydata is non-functional.
When running "eatmydata" the following error message is shown:
/usr/bin/eatmydata: line 18: dpkg-architecture: command not found

This error occurs in line 18 of the script:
export `dpkg-architecture|grep DEB_BUILD_MULTIARCH`

Currently, there are separate x86_64 and i586 eatmydata packages and these can't be both installed at the same time.

Two solve this bug I see two approaches:

A)
Remove the line:
export `dpkg-architecture|grep DEB_BUILD_MULTIARCH`

And replace the line:
shlib="/usr/lib/$DEB_BUILD_MULTIARCH/eatmydata.sh"
with:
shlib="/usr/libexec/eatmydata.sh"

This is the approach used in Mageia 5.


B)
Merge the various architecture eatmydata packages in to one package that supports multiple architectures. This will require placing the eatmydata.sh scripts in the right paths (/usr/lib/$DEB_BUILD_MULTIARCH/eatmydata.sh). Also, the eatmydata package must depend on the package with dpkg-architecture, dpkg.

This approach seems to be as upstream intended.
David Walser 2016-11-11 16:11:36 CET

Assignee: bugsquad => thierry.vignaud

Comment 1 Thierry Vignaud 2016-11-11 16:37:28 CET
It works fine, that's just a warning
Thierry Vignaud 2016-11-11 16:37:35 CET

Priority: Normal => Low
Severity: normal => minor

Comment 2 PC LX 2016-11-11 18:37:01 CET
It does not work fine. It does not work at all. Programs called with eatmydata should have "LD_PRELOAD=/usr/lib64/libeatmydata.so" in the environment and that is not happening.

You can use this command to check if it works or not:
[[ -n "$(eatmydata bash -c 'set' 2>&1 | grep '^LD_PRELOAD=/usr/lib64/libeatmydata.so$')" ]] && echo OK || echo FAILURE
Comment 3 Thierry Vignaud 2016-11-11 20:41:28 CET
Fixed in eatmydata-105-2.mga6

Status: NEW => RESOLVED
Resolution: (none) => FIXED
Source RPM: (none) => eatmydata-105-1.mga6