From: Jo-Philipp Wich Date: Mon, 22 Jun 2009 10:23:21 +0000 (+0000) Subject: luci-0.9: merge r4886-r4890 X-Git-Tag: 0.9.0~185 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=23965204136603e49f401fccb1b6e16962529791;p=oweals%2Fluci.git luci-0.9: merge r4886-r4890 --- diff --git a/build/setup.lua b/build/setup.lua index dbe9bdcc9..a3e64f3d1 100644 --- a/build/setup.lua +++ b/build/setup.lua @@ -9,3 +9,5 @@ x(self, schemedir or SYSROOT .. "/lib/uci/schema") end + local sys = require "luci.sys" + sys.user.checkpasswd = function() return true end diff --git a/contrib/bitlib/.gitignore b/contrib/bitlib/.gitignore deleted file mode 100644 index 7211268c8..000000000 --- a/contrib/bitlib/.gitignore +++ /dev/null @@ -1 +0,0 @@ -bitlib-* diff --git a/contrib/bitlib/Makefile b/contrib/bitlib/Makefile deleted file mode 100644 index ea08c973b..000000000 --- a/contrib/bitlib/Makefile +++ /dev/null @@ -1,36 +0,0 @@ -include ../../build/config.mk -include ../../build/gccconfig.mk - -BITLIB_VERSION = 25 -BITLIB_SITE = http://dev.luci.freifunk-halle.net/sources/ -BITLIB_DIR = bitlib-$(BITLIB_VERSION) -BITLIB_FILE = $(BITLIB_DIR).tar.gz -BITLIB_URL = $(BITLIB_SITE)/$(BITLIB_FILE) - -all: compile - -include ../../build/module.mk - -$(BITLIB_FILE): - wget -O $@ $(BITLIB_URL) || rm -f $@ - -$(BITLIB_DIR)/.prepared: $(BITLIB_FILE) - rm -rf $(BITLIB_DIR) - tar xvfz $(BITLIB_FILE) - test -f $(BITLIB_DIR)/config.h || cp $(BITLIB_DIR)/config.h.in $(BITLIB_DIR)/config.h - touch $@ - -compile: $(BITLIB_DIR)/.prepared dist$(LUA_LIBRARYDIR)/bit.so - -dist$(LUA_LIBRARYDIR)/bit.so: - mkdir -p dist$(LUA_LIBRARYDIR) - $(COMPILE) -DHAVE_CONFIG_H -I$(BITLIB_DIR) -O2 -c $(BITLIB_DIR)/lbitlib.c $(FPIC) $(LUA_CFLAGS) -o $(BITLIB_DIR)/lbitlib.o - $(LINK) $(SHLIB_FLAGS) $(LDFLAGS) $(BITLIB_DIR)/lbitlib.o $(LUA_SHLIBS) -lm -ldl -o dist$(LUA_LIBRARYDIR)/bit.so - -luasource: -luastrip: -luacompile: -compile-all: compile - -clean: - rm -rf $(BITLIB_DIR) $(BITLIB_FILE) diff --git a/contrib/luadoc/lua/luadoc/doclet/html.lua b/contrib/luadoc/lua/luadoc/doclet/html.lua index a94e1983f..e77fb7441 100644 --- a/contrib/luadoc/lua/luadoc/doclet/html.lua +++ b/contrib/luadoc/lua/luadoc/doclet/html.lua @@ -14,7 +14,7 @@ local assert, getfenv, ipairs, loadstring, pairs, setfenv, tostring, tonumber, type = assert, getfenv, ipairs, loadstring, pairs, setfenv, tostring, tonumber, type local io = require"io" -local posix = require "posix" +local posix = require "nixio.fs" local lp = require "luadoc.lp" local luadoc = require"luadoc" local package = package diff --git a/contrib/luadoc/lua/luadoc/taglet/standard.lua b/contrib/luadoc/lua/luadoc/taglet/standard.lua index f55ea7204..17a305889 100644 --- a/contrib/luadoc/lua/luadoc/taglet/standard.lua +++ b/contrib/luadoc/lua/luadoc/taglet/standard.lua @@ -4,7 +4,7 @@ local assert, pairs, tostring, type = assert, pairs, tostring, type local io = require "io" -local posix = require "posix" +local posix = require "nixio.fs" local luadoc = require "luadoc" local util = require "luadoc.util" local tags = require "luadoc.taglet.standard.tags" @@ -505,14 +505,14 @@ end -- @return table with documentation function directory (path, doc) - for f in posix.files(path) do + for f in posix.dir(path) do local fullpath = path .. "/" .. f local attr = posix.stat(fullpath) assert(attr, string.format("error stating file `%s'", fullpath)) - if attr.type == "regular" then + if attr.type == "reg" then doc = file(fullpath, doc) - elseif attr.type == "directory" and f ~= "." and f ~= ".." then + elseif attr.type == "dir" and f ~= "." and f ~= ".." then doc = directory(fullpath, doc) end end @@ -550,9 +550,9 @@ function start (files, doc) local attr = posix.stat(path) assert(attr, string.format("error stating path `%s'", path)) - if attr.type == "regular" then + if attr.type == "reg" then doc = file(path, doc) - elseif attr.type == "directory" then + elseif attr.type == "dir" then doc = directory(path, doc) end end) diff --git a/contrib/luadoc/lua/luadoc/util.lua b/contrib/luadoc/lua/luadoc/util.lua index 3a48e7418..acaaac828 100644 --- a/contrib/luadoc/lua/luadoc/util.lua +++ b/contrib/luadoc/lua/luadoc/util.lua @@ -3,7 +3,7 @@ -- @release $Id: util.lua,v 1.16 2008/02/17 06:42:51 jasonsantos Exp $ ------------------------------------------------------------------------------- -local posix = require "posix" +local posix = require "nixio.fs" local type, table, string, io, assert, tostring, setmetatable, pcall = type, table, string, io, assert, tostring, setmetatable, pcall ------------------------------------------------------------------------------- diff --git a/contrib/luaposix/.gitignore b/contrib/luaposix/.gitignore deleted file mode 100644 index 1407d2387..000000000 --- a/contrib/luaposix/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -luaposix-* -lua-posix_* -patches/series diff --git a/contrib/luaposix/Makefile b/contrib/luaposix/Makefile deleted file mode 100644 index 70d3c9c4c..000000000 --- a/contrib/luaposix/Makefile +++ /dev/null @@ -1,35 +0,0 @@ -include ../../build/config.mk -include ../../build/gccconfig.mk - -LUAPOSIX_VERSION = 5.1.4 -LUAPOSIX_SITE = http://dev.luci.freifunk-halle.net/sources/ -LUAPOSIX_DIR = luaposix-$(LUAPOSIX_VERSION) -LUAPOSIX_FILE = lua-posix_5.1.4.orig.tar.gz -LUAPOSIX_URL = $(LUAPOSIX_SITE)/$(LUAPOSIX_FILE) -LUAPOSIX_PATCHDIR = patches - -all: compile - -include ../../build/module.mk - -$(LUAPOSIX_FILE): - wget -O $@ $(LUAPOSIX_URL) || rm -f $@ - -$(LUAPOSIX_DIR)/.prepared: $(LUAPOSIX_FILE) - rm -rf $(LUAPOSIX_DIR) - tar xvfz $(LUAPOSIX_FILE) - touch $@ - -compile: $(LUAPOSIX_DIR)/.prepared - $(MAKE) -C $(LUAPOSIX_DIR) CC=$(CC) CFLAGS="$(CFLAGS) $(LUA_CFLAGS)" LDFLAGS="$(LDFLAGS) $(LUA_SHLIBS)" OS="$(OS)" - mkdir -p dist$(LUA_LIBRARYDIR) - cp $(LUAPOSIX_DIR)/posix.so dist$(LUA_LIBRARYDIR) - -luasource: -luastrip: -luacompile: -compile-all: compile - -clean: - rm -rf $(LUAPOSIX_DIR) $(LUAPOSIX_FILE) - rm -f $(LUAPOSIX_PATCHDIR)/series diff --git a/contrib/package/luci/Makefile b/contrib/package/luci/Makefile index 0263f6174..46f356eb5 100644 --- a/contrib/package/luci/Makefile +++ b/contrib/package/luci/Makefile @@ -94,7 +94,7 @@ endef define Package/luci-core $(call Package/luci/libtemplate) - DEPENDS:=+lua + DEPENDS:=+lua +luci-nixio TITLE:=LuCI core libraries endef @@ -242,7 +242,7 @@ NIXIO_TLS:=axtls define Package/luci-nixio $(call Package/luci/libtemplate) - TITLE:=NIXIO Socket Library + TITLE:=NIXIO POSIX Library DEPENDS:= endef diff --git a/libs/cbi/luasrc/view/cbi/filebrowser.htm b/libs/cbi/luasrc/view/cbi/filebrowser.htm index 0e223a933..5eda993b6 100644 --- a/libs/cbi/luasrc/view/cbi/filebrowser.htm +++ b/libs/cbi/luasrc/view/cbi/filebrowser.htm @@ -66,10 +66,10 @@ $Id$ local filestat = luci.fs.stat( filepath ) local baseurl = luci.dispatcher.build_url('admin', 'filebrowser') - if filestat and filestat.type == "regular" then + if filestat and filestat.type == "reg" then table.remove( path, #path ) filepath = table.concat( path, '/' ) .. '/' - elseif not ( filestat and filestat.type == "directory" ) then + elseif not ( filestat and filestat.type == "dir" ) then path = { '' } filepath = '/' else @@ -99,7 +99,7 @@ $Id$