Wiki - https://fedoraproject.org/wiki/Changes/NodejsAlternativesSystem Discussion thread - https://discussion.fedoraproject.org/t/f43-change-proposal-use-update-alternatives-for-managing-nodejs-symlinks-self-contained/158042/2
This is a proposed Change for Fedora Linux. This document represents a proposed Change. As part of the Changes process, proposals are publicly announced in order to receive community feedback. This proposal will only be implemented if approved by the Fedora Engineering Steering Committee. == Summary == We aim to move away from manual management of <code>/usr/bin/node</code>, <code>/usr/bin/npm</code>, and similar symlinks to leveraging update-alternatives system. == Owners == * Name: [[User:aradchen|Andrei Radchenko]] * Email: aradc...@redhat.com * Name: [[User:jstanek|Jan Stanek]] * Email: jsta...@redhat.com * Name: [[User:tjuhasz|Tomas Juhasz]] * Email: tjuh...@redhat.com == Detailed Description == This is a part of a larger iteration in a way we package NodeJS for Fedora and RHEL. The other parts are [[Changes/NodejsNodeModulesPath]] and [[Changes/NodeJSMetapackages]]. This change deals specifically with the management of the non-versioned symlinks in system paths. Currently, the NodeJS packages (streams) provided in Fedora are all installable in parallel, by virtue of moving any potentially conflicting bits into versioned equivalents and/or versioned directories. For one example of many: <pre> %install mv %{buildroot}%{_bindir}/node %{buildroot}%{_bindir}/node-%{node_version_major} ... </pre> One of the streams is designed as the "default" one, and that stream then ships manually created non-versioned symlinks to the renamed paths: <pre> %if 0%{nodejs_is_default} ln -srf %{buildroot}%{_bindir}/node-%{node_version_major} %{buildroot}%{_bindir}/node ... %endif </pre> By using update-alternatives, we can iterate on this idea and gain several benefits outlined below. == Feedback == == Benefit to Fedora == # No matter which stream you install, you'll always have <code>/usr/bin/node</code> and other non-versioned names available. The versioned names will be also present, if you want to be specific in your scripts. # There is no "official Fedora endorsement" on which NodeJS stream should be "best" or "default"; if you as a system administrator have multiple streams installed, the decision of which should be the default is up to you. The second item will also give us the maintainers greater freedom in introducing new streams and obsoleting the old ones without worrying too much about how to switch the "default" in the middle of the distribution life cycle. This is not a big pain point for Fedora, where the length of the life of a single version matches the length of upstream NodeJS LTO support pretty closely, but becomes much more important in longer-living downstream distributions (e.g. RHEL). == Scope == * Proposal owners: ** Port the manual symlink creation and management to update-alternatives. ** Ensure the streams behave consistently and no conflict is introduced. == User Experience == * Users will be able to install any number of streams and switch between default one rather easy by just running `update-alternatives --config node'. == Dependencies == * Should not cause any problems to dependant packages. == Contingency Plan == * Contingency mechanism: Revert back to manual symlink management and go back to the design phase. * Contingency deadline: Beta Freeze. * Blocks release? We aim to do the rebuilds in Koji side tag and merge it atomically; so NO. == Documentation == * This is a downstream change; this page is the initial documentation. * [https://docs.fedoraproject.org/en-US/packaging-guidelines/Alternatives/ Fedora Alternatives] == Release Notes == TODO -- Aoife Moloney Fedora Operations Architect Fedora Project Matrix: @amoloney:fedora.im IRC: amoloney -- _______________________________________________ devel-announce mailing list -- devel-annou...@lists.fedoraproject.org To unsubscribe send an email to devel-announce-le...@lists.fedoraproject.org Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/devel-annou...@lists.fedoraproject.org Do not reply to spam, report it: https://pagure.io/fedora-infrastructure/new_issue -- _______________________________________________ devel mailing list -- devel@lists.fedoraproject.org To unsubscribe send an email to devel-le...@lists.fedoraproject.org Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org Do not reply to spam, report it: https://pagure.io/fedora-infrastructure/new_issue