Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
Jan200101 opened this issue Nov 8, 2024 · 9 comments
Open

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

Jan200101 opened this issue Nov 8, 2024 · 9 comments

Comments

@Jan200101
Copy link
Contributor

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
Copy link
Member

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
Copy link
Member

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
Copy link
Member

Did this in 275a0fe.

@Jan200101
Copy link
Contributor Author

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
Copy link
Member

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
Copy link
Contributor Author

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
Copy link
Member

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
Copy link
Member

adamharrison commented Nov 11, 2024

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
Copy link
Contributor Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants