Closed iavael closed 6 years ago
We will look at these comments and make changes. Particularly:
-Adding update-alternatives support instead of symlinking ourselves in -The /bin/sh stuff is due to Ubuntu symlinking dash to /bin/sh and that reacting badly with both the R shell wrapper and some Microsoft R Server features. I believe we fixed the R shell wrapper features last release by explicitly requesting bash and we will be fixing the R server features next release. 3.3.3 should be updated with these fixes.
Adding update-alternatives support instead of symlinking ourselves in
I investigated a bit more. If there's already R package in distro and it doesn't support update-alternatives mechanism (in Fedora/CentOS/RHEL it doesn't), then alternatives won't help anyway, but direct manipulation with /usr/bin/R and /usr/bin/Rscript will break distro packages if they are installed. It's better to pick one of variants:
Replaces: R-core
Obsoletes: R-core
Provides: R-core
The /bin/sh stuff is due to Ubuntu symlinking dash to /bin/sh...
Well, in RPM-based systems (at least in RHEL-based like RHEL itself, CentOS and Fedora, I don't remember about SuSE-based) /bin/sh is already symlink to /bin/bash, so you can avoid replacing in in MRO's rpm packages. For debian-based systems there is dpkg-divert mechanism [1][2] which can help you replace /bin/sh without conflicting distro's settings. Fixing R shell wrapper looks as better option but maybe you can use provided info for fastfix.
[1] https://www.debian.org/doc/debian-policy/ap-pkg-diversions.html [2] https://wiki.debian.org/Adding%20and%20removing%20diversions
https://lobste.rs/s/btycfp/microsoft_s_failed_attempt_at_debian
This issue was reffered to on Lobsters which was discussing this article https://www.preining.info/blog/2018/06/microsofts-failed-attempt-on-debian-packaging/ . Perhaps you could reach out to someone for help on this.
We have re-released MRO 3.5.0 with new mro postinst scripts that use the alternatives approach; most of the other changes had been made for MRO 3.3.3.
In microsoft-r-open-mro-3.3 and microsoft-r-open-mkl-3.3 rpm-s there're unnecessary scripts in pre/post sections, see comments
microsoft-r-open-mro-3.3:
So whole pre and post sections are unnecessary, beacuse everything they do could (moreover should!) be done during build. One mistake in "rm" statement and you destroy user's system like in https://github.com/MrMEEE/bumblebee-Old-and-abbandoned/issues/123
These pre/post sections can be reduced to couple of update-alternatives calls. And playing with /bin/sh risking of cripple user's system is wrong from any point of view, please never do this.