[MDEV-13946] Server RPMs have dependency on "which" Created: 2017-09-28 Updated: 2018-02-13 Resolved: 2017-10-10 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Packaging, Platform SUSE, wsrep |
| Affects Version/s: | 10.1.28, 10.2.9 |
| Fix Version/s: | 10.1.29, 10.2.10, 10.3.5 |
| Type: | Bug | Priority: | Blocker |
| Reporter: | Kolbe Kegel (Inactive) | Assignee: | Sergei Golubchik |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Environment: |
RPM-based Linux distributions. |
||
| Issue Links: |
|
||||||||||||
| Sprint: | 10.2.10 | ||||||||||||
| Description |
|
Our Server RPMs have a dependency on "which" if they're build with wsrep support: cmake/cpack_rpm.cmake:170:
This breaks installations on SLES11, because SLES11 does not have any package that provides the "which" capability. (The which(1) tool itself is included in some other package.) It's also worth noting that many Docker containers and other very lightweight environments may not include which(1), either. This is because which(1) is used in a large number of galera shell scripts (as well as other shell scripts):
For example:
This is a very poor way to perform this kind of check. It unnecessarily requires an external tool, which makes it fragile and error-prone. The POSIX way to perform this same check would be to do, for example,
. This change should be made across all shell scripts shipped by MariaDB Server, and the dependency on which(1) should be removed. |
| Comments |
| Comment by Kolbe Kegel (Inactive) [ 2017-09-28 ] | ||||||||||
|
Here's a brute-force way to solve the SLES11-specific part of this problem:
| ||||||||||
| Comment by Sergei Golubchik [ 2017-10-09 ] | ||||||||||
|
I'll use your "brute-force" fix as above.
and I am not sure whether we could ignore that. | ||||||||||
| Comment by Kolbe Kegel (Inactive) [ 2017-10-10 ] | ||||||||||
|
serg, alias expansion is disabled by default in non-interactive shell sessions, such as a script. ("Aliases are not expanded when the shell is not interactive, unless the expand_aliases shell option is set using shopt") | ||||||||||
| Comment by Sergei Golubchik [ 2017-10-10 ] | ||||||||||
|
Indeed. Then I'll remove which in 10.2 or 10.3, as a cleanup |