# Upstream publishes prebuilt Rust binaries as npm platform packages # (@pnpm/pnpr.linux-x64 / .linux-arm64); the tarball contains the stripped # ELF binary, package.json and LICENSE. npm versions use a hyphenated # pre-release (0.1.0-alpha.5) which maps to a tilde in the RPM version. %global upstream_version 0.1.0-alpha.5 # Prebuilt stripped binary — nothing to extract debuginfo from. %global debug_package %{nil} Name: pnpr Version: 0.1.0~alpha.5 Release: 1%{?dist} Summary: pnpm-compatible npm registry server and caching proxy # Docs (https://pnpm.io/pnpr) state PolyForm Shield 1.0.0 (source-available, # self-hosting explicitly permitted); the binary tarballs ship pnpm's MIT text. License: PolyForm-Shield-1.0.0 Group: System Environment/Daemons URL: https://pnpm.io/pnpr Source0: https://registry.npmjs.org/@pnpm/pnpr.linux-x64/-/pnpr.linux-x64-%{upstream_version}.tgz Source1: https://registry.npmjs.org/@pnpm/pnpr.linux-arm64/-/pnpr.linux-arm64-%{upstream_version}.tgz Source10: pnpr.service Source11: pnpr.yaml Source12: pnpr.env Source13: pnpr.sysusers BuildRequires: systemd-rpm-macros %{?systemd_requires} ExclusiveArch: x86_64 aarch64 %description pnpr is a pnpm-compatible npm registry server written in Rust. It speaks the npm registry protocol, so pnpm, npm and yarn can all use it as a caching proxy for registry.npmjs.org, a private hosted registry, a credential gateway, or an install accelerator (server-side dependency resolution). This package runs pnpr as a systemd service under a dedicated user. Published/hosted packages live in /var/lib/pnpr; the disposable proxy cache lives in /var/cache/pnpr. Listens on 127.0.0.1:7677 by default — see /etc/pnpr/pnpr.env to expose it to CI runners. %prep %setup -q -c -T %ifarch x86_64 tar -xzf %{SOURCE0} %endif %ifarch aarch64 tar -xzf %{SOURCE1} %endif %install %{__rm} -rf %{buildroot} install -D -m 755 package/pnpr %{buildroot}%{_bindir}/pnpr install -p -D -m 644 %{SOURCE10} %{buildroot}%{_unitdir}/pnpr.service install -p -D -m 644 %{SOURCE13} %{buildroot}%{_sysusersdir}/pnpr.conf install -d -m 750 %{buildroot}%{_sysconfdir}/pnpr install -m 640 %{SOURCE11} %{buildroot}%{_sysconfdir}/pnpr/pnpr.yaml install -m 640 %{SOURCE12} %{buildroot}%{_sysconfdir}/pnpr/pnpr.env # storage (hosted/published packages) and disposable proxy cache install -d -m 750 %{buildroot}%{_sharedstatedir}/pnpr install -d -m 750 %{buildroot}%{_localstatedir}/cache/pnpr %pre %sysusers_create_package pnpr %{SOURCE13} %post %systemd_post pnpr.service %preun %systemd_preun pnpr.service %postun %systemd_postun_with_restart pnpr.service %clean %{__rm} -rf %{buildroot} %files %defattr(-,root,root,-) %license package/LICENSE %{_bindir}/pnpr %{_unitdir}/pnpr.service %{_sysusersdir}/pnpr.conf %dir %attr(0750,root,pnpr) %{_sysconfdir}/pnpr %config(noreplace) %attr(0640,root,pnpr) %{_sysconfdir}/pnpr/pnpr.yaml %config(noreplace) %attr(0640,root,pnpr) %{_sysconfdir}/pnpr/pnpr.env %dir %attr(0750,pnpr,pnpr) %{_sharedstatedir}/pnpr %dir %attr(0750,pnpr,pnpr) %{_localstatedir}/cache/pnpr %changelog * Tue Aug 11 2026 Zoran Pericic - 0.1.0~alpha.5-1 - Initial package for pnpr 0.1.0-alpha.5 (experimental upstream) - Prebuilt binaries taken from the @pnpm/pnpr.linux-{x64,arm64} npm platform packages - systemd service with dynamic sysusers pnpr user; storage in /var/lib/pnpr, proxy cache separated into /var/cache/pnpr via --cache - Default config proxies registry.npmjs.org; listen address and extra flags configurable via /etc/pnpr/pnpr.env