set valid user and group in fcgiwrap.service for apache and nginx in openmamba [release 1.1.0-2mamba;Sun Aug 13 2023]
This commit is contained in:
parent
ef7482d45c
commit
f5b159cd06
13
fcgiwrap-1.1.0-service-user-group.patch
Normal file
13
fcgiwrap-1.1.0-service-user-group.patch
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
--- fcgiwrap-1.1.0/systemd/fcgiwrap.service.orig 2023-08-13 01:58:26.805337286 +0200
|
||||||
|
+++ fcgiwrap-1.1.0/systemd/fcgiwrap.service 2023-08-13 01:58:33.904359976 +0200
|
||||||
|
@@ -4,8 +4,8 @@
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
ExecStart=/usr/sbin/fcgiwrap
|
||||||
|
-User=http
|
||||||
|
-Group=http
|
||||||
|
+User=nobody
|
||||||
|
+Group=nobody
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
Also=fcgiwrap.socket
|
26
fcgiwrap-1.1.0-systemd.patch
Normal file
26
fcgiwrap-1.1.0-systemd.patch
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
From e621d6acb538d717d6767429e3f85190019a887d Mon Sep 17 00:00:00 2001
|
||||||
|
From: Thomas Claveirole <thomas.claveirole@green-communications.fr>
|
||||||
|
Date: Mon, 18 Jul 2016 15:06:59 +0200
|
||||||
|
Subject: [PATCH] configure.ac: Check for libsystemd, not libsystemd-daemon.
|
||||||
|
|
||||||
|
Newer versions of systemd do not provide libsystemd-daemon anymore.
|
||||||
|
Therefore, use libsystemd instead.
|
||||||
|
|
||||||
|
Signed-off-by: Thomas Claveirole <thomas.claveirole@green-communications.fr>
|
||||||
|
---
|
||||||
|
configure.ac | 2 +-
|
||||||
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/configure.ac b/configure.ac
|
||||||
|
index bb3674e..2b02ef4 100644
|
||||||
|
--- a/configure.ac
|
||||||
|
+++ b/configure.ac
|
||||||
|
@@ -28,7 +28,7 @@ AC_ARG_WITH([systemd],
|
||||||
|
[], [with_systemd=check])
|
||||||
|
have_systemd=no
|
||||||
|
if test "x$with_systemd" != "xno"; then
|
||||||
|
- PKG_CHECK_MODULES(systemd, [libsystemd-daemon],
|
||||||
|
+ PKG_CHECK_MODULES(systemd, [libsystemd],
|
||||||
|
[AC_DEFINE(HAVE_SYSTEMD, 1, [Define if systemd is available])
|
||||||
|
have_systemd=yes],
|
||||||
|
have_systemd=no)
|
22
fcgiwrap-1.1.0-upstream-bugfix.patch
Normal file
22
fcgiwrap-1.1.0-upstream-bugfix.patch
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
From dc0c3b14f0d7bb014a9a4c6c17eb55a123496365 Mon Sep 17 00:00:00 2001
|
||||||
|
From: "D.pz" <xpz91@126.me>
|
||||||
|
Date: Mon, 28 Aug 2017 23:54:08 +0800
|
||||||
|
Subject: [PATCH] 1.fix: kill() parameter sequence wrong
|
||||||
|
|
||||||
|
---
|
||||||
|
fcgiwrap.c | 2 +-
|
||||||
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/fcgiwrap.c b/fcgiwrap.c
|
||||||
|
index b44d8aa..bfd9a90 100644
|
||||||
|
--- a/fcgiwrap.c
|
||||||
|
+++ b/fcgiwrap.c
|
||||||
|
@@ -205,7 +205,7 @@ static void fcgi_finish(struct fcgi_context *fc, const char* msg)
|
||||||
|
if (fc->fd_stderr >= 0) close(fc->fd_stderr);
|
||||||
|
|
||||||
|
if (fc->cgi_pid)
|
||||||
|
- kill(SIGTERM, fc->cgi_pid);
|
||||||
|
+ kill(fc->cgi_pid, SIGTERM);
|
||||||
|
}
|
||||||
|
|
||||||
|
static const char * fcgi_pass_fd(struct fcgi_context *fc, int *fdp, FCGI_FILE *ffp, char *buf, size_t bufsize)
|
72
fcgiwrap.spec
Normal file
72
fcgiwrap.spec
Normal file
@ -0,0 +1,72 @@
|
|||||||
|
Name: fcgiwrap
|
||||||
|
Version: 1.1.0
|
||||||
|
Release: 2mamba
|
||||||
|
Summary: Simple FastCGI wrapper for CGI scripts
|
||||||
|
Group: System/Servers
|
||||||
|
Vendor: openmamba
|
||||||
|
Distribution: openmamba
|
||||||
|
Packager: Silvan Calarco <silvan.calarco@mambasoft.it>
|
||||||
|
URL: https://github.com/gnosek/fcgiwrap
|
||||||
|
Source: https://github.com/gnosek/fcgiwrap.git/%{version}/fcgiwrap-%{version}.tar.bz2
|
||||||
|
Patch0: fcgiwrap-1.1.0-upstream-bugfix.patch
|
||||||
|
Patch1: fcgiwrap-1.1.0-systemd.patch
|
||||||
|
Patch2: fcgiwrap-1.1.0-service-user-group.patch
|
||||||
|
License: MIT
|
||||||
|
## AUTOBUILDREQ-BEGIN
|
||||||
|
BuildRequires: glibc-devel
|
||||||
|
BuildRequires: libfcgi-devel
|
||||||
|
BuildRequires: libsystemd-devel
|
||||||
|
## AUTOBUILDREQ-END
|
||||||
|
|
||||||
|
%description
|
||||||
|
Simple FastCGI wrapper for CGI scripts.
|
||||||
|
|
||||||
|
%debug_package
|
||||||
|
|
||||||
|
%prep
|
||||||
|
%setup -q
|
||||||
|
%patch0 -p1 -b .upstream-bugfix
|
||||||
|
%patch1 -p1 -b .systemd
|
||||||
|
%patch2 -p1
|
||||||
|
|
||||||
|
autoreconf -f -i
|
||||||
|
|
||||||
|
%build
|
||||||
|
%configure \
|
||||||
|
--prefix=/ \
|
||||||
|
CFLAGS='%{optflags} -Wno-error=implicit-fallthrough'
|
||||||
|
|
||||||
|
%make
|
||||||
|
|
||||||
|
%install
|
||||||
|
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
|
||||||
|
%makeinstall
|
||||||
|
|
||||||
|
%post
|
||||||
|
%systemd_post fcgiwrap.socket
|
||||||
|
:
|
||||||
|
|
||||||
|
%preun
|
||||||
|
%systemd_preun fcgiwrap.socket
|
||||||
|
:
|
||||||
|
|
||||||
|
%postun
|
||||||
|
%systemd_postun_with_restart fcgiwrap.socket
|
||||||
|
:
|
||||||
|
|
||||||
|
%clean
|
||||||
|
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
|
||||||
|
|
||||||
|
%files
|
||||||
|
%defattr(-,root,root)
|
||||||
|
%{_sbindir}/fcgiwrap
|
||||||
|
%{_unitdir}/fcgiwrap.service
|
||||||
|
%{_unitdir}/fcgiwrap.socket
|
||||||
|
%{_mandir}/man8/fcgiwrap.8*
|
||||||
|
|
||||||
|
%changelog
|
||||||
|
* Sun Aug 13 2023 Silvan Calarco <silvan.calarco@mambasoft.it> 1.1.0-2mamba
|
||||||
|
- set valid user and group in fcgiwrap.service for apache and nginx in openmamba
|
||||||
|
|
||||||
|
* Sat Aug 12 2023 Silvan Calarco <silvan.calarco@mambasoft.it> 1.1.0-1mamba
|
||||||
|
- package created using the webbuild interface
|
Loading…
Reference in New Issue
Block a user