diff options
6 files changed, 27 insertions, 231 deletions
diff --git a/main/lua-aports/0001-buildrepo-fix-bug-when-repodest-is-set-with-buildrep.patch b/main/lua-aports/0001-buildrepo-fix-bug-when-repodest-is-set-with-buildrep.patch deleted file mode 100644 index d52c13a9c5..0000000000 --- a/main/lua-aports/0001-buildrepo-fix-bug-when-repodest-is-set-with-buildrep.patch +++ /dev/null @@ -1,103 +0,0 @@ -From 4de3a72e08487d44b2d4a57e7334d97cdebb8770 Mon Sep 17 00:00:00 2001 -From: Natanael Copa <ncopa@alpinelinux.org> -Date: Thu, 7 Apr 2016 08:47:52 +0200 -Subject: [PATCH] buildrepo: fix bug when repodest is set with buildrepo -d - -we need to use the specified repodest when checking if package is built -or not ---- - aports/db.lua | 14 +++++++++----- - aports/pkg.lua | 13 +++++++++---- - buildrepo.lua | 2 +- - 3 files changed, 19 insertions(+), 10 deletions(-) - -diff --git a/aports/db.lua b/aports/db.lua -index 45e394e..09afaeb 100644 ---- a/aports/db.lua -+++ b/aports/db.lua -@@ -116,7 +116,7 @@ local function apkbuilds_open(aportsdir, repos) - return obj - end - --local function init_apkdb(aportsdir, repos) -+local function init_apkdb(aportsdir, repos, repodest) - local pkgdb = {} - local revdeps = {} - local apkbuilds = apkbuilds_open(aportsdir, repos) -@@ -125,7 +125,7 @@ local function init_apkdb(aportsdir, repos) - if pkgdb[a.pkgname] == nil then - pkgdb[a.pkgname] = {} - end -- pkg.init(a) -+ pkg.init(a, repodest) - table.insert(pkgdb[a.pkgname], a) - -- add subpackages to package db - local k,v -@@ -296,11 +296,15 @@ function Aports:known_deps_exists(pkg) - return true - end - --function M.new(aportsdir, ...) -+function M.new(aportsdir, repos, repodest) - local h = Aports - h.aportsdir = aportsdir -- h.repos = {...} -- h.apks, h.revdeps = init_apkdb(aportsdir, h.repos) -+ if type(repos) == "table" then -+ h.repos = repos -+ else -+ h.repos = { repos } -+ end -+ h.apks, h.revdeps = init_apkdb(aportsdir, h.repos, repodest) - if h.apks == nil then - return nil, h.revdeps - end -diff --git a/aports/pkg.lua b/aports/pkg.lua -index 9689ecf..b99bf68 100644 ---- a/aports/pkg.lua -+++ b/aports/pkg.lua -@@ -59,11 +59,12 @@ function M.get_apk_file_name(pkg, name) - end - - function M.get_apk_file_path(pkg, name) -- if abuild.pkgdest ~= nil and abuild.pkgdest ~= "" then -+ local repodest = pkg.repodest or abuild.repodest -+ if pkg.repodest == nil and abuild.pkgdest ~= nil and abuild.pkgdest ~= "" then - return abuild.pkgdest.."/"..M.get_apk_file_name(pkg, name) - end -- if abuild.repodest ~= nil and abuild.repodest ~= "" then -- return abuild.repodest.."/"..M.get_repo_name(pkg).."/"..abuild.arch.."/"..M.get_apk_file_name(pkg, name) -+ if repodest ~= nil and repodest ~= "" then -+ return repodest.."/"..M.get_repo_name(pkg).."/"..abuild.arch.."/"..M.get_apk_file_name(pkg, name) - end - return pkg.dir.."/"..M.get_apk_file_name(pkg, name) - end -@@ -110,10 +114,11 @@ function M.each_dependency(pkg) - end - - --function M.init(pkg) -+function M.init(pkg, repodest) - for k,v in pairs(M) do - pkg[k] = v - end -+ pkg.repodest = repodest - end - - return M -diff --git a/buildrepo.lua b/buildrepo.lua -index adb73ec..c665711 100755 ---- a/buildrepo.lua -+++ b/buildrepo.lua -@@ -157,7 +157,7 @@ end - - stats = {} - for _,repo in pairs(args) do -- local db = require('aports.db').new(aportsdir, repo) -+ local db = require('aports.db').new(aportsdir, repo, repodest) - local pkgs = {} - local unsorted = {} - local logdir = nil --- -2.8.0 - diff --git a/main/lua-aports/0001-buildrepo-regenerate-index-if-packages-been-deleted.patch b/main/lua-aports/0001-buildrepo-regenerate-index-if-packages-been-deleted.patch deleted file mode 100644 index d3437fd636..0000000000 --- a/main/lua-aports/0001-buildrepo-regenerate-index-if-packages-been-deleted.patch +++ /dev/null @@ -1,26 +0,0 @@ -From 922130c3e0359b04cfb5d7cd31ee2fb9a5aa4b8d Mon Sep 17 00:00:00 2001 -From: Natanael Copa <ncopa@alpinelinux.org> -Date: Fri, 26 Aug 2016 21:29:43 +0000 -Subject: [PATCH] buildrepo: regenerate index if packages been deleted - -http://lists.alpinelinux.org/alpine-devel/5444.html ---- - buildrepo.lua | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/buildrepo.lua b/buildrepo.lua -index c665711..bf0f39a 100755 ---- a/buildrepo.lua -+++ b/buildrepo.lua -@@ -239,7 +239,7 @@ for _,repo in pairs(args) do - end - - -- generate new apkindex -- if not opts.n and built > 0 then -+ if not opts.n and (built > 0 or deleted > 0) then - info("Updating apk index") - apkrepo.update_index(("%s/%s"):format(repodest, repo), - abuild.arch, db:git_describe()) --- -2.9.3 - diff --git a/main/lua-aports/0001-pkg-db-support-checkdepends-variable.patch b/main/lua-aports/0001-pkg-db-support-checkdepends-variable.patch deleted file mode 100644 index 2a95bffad4..0000000000 --- a/main/lua-aports/0001-pkg-db-support-checkdepends-variable.patch +++ /dev/null @@ -1,64 +0,0 @@ -From dbf4268f130ca7cc4b68b4b8c986ee19f94007e3 Mon Sep 17 00:00:00 2001 -From: William Pitcock <nenolod@dereferenced.org> -Date: Sun, 29 Jan 2017 09:59:40 +0000 -Subject: [PATCH] pkg, db: support $checkdepends variable - ---- - aports/db.lua | 6 ++++-- - aports/pkg.lua | 3 +++ - 2 files changed, 7 insertions(+), 2 deletions(-) - -diff --git a/aports/db.lua b/aports/db.lua -index 09afaeb..407a3d9 100644 ---- a/aports/db.lua -+++ b/aports/db.lua -@@ -55,13 +55,14 @@ local function split_apkbuild(line) - return nil - end - local r = {} -- local dir,pkgname, pkgver, pkgrel, arch, options, depends, makedepends, subpackages, linguas, source, url = string.match(line, "([^|]*)|([^|]*)|([^|]*)|([^|]*)|([^|]*)|([^|]*)|([^|]*)|([^|]*)|([^|]*)|([^|]*)|([^|]*)|([^|]*)") -+ local dir,pkgname, pkgver, pkgrel, arch, options, depends, makedepends, checkdepends, subpackages, linguas, source, url = string.match(line, "([^|]*)|([^|]*)|([^|]*)|([^|]*)|([^|]*)|([^|]*)|([^|]*)|([^|]*)|([^|]*)|([^|]*)|([^|]*)|([^|]*)|([^|]*)") - r.dir = dir - r.pkgname = pkgname - r.pkgver = pkgver - r.pkgrel = pkgrel - r.depends = split_deps(depends) - r.makedepends = split_deps(makedepends) -+ r.checkdepends = split_deps(checkdepends) - r.linguas = split(linguas) - r.subpackages = split_subpkgs(subpackages, r.linguas, pkgname) - r.source = split(source) -@@ -93,6 +94,7 @@ local function apkbuilds_open(aportsdir, repos) - options= - depends= - makedepends= -+ checkdepends= - subpackages= - linguas= - source= -@@ -101,7 +103,7 @@ local function apkbuilds_open(aportsdir, repos) - [ -n "$dir" ] || exit 1; - cd "$dir"; - . ./APKBUILD; -- echo $dir\|$pkgname\|$pkgver\|$pkgrel\|$arch\|$options\|$depends\|$makedepends\|$subpackages\|$linguas\|$source\|$url ; -+ echo $dir\|$pkgname\|$pkgver\|$pkgrel\|$arch\|$options\|$depends\|$makedepends\|$checkdepends\|$subpackages\|$linguas\|$source\|$url ; - done; - ]]) - obj.read = function(self) -diff --git a/aports/pkg.lua b/aports/pkg.lua -index f21f352..5d40db5 100644 ---- a/aports/pkg.lua -+++ b/aports/pkg.lua -@@ -110,6 +110,9 @@ function M.each_dependency(pkg) - for _,dep in pairs(pkg.makedepends or {}) do - coroutine.yield(dep) - end -+ for _,dep in pairs(pkg.checkdepends or {}) do -+ coroutine.yield(dep) -+ end - end) - end - --- -2.13.2 - diff --git a/main/lua-aports/0001-pkg-support-arch-arch-syntax.patch b/main/lua-aports/0001-pkg-support-arch-arch-syntax.patch deleted file mode 100644 index 65268483da..0000000000 --- a/main/lua-aports/0001-pkg-support-arch-arch-syntax.patch +++ /dev/null @@ -1,25 +0,0 @@ -From d2e111262470976b190d6f9aabed0ebf3afe2cb9 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Timo=20Ter=C3=A4s?= <timo.teras@iki.fi> -Date: Mon, 25 Jul 2016 13:15:20 +0300 -Subject: [PATCH] pkg: support arch="!arch" syntax - ---- - aports/pkg.lua | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/aports/pkg.lua b/aports/pkg.lua -index b99bf68..f21f352 100644 ---- a/aports/pkg.lua -+++ b/aports/pkg.lua -@@ -91,7 +91,7 @@ function M.all_apks_exists(pkg) - end - - function M.arch_enabled(pkg) -- return pkg.arch.all or pkg.arch.noarch or pkg.arch[abuild.arch] -+ return not pkg.arch["!"..abuild.arch] and (pkg.arch.all or pkg.arch.noarch or pkg.arch[abuild.arch]) - end - - function M.libc_enabled(pkg) --- -2.9.3 - diff --git a/main/lua-aports/APKBUILD b/main/lua-aports/APKBUILD index c832ff3203..20472aac03 100644 --- a/main/lua-aports/APKBUILD +++ b/main/lua-aports/APKBUILD @@ -1,19 +1,15 @@ # Maintainer: Natanael Copa <ncopa@alpinelinux.org> pkgname=lua-aports -pkgver=0.5 -pkgrel=5 +pkgver=0.6.0 +pkgrel=0 pkgdesc="Lua modules for parsing aports tree" url="http://dev.alpinelinux.org/archive/lua-aports/" arch="noarch" license="MIT" -depends="lua5.2-filesystem lua5.2-optarg lua5.2" +depends="lua5.2-cjson lua5.2-filesystem lua5.2-optarg lua5.2" replaces="abuild" source="http://dev.alpinelinux.org/archive/lua-aports/lua-aports-$pkgver.tar.xz - 0001-buildrepo-fix-bug-when-repodest-is-set-with-buildrep.patch - 0001-pkg-support-arch-arch-syntax.patch - 0001-buildrepo-regenerate-index-if-packages-been-deleted.patch - 0001-pkg-db-support-checkdepends-variable.patch - " + fix-makefile.patch" builddir="$srcdir/$pkgname-$pkgver" package() { @@ -21,8 +17,5 @@ package() { make DESTDIR="$pkgdir" install } -sha512sums="7047f0c902c8f65e8a45ed221e793dd0a0c8abf77f85b21b2d23c4f3c19ab12d9862565615718223ff2633465b85026f260bba4d5851a898475974c93f40797d lua-aports-0.5.tar.xz -74d282482c54671cdac7bb0b484818aa67a875719bd615d24fa69b8ebd9905b5cc685d029e478d7f7c4f351e86b94b6fd4ad207240e82071bcff3b23ff764caf 0001-buildrepo-fix-bug-when-repodest-is-set-with-buildrep.patch -442f4701ea8020dce801bd5ddc08cac2bccff5a70cf12cc3d1602d091ae3dffe3e6905037d04e78da87eb3734401718b3340721d25dac0be5dbb59dbec9dac5a 0001-pkg-support-arch-arch-syntax.patch -165418eea5bfa8ef0c9782b29f43a27e5fd922ce0f54db0d12c7fe92ab174bc134e31a87d835a3fef6935f81a204573246a33a63adaf77580e21cf9d924bffe1 0001-buildrepo-regenerate-index-if-packages-been-deleted.patch -1a9399f5488256edd17e51ab25d35e4b1b80fe4b7b2d701f5a008b0ef9af7f3b69925056bb9aafed362c2143b203bc6430dc938d92d76a5cde9b5728fb84300e 0001-pkg-db-support-checkdepends-variable.patch" +sha512sums="32039f860ee8297e8c67bb56418657769bcf0a877738d01c95cb6ab6b0c9abd766a8855d41df83dc4e59fc3c39a5bf02e9b59ff1750388d772b969534b17fbe0 lua-aports-0.6.0.tar.xz +a46292422bd297f0710d4f1544ca4763b874006e1018ab59f7b6613e54d059ae4de19649ccc152ac63d2cff6d80f95cc05fd06e3f908de295d2c268bdc890cc1 fix-makefile.patch" diff --git a/main/lua-aports/fix-makefile.patch b/main/lua-aports/fix-makefile.patch new file mode 100644 index 0000000000..89b07a8110 --- /dev/null +++ b/main/lua-aports/fix-makefile.patch @@ -0,0 +1,21 @@ +From 4efd713435315918becc1a838fa3fb4f29e13d58 Mon Sep 17 00:00:00 2001 +From: Jakub Jirutka <jakub@jirutka.cz> +Date: Mon, 24 Jul 2017 21:47:54 +0200 +Subject: [PATCH] makefile: add dump.lua + +--- + Makefile | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/Makefile b/Makefile +index 22d5f77..22c68ce 100644 +--- a/Makefile ++++ b/Makefile +@@ -10,6 +10,7 @@ aportsfiles= \ + abuild.lua \ + apkrepo.lua \ + db.lua \ ++ dump.lua \ + pkg.lua + + binfiles=buildrepo.lua ap.lua |