%global _hardened_build 1 %global debug_package %{nil} Name: pushpin Version: 1.41.0 Release: 1%{?dist} Summary: Reverse proxy for realtime web services License: Apache-2.0 URL: https://pushpin.org/ Source0: pushpin-%{version}.tar.gz Source1: pushpin.service Source2: pushpin.conf BuildRequires: gcc BuildRequires: gcc-c++ BuildRequires: make BuildRequires: cargo BuildRequires: rust BuildRequires: openssl-devel # ZeroMQ packages - distribution specific %if 0%{?suse_version} BuildRequires: zeromq-devel %else %if 0%{?mageia} %ifarch x86_64 aarch64 BuildRequires: lib64zeromq-devel %else BuildRequires: libzeromq-devel %endif %else # Fedora/RHEL/CentOS/AlmaLinux (EPEL enabled above) BuildRequires: zeromq-devel %endif %endif # PCRE packages %if 0%{?suse_version} BuildRequires: pcre2-devel %else %if 0%{?mageia} %ifarch x86_64 aarch64 BuildRequires: lib64pcre2-devel %else BuildRequires: libpcre2-devel %endif %else BuildRequires: pcre2-devel %endif %endif # Qt5 development packages - distribution specific %if 0%{?suse_version} # openSUSE/SLES BuildRequires: libqt5-qtbase-devel BuildRequires: libQt5Core-devel BuildRequires: libQt5Network-devel %else %if 0%{?mageia} # Mageia %ifarch x86_64 aarch64 BuildRequires: lib64qt5core-devel BuildRequires: lib64qt5network-devel BuildRequires: qtbase5-common-devel %else BuildRequires: libqt5core-devel BuildRequires: libqt5network-devel BuildRequires: qtbase5-common-devel %endif %else # Fedora/RHEL/CentOS/Rocky/Alma BuildRequires: qt5-qtbase-devel %endif %endif BuildRequires: boost-devel BuildRequires: systemd-rpm-macros Requires: openssl Requires: zeromq Requires: pcre2 Requires(pre): shadow-utils Requires(post): systemd Requires(preun): systemd Requires(postun): systemd %description Pushpin is a reverse proxy server written in Rust/C++ that makes it easy to implement WebSocket, HTTP streaming, and HTTP long-polling services. The project is unique among realtime push solutions in that it is designed to be transparent to clients and integrates easily into an API stack. %prep %setup -q -n pushpin-%{version} %build # Set build flags export CARGO_HOME=.cargo export PREFIX=%{_prefix} export BINDIR=%{_bindir} export LIBDIR=%{_libdir}/pushpin export CONFIGDIR=%{_sysconfdir}/pushpin export RUST_BACKTRACE=1 export CARGO_PROFILE_RELEASE_BUILD_OVERRIDE_DEBUG=true # Build Pushpin # Fetch cargo dependencies first (needed when building from tarball) cargo fetch # Build with release flag but without offline mode # We build components separately to avoid the --offline flag cargo build --release make postbuild RELEASE=1 %install # Install binaries install -D -m 755 target/release/pushpin %{buildroot}%{_bindir}/pushpin install -D -m 755 target/release/pushpin-proxy %{buildroot}%{_bindir}/pushpin-proxy install -D -m 755 target/release/pushpin-handler %{buildroot}%{_bindir}/pushpin-handler install -D -m 755 target/release/pushpin-connmgr %{buildroot}%{_bindir}/pushpin-connmgr install -D -m 755 target/release/m2adapter %{buildroot}%{_bindir}/m2adapter install -D -m 755 target/release/pushpin-publish %{buildroot}%{_bindir}/pushpin-publish # Install legacy wrapper if it exists if [ -f target/release/pushpin-legacy ]; then install -D -m 755 target/release/pushpin-legacy %{buildroot}%{_bindir}/pushpin-legacy fi # Create symlink for condure ln -sf pushpin-connmgr %{buildroot}%{_bindir}/pushpin-condure # Install configuration files install -D -m 644 %{SOURCE2} %{buildroot}%{_sysconfdir}/pushpin/pushpin.conf install -D -m 644 src/internal.conf %{buildroot}%{_libdir}/pushpin/internal.conf # Create default routes file echo "* localhost:8080" > %{buildroot}%{_sysconfdir}/pushpin/routes # Install systemd service file install -D -m 644 %{SOURCE1} %{buildroot}%{_unitdir}/pushpin.service # Create required directories install -d -m 755 %{buildroot}%{_localstatedir}/lib/pushpin install -d -m 755 %{buildroot}%{_localstatedir}/log/pushpin install -d -m 755 %{buildroot}%{_localstatedir}/run/pushpin install -d -m 755 %{buildroot}%{_sysconfdir}/pushpin/runner install -d -m 755 %{buildroot}%{_sysconfdir}/pushpin/runner/certs # Install runner templates if they exist if [ -d src/runner ]; then cp -r src/runner/* %{buildroot}%{_libdir}/pushpin/runner/ 2>/dev/null || true fi %pre getent group pushpin >/dev/null || groupadd -r pushpin getent passwd pushpin >/dev/null || \ useradd -r -g pushpin -d /var/lib/pushpin -s /sbin/nologin \ -c "Pushpin realtime proxy" pushpin exit 0 %post %systemd_post pushpin.service if [ $1 -eq 1 ]; then echo "Pushpin installed. Edit /etc/pushpin/pushpin.conf and /etc/pushpin/routes," echo "then start with: systemctl start pushpin" fi %preun %systemd_preun pushpin.service %postun %systemd_postun_with_restart pushpin.service if [ $1 -eq 0 ]; then # Package removal, not upgrade userdel pushpin >/dev/null 2>&1 || true groupdel pushpin >/dev/null 2>&1 || true fi %files %license LICENSE %doc README.md CHANGELOG.md %{_bindir}/pushpin %{_bindir}/pushpin-proxy %{_bindir}/pushpin-handler %{_bindir}/pushpin-connmgr %{_bindir}/pushpin-condure %{_bindir}/m2adapter %{_bindir}/pushpin-publish %dir %{_libdir}/pushpin %{_libdir}/pushpin/* %{_unitdir}/pushpin.service %dir %{_sysconfdir}/pushpin %config(noreplace) %{_sysconfdir}/pushpin/pushpin.conf %config(noreplace) %{_sysconfdir}/pushpin/routes %dir %{_sysconfdir}/pushpin/runner %dir %{_sysconfdir}/pushpin/runner/certs %attr(0755,pushpin,pushpin) %dir %{_localstatedir}/lib/pushpin %attr(0755,pushpin,pushpin) %dir %{_localstatedir}/log/pushpin %attr(0755,pushpin,pushpin) %dir %{_localstatedir}/run/pushpin %changelog * Fri Sep 05 2025 COPR Builder - 1.41.0-1 - Automated build from GitHub release v%{version} - Built from upstream Pushpin project