diff options
author | Kaarle Ritvanen <kaarle.ritvanen@datakunkku.fi> | 2017-05-25 18:55:38 +0300 |
---|---|---|
committer | Kaarle Ritvanen <kaarle.ritvanen@datakunkku.fi> | 2017-05-25 18:55:38 +0300 |
commit | f58356d8624f8747b5844638c56d815b8b911548 (patch) | |
tree | a3c6b7f64154c6b4770f863fd5036e28742beecf /main | |
parent | a4ec74c3e8c1734a64736d2fcab63d83ac51fd82 (diff) | |
download | aports-f58356d8624f8747b5844638c56d815b8b911548.tar.bz2 aports-f58356d8624f8747b5844638c56d815b8b911548.tar.xz |
main/awall: upgrade to 1.4.3
Diffstat (limited to 'main')
-rw-r--r-- | main/awall/APKBUILD | 8 | ||||
-rw-r--r-- | main/awall/yaml-toml-support.patch | 69 |
2 files changed, 3 insertions, 74 deletions
diff --git a/main/awall/APKBUILD b/main/awall/APKBUILD index f14a43533e..2ff319e6ea 100644 --- a/main/awall/APKBUILD +++ b/main/awall/APKBUILD @@ -1,8 +1,8 @@ # Contributor: Kaarle Ritvanen <kaarle.ritvanen@datakunkku.fi> # Maintainer: Kaarle Ritvanen <kaarle.ritvanen@datakunkku.fi> pkgname=awall -pkgver=1.4.2 -pkgrel=1 +pkgver=1.4.3 +pkgrel=0 pkgdesc="Alpine Wall" url="http://git.alpinelinux.org/cgit/awall/" _luaver=5.2 @@ -14,7 +14,6 @@ depends="bind-tools ip6tables ipset iptables lua$_luaver lua$_luaver-alt-getopt subpackages=$pkgname-masquerade triggers="$pkgname.trigger=/usr/share/awall" source="http://dev.alpinelinux.org/archive/awall/awall-$pkgver.tar.xz - yaml-toml-support.patch " _builddir=$srcdir/awall-$pkgver @@ -47,5 +46,4 @@ masquerade() { done } -sha512sums="1c58c6c9ecc9394bb5f19338224edb5eeff82d5139a78ede85ab04fbd35be21e3fd7f7c8fd5938460a754113372cb3f39c02d9e551dda84450c4515a856a21cd awall-1.4.2.tar.xz -a76d0b2decd6277b3b723d874de7aaa1a9e9b444e025307fbfa8ef4b97cb98a53c44dfcb5f15bcd649e0a849e07ecd85f9d3ee10e9d259ecdc68324fc53cc20a yaml-toml-support.patch" +sha512sums="149e41f49a66397e967fa4f5cc0afab59a175d5b645222fcb05f81411466d14abd977649297f0e27329f7e86961e19adc52453f61c4d426ffc2bef8b73b265ae awall-1.4.3.tar.xz" diff --git a/main/awall/yaml-toml-support.patch b/main/awall/yaml-toml-support.patch deleted file mode 100644 index 6128f067fb..0000000000 --- a/main/awall/yaml-toml-support.patch +++ /dev/null @@ -1,69 +0,0 @@ -From 463c4117d2c985b3e6d693508240fdf34272f22d Mon Sep 17 00:00:00 2001 -From: Natanael Copa <ncopa@alpinelinux.org> -Date: Tue, 9 May 2017 14:48:24 +0200 -Subject: [PATCH] policy: add support for loading yaml and toml policies - -The lua modules for yaml and toml are optional, and will only be -required if there are any *.yaml or *.toml files. ---- - awall/policy.lua | 17 ++++++++++++----- - 1 file changed, 12 insertions(+), 5 deletions(-) - -diff --git a/awall/policy.lua b/awall/policy.lua -index 1509d3f..cb2c93a 100644 ---- a/awall/policy.lua -+++ b/awall/policy.lua -@@ -17,7 +17,6 @@ local map = util.map - local printmsg = util.printmsg - - --local json = require('cjson') - local posix = require('posix') - - -@@ -75,7 +74,7 @@ function Policy:load() - local data = file:read('*all') - file:close() - -- local success, res = pcall(json.decode, data) -+ local success, res = pcall(self.decode, data) - if success then return res end - raise(res..' while parsing '..self.path) - end -@@ -109,14 +108,21 @@ local PolicySet = class() - - function PolicySet:init(dirs) - local confdir = (dirs.mandatory or defdirs.mandatory)[1] -+ local decoder = { -+ json = { mod="cjson", func="decode" }, -+ yaml = { mod="lyaml", func="load" }, -+ toml = { mod="toml", func="parse" }, -+ } - self.policies = {} - - for i, cls in ipairs{'private', 'optional', 'mandatory'} do - for i, dir in ipairs(dirs[cls] or defdirs[cls]) do - for _, fname in ipairs(posix.dir(dir)) do -- local si, ei, name = fname:find('^([%w-]+)%.json$') -- if name then -+ local si, ei, name, suff = fname:find('^([%w-]+)%.([jyt][sao][om][nl])$') -- json|yaml|toml -+ -+ if name and suff and decoder[suff] then - local pol = self.policies[name] -+ local decmod = require(decoder[suff].mod) - - local path = dir..'/'..fname - if path:sub(1, 1) ~= '/' then -@@ -141,7 +147,8 @@ function PolicySet:init(dirs) - path=path, - fname=fname, - loc=loc, -- confdir=confdir -+ confdir=confdir, -+ decode=decmod[decoder[suff].func] - } - end - end --- -2.12.2 - |