stumpapp / stump

A free and open source comics, manga and digital book server with OPDS support (WIP)
https://stumpapp.dev
MIT License
924 stars 41 forks source link

Release AUR package #98

Open aaronleopold opened 1 year ago

aaronleopold commented 1 year ago

Discussed in https://github.com/aaronleopold/stump/discussions/97

Originally posted by **Relwi** March 15, 2023 Hey, is there the possibility that we have in a future an AUR package?

At some point, it would be a nice to have if CI can also publish the zipped(?) linux binary + webapp bundle to AUR.

airvzxf commented 11 months ago

Hi, I am interested in this enhancement, but I am confident that it needs more details to achieve the goal.

My first question is: What should be the zipped Linux binary + web app bundle?

My second question is: How do you handle the versions for all the builds?


These are my AUR:

aaronleopold commented 11 months ago

My first question is: What should be the zipped Linux binary + web app bundle?

Exactly correct, the binary and the webapp bundle zipped together. Not sure if an installer of some kind would be necessary, but those two items are all that is otherwise needed.

In the GitHub actions, I noticed that you create different builds. I assume that the Desktop build should be gone to the AUR. Is it correct?

Eventually, yes it can. Until the first more stable release of Stump is released, though, it shouldn't. I'm not personally focusing on ensuring the desktop app is always functional right now, since there are many other higher priority things I need to get out the door first.

What are you expected to add to AUR as a web app bundle?

That's a big question, and one I probably can't answer. Someone else requested AUR releases.

My second question is: How do you handle the versions for all the builds?

I don't. This is something that I have an issue for actually: https://github.com/stumpapp/stump/issues/93

Basically, the release workflow is not yet implemented. Ideally, I would imagine when tags are pushed from main to:

  1. Update versions throughout Cargo.toml files
  2. Start various builds
  3. Generate a change log

In general, I don't think any actual publishing to AUR should be done yet. You're welcome to continue with this ticket as far or as little as you'd like, but keep in mind it should just be adding the required CI/hookups for it while keeping it 'disabled' so nothing gets published until versioning is a thing here

airvzxf commented 11 months ago

Thanks for the detailed answer.

I have two questions before continue with this ticket (PR and RM).

  1. If I create the PR, will you merge it if it complains your basic expectations? I am interested in the Hacktoberfest challenge.
  2. I can solve it, in the similar way that I solved in my AUR packages, which for me works good. Do you agree with this solution?
aaronleopold commented 11 months ago

If I create the PR, will you merge it if it complains your basic expectations? I am interested in the Hacktoberfest challenge.

Yep! To reiterate, the general expectation would be to add the integration that is functional (i.e. it can run a build and push info to the AUR) but have the workflow be disabled until I am ready (i.e. versioned releases start). That way, there is less of a hurdle once this functionality is needed and we don't pollute the AUR with nightly builds.

I can solve it, in the similar way that I solved in my AUR packages, which for me works good. Do you agree with this solution?

I trust your judgement. Your description sounds logical to me:

Basically, I automate the creation of the build as you did, then upload the information to the AUR

Keeping in mind that while I have primarily used arch-based distributions, my knowledge about best practices for AUR packaging is lacking 😅

airvzxf commented 11 months ago

Ok, would you kindly assign to me? I'll start working in a few minutes or hours.

airvzxf commented 11 months ago

I am trying to follow the Development Guide, but it is not working. Do you have an idea how to solve it?

Error:

WARN Unsupported engine: wanted: {"node":"18.16.0"} (current: {"node":"v20.8.0","pnpm":"8.8.0"})

packages/interface | WARN The field "pnpm" was found in /home/wolf/workspace/projects/stump/packages/interface/package.json. This will not take effect. You should configure "pnpm" at the root of the workspace instead.

Scope: all 12 workspace projects
Lockfile is up to date, resolution step is skipped
Packages: +2209

Running install script...
 ELIFECYCLE  Command failed.
 ELIFECYCLE  Command failed with exit code 1.

I attached the screenshots.

Screenshot_2023-10-04_07-42-18


Screenshot_2023-10-04_07-42-39


Screenshot_2023-10-04_07-43-11

aaronleopold commented 11 months ago

Can you run:

pnpm why sharp

I don't see any reference to sharp on my end, so not sure why it is trying to install it here.

The other two errors are just command not found, the first of which (for moon) is because I assume you did not install moon, the second is probably because your install failed earlier. If you manually run:

pnpm i

does it continue to try installing sharp?

airvzxf commented 11 months ago

This is the output for the commands:

Screenshot_2023-10-04_09-16-55

aaronleopold commented 11 months ago

Are there any log files being generated? The error code alone isn't much to go off of. You can maybe try removing all node_modules and then:

pnpm store prune
pnpm i --ignore-scripts

I'd also be curious if trying to use moon would present the same issue for you. Could also try removing the pnpm-lock.yaml and retrying the above.

airvzxf commented 11 months ago

I'd also be curious if trying to use moon would present the same issue for you. Could also try removing the pnpm-lock.yaml and retrying the above.

First, I deleted these files, then tried pnpm i and I got the same error.

$ find . -iname pnpm-lock.yaml
./node_modules/.pnpm/remark-reading-time@2.0.1/node_modules/remark-reading-time/pnpm-lock.yaml
./pnpm-lock.yaml

$ rm -f ./node_modules/.pnpm/remark-reading-time@2.0.1/node_modules/remark-reading-time/pnpm-lock.yaml
$ rm -f ./pnpm-lock.yaml

$ pnpm i

Are there any log files being generated? The error code alone isn't much to go off of. You can maybe try removing all node_modules and then:

pnpm store prune
pnpm i --ignore-scripts

I restored the file ./pnpm-lock.yaml then I tried these commands and it worked.

Screenshot_2023-10-04_10-53-50


Are there any log files being generated? The error code alone isn't much to go off of. You can maybe try removing all node_modules and then:

pnpm store prune
pnpm i --ignore-scripts

I tried first delete the file pnpm-lock.yaml then I executed these commands and it worked too.

Screenshot_2023-10-04_11-06-30

Screenshot_2023-10-04_11-06-47

Screenshot_2023-10-04_11-07-07

airvzxf commented 11 months ago

New error, I ran pnpm dev:desktop.

These are the outputs.

First time:

Screenshot_2023-10-04_11-25-38


Second time:

Screenshot_2023-10-04_11-27-11

aaronleopold commented 11 months ago

cargo-watch: command not found

To run any of the dev scripts, you'll need to install that dependency (step 2 of the install guide). However, you don't need to worry about the desktop for now. If you remember:

In the GitHub actions, I noticed that you create different builds. I assume that the Desktop build should be gone to the AUR. Is it correct?

Eventually, yes it can. Until the first more stable release of Stump is released, though, it shouldn't. I'm not personally focusing on ensuring the desktop app is always functional right now, since there are many other higher priority things I need to get out the door first.

I'm mostly concerned with the server and web app bundle for now, sorry if that wasn't communicated well 😅 but that shrinks the scope a bit for this ticket

airvzxf commented 11 months ago

Yes, I agree. I'm deviating from the goal. Furthermore, I was thinking this day that this ticket is not ready to start because at the end AUR packages have a dependency on digital storage in some place (GitHub releases, hosting, or other). Then, I suggest unassigning me and creating some kind of block.

Thank you very much for your patient, attention, and proactivity.