Bug 1849755 - LigHTTPd should include tmpfiles.d configuration to create /run/lighttpd
Summary: LigHTTPd should include tmpfiles.d configuration to create /run/lighttpd
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora EPEL
Classification: Fedora
Component: lighttpd
Version: epel8
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Gwyn Ciesla
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-06-22 18:04 UTC by Karl-Johan Karlsson
Modified: 2020-07-08 00:26 UTC (History)
3 users (show)

Fixed In Version: lighttpd-1.4.55-3.el8
Clone Of:
Environment:
Last Closed: 2020-07-08 00:26:45 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Karl-Johan Karlsson 2020-06-22 18:04:48 UTC
Description of problem:
The default configuration in /etc/lighttpd/lighttpd.conf points to /run/lighttpd/ for runtime state:

   var.state_dir   = "/run/lighttpd"

But this directory does not exist, and cannot be created since LigHTTPd runs as its own user:

   server.username  = "lighttpd"

This means that LigHTTPd fails to start, claiming "opening pid-file failed: /run/lighttpd/lighttpd.pid No such file or directory":

● lighttpd.service - Lightning Fast Webserver With Light System Requirements
   Loaded: loaded (/usr/lib/systemd/system/lighttpd.service; enabled; vendor preset: disabled)
   Active: failed (Result: exit-code) since Mon 2020-06-22 19:50:43 CEST; 5min ago
  Process: 3047 ExecStart=/usr/sbin/lighttpd -D -f /etc/lighttpd/lighttpd.conf (code=exited, status=255)
 Main PID: 3047 (code=exited, status=255)

Jun 22 19:50:43 webserver systemd[1]: Started Lightning Fast Webserver With Light System Requirements.
Jun 22 19:50:43 webserver lighttpd[3047]: 2020-06-22 19:50:43: (server.c.1233) opening pid-file failed: /run/lighttpd/lighttpd.pid No such file or directory
Jun 22 19:50:43 webserver lighttpd[3047]: 2020-06-22 19:50:43: (server.c.424) unlink failed for: /run/lighttpd/lighttpd.pid 2 No such file or directory
Jun 22 19:50:43 webserver systemd[1]: lighttpd.service: Main process exited, code=exited, status=255/n/a
Jun 22 19:50:43 webserver systemd[1]: lighttpd.service: Failed with result 'exit-code'.

Interestingly, the spec file contains code for handling this, at https://src.fedoraproject.org/rpms/lighttpd/blob/30ec12b96be54a47693139c510e2e3b0d5537d86/f/lighttpd.spec#_230

   mkdir -p %{buildroot}/usr/lib/tmpfiles.d
   echo 'D /run/lighttpd 0750 lighttpd lighttpd -' > \
       %{buildroot}/usr/lib/tmpfiles.d/lighttpd.conf

But that file does not exist on the system or in the RPM:

   # rpm -qil lighttpd | grep tmpfiles
   # 

Manually creating this file makes LigHTTPd work.

The code in the spec file creating the tmpfiles.d configuration is behind an "%if %{with tmpfiles}" block, so it seems that the RPM build should be configured to set this variable on EPEL 8.

Version-Release number of selected component (if applicable):
lighttpd-1.4.55-2.el8.x86_64

How reproducible:
Always

Steps to Reproduce:
1. Install CentOS 8
2. dnf install epel-release
3. dnf install lighttpd
4. systemctl start lighttpd

Actual results:
LigHTTPD does not start. "systemctl status lighttpd" contains the error message "opening pid-file failed: /run/lighttpd/lighttpd.pid No such file or directory".

Expected results:
LigHTTPD starts.

Comment 1 Fedora Update System 2020-06-22 20:23:26 UTC
FEDORA-EPEL-2020-0de6d49717 has been submitted as an update to Fedora EPEL 8. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2020-0de6d49717

Comment 2 Fedora Update System 2020-06-23 01:20:24 UTC
FEDORA-EPEL-2020-0de6d49717 has been pushed to the Fedora EPEL 8 testing repository.

You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2020-0de6d49717

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 3 Karl-Johan Karlsson 2020-06-23 12:04:35 UTC
Thanks for the quick response. I have tested and can confirm that lighttpd-1.4.55-3.el8.x86_64 from epel-testing fixes my problem.

Comment 4 Fedora Update System 2020-07-08 00:26:45 UTC
FEDORA-EPEL-2020-0de6d49717 has been pushed to the Fedora EPEL 8 stable repository.
If problem still persists, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.