backdrop / backdrop-issues

Issue tracker for Backdrop core.
144 stars 39 forks source link

Provide BackdropCMS releases as tarball #6675

Open rfay opened 1 month ago

rfay commented 1 month ago

Description of the need

I was working on the DDEV Backdrop quickstart and noticed that we have to jump through a lot of hoops to get the backdrop files into a named directory.

I do see

But that seems unrelated.

Proposed solution

It's so easy to provide a tarball as well as a zipball.

Alternatives that have been considered

zip is just a pretty unwieldy thing, no --strip-components, etc.

Additional information

Of course, the zipball could not have "backdrop" inside it, but that would break years of tradition, I know.

Draft of feature description for Press Release (1 paragraph at most)

"Backdrop releases now contain a tarball as well as a zipball. It has the exact same structure."

klonos commented 1 month ago

But that seems unrelated.

Not totally unrelated - one of the arguments in that issue is that we currently only ship .zip release assets (assuming that we will never need to handle tarballs).

Sad that this was raised during a time that missed the dev meeting this week. I'll try to bring it up during next week's dev meeting.

In the meantime, pinging our @backdrop/core-committers for input.

rfay commented 1 month ago

If the source tarball were the same as the release, we could just use https://github.com/backdrop/backdrop/tarball/1.28.2 for example (gets backdrop-backdrop-1.28.2-0-g82b5dce.tar.gz). But officialness would be better.

(Edit: it doesn't really work out, seems the only difference is the official release tag put in the .info files though)

klonos commented 1 month ago

...seems the only difference is the official release tag put in the .info files though

Yeah, that'd be the packager that does certain things, like removing the various CI/tugboat folders and files and setting the version number. I'll make sure to bring this up during the next dev meeting as I said in my previous comment ...unless one of our core committers chimes in here sooner than that.

Thanks for keeping an eye on Backdrop-land @rfay 🙏🏼

izmeez commented 1 month ago

Came across this same problem on another project. As mentioned above, not having a tarball of the release means the simple -strip-components options is not available and the source tarball includes unnecessary directories and the .info files do not display the version and appear as 1.x instead. It would definitely be a useful option, although not sure how to mitigate security concerns, if any, as the source tarball is available with the shortcomings listed.

izmeez commented 1 month ago

What's even worse is the additional directories like .github with workflows can interfere with pushing updates to a fork of a repo.

jenlampton commented 1 month ago

Interesting discussion. In general, we prefer to make things easier on those who are less technical, assuming those who are more technical will be able to find solutions or work-arounds.

At the time we dropped tarballs, I don't think anyone saw any real benefits to the tarballs over zipballs, and since providing two types caused confusion for most of our users who are less technically-savvy it seemed like an easy decision to make.

Since there do now seem to be reasons to retain tarballs, I don't see any downside to having zipballs avilable on GitHub. We could leave them off backdropcms.org if we still wanted to make things simpler for those using the UIs to grab their downloads.

izmeez commented 1 month ago

@jenlampton Thank you for your comment. What tasks, steps are a needed for this to happen?

quicksketch commented 1 month ago

Thanks @rfay for reaching out to demonstrate a problem with .zip files. It seems kind of like a silly question, but might there be a better way to unzip the files? (My Googling could not find any working solutions). My previous experience had been that zip files were a lot easier to work with across platforms using a GUI; you can usually double-click them then drag out the files, which wasn't the case with tar.gz files.

A very big difference between .tar.gz and .zip files is that .tar.gz files preserve file permissions, whereas (most) .zip files do not. In practice, this means that files receive the default file system permissions with zip archives. That change can trip up developers by having files with different permissions. Though we could address that either by CI-validation to confirm the permissions in Git, or build it into the the packager that we standardize the permissions. There's an issue around this question at https://github.com/backdrop/backdrop-issues/issues/3854

rfay commented 1 month ago

I didn't find a good technique beyond what we currently have in the docs, https://ddev.readthedocs.io/en/stable/users/quickstart/#backdrop

unzip ./backdrop.zip && rm -f backdrop.zip && mv -f ./backdrop/{.,}* . ; rm -rf backdrop UGLY :)

It's pretty easy to set perms to "normal" before tarring them up. And people who need to care about permissions already know what to do.

izmeez commented 1 month ago

@rfay Thank you for sharing the technique to unzip the release file. While it is a more complex line it works for our use case.

yorkshire-pudding commented 4 weeks ago

The bee dl-core command handles this with the existing zip files. It downloads Backdrop to whatever destination you specify or the current location if you don't. It does this by downloading first to a temp folder and then copying the contents of the folder to the destination and deleting the temp folder.