-
-
Notifications
You must be signed in to change notification settings - Fork 288
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
[enh] add xz decompression for sources #1785
base: dev
Are you sure you want to change the base?
Conversation
|
Documentation should be change too: |
I can add it too. It seems a good idea for Yunohost to supports theses formats. |
I'll make a PR for documentation soon (I hope 😄 ) |
Alongside xz / gz / bz2 extraction, I propose in this PR to rename the extracted file automaticaly (if
What do you think about this ? |
@grosmanal : it's pretty much already what it does (except that "main" is kept to "main"), because unless you use the |
if [[ "$source_id" == "main" ]]; then | ||
local src_rename=$app |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm confused by this because this will lead to inconsistent behavior between this case and other case (where the main source is just kept as "main" and not "$app") x_X ... What's the rationale for this ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The goal is to allow the omission of rename
in resource definition. (I just remember, writing this line, I've mentioned to set rename
in the «how to test» section of this PR 🥴)
In the the forgejo app case, I thought it was logical to extract the archive to the same name as the application one.
The problem
Forgejo application is a single executable file. It is released compressed in xz format (https://codeberg.org/forgejo/forgejo/releases)
Yunohost does not allow to extract such archives with
ynh_setup_source
helper. The extraction has to be done ininstall
script.Since Yunohost supports
tar.xz
format (and many others), it should supportsxz
format as well.Solution
Update
ynh_setup_source
helper to introduce thexz
format.PR Status
Ready to test
How to test
format
andextract
configuration from[resources.sources.main]
rename
configuration to «forgejo» in[resources.sources.main]
scripts/install
(xz -d "$install_dir/forgejo.xz"
)