diff options
| author | rawnix ports <ports@rawnix.org> | 2026-09-26 19:39:47 +0000 |
|---|---|---|
| committer | rawnix ports <ports@rawnix.org> | 2026-09-26 19:39:47 +0000 |
| commit | 663ecf636bd7b3ca6511c93d35a1bf6af05a6d49 (patch) | |
| tree | a4cea9e26d2daa387808786403893120f392dc06 /opt/fcgiwrap/MAKEPKG | |
| parent | fbf3c03f3ae55b0a3c47b9f6e5dee87be21680de (diff) | |
| download | ports-663ecf636bd7b3ca6511c93d35a1bf6af05a6d49.tar.gz | |
sync 2026-09-26 19:39 UTC
2 files changed, 17 insertions(+), 30 deletions(-)
Diffstat (limited to 'opt/fcgiwrap/MAKEPKG')
| -rw-r--r-- | opt/fcgiwrap/MAKEPKG | 41 |
1 files changed, 14 insertions, 27 deletions
diff --git a/opt/fcgiwrap/MAKEPKG b/opt/fcgiwrap/MAKEPKG index 3329b0e..fb30658 100644 --- a/opt/fcgiwrap/MAKEPKG +++ b/opt/fcgiwrap/MAKEPKG @@ -4,10 +4,10 @@ name=fcgiwrap version=1.1.0 -release=1 +release=2 depends=(fcgi2) makedeps=(autoconf automake libtool m4) -groups=(fcgiwrap:user:fcgiwrap:/var/run/fcgiwrap:755) +groups=(fcgiwrap:user:fcgiwrap:/var/empty:755) services=(fcgiwrap) source=(https://github.com/gnosek/fcgiwrap/archive/refs/tags/$version.tar.gz) sha256sums=( @@ -25,39 +25,26 @@ build() { make make DESTDIR=$PKG install - - # rawnix uses unified /usr/bin - # install -d $PKG/usr/bin - # mv $PKG/usr/sbin/fcgiwrap $PKG/usr/bin/ - # rmdir $PKG/usr/sbin } post_build() { install -d $PKG/etc/sv/fcgiwrap/log - # Listen on a unix socket; nginx (running as http) needs to reach it. - # We start fcgiwrap as fcgiwrap user, then chmod the socket so http can connect. printf '%s\n' \ '#!/bin/sh' \ 'exec 2>&1' \ '' \ - 'mkdir -p /run/fcgiwrap' \ - 'rm -f /run/fcgiwrap/sock' \ - '' \ - 'chpst -u fcgiwrap:fcgiwrap \' \ - ' fcgiwrap -c 4 -s unix:/run/fcgiwrap/sock &' \ - 'pid=$!' \ + "if grep -q '^http:' /etc/group; then" \ + ' webgroup=http' \ + 'else' \ + ' webgroup=fcgiwrap' \ + 'fi' \ '' \ - '# Wait briefly for the socket, then make it accessible to http' \ - 'i=0' \ - 'while [ ! -S /run/fcgiwrap/sock ] && [ $i -lt 50 ]; do' \ - ' sleep 0.1' \ - ' i=$((i+1))' \ - 'done' \ - 'chgrp http /run/fcgiwrap/sock 2>/dev/null || true' \ - 'chmod 660 /run/fcgiwrap/sock' \ + 'install -d -o fcgiwrap -g "$webgroup" -m 2750 /run/fcgiwrap' \ + 'rm -f /run/fcgiwrap/sock' \ + 'umask 007' \ '' \ - 'wait $pid' \ + 'exec chpst -u fcgiwrap:fcgiwrap fcgiwrap -c 4 -s unix:/run/fcgiwrap/sock' \ > $PKG/etc/sv/fcgiwrap/run printf '%s\n' \ @@ -71,9 +58,9 @@ post_build() { 'rm -f /run/fcgiwrap/sock' \ > $PKG/etc/sv/fcgiwrap/finish - chmod 755 $PKG/etc/sv/fcgiwrap/run - chmod 755 $PKG/etc/sv/fcgiwrap/log/run - chmod 755 $PKG/etc/sv/fcgiwrap/finish + chmod 755 $PKG/etc/sv/fcgiwrap/run \ + $PKG/etc/sv/fcgiwrap/log/run \ + $PKG/etc/sv/fcgiwrap/finish } signify() { |
