-
Notifications
You must be signed in to change notification settings - Fork 307
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
Allow allow prefixing deltas and objects with different hostname/URL and be stored as top level files on that URL #1699
Comments
Any input on this? It's somewhat related to #1541, I also want to host |
Offhand it sounds potentially reasonable; not clear exactly how you're proposing this be configured though. Unless your app is huge though you can probably get away with just hosting "from scratch" deltas for new versions right? Also I guess integration with github releases could go all the way to libostree having some awareness of parsing the github release metadata API. |
One way to do this might be to add couple of options to
so that whenever someone tries to use my repo, their OSTree client program will see those config options set and will know that it needs to flatten the
to something like
and then also prefix it with whatever is in
I don't think the OSTree software needs to use any GitHub API in order to implement the suggested. Although we are trying to work around GitHub limitations here, OSTree doesn't even have to be aware that it's GitHub, if some other service has the same limitations it would work with that too. |
Here is an example of how I expect it to work. I have two repositories on GitHub. One is for a software called FooBar, and another is for Flatpak repository that uses GitHub Pages. Whenever I make a new FooBar software release, I update the Flatpak repo locally with the new version of FooBar, run a bash script to flatten |
Reworded the issue better in #2020. |
I want my ostree to be on
https://example.com/repo/
, but theobjects
anddeltas
-- the most heavyweight files -- onhttps://cnd.example.com/repo/
. Moreover, I want everything onhttps://cnd.example.com/foobar/
to be a file with no directory hierarchy, e.g. what would have beenhttps://example.com/repo/objects/01/cf30656a692c23c76e73bae7950bdcc7ff6316e7cb7ebcd7a337c1ac45af57.dirtree
should be something along the lines of this:https://cnd.example.com/foobar/objects_01_cf30656a692c23c76e73bae7950bdcc7ff6316e7cb7ebcd7a337c1ac45af57.dirtree
.So I want an option to specify
objects
anddeltas
prefix URL, potentially different host, and an option to flatten the directory structure so that they are top level files on that URL.This can be very easy done server-side with a custom URL rewriting rule that does 301 HTTP redirect, but I host my repo on GitHub Pages, which doesn't provide any way to do server-side redirects. You can only do client-side redirects on GitHub Pages with
<!DOCTYPE html><head><meta http-equiv="refresh" content="0;URL=https://cnd.example.com/foobar/objects_01_cf30656a692c23c76e73bae7950bdcc7ff6316e7cb7ebcd7a337c1ac45af57.dirtree"></head><body></body></html>
, but those work only in browsers, neither wget nor curl follow those.Anyway, my actual use case is to host a Flatpak repo on GitHub such that small metadata files would be hosted on GitHub Pages static website hosting, but heavyweight files like objects and deltas would be hosted on GitHub Releases. I want this due to limitations: GitHub Pages has a limit of 100MB per file, total repository size not should not exceed 1GB, and it allows only 100GB/month bandwidth, when GitHub Releases has a limit of 2GB per file, and no limit for the total size of all files combined and no limit on the bandwidth, so it makes more sense to host the heavyweight
objects
anddeltas
on Releases over Pages.Just to give an example URLs closer to real-world use, given my ostree is at
http://nurupo.github.io/test-repo/repo/
, instead of ostree looking forhttp://nurupo.github.io/test-repo/repo/objects/01/cf30656a692c23c76e73bae7950bdcc7ff6316e7cb7ebcd7a337c1ac45af57.dirtree
I want it to look forhttps://github.com/nurupo/test-repo/repo/releases/download/some-git-tag/objects_01_cf30656a692c23c76e73bae7950bdcc7ff6316e7cb7ebcd7a337c1ac45af57.dirtree
.I wanted to open this issue against Flatpak initially, but then I realized that there is little they can do about it given that they just use OSTreee for the repository and it's something that OSTree would need to support itself.
The text was updated successfully, but these errors were encountered: