Bug 666090 - broken lua-wsapi package
Summary: broken lua-wsapi package
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: lua-wsapi
Version: rawhide
Hardware: All
OS: Linux
low
urgent
Target Milestone: ---
Assignee: Tim Niemueller
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-12-28 22:48 UTC by Alexey Lubimov
Modified: 2011-06-02 19:26 UTC (History)
1 user (show)

Fixed In Version: lua-wsapi-1.3.4-4.fc14
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-06-02 19:00:51 UTC


Attachments (Terms of Use)
spec for lua-wsapi (2.07 KB, application/octet-stream)
2010-12-28 22:48 UTC, Alexey Lubimov
no flags Details

Description Alexey Lubimov 2010-12-28 22:48:27 UTC
Created attachment 471007 [details]
spec for lua-wsapi

Description of problem:

At this time package lua-wsapi not work in most cases.

 Broken scripts wsapi-cgi and wsapi-fcgi

 src package lua-wsapi  contain module module fcgi.so, but not build them.



Version-Release number of selected component (if applicable):

all 

How reproducible:


Steps to Reproduce:
1. yum install lua-wsapi

create test script:

#!/var/www/cgi-bin/wsapi/wsapi.cgi

module(..., package.seeall)

function run(wsapi_env)
  local headers = { ["Content-type"] = "text/html" }

  local function hello_text()
    coroutine.yield("<html><body>")
    coroutine.yield("<p>Hello Wsapi!</p>")
    coroutine.yield("</body></html>")
  end

  return 200, headers, coroutine.wrap(hello_text)
end



2. run this script
  

Actual results:


./cgi.lua
lua: /usr/share/lua/5.1/wsapi/common.lua:9: module 'lfs' not found:
	no field package.preload['lfs']
	no file './lfs.lua'
	no file '/usr/share/lua/5.1/lfs.lua'
	no file '/usr/share/lua/5.1/lfs/init.lua'
	no file '/usr/lib64/lua/5.1/lfs.lua'
	no file '/usr/lib64/lua/5.1/lfs/init.lua'
	no file './lfs.so'
	no file '/usr/lib64/lua/5.1/lfs.so'
	no file '/usr/lib64/lua/5.1/loadall.so'
stack traceback:
	[C]: in function 'require'
	/usr/share/lua/5.1/wsapi/common.lua:9: in main chunk
	[C]: in function 'require'
	/usr/share/lua/5.1/wsapi/cgi.lua:11: in main chunk
	[C]: in function 'require'
	./cgi.lua:2: in main chunk
	[C]: ?


This is not serious problem. just missing dependeties to lua-filesystem

yum install lua-filesystem 


and cgi lua wrapper works.

But fastcgi wrapper still not work:

cat test.fcgi

#!/usr/bin/env lua

require "wsapi.fastcgi"


function hello(wsapi_env)
  local headers = { ["Content-type"] = "text/html" }

  local function hello_text()
    coroutine.yield("<html><body>")
    coroutine.yield("<p>Hello Wsapi!</p>")
    coroutine.yield("<p>PATH_INFO: " .. wsapi_env.PATH_INFO .. "</p>")
    coroutine.yield("<p>SCRIPT_NAME: " .. wsapi_env.SCRIPT_NAME .. "</p>")
    coroutine.yield("</body></html>")
  end

  return 200, headers, coroutine.wrap(hello_text)
end

wsapi.fastcgi.run(hello.run)


./test.fcgi
lua: /usr/share/lua/5.1/wsapi/fastcgi.lua:9: module 'lfcgi' not found:
	no field package.preload['lfcgi']
	no file './lfcgi.lua'
	no file '/usr/share/lua/5.1/lfcgi.lua'
	no file '/usr/share/lua/5.1/lfcgi/init.lua'
	no file '/usr/lib64/lua/5.1/lfcgi.lua'
	no file '/usr/lib64/lua/5.1/lfcgi/init.lua'
	no file './lfcgi.so'
	no file '/usr/lib64/lua/5.1/lfcgi.so'
	no file '/usr/lib64/lua/5.1/loadall.so'
stack traceback:
	[C]: in function 'require'
	/usr/share/lua/5.1/wsapi/fastcgi.lua:9: in main chunk
	[C]: in function 'require'
	./test.fcgi:3: in main chunk
	[C]: ?

this is because nodule lfcgi was not build in package lua-wsapi











Expected results:

 ./index.lua
Status: 200 OK
Content-type: text/html
<html>
<body>
<p>Hello Wsapi!</p>
</body>
</html>

Additional info:

Comment 1 Alexey Lubimov 2010-12-28 23:17:09 UTC
after rebuild lua-wsapi:

 rpm -ql lua-wsapi
/usr/lib64/lua/5.1/lfcgi.so


and now test.fcgi works very well 

but real wrapper /var/www/cgi-bin/wsapi/wsapi.fcgi  

/usr/share/lua/5.1/wsapi/common.lua:489: attempt to call field 'new' (a nil value)
stack traceback:
	/usr/share/lua/5.1/wsapi/common.lua:489: in function 'bootstrap_app'
	/usr/share/lua/5.1/wsapi/common.lua:553: in function 'load_wsapi_isolated'
	/usr/share/lua/5.1/wsapi/common.lua:525: in function 
	(tail call): ?
	(tail call): ?
	[C]: in function 'xpcall'
	/usr/share/lua/5.1/wsapi/common.lua:254: in function 'run_app'
	/usr/share/lua/5.1/wsapi/common.lua:281: in function 'run'
	/usr/share/lua/5.1/wsapi/fastcgi.lua:40: in function 'run'
	/var/www/cgi-bin/wsapi/wsapi.fcgi:28: in main chunk
	[C]: ?

this wrapper use lua module "rings"

rpm -qlp lua-rings-1.2.3-1.fc14.x86_64.rpm 
/usr/lib64/lua/5.1/rings.so
/usr/share/doc/lua-rings-1.2.3
/usr/share/doc/lua-rings-1.2.3/README
/usr/share/doc/lua-rings-1.2.3/index.html
/usr/share/doc/lua-rings-1.2.3/license.html
/usr/share/doc/lua-rings-1.2.3/manual.html
/usr/share/doc/lua-rings-1.2.3/rings.png
/usr/share/lua/5.1/stable.lua

after install lua-rings we have new error
/usr/share/lua/5.1/wsapi/ringer.lua:116: [string "  local app_name, bootstrap_code, is_file =..."]:19: module 'coxpcall' not found:
	no field package.preload['coxpcall']
	no file './coxpcall.lua'
	no file '/usr/share/lua/5.1/coxpcall.lua'
	no file '/usr/share/lua/5.1/coxpcall/init.lua'
	no file '/usr/lib64/lua/5.1/coxpcall.lua'
	no file '/usr/lib64/lua/5.1/coxpcall/init.lua'
	no file './coxpcall.so'
	no file '/usr/lib64/lua/5.1/coxpcall.so'
	no file '/usr/lib64/lua/5.1/loadall.so'
stack traceback:
	[C]: in function 'require'
	[string "  local app_name, bootstrap_code, is_file =..."]:19: in main chunk
stack traceback:
	[C]: in function 'assert'
	/usr/share/lua/5.1/wsapi/ringer.lua:116: in function 
	(tail call): ?
	/usr/share/lua/5.1/wsapi/common.lua:553: in function 'load_wsapi_isolated'
	/usr/share/lua/5.1/wsapi/common.lua:525: in function 
	(tail call): ?
	(tail call): ?
	[C]: in function 'xpcall'
	/usr/share/lua/5.1/wsapi/common.lua:254: in function 'run_app'
	/usr/share/lua/5.1/wsapi/common.lua:281: in function 'run'
	/usr/share/lua/5.1/wsapi/fastcgi.lua:40: in function 'run'
	/var/www/cgi-bin/wsapi/wsapi.fcgi:28: in main chunk

this is lost dependites to lua-coxpcall

yum install lua-coxpcall

and now lua wrapper wsapi.fcgi works!

Comment 2 Fedora Update System 2011-04-21 22:43:37 UTC
lua-wsapi-1.3.4-4.fc14 has been submitted as an update for Fedora 14.
https://admin.fedoraproject.org/updates/lua-wsapi-1.3.4-4.fc14

Comment 3 Fedora Update System 2011-04-21 22:44:21 UTC
lua-wsapi-1.3.4-4.fc15 has been submitted as an update for Fedora 15.
https://admin.fedoraproject.org/updates/lua-wsapi-1.3.4-4.fc15

Comment 4 Fedora Update System 2011-04-21 22:44:55 UTC
lua-wsapi-1.3.4-4.el5 has been submitted as an update for Fedora EPEL 5.
https://admin.fedoraproject.org/updates/lua-wsapi-1.3.4-4.el5

Comment 5 Fedora Update System 2011-04-21 22:45:24 UTC
lua-wsapi-1.3.4-4.el6 has been submitted as an update for Fedora EPEL 6.
https://admin.fedoraproject.org/updates/lua-wsapi-1.3.4-4.el6

Comment 6 Fedora Update System 2011-04-22 21:19:03 UTC
Package lua-wsapi-1.3.4-4.fc14:
* should fix your issue,
* was pushed to the Fedora 14 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing lua-wsapi-1.3.4-4.fc14'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/lua-wsapi-1.3.4-4.fc14
then log in and leave karma (feedback).

Comment 7 Fedora Update System 2011-04-28 19:25:50 UTC
lua-wsapi-1.3.4-4.fc15 has been pushed to the Fedora 15 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 8 Fedora Update System 2011-06-02 19:00:42 UTC
lua-wsapi-1.3.4-4.fc14 has been pushed to the Fedora 14 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 9 Fedora Update System 2011-06-02 19:24:00 UTC
lua-wsapi-1.3.4-4.el5 has been pushed to the Fedora EPEL 5 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 10 Fedora Update System 2011-06-02 19:25:13 UTC
lua-wsapi-1.3.4-4.el6 has been pushed to the Fedora EPEL 6 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 11 Alexey Lubimov 2011-06-02 19:26:39 UTC
Package lua-wsapi-1.3.4-4.fc14 still noarch.

Package lua-wsapi still contain module fcgi.so, but not build them.


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