Skip to contentSkip to conversation

Hiawatha: update to 9.0, add systemd support

PATCH Superseded Jack Mitchell 3 participants 3 messages Apr 16, 2013 – Apr 18, 2013

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Hiawatha: update to 9.0, add systemd support

From: Jack Mitchell <[email protected]>

---
 .../recipes-httpd/hiawatha/files/hiawatha.service     | 16 ++++++++++++++++
 .../hiawatha/{hiawatha_8.8.1.bb => hiawatha_9.0.bb}   | 19 ++++++++++++++-----
 2 files changed, 30 insertions(+), 5 deletions(-)
 create mode 100644 meta-webserver/recipes-httpd/hiawatha/files/hiawatha.service
 rename meta-webserver/recipes-httpd/hiawatha/{hiawatha_8.8.1.bb => hiawatha_9.0.bb} (79%)
meta-webserver/recipes-httpd/hiawatha/files/hiawatha.service new file +16 -0
new file mode 100644
index 0000000..26cb8d0
@@ -0,0 +1,16 @@
+[Unit]
+Description=Hiawatha Web Server
+After=network.target remote-fs.target nss-lookup.target
+
+[Service]
+Type=simple
+SyslogIdentifier=hiawatha
+ExecStartPre=/usr/sbin/hiawatha -k ; /usr/sbin/wigwam
+ExecStart= /usr/sbin/hiawatha -d
+TimeoutSec=10
+#(doesn't like this setting. Can't find files) PrivateTmp=true
+LimitNOFILE=infinity
+CapabilityBoundingSet=CAP_NET_BIND_SERVICE CAP_CHOWN CAP_DAC_OVERRIDE CAP_FOWNER CAP_FSETID CAP_SETGID CAP_SETUID 
+
+[Install]
+WantedBy=multi-user.target
meta-webserver/recipes-httpd/hiawatha/hiawatha_9.0.bb renamed from meta-webserver/recipes-httpd/hiawatha/hiawatha_8.8.1.bb +14 -5
similarity index 79%
rename from meta-webserver/recipes-httpd/hiawatha/hiawatha_8.8.1.bb
rename to meta-webserver/recipes-httpd/hiawatha/hiawatha_9.0.bb
index 9e4f119..79fdc59 100644
@@ -7,16 +7,19 @@ DEPENDS = "libxml2 libxslt"
 SECTION = "net"
 
 SRC_URI = "http://hiawatha-webserver.org/files/${PN}-${PV}.tar.gz \
-           file://hiawatha-init "
+           file://hiawatha-init \
+           file://hiawatha.service "
 
-SRC_URI[md5sum] = "5def93779bbc10a021796abd3609caf7"
-SRC_URI[sha256sum] = "2583d8e7f48ddc6cdedc27bb51d3e130679fc2f4411622bae9ddce3ef965d063"
-
-inherit cmake update-rc.d
+SRC_URI[md5sum] = "8abc4f85dbb9a76ed66e7f35de520064"
+SRC_URI[sha256sum] = "e40119afb050b11737250c08d89ac7ba7472645738a48c06aa79979a19729fc"
 
 INITSCRIPT_NAME = "hiawatha"
 INITSCRIPT_PARAMS = "defaults 70"
 
+SYSTEMD_SERVICE_${PN} = "hiawatha.service"
+
+inherit cmake update-rc.d systemd
+
 EXTRA_OECMAKE = " -DENABLE_IPV6=OFF \
                   -DENABLE_CACHE=OFF \
                   -DENABLE_DEBUG=OFF \
@@ -44,6 +47,12 @@ do_install_append() {
     # configure php-fcgi to have a working configuration
     # by default if php is installed
     echo "Server = ${bindir}/php-cgi ; 2 ; 127.0.0.1:2005 ; nobody:nobody ; ${sysconfdir}/php/hiawatha-php5/php.ini" >> ${D}${sysconfdir}/hiawatha/php-fcgi.conf
+
+    if ${@base_contains('DISTRO_FEATURES','systemd','true','false',d)}; then
+        install -d ${D}/${systemd_unitdir}/system
+        install -m 644 ${WORKDIR}/hiawatha.service ${D}/${systemd_unitdir}/system
+    fi
+
 }
 
 CONFFILES_${PN} = " \
Signature · 1 line
1.8.2
#1 lore raw
Quoted 43 lines · Jack Mitchell

From: Jack Mitchell <[email protected]>

---
 .../recipes-httpd/hiawatha/files/hiawatha.service     | 16 ++++++++++++++++
 .../hiawatha/{hiawatha_8.8.1.bb => hiawatha_9.0.bb}   | 19 ++++++++++++++-----
 2 files changed, 30 insertions(+), 5 deletions(-)
 create mode 100644 meta-webserver/recipes-httpd/hiawatha/files/hiawatha.service
 rename meta-webserver/recipes-httpd/hiawatha/{hiawatha_8.8.1.bb => hiawatha_9.0.bb} (79%)
meta-webserver/recipes-httpd/hiawatha/files/hiawatha.service new file +16 -0
new file mode 100644
index 0000000..26cb8d0
@@ -0,0 +1,16 @@
+[Unit]
+Description=Hiawatha Web Server
+After=network.target remote-fs.target nss-lookup.target
+
+[Service]
+Type=simple
+SyslogIdentifier=hiawatha
+ExecStartPre=/usr/sbin/hiawatha -k ; /usr/sbin/wigwam
+ExecStart= /usr/sbin/hiawatha -d
+TimeoutSec=10
+#(doesn't like this setting. Can't find files) PrivateTmp=true
+LimitNOFILE=infinity
+CapabilityBoundingSet=CAP_NET_BIND_SERVICE CAP_CHOWN CAP_DAC_OVERRIDE CAP_FOWNER CAP_FSETID CAP_SETGID CAP_SETUID 
+
+[Install]
+WantedBy=multi-user.target
meta-webserver/recipes-httpd/hiawatha/hiawatha_9.0.bb renamed from meta-webserver/recipes-httpd/hiawatha/hiawatha_8.8.1.bb +0 -0
similarity index 79%
rename from meta-webserver/recipes-httpd/hiawatha/hiawatha_8.8.1.bb
rename to meta-webserver/recipes-httpd/hiawatha/hiawatha_9.0.bb
index 9e4f119..79fdc59 100644
@@ -7,16 +7,19 @@ DEPENDS = "libxml2 libxslt"
 SECTION = "net"
 
 SRC_URI = "http://hiawatha-webserver.org/files/${PN}-${PV}.tar.gz \

meta-webserver/recipes-httpd/hiawatha/hiawatha_9.0.bb DEPENDS = "libxml2 libxslt" · line 14

Quoted 10 lines
meta-webserver/recipes-httpd/hiawatha/hiawatha_9.0.bb renamed from meta-webserver/recipes-httpd/hiawatha/hiawatha_8.8.1.bb +4 -5
-           file://hiawatha-init "
+           file://hiawatha-init \
+           file://hiawatha.service "
 
-SRC_URI[md5sum] = "5def93779bbc10a021796abd3609caf7"
-SRC_URI[sha256sum] = "2583d8e7f48ddc6cdedc27bb51d3e130679fc2f4411622bae9ddce3ef965d063"
-
-inherit cmake update-rc.d
+SRC_URI[md5sum] = "8abc4f85dbb9a76ed66e7f35de520064"
+SRC_URI[sha256sum] = "e40119afb050b11737250c08d89ac7ba7472645738a48c06aa79979a19729fc"

Can you recheck checksums? It could be issue in jenkins download, but yesterday it failed with:

WARNING: Checksum failure encountered with download of http://hiawatha-webserver.org/files/hiawatha-9.0.tar.gz - will attempt other sources if available
ERROR: Fetcher failure for URL: 'http://hiawatha-webserver.org/files/hiawatha-9.0.tar.gz'. Checksum mismatch!
File: '/home/jenkins/oe/shr-core-branches/shr-core/downloads/hiawatha-9.0.tar.gz' has sha256 checksum 5e40119afb050b11737250c08d89ac7ba7472645738a48c06aa79979a19729fc when e40119afb050b11737250c08d89ac7ba7472645738a48c06aa79979a19729fc was expected If this change is expected (e.g. you have upgraded to a new version without updating the checksums) then you can use these lines within the recipe:
SRC_URI[md5sum] = "8abc4f85dbb9a76ed66e7f35de520064"
SRC_URI[sha256sum] = "5e40119afb050b11737250c08d89ac7ba7472645738a48c06aa79979a19729fc"
Otherwise you should retry the download and/or check with upstream to determine if the file has become corrupted or otherwise unexpectedly modified.

So I guess the first '5' in sha256sum is missing in your recipe (one char shorter 256 is good hint :))

I'll fix it locally, no need to resend.

Signature · 1 line
Martin 'JaMa' Jansa     jabber: [email protected]
#2 lore raw

Hi,

Quoted 1 line · Martin Jansa

http://hiawatha-webserver.org/files/hiawatha-9.0.tar.gz

I can confirme that the sha256 is false :

meta-webserver/recipes-httpd/hiawatha/hiawatha_9.0.bb DEPENDS = "libxml2 libxslt" · line 14

Quoted 2 lines
meta-webserver/recipes-httpd/hiawatha/hiawatha_9.0.bb renamed from meta-webserver/recipes-httpd/hiawatha/hiawatha_8.8.1.bb +2 -0
+SRC_URI[md5sum] = "8abc4f85dbb9a76ed66e7f35de520064"
+SRC_URI[sha256sum] = "e40119afb050b11737250c08d89ac7ba7472645738a48c06aa79979a19729fc"  

here I also get :
5e40119afb050b11737250c08d89ac7ba7472645738a48c06aa79979a19729fc as you get on jenkins.

Eric