Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.
Sign upUnnecessary post-scripts in RPM packages of MRO #20
Comments
nathansoz
added this to the MRO 3.3.3 milestone
Nov 30, 2016
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
nathansoz
Nov 30, 2016
Contributor
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.
|
We will look at these comments and make changes. Particularly: -Adding update-alternatives support instead of symlinking ourselves in |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
iavael
Nov 30, 2016
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:
- obsolete and replace R-core package for rhel-based distros in your rpm metadata like
Replaces: R-core
Obsoletes: R-core
Provides: R-core
- don't touch /usr/bin/R/Rscript at all and avoid conflict by symlinking your binaries to path like /usr/bin/MR and /usr/bin/MRscript (but this can break integration with other tools that just look for "R" and "Rscript" in $PATH and have no params to override this)
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
iavael
commented
Nov 30, 2016
•
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:
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 |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
voronoipotato
Jun 13, 2018
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.
voronoipotato
commented
Jun 13, 2018
|
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. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
richcalaway
Jun 14, 2018
Contributor
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.
|
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. |
iavael commentedNov 27, 2016
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 MrMEEE/bumblebee-Old-and-abbandoned#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.