ferium icon indicating copy to clipboard operation
ferium copied to clipboard

Publish to major package managers

Open theRookieCoder opened this issue 2 years ago • 76 comments

We would ideally want to publish to the most common package managers so that updating to the latest version is easy and convenient. These are the ones I have in mind;

Preferably, these packages would use the existing Releases builds rather than compile their builds separately. Their packages should also be updated automatically in the Actions workflow.

theRookieCoder avatar May 05 '22 05:05 theRookieCoder

There's a good alternative to Chocolatey on Windows: https://scoop.sh

It actually manages packages instead of just running the installer, like choco and winget.

NatoBoram avatar May 06 '22 12:05 NatoBoram

yeah, scoop is great too. Although chocolatey is the most well known(scoop is just behind)

JustSimplyKyle avatar May 06 '22 13:05 JustSimplyKyle

It seems that Scoop is meant more for developer tools? Well it seems much easier to upload to anyways so I'll do both

theRookieCoder avatar May 07 '22 03:05 theRookieCoder

https://gist.github.com/KyleUltimate/3e20b14ecbf6a5512912f8dc3addc4b7 This is my implementation of ferium in scoop. It's really easy to implement. This should not even require action changing, the auto update should be done by scoop (currently there is no hash checking because I'm lazy to check hash for windows)

JustSimplyKyle avatar May 08 '22 01:05 JustSimplyKyle

I will add it later, it should also automatically update sha256sums too.

JustSimplyKyle avatar May 08 '22 01:05 JustSimplyKyle

Ok now it also auto updates the hash too!

JustSimplyKyle avatar May 08 '22 01:05 JustSimplyKyle

Also, do you consider ferium fitting this? https://github.com/ScoopInstaller/Scoop/wiki/Criteria-for-including-apps-in-the-main-bucket I think it does. Therefore https://github.com/ScoopInstaller/Main/pull/3558

JustSimplyKyle avatar May 08 '22 01:05 JustSimplyKyle

Also, do you consider ferium fitting this?

I wasn't actually sure, I mean it isn't 'reasonably well-known' or a 'developer tool' right?

theRookieCoder avatar May 08 '22 03:05 theRookieCoder

Oh and looking at the autoupdate, would the releases now need .sha256 files? Or is that some sort of shortcut?

theRookieCoder avatar May 08 '22 03:05 theRookieCoder

I believe it's a shortcut! Although I'm not sure bout that

JustSimplyKyle avatar May 08 '22 04:05 JustSimplyKyle

Wait hmm no. It's an direct file. We still need to upload the sha256sum to github release too

JustSimplyKyle avatar May 08 '22 04:05 JustSimplyKyle

https://github.com/theRookieCoder/ferium/pull/50 Done, haven't actually tested that tho. It's a very simple one, it should just work

JustSimplyKyle avatar May 08 '22 05:05 JustSimplyKyle

https://github.com/Calinou/scoop-games/pull/616 Up!(This is the official game repository) Installation step.

  1. scoop bucket add games
  2. scoop install ferium image And it also auto upgrades! My pull request is 3.27.0, but it auto upgrades to 3.28.0!

JustSimplyKyle avatar May 09 '22 00:05 JustSimplyKyle

This is great, thank you so much! Also where did you get the screenshot from, I can't find a Scoop index website with Ferium in it

theRookieCoder avatar May 09 '22 07:05 theRookieCoder

https://scoop.sh/#/apps?q=ferium

JustSimplyKyle avatar May 09 '22 07:05 JustSimplyKyle

You can create packages for multiple distros(Debian+Debian-based, Arch, basically all of the RPM distros...) and automatically make repositories for them via https://build.opensuse.org.

You can use https://build.opensuse.org/package/show/home:ImperatorStorm/minizip-git as an example if needed, and via a beta automatically trigger an OBS rebuild on commit.

ImperatorStorm avatar May 10 '22 19:05 ImperatorStorm

Another AUR release! https://aur.archlinux.org/packages/ferium-git This is ferium-git, which automatically compiles from source! The package version will always be "outdated", but the actual package won't... In short words, it auto upgrades and doesn't require any changes to ferium itself

JustSimplyKyle avatar May 12 '22 15:05 JustSimplyKyle

How does it know when it should recompile, does it infer that from the tags/commits?

theRookieCoder avatar May 12 '22 15:05 theRookieCoder

Well the thing with git packages is that the upgrading is done on the user side. When the user decides to build(or upgrades) the package, it automatically pulls from the latest commit. But the upstream package version will never get upgraded. eg. image The left version continuous.r1621.g41a49c488-1 is what you see on AUR But the right Installed: continuous.r1940.g6613ff329-1 is the version you actually get

JustSimplyKyle avatar May 12 '22 15:05 JustSimplyKyle

Ah I see, and now from-source builds don't need the CurseForge API key environment variable anymore so perfect timing!

theRookieCoder avatar May 12 '22 15:05 theRookieCoder

Actually, you don't need to state that it require the rust toolchain since it has cargo in makedepends(which automatically configures the rust toolchain for you, and you can choose to uninstall makedepends after your installation but that's normally not recommended although it would function)

JustSimplyKyle avatar May 12 '22 23:05 JustSimplyKyle

I just wanted to warn the user that it will install additional stuff that might be quite large because the Rust toolchain is over 5gb I think

theRookieCoder avatar May 13 '22 04:05 theRookieCoder

hmm, I can't get just build-linux to work, but I could get just build-linux-nogui to build? it seems like build-linux will also build for windows but I don't have the windows toolchain so it doesn't work. Currently I'm tweeking the -git package to automatically build the nogui version if you don't have gtk3 installed, and build the normal one if you do have one installed. But I'm running into this problem... Is this the same problem that this issue has? https://github.com/theRookieCoder/ferium/issues/69

JustSimplyKyle avatar May 14 '22 01:05 JustSimplyKyle

Looks like it, cargo doesn't auto-install toolchains that aren't for the host OS, you'd need to install them manually. Fixed in https://github.com/theRookieCoder/ferium/pull/71 once it gets merged.

ImperatorStorm avatar May 14 '22 01:05 ImperatorStorm

https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=ferium-git Yep after the latest commit, this now works!

JustSimplyKyle avatar May 14 '22 08:05 JustSimplyKyle

why keep it as a single package, rather than split it like the binary packages?

ImperatorStorm avatar May 15 '22 01:05 ImperatorStorm

Because that's what people normally do for source packages, enable features if your computer has that functionality. But for binary packages, it's not the normal thing to do Also another reason, I don't know how to download only a single source :rofl:

JustSimplyKyle avatar May 15 '22 02:05 JustSimplyKyle

Nah, people split packages into cli and gui versions commonly, see citra-git and dolphin-emu-git. Also, changing build depending on whether a certain package is available breaks reproducible builds.

Rewrote the ferium-git PKGBUILD: https://gist.github.com/ImperatorStorm/bbe40ed329f5706740b54c4e9bec0933

Unrelated, but

gtk optdepends should be gtk3, as gtk refers to a gtk1 aur package (https://aur.archlinux.org/packages/gtk)

ImperatorStorm avatar May 15 '22 04:05 ImperatorStorm

oh, my apologies. https://aur.archlinux.org/packages/ferium-git https://aur.archlinux.org/packages/ferium-gui-git And the ferium-gui-bin dependencies is set to gtk3! Thanks so much for your help, I still need to learn a lot about AUR packaging!

JustSimplyKyle avatar May 15 '22 06:05 JustSimplyKyle

I opened a PR for NixOS/Nixpkgs: https://github.com/NixOS/nixpkgs/pull/173201

leo60228 avatar May 15 '22 21:05 leo60228