aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHenrik Riomar <henrik.riomar@gmail.com>2017-05-26 19:59:55 +0200
committerShiz <hi@shiz.me>2017-06-02 10:58:42 +0200
commit7fc7e98817fc3ecaf08eea068202caf3ce301acf (patch)
tree28a596c302ed5acd9083162f54365a59b91f967a
parent0bc88b0ef76390f81ba815126568c41f1b7c4f1b (diff)
downloadaports-7fc7e98817fc3ecaf08eea068202caf3ce301acf.tar.bz2
aports-7fc7e98817fc3ecaf08eea068202caf3ce301acf.tar.xz
testing/apt-dater-host: fixes two bugs
Upstream-Issue: https://github.com/DE-IBH/apt-dater-host/pull/19
-rw-r--r--testing/apt-dater-host/0001-apk-add-some-unit-tests-called-via-make-check.patch (renamed from testing/apt-dater-host/add-some-unit-tests-called-via-make-check.patch)5
-rw-r--r--testing/apt-dater-host/0002-apk-handle-packages-installed-with-Repository_pinnin.patch39
-rw-r--r--testing/apt-dater-host/0003-apk-an-alpine-package-can-be-held-back-with-as-well.patch26
-rw-r--r--testing/apt-dater-host/APKBUILD26
4 files changed, 82 insertions, 14 deletions
diff --git a/testing/apt-dater-host/add-some-unit-tests-called-via-make-check.patch b/testing/apt-dater-host/0001-apk-add-some-unit-tests-called-via-make-check.patch
index 6d4eec2db2..39d2ee7704 100644
--- a/testing/apt-dater-host/add-some-unit-tests-called-via-make-check.patch
+++ b/testing/apt-dater-host/0001-apk-add-some-unit-tests-called-via-make-check.patch
@@ -1,9 +1,8 @@
-From a52c54d9b918f7683315e5206fd5e8d62f36b589 Mon Sep 17 00:00:00 2001
+From 93ce508fdd073f652d148425eb1f4bf48edd7cee Mon Sep 17 00:00:00 2001
From: Henrik Riomar <henrik.riomar@gmail.com>
Date: Wed, 15 Mar 2017 06:38:05 +0100
Subject: [PATCH] apk: add some unit tests, called via "make check"
-Upstream-Issue: https://github.com/DE-IBH/apt-dater-host/pull/19
---
apk/Makefile | 3 +++
apk/apt-dater-host | 6 +++++-
@@ -91,5 +90,5 @@ index 0000000..eef6d2b
+ check_tag KERNELINFO $result
+}
--
-2.11.1
+2.13.0
diff --git a/testing/apt-dater-host/0002-apk-handle-packages-installed-with-Repository_pinnin.patch b/testing/apt-dater-host/0002-apk-handle-packages-installed-with-Repository_pinnin.patch
new file mode 100644
index 0000000000..e8682613d1
--- /dev/null
+++ b/testing/apt-dater-host/0002-apk-handle-packages-installed-with-Repository_pinnin.patch
@@ -0,0 +1,39 @@
+From 28d424bdd838821c38170fe9120b9ceec809e8da Mon Sep 17 00:00:00 2001
+From: Henrik Riomar <henrik.riomar@gmail.com>
+Date: Fri, 19 May 2017 17:22:17 +0200
+Subject: [PATCH] apk: handle packages installed with Repository_pinning
+
+If the package is pinned the last element of the version
+line will contain @<pin name>, strip that before getting the
+version number.
+
+https://wiki.alpinelinux.org/wiki/Alpine_Linux_package_management#Repository_pinning
+---
+ apk/apt-dater-host | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/apk/apt-dater-host b/apk/apt-dater-host
+index e0c9b65..cc0a1eb 100755
+--- a/apk/apt-dater-host
++++ b/apk/apt-dater-host
+@@ -10,7 +10,7 @@
+ # Henrik Riomar <henrik.riomar@gmail.com>
+ #
+ # Copyright Holder:
+-# 2016,2017 (C) Henrik Riomar
++# 2016, 2017 (C) Henrik Riomar
+ #
+ # License:
+ # This program is free software; you can redistribute it and/or modify
+@@ -71,7 +71,7 @@ get_pkg_stat()
+ $APK_CMD info | while read -r pkg
+ do
+ line=$(grep -E "^${pkg}-[0-9]" $tmp)
+- new_ver=$(echo $line | awk '{print $NF}')
++ new_ver=$(echo $line | sed 's/ @.\+$//' | awk '{print $NF}')
+ cur_ver=$(echo $line | awk '{print $1}' | sed "s/$pkg-//")
+ if [ x"$new_ver" = x"$cur_ver" ]; then
+ echo "STATUS: $pkg|$cur_ver|i"
+--
+2.13.0
+
diff --git a/testing/apt-dater-host/0003-apk-an-alpine-package-can-be-held-back-with-as-well.patch b/testing/apt-dater-host/0003-apk-an-alpine-package-can-be-held-back-with-as-well.patch
new file mode 100644
index 0000000000..bf0dc11009
--- /dev/null
+++ b/testing/apt-dater-host/0003-apk-an-alpine-package-can-be-held-back-with-as-well.patch
@@ -0,0 +1,26 @@
+From 77f70cd961923e9caa5e5a83bf32eeb5ea125255 Mon Sep 17 00:00:00 2001
+From: Henrik Riomar <henrik.riomar@gmail.com>
+Date: Fri, 19 May 2017 17:28:24 +0200
+Subject: [PATCH] apk: an alpine package can be held back with < as well
+
+https://wiki.alpinelinux.org/wiki/Alpine_Linux_package_management#Holding_a_specific_package_back
+---
+ apk/apt-dater-host | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/apk/apt-dater-host b/apk/apt-dater-host
+index cc0a1eb..25c9fb8 100755
+--- a/apk/apt-dater-host
++++ b/apk/apt-dater-host
+@@ -52,7 +52,7 @@ get_prl()
+ # check if a pkg is held back
+ is_held()
+ {
+- grep -E -q ^$1\= /etc/apk/world
++ grep -E -q -e ^$1\= -e ^$1\< /etc/apk/world
+ }
+
+ # check if $1 > $2
+--
+2.13.0
+
diff --git a/testing/apt-dater-host/APKBUILD b/testing/apt-dater-host/APKBUILD
index 5580c341ac..de4383693b 100644
--- a/testing/apt-dater-host/APKBUILD
+++ b/testing/apt-dater-host/APKBUILD
@@ -2,7 +2,7 @@
# Maintainer: Henrik Riomar <henrik.riomar@gmail.com>
pkgname=apt-dater-host
pkgver=1.0.0
-pkgrel=3
+pkgrel=4
pkgdesc="Host helper application for apt-dater"
url="https://github.com/DE-IBH/apt-dater-host"
arch="noarch"
@@ -12,32 +12,36 @@ subpackages="$pkgname-doc"
source="$pkgname-$pkgver.tar.gz::https://github.com/DE-IBH/$pkgname/archive/v$pkgver.tar.gz
initial-support-for-alpine.patch
try-to-use-virt-what.patch
- add-some-unit-tests-called-via-make-check.patch
+ 0001-apk-add-some-unit-tests-called-via-make-check.patch
+ 0002-apk-handle-packages-installed-with-Repository_pinnin.patch
+ 0003-apk-an-alpine-package-can-be-held-back-with-as-well.patch
"
+
builddir="$srcdir/$pkgname-$pkgver"
prepare() {
- default_prepare || return 1
+ default_prepare
cd "$builddir"
- chmod a+x apk/test-apt-dater-host || return 1
+ chmod a+x apk/test-apt-dater-host
}
check() {
cd "$builddir"/apk
- make check || return 1
+ make check
}
package() {
cd "$builddir"/apk
- make install DESTDIR="$pkgdir" || return 1
+ make install DESTDIR="$pkgdir"
- cd "$builddir"/man || return 1
- install -d -m0755 "$pkgdir"/usr/share/man/man1 || return 1
- install -m0644 "$pkgname".1 "$pkgdir"/usr/share/man/man1 || return 1
+ cd "$builddir"/man
+ install -d -m0755 "$pkgdir"/usr/share/man/man1
+ install -m0644 "$pkgname".1 "$pkgdir"/usr/share/man/man1
}
-
sha512sums="db750d1c33e425de315ecfe4d7d1a177b64432070ce355adfe24ebf7510f4f3d64522f57578a1157394255ec4c13d5d6fd20639dfdf2a69a94f9364ec1b1a6c8 apt-dater-host-1.0.0.tar.gz
8f427b0f6bf240b753e66e61f4ff069ae5fb46ea2c87df5b0ba6126ccb21d3b104b37af8260da0925eabedecf7e43fee2adf57fb6b1112c309c84817aa8a74c9 initial-support-for-alpine.patch
105b10a811a39b78ed8764318bceb7c44f7dd9781f49bd7b8ce09fc7011e3dd88b41037a5a82f9b05b1324914fab4baa87c836f613cafea606554abe7b35c139 try-to-use-virt-what.patch
-12392a9bd36c3445c47382bb33be2f17609d5badfed51b8b25caa5262c8260f0048da6a3990f695caa0d70b8e908a1452caef9e15eb6211f2c696c974218ed0d add-some-unit-tests-called-via-make-check.patch"
+d316c9cb8d465112b7c838103a6d0fe5acf437819bf3a7e8d51a2e317cded71d53a36f6db980f71f5aa789ee28c9ffbfd2af2a333e3ae16fcd4ac05cf48c84bc 0001-apk-add-some-unit-tests-called-via-make-check.patch
+ee606e48869c83b4f36515e3ffc23be1f99779aab848414601cf86722122fa2c433283dba6872571ec47af1a0b83d38f21dfa054221f7196b0273e7fce4904e5 0002-apk-handle-packages-installed-with-Repository_pinnin.patch
+bea084d448e1679e3910cb642177182a5ae75505b334b909989a4cdfaf1b5059286f90fcfcd39deb3e504a1816e5ba662e4c4c4f229493847a666396d1138f36 0003-apk-an-alpine-package-can-be-held-back-with-as-well.patch"