Bug 1822280
| Summary: | lvm2: set -o pipefail in tools/Makefile.in is a bashism | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | [Community] LVM and device-mapper | Reporter: | Michael Orlitzky <michael> | ||||||
| Component: | lvm2 | Assignee: | Zdenek Kabelac <zkabelac> | ||||||
| lvm2 sub component: | Compilation, building and portability | QA Contact: | cluster-qe <cluster-qe> | ||||||
| Status: | POST --- | Docs Contact: | |||||||
| Severity: | medium | ||||||||
| Priority: | unspecified | CC: | agk, heinzm, jbrassow, prajnoha, zkabelac | ||||||
| Version: | 2.02.185 | Flags: | pm-rhel:
lvm-technical-solution?
pm-rhel: lvm-test-coverage? |
||||||
| Target Milestone: | --- | ||||||||
| Target Release: | --- | ||||||||
| Hardware: | All | ||||||||
| OS: | All | ||||||||
| Whiteboard: | |||||||||
| Fixed In Version: | Doc Type: | If docs needed, set a value | |||||||
| Doc Text: | Story Points: | --- | |||||||
| Clone Of: | Environment: | ||||||||
| Last Closed: | Type: | Bug | |||||||
| Regression: | --- | Mount Type: | --- | ||||||
| Documentation: | --- | CRM: | |||||||
| Verified Versions: | Category: | --- | |||||||
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||||
| Cloudforms Team: | --- | Target Upstream Version: | |||||||
| Embargoed: | |||||||||
| Attachments: |
|
||||||||
|
Description
Michael Orlitzky
2020-04-08 16:37:47 UTC
lvm2 building basically depends on bash & gcc. If there is anyone who wants to provide global patch fixing all the 'bashism' everywhere - it might be pushed upstream if the code will behave in the same way. (In reply to Zdenek Kabelac from comment #1) > lvm2 building basically depends on bash & gcc. > That's a valid choice, but in that case, can you set SHELL=bash rather than using /bin/sh and just praying that it points to bash? Please provide tested patch - so it can be considered for upstreaming. Created attachment 1677380 [details]
0001-tools-Makefile.in-only-set-o-pipefail-if-the-shell-i.patch
Created attachment 1677381 [details]
0002-tools-Makefile.in-use-printf-instead-of-non-portable.patch
I had to fix a few "echo" calls after guarding "set -o pipefail" behind a bash test, too. The resulting command-count.h and command-lines-input.h are unchanged for me.
Fixed with different solution to avoid using pipe - which is hard to catch when it fail without 'set -o pipefail' https://listman.redhat.com/archives/lvm-devel/2023-February/024582.html Will likely go upstream with lvm2 2.03.19 with some more MuslC/dash fixes as well. |