Project

General

Profile

[UserError] lighttpd-1.4.47 feed makefile needed.

Added by ligttpd_user over 6 years ago

Hi ,

I tried to update the version on net/lighttpd/Makefile(lede-17.01) from 1.4.45 to 1.4.47. getting compilation issues. after fixing compilation issues facing following issue on DUT.

root@root_d:~# /usr/sbin/lighttpd -Df /etc/lighttpd/lighttpd.conf &
root@root_d:~# Undefined config variable: var.cache_dir
2017-10-27 13:23:59: (configfile.c.1144) source: cat /etc/lighttpd/conf.d/*.conf line: 81 pos: 52 parser failed somehow near 
2017-10-27 13:23:59: (configfile.c.1144) source: /etc/lighttpd/lighttpd.conf line: 37 pos: 1 parser failed somehow near here 

how to fix this issue ? and also feed makefile for 1.4.47 release.

thanks for your support.


Replies (16)

RE: lighttpd-1.4.47 feed makefile needed. - Added by stbuehler over 6 years ago

You mixed your own lighttpd.conf with the upstream provided conf.d/*.conf examples. Don't do that.

Also please provide links where your source is, so others can help you without having to google for your shit.

In this case I assume this is what you're talking about: https://github.com/openwrt/packages/tree/master/net/lighttpd

RE: lighttpd-1.4.47 feed makefile needed. - Added by ligttpd_user over 6 years ago

thanks for reply.

No i didnt modify lighttpd.conf.

yes your right, i have taken only feed makefile from https://github.com/openwrt/packages/tree/master/net/lighttpd.
and modified the version to download the latest lighttpd version(1.4.47) , and got following compilation issue.

*
-MD -MP -MF .deps/mod_vhostdb.Tpo -c mod_vhostdb.c  -fPIC -DPIC -o .libs/mod_vhostdb.o
In file included from plugin.h:5:0,
                 from mod_vhostdb.c:3:
base.h:319:18: warning: comma at end of enumerator list [-Wpedantic]
  COND_RESULT_TRUE, /* active */
                  ^
mod_vhostdb.c: In function 'mod_vhostdb_set_defaults':
mod_vhostdb.c:69:5: error: 'for' loop initial declarations are only allowed in C99 mode
     for (size_t i = 0; i < srv->config_context->used; ++i) {
     ^
mod_vhostdb.c:69:5: note: use option -std=c99 or -std=gnu99 to compile your code
mod_vhostdb.c: In function 'mod_vhostdb_patch_connection':
mod_vhostdb.c:104:5: error: 'for' loop initial declarations are only allowed in C99 mode
     for (size_t i = 1; i < srv->config_context->used; ++i) {
     ^
mod_vhostdb.c:112:9: error: 'for' loop initial declarations are only allowed in C99 mode
         for (size_t j = 0; j < dc->value->used; ++j) {*****

After fixing this compilation issue. when i try to start lighttpd service. got following issue.

root@root_d:~# /etc/init.d/lighttpd  start
Undefined config variable: var.cache_dir
2017-10-31 16:07:00: (configfile.c.1144) source: cat /etc/lighttpd/conf.d/*.conf line: 82 pos: 52 parser failed somehow near 
2017-10-31 16:07:00: (configfile.c.1144) source: /etc/lighttpd/lighttpd.conf line: 33 pos: 1 parser failed somehow near here

How to resolve this ? and compatible feed make file for 1.4.47 release .
thanks for your support.

RE: lighttpd-1.4.47 feed makefile needed. - Added by stbuehler over 6 years ago

stbuehler wrote:

You mixed your own lighttpd.conf with the upstream provided conf.d/*.conf examples. Don't do that.
[...]

ligttpd_user wrote:

[...]
No i didnt modify lighttpd.conf.

yes your right, i have taken only feed makefile from https://github.com/openwrt/packages/tree/master/net/lighttpd.
and modified the version to download the latest lighttpd version(1.4.47) , and got following compilation issue.

"You" == "whoever did this in openwrt", in this case you since you're trying to maintain that.

https://github.com/openwrt/packages/blob/master/net/lighttpd/files/lighttpd.conf - this is the config that package is using instead of https://git.lighttpd.net/lighttpd/lighttpd1.4.git/tree/doc/config/lighttpd.conf#n61, which includes var.cache_dir = "/var/cache/lighttpd" missing in openwrt.

RE: lighttpd-1.4.47 feed makefile needed. - Added by ligttpd_user over 6 years ago

Thanks for the reply.

After copying proper config file from doc path , i see following error.

root@root_d:~# /etc/init.d/lighttpd start
2017-10-31 17:33:54: (network.c.441) server.network-backend has a unknown value: sendfile

what else i'm missing, can you please share feedmake file which is compatible for 1.4.47 version.

thanks for your support.

RE: lighttpd-1.4.47 feed makefile needed. - Added by stbuehler over 6 years ago

Hm.

The config example sets server.network-backend = "sendfile", but "sendfile" is not available on cross compilation as configure.ac wants to verify sendfile actually works before it uses it.

Maybe you can grep your build log for the line with "if sendfile works".

I'm not sure what we expect from the example config; should it always work, work in "normal" setups, ...?

I guess you need to disable that line for 1.4.47, or make configure.ac not check for broken sendfile implementations.

RE: lighttpd-1.4.47 feed makefile needed. - Added by stbuehler over 6 years ago

I just filed #2836; I think we'll drop the broken sendfile check in the future (at least for cross compilation).

RE: lighttpd-1.4.47 feed makefile needed. - Added by gstrauss over 6 years ago

Hey @ligttpd_user [sic], have you tried reading the documentation?

server.network-backend = "writev" 

RE: lighttpd-1.4.47 feed makefile needed. - Added by ligttpd_user over 6 years ago

Modified following configuration.

server.document-root = "/test/www/" 
server.use-ipv6 = "disable" 
server.network-backend = "writev" 

lighttpd daemon spawned without any issues.

When i try to open webpage, i see following responses from web server.

GET http://1x.1xx.xx.xx:9001/images/icons/%7B%7Bicon%7D%7D.png 404 (Not Found)
TypeError: Cannot read property 'length' of undefined

and also not getting login page, seems mod_auth not kicked in.

server.modules = (
  "mod_access",
  "mod_alias",
  "mod_auth",
  "mod_authn_file",
  "mod_redirect",
  "mod_rewrite",
  "mod_setenv",
  "mod_usertrack",
)

RE: lighttpd-1.4.47 feed makefile needed. - Added by gstrauss over 6 years ago

@ligttpd_user, I think you're on the wrong forum. None of your mistakes have been problems in the lighttpd code, but your own mistakes in what to use with your chosen distro. Please ask for assistance on your distro forums. Better, try troubleshooting your lighttpd config yourself by looking in the lighttpd error log, or testing your scripts more carefully. You see -- or maybe you don't -- you have posted that mod_auth is not magically kicking in for the non-existent auth config which you have failed to share.

RE: lighttpd-1.4.47 feed makefile needed. - Added by ligttpd_user over 6 years ago

understood. one last question.

In response i see encoded data instead of plain data.
even i removed "charset=utf-8" from mime.conf.

How can i make response with plain data.

RE: lighttpd-1.4.47 feed makefile needed. - Added by stbuehler over 6 years ago

Not enough data to answer. What do you mean with "encoded data", "plain data", where is the output of curl -v, ...

RE: lighttpd-1.4.47 feed makefile needed. - Added by ligttpd_user over 6 years ago

I have resolved that issue.
need to know how to set "httponly" flag.

RE: lighttpd-1.4.47 feed makefile needed. - Added by ligttpd_user over 6 years ago

How to enable "https" support and "httponly" support in latest release version.

RE: lighttpd-1.4.47 feed makefile needed. - Added by gstrauss over 6 years ago

How to enable "https" support and "httponly" support in latest release version.

The same ways as in previous versions of lighttpd.

Please use your favorite search engine to try to solve this yourself. From your posts above, you have not demonstrated an understanding of what these terms mean and how they are different from one another, so I suggest you start with those questions in your favorite search engine. There is plenty of existing documentation how to enable https in lighttpd, both on this site and in many blog posts which you should be able to easily find with a search engine.

tl;dr: kindly type your questions into a search engine and read through the results before asking us to repeat things here.

RE: [UserError] lighttpd-1.4.47 feed makefile needed. - Added by ligttpd_user over 6 years ago

From documentation :
"This was historically built into the core of lighttpd 1.4.x, but is now a standalone module (mod_openssl) since lighttpd 1.4.46."

//#### SSL engine

$SERVER["socket"] == ":443" {
server.document-root = "/test/www/"
ssl.engine = "enable"
ssl.pemfile = "/etc/lighttpd/lighttpd.pem"
}

root@root_d:~# /etc/init.d/lighttpd restart

2017-11-03 08:53:33: (configfile.c.59) Warning: please add "*mod_openssl*" to server.modules list in lighttpd.conf. A future s
root@root_d:~# 2017-11-03 08:53:33: (plugin.c.229) dlopen() failed for: /usr/lib/lighttpd/mod_openssl.so File not found
2017-11-03 08:53:33: (server.c.1231) loading plugins finally failed

How to enable mod_openssl ? or please point out documentation path for 1.4.47 release.

RE: [UserError] lighttpd-1.4.47 feed makefile needed. - Added by gstrauss over 6 years ago

@ligttpd_user, I think you're on the wrong forum. None of your mistakes have been problems in the lighttpd code, but your own mistakes in what to use with your chosen distro. Please ask for assistance on your distro forums. Better, try troubleshooting your lighttpd config yourself by looking in the lighttpd error log, or testing your scripts more carefully. You see -- or maybe you don't -- you have posted that mod_auth is not magically kicking in for the non-existent auth config which you have failed to share.

This was already said. I will repeat it once, and will not be posting further here.

root@root_d:~# 2017-11-03 08:53:33: (plugin.c.229) dlopen() failed for: /usr/lib/lighttpd/mod_openssl.so File not found

You didn't build it, since you didn't modify the build scripts to build it.

This post is off-topic for lighttpd code.

tl;dr: go ask for distro help on specific distro forums or actually look at the simple openwrt build scripts and see if you can figure out the one or two lines that you need to add.

    (1-16/16)