Ticket #4459 (closed defect: fixed)
Usage of 'sed' in build system/makefiles is not portable
Reported by: | karlson2k | Owned by: | andrew_b |
---|---|---|---|
Priority: | major | Milestone: | 4.8.30 |
Component: | compilation | Version: | master |
Keywords: | Cc: | ||
Blocked By: | Blocking: | ||
Branch state: | merged | Votes for changeset: | committed-master |
Description
In the build system the sed command used with unportable "inplace" options ("-i").
The leads to build failures on some platforms, like Solaris, and reduces portability in general.
Similar issues were fixed already in the past: https://midnight-commander.org/ticket/3479
The configure script is already detecting suitable sed command in LT_INIT macro, so it worth to use the result of this detection to reduce portability problems.
On the other hand, workaround for "inplace" use is very simple and straightforward, so for the best portability it would be better to avoid unportable sed commands.
POSIX sed specification: https://pubs.opengroup.org/onlinepubs/9699919799/utilities/sed.html
Suggested fix: https://github.com/MidnightCommander/mc/pull/184
Attachments
Change History
Changed 18 months ago by karlson2k
- Attachment 0001-configure-add-explicit-sed-detection.patch added
Changed 18 months ago by karlson2k
- Attachment 0002-Use-configure-detected-or-user-specified-sed-in-buil.patch added
Changed 18 months ago by karlson2k
- Attachment 0003-Replaced-unportable-inplace-sed-command.patch added
comment:1 Changed 18 months ago by andrew_b
- Status changed from new to accepted
- Owner set to andrew_b
- Component changed from mc-core to compilation
- Milestone changed from Future Releases to 4.8.30
comment:2 Changed 18 months ago by andrew_b
- Branch state changed from no branch to on review
Branch: 4459_sed
Initial changeset:054a051b427d7fab879b596f953265e764ee03d2
comment:3 Changed 18 months ago by andrew_b
- Votes for changeset set to andrew_b
- Branch state changed from on review to approved
comment:4 Changed 18 months ago by andrew_b
- Status changed from accepted to testing
- Votes for changeset changed from andrew_b to committed-master
- Resolution set to fixed
- Branch state changed from approved to merged
Merged to master: [2e3e3a377570570394850ca04069894ca1ffaf79].
git log --pretty=oneline e5911c1ef..2e3e3a377