DroboApp announcement: lighttpd 1.4.30

A new version of lighttpd is out, therefore a new DroboApp package follows:


This version is statically linked as the previous version, has all the latest dependencies, and it includes full support for webdav.

I recommend backing up the “etc” and “www” folders before updating, and then copying them back after the update.

As usual, comments, suggestions and feedback are welcome.

Afraid I’m running into some significant issues on the new version.

First off, it fails on initial install due to a missing “lighttpd.conf” file:

bash-4.1# DroboApps.sh install Installing /mnt/DroboFS/Shares/DroboApps/lighttpd.tgz. Starting lighttpd. bash-4.1# ps | grep lighttpd 12662 root 3036 S grep lighttpd bash-4.1#

I copied lighttpd.conf.default to lighttpd.conf, and the server started. However, after trying to add a link to webdav.conf to the enabled modules, lighttpd would no longer start:

bash-4.1# /mnt/DroboFS/Shares/DroboApps/lighttpd/sbin/lighttpd -f /mnt/DroboFS/Shares/DroboApps/lighttpd/etc/lighttpd.conf Undefined config variable: var.home_dir 1999-12-03 09:27:41: (configfile.c.943) source: cat conf-enabled/*.conf 2> /dev/null line: 281 pos: 49 parser failed somehow near here: + 1999-12-03 09:27:41: (configfile.c.943) source: /mnt/DroboFS/Shares/DroboApps/lighttpd/etc/lighttpd.conf line: 43 pos: 50 parser failed somehow near here: (EOL)

Looks like it’s missing the home_dir variable, referenced from the infamous sql line in webdav.conf:

webdav.sqlite-db-name = home_dir + "/webdav.db"

I changed it to server_root, but that still didn’t appease it:

bash-4.1# /mnt/DroboFS/Shares/DroboApps/lighttpd/sbin/lighttpd -f /mnt/DroboFS/Shares/DroboApps/lighttpd/etc/lighttpd.conf 1999-12-03 09:31:31: (plugin.c.169) dlopen() failed for: /mnt/DroboFS/Shares/DroboApps/lighttpd/lib/mod_webdav.so /mnt/DroboFS/Shares/DroboApps/lighttpd/lib/mod_webdav.so: undefined symbol: floor 1999-12-03 09:31:31: (server.c.657) loading plugins finally failed

Commenting out the sqlite line had no effect. Looks like something along the way didn’t statically compile into the webdav module.

So, three changes I’d make:
[list=1][]Change the startup script to check for lighttpd.conf and lighttpd.conf.default. If the conf file is missing but the default exists, make a copy of the default. That way it’s easy to roll back to the defaults if needed.
]Either define the home_dir variable, or replace that instance with server_root. I lean towards server_root in the name of keeping it all self-contained.
[*]Check into the compilation of the webdav module. Seems like a pretty basic library is missing for the undefined symbol to be “floor”. :)[/list]

Thanks for the feedback. As you’ll see, two of the issues were quite easily solved, but the last one, not so much.
[]The missing lighttpd.conf was a complete blunder of mine. I was sure I copied the new service.sh in the package folder, but apparently I did not. This time I made sure the missing ‘if’ statement is really there.
]The webdav configuration file has been fixed as well. I changed it to put the .db file inside of lighttpd/var. Moral of the story: Never trust the default configuration files that ship with the program itself… :-/
[]There was indeed a missing compilation flag. This is one of the reasons it is so hard to properly cross-compile software based on modules. In this particular case, the webdav module compiles just fine, and only complains about the missing dependency at runtime.
[*]Bonus fix: I moved the log files from lighttpd/logs to lighttpd/var/log. This is better aligned with all the other DroboApps.
*) For future reference: It is not enough to compile the dependencies (in this case libxml2 and sqlite3) statically. When you are compiling the main program (i.e. lighttpd), all the dependencies of the dependencies have to be enumerated again (in this case -lm for libxml2 and -lpthread for sqlite3).

I uploaded a new version of lighttpd.tgz to the same DroboPorts page. It is version 3 of the file.

Indeed, everything appears to be working perfectly in the new version. Thanks, ricardo!