lite-xl / lite-xl-plugin-manager

A lite-xl plugin manager.
Other
112 stars 18 forks source link

Support disabling self-upgrade and lite-xl management #132

Open Jan200101 opened 3 weeks ago

Jan200101 commented 3 weeks ago

Since lpm has more or less become the defacto Lite-XL package/plugin manager it might be of interest for distros to start shipping it simplify the process of installing and updating plugins.

For this it might be of use if its possible to disable or outright remove the ability for lpm to upgrade itself and install lite-xl on its own.

adamharrison commented 3 weeks ago

Already exists, courtesy of Guldo, use -DLPM_DEFAULT_RELEASE='':

// If this is defined as empty string, we disable self-upgrading.
#ifndef LPM_DEFAULT_RELEASE
  #if _WIN32
    #define LPM_DEFAULT_RELEASE "https://github.com/lite-xl/lite-xl-plugin-manager/releases/download/%r/lpm." LITE_ARCH_TUPLE ".exe"
  #else
    #define LPM_DEFAULT_RELEASE "https://github.com/lite-xl/lite-xl-plugin-manager/releases/download/%r/lpm." LITE_ARCH_TUPLE
  #endif
#endif
adamharrison commented 3 weeks ago

For installing lxl; I think it's still reasonable to be able to use bottles, and install versions; just not swap the system version.

adamharrison commented 3 weeks ago

Did this in 275a0fe.

Jan200101 commented 3 weeks ago

For installing lxl; I think it's still reasonable to be able to use bottles, and install versions; just not swap the system version.

I'm fine with using bottles but I'm not so sure how happy distro maintainers would be to package an app that just installs a complete untrusted binary onto the system.

adamharrison commented 3 weeks ago

I mean, things like pip, npm, stuff like that so this too, and you can install most of those via package manager.

If you can give me a case where it's not accepted for this reason, I will happily disable it.

Jan200101 commented 3 weeks ago

I'm not sure the pip or other analogy works because I am not talking about installing an extension but the main program itself (think pip installing python), though distros do tend to ship virtualenv which is capable of it... I'll try to discuss this with other fedora maintainers when I find the time

adamharrison commented 3 weeks ago

Hrm. Yeah; actually, I did look for the exact equivalent, which I guess would be nvm, rvm, perlbrew. nvm and rvm are not included by default in apt repositories for ubuntu.

perlbrew, however, is.

I'll add this as an extra option, unrelated to the release URL.

adamharrison commented 3 weeks ago

Which specific commands are you looking to disable here?

lpm lite-xl switch lpm lite-xl add lpm lite-xl install lpm lite-xl run lpm lite-xl rm lpm list-xl list

All of those?

Keep in mind, though; you can add local lite-xls that you've built yourself. If the issue is downloading a foreign binary executable, then maybe we just limit parsing of lite-xls from manifests?

Jan200101 commented 3 weeks ago

I think just preventing the installation of foreign lite-xl's is good enough.

In regards to those version manager tools: Ubuntu (and Fedora) do ship rustup which lets you install officially supported rust toolchains.

I'm unsure how much the ruling on that applies to this though since through lpm you can install lxl from any source