Skip to content
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

Replace pkg with @yao-pkg/pkg and target node20 #3126

Merged
merged 1 commit into from
Jul 6, 2024

Conversation

mikiher
Copy link
Contributor

@mikiher mikiher commented Jul 6, 2024

This replaces the use of pkg (which packs Node runtime and project code into a single binary) with the @yao-pkg/pkg fork. We do this since pkg is deprecated and in maintenance mode, and doesn't support packing a node20 runtime. Yao-pkg seems to be well maintained and used, and supports node20 targeting.

Changes made:

  • Replace node18 pkg targets with node20
  • Modify relevant workflows and scripts to install @yao-pkg/pkg instead of pkg
  • Log Node version when server goes up for clarity

@mikiher mikiher marked this pull request as ready for review July 6, 2024 16:57
@mikiher
Copy link
Contributor Author

mikiher commented Jul 6, 2024

One question: build/linuxpackager seems to call pkg, but I can't find any script which installs it. Should I add the npm install command to that script?

@advplyr
Copy link
Owner

advplyr commented Jul 6, 2024

I updated that script. It is currently running on one of my ubuntu droplets that builds the PPA. Eventually that will become a github action hopefully.

The debian package built fine with this but I hit the same issue mentioned here yao-pkg/pkg#55 (comment)

Currently audiobookshelf.service is setup to use audiobookshelf user and group.

User=audiobookshelf
Group=audiobookshelf

This user did not have a home directory so I had to create one and give it write access.
I'm going to try building again with 5.11.5

@advplyr
Copy link
Owner

advplyr commented Jul 6, 2024

I installed https://github.com/yao-pkg/pkg/releases/tag/v5.11.5 and built the debian package again. No permission issues with the cache dir so I'll keep that version installed for building the debian package.
Great to be able to move to node20 for the binaries finally. Thanks!

@advplyr advplyr merged commit 1e5787c into advplyr:master Jul 6, 2024
4 checks passed
@mikiher mikiher deleted the pkg-replacement branch July 12, 2024 18:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants