diff --git a/dist/arch/PKGBUILD b/dist/arch/PKGBUILD index 056ee6af..66a5ff16 100644 --- a/dist/arch/PKGBUILD +++ b/dist/arch/PKGBUILD @@ -7,30 +7,30 @@ arch=("any") url="https://thearsse.com/" license=("MIT") groups=() -depends=("php>=7.1" "php-intl" "php-sqlite" "uwsgi" "uwsgi-plugin-php") -makedepends=("composer") +depends=() +makedepends=() checkdepends=() optdepends=("php-pgsql: PostgreSQL database support") provides=() conflicts=() replaces=() -backup=("etc/webapps/arsse/config.php" "etc/webapps/arsse/uwsgi.ini") +backup=("etc/webapps/arsse/config.php" "etc/php/php-fpm.d/arsse.conf") options=() install= changelog= -source=("https://code.mensbeam.com/attachments/229880aa-3fcc-499f-b747-6932a661dc0e" +source=("https://thearsse.com/releases/0.9.0.tar.gz" "arsse.service" - "arsse-web.service" "arsse-fetch.service" "sysuser.conf" "config.php" - "uwsgi.ini" + "php-fpm.conf" "arsse.sh") noextract=() package() { + depends=("php" "php-intl" "php-sqlite" "php-fpm") cd "$pkgdir" - mkdir -p "usr/bin" "usr/share/webapps/arsse" "usr/share/doc/arsse" "usr/share/licenses/arsse" "usr/lib/systemd/system" "usr/lib/sysusers.d" "etc/webapps/arsse" + mkdir -p "usr/bin" "usr/share/webapps/arsse" "usr/share/doc/arsse" "usr/share/licenses/arsse" "usr/lib/systemd/system" "usr/lib/sysusers.d" "etc/webapps/arsse" "etc/php/php-fpm.d/" cd "$srcdir/arsse" cp ../arsse.sh "$pkgdir/usr/bin/arsse" cp -r lib locale sql vendor www CHANGELOG UPGRADING README.md arsse.php "$pkgdir/usr/share/webapps/arsse" @@ -38,19 +38,18 @@ package() { cp LICENSE AUTHORS "$pkgdir/usr/share/licenses/arsse" cp ../*.service "$pkgdir/usr/lib/systemd/system" cp ../sysuser.conf "$pkgdir/usr/lib/sysusers.d/arsse.conf" - cp ../config.php config.defaults.php ../uwsgi.ini "$pkgdir/etc/webapps/arsse" + cp ../config.php config.defaults.php "$pkgdir/etc/webapps/arsse" + cp ../php-fpm.conf "$pkgdir/etc/php/php-fpm.d/arsse.conf" cd "$pkgdir" chmod -R a=rX * chmod a=rx usr/bin/arsse chmod u=r etc/webapps/arsse/* ln -sT "/etc/webapps/arsse/config.php" "usr/share/webapps/arsse/config.php" } - -md5sums=('c7c9526f02fe34bf6f8399eff95c819d' - '53f150081dc9097790166ac22575fb1d' - '9ed9119aff93e0099c15cd12a3f71655' - '71a5975aed6b2da581262441f14bc929' +md5sums=('93327083c316daf879c70921189ed7b6' + '91871736d9594b2c92d1fa6b6e4f2803' + '0ca05e2965247d4651a986aad81d80e1' 'b6ef9ab7e9062df1d5ba060066b6d734' '33e7a5b290ef20339952f1d904b33f8f' - 'ff8fc77353d8e06f5c74ad577880a19d' + '943d35272b0aa7af2bf3818a0c9bd5fc' '4fb46ec290e497279c3dd7c8c528abf6') diff --git a/dist/arch/arsse-fetch.service b/dist/arch/arsse-fetch.service index 81a31fc7..be2d7105 100644 --- a/dist/arch/arsse-fetch.service +++ b/dist/arch/arsse-fetch.service @@ -1,6 +1,7 @@ [Unit] Description=The Arsse newsfeed fetching service Documentation=https://thearsse.com/manual/ +PartOf=arsse.service [Service] User=arsse diff --git a/dist/arch/arsse-web.service b/dist/arch/arsse-web.service deleted file mode 100644 index 8e280d17..00000000 --- a/dist/arch/arsse-web.service +++ /dev/null @@ -1,33 +0,0 @@ -[Unit] -Description=The Arsse newsfeed client service -Documentation=https://thearsse.com/manual/ - -[Service] -User=arsse -Group=arsse -Type=simple -WorkingDirectory=/usr/share/webapps/arsse -ExecStart=/usr/bin/uwsgi /etc/webapps/arsse/uwsgi.ini - -ProtectProc=invisible -NoNewPrivileges=true -ProtectSystem=full -ProtectHome=true -RuntimeDirectory=arsse -StateDirectory=arsse -ConfigurationDirectory=webapps/arsse -ReadOnlyPaths=/ -ReadWriePaths=/usr/lib/arsse -NoExecPaths=/ -ExecPaths=/usr/bin/uwsgi -PrivateTmp=true -PrivateDevices=true -RestrictSUIDSGID=true -StandardOutput=journal -StandardError=journal -SyslogIdentifier=arsse -Restart=on-failure -RestartPreventStatus= - -[Install] -WantedBy=multi-user.target diff --git a/dist/arch/arsse.service b/dist/arch/arsse.service index f04d5846..62ee4358 100644 --- a/dist/arch/arsse.service +++ b/dist/arch/arsse.service @@ -2,7 +2,8 @@ Description=The Arsse newsfeed management service Documentation=https://thearsse.com/manual/ Requires=arsse-fetch.service -BindsTo=arsse-web.service +BindsTo=php-fpm.service +After=php-fpm.service [Service] Type=oneshot diff --git a/dist/arch/php-fpm.conf b/dist/arch/php-fpm.conf new file mode 100644 index 00000000..ca7f3af4 --- /dev/null +++ b/dist/arch/php-fpm.conf @@ -0,0 +1,16 @@ +[arsse] +user = arsse +group = arsse +listen = /run/php-fpm/arsse.sock +listen.owner = arsse +listen.group = http +pm = dynamic +pm.max_children = 5 +pm.start_servers = 2 +pm.min_spare_servers = 1 +pm.max_spare_servers = 3 + +php_value[extension] = intl +php_value[extension] = dom +php_value[extension] = iconv +php_value[extension] = sqlite3 diff --git a/dist/arch/uwsgi.ini b/dist/arch/uwsgi.ini deleted file mode 100644 index 9766b4ee..00000000 --- a/dist/arch/uwsgi.ini +++ /dev/null @@ -1,15 +0,0 @@ -[uwsgi] - -strict=true -uwsgi-socket=/run/arsse/uwsgi.socket -master=true -processes=4 -workers=2 -vacuum=true -plugin=php -php-sapi-name=apache -php-set=extension=curl -php-set=extension=iconv -php-set=extension=intl -php-set=extension=sqlite3 -php-app=/usr/share/webapps/arsse/arsse.php