aboutsummaryrefslogtreecommitdiffstats
path: root/main/lxc
diff options
context:
space:
mode:
authorJakub Jirutka <jakub@jirutka.cz>2017-03-14 17:56:07 +0100
committerJakub Jirutka <jakub@jirutka.cz>2017-03-14 17:59:52 +0100
commit106e01120b70de146cd0a174547f28fa85f432f9 (patch)
tree09dc835508ea91425556e2fead92bbac77163285 /main/lxc
parent40b4d47218c385db9d903b880d27a72043372860 (diff)
downloadaports-106e01120b70de146cd0a174547f28fa85f432f9.tar.bz2
aports-106e01120b70de146cd0a174547f28fa85f432f9.tar.xz
main/lxc: backport upstream patches for alpine template
Diffstat (limited to 'main/lxc')
-rw-r--r--main/lxc/APKBUILD18
-rw-r--r--main/lxc/alpine-default-mirror.patch59
-rw-r--r--main/lxc/alpine-default-repos.patch37
3 files changed, 102 insertions, 12 deletions
diff --git a/main/lxc/APKBUILD b/main/lxc/APKBUILD
index 6124ec69e9..130fd0cddc 100644
--- a/main/lxc/APKBUILD
+++ b/main/lxc/APKBUILD
@@ -5,7 +5,7 @@
pkgname=lxc
pkgver=2.0.7
_pkgver=${pkgver/_rc/.rc}
-pkgrel=1
+pkgrel=2
pkgdesc="Userspace interface for the Linux kernel containment features"
url="https://linuxcontainers.org/lxc/"
arch="all"
@@ -24,6 +24,8 @@ source="https://github.com/lxc/lxc/archive/lxc-$_pkgver.tar.gz
lxc.conf
download-template-tmpfs.patch
+ alpine-default-mirror.patch
+ alpine-default-repos.patch
"
builddir="$srcdir/lxc-lxc-$_pkgver"
@@ -117,18 +119,10 @@ dev() {
mv "$subpkgdir"/usr/bin/lxc-config "$pkgdir"/usr/bin/
}
-md5sums="8913b4f3d53a4602051b7728cf1b35e7 lxc-2.0.7.tar.gz
-79e90616b5049a472ccdcb5b1dcdd8b1 version.patch
-7c9d3bb2e5015dd40080de6e18100f2f lxc.initd
-032d70c80d3380353223776a5bfe4014 lxc.conf
-e8fd932f3ec6d52d7b4c183fc58c0b24 download-template-tmpfs.patch"
-sha256sums="e74ee4a61a8ff426051ce86664f85b028052dd5664cc8e4cf710205c75ded356 lxc-2.0.7.tar.gz
-b6d85fb23940d2511b3951de56b2532843c0e03ec1613548366361cc0c1a46b9 version.patch
-0738606c80cb2185a4eb13ba794d42a80a18fc60f383e7f9cab77de829d3aba6 lxc.initd
-06c02a9d21c5160a00c0a92fac222850b97c04f830307692007f264d9344c474 lxc.conf
-8cb638f927d51f05884439e6db15092e902a9c59ef830cbdcb07d88f5cff11e1 download-template-tmpfs.patch"
sha512sums="eb48dc800ce43d2f4d46e0cecc4d0a714b3e22c6a4975776b54d17d1d20d5a1411e6b605215282f1f77286ddf22b61c80b86b83752191fc18023894ef7a1c44d lxc-2.0.7.tar.gz
e2ffcbf55447291a8434a4f37255c3a6a119bc4116c75d205006aa2b070bf6be28535cf6107bead14bbf64bf9fa415346ab544bd1c15e1add7d1c6380e6b2def version.patch
1037e0b773553aa04b619cec7cfc8fa504af830e58c8211eda367da7e36aeb88f45fca1f955a08fc4fa3f9da660017d5fe7145a326a2064cf15e24d1772d9e27 lxc.initd
5b83b0323e58bf00bd1e124c265729499cee97559b6fe18482962e3bed50d121b4c7a09f25cbce7b1e18d4234627bc4b4581ba2060e33cd022f105b4429cef01 lxc.conf
-b3b8c47a8594cefff58cef74efe9e6bf0dd8422a40289c4398ea34e61d04dd3d95c567e880a4b123df42ffac3fae179b63b130b357eb6659f73f922f2908d971 download-template-tmpfs.patch"
+b3b8c47a8594cefff58cef74efe9e6bf0dd8422a40289c4398ea34e61d04dd3d95c567e880a4b123df42ffac3fae179b63b130b357eb6659f73f922f2908d971 download-template-tmpfs.patch
+458c0d6f7aa91feeeafc228f8493f7056397bf3e3863b98e99b0e1297fa3553f7be23c1d37c4a37a7426d3f05e35c714096aabcbf8bd894af38a23dfec170911 alpine-default-mirror.patch
+a8ce110414578ba58cee8c15762f59d5185d7e543e8fdd46e1e7148895600b3603499e2c2b9222ee36d867b07e8c9776d8dee994a1647bac4d1fb478129faaf9 alpine-default-repos.patch"
diff --git a/main/lxc/alpine-default-mirror.patch b/main/lxc/alpine-default-mirror.patch
new file mode 100644
index 0000000000..359768d904
--- /dev/null
+++ b/main/lxc/alpine-default-mirror.patch
@@ -0,0 +1,59 @@
+From 72ead1c05401789ced73d9e3f47d1c11aa6dd951 Mon Sep 17 00:00:00 2001
+From: Jakub Jirutka <jakub@jirutka.cz>
+Date: Tue, 14 Mar 2017 17:35:46 +0100
+Subject: [PATCH 2/2] lxc-alpine: use dl-cdn.a.o as default mirror instead of
+ random one
+
+Some mirrors from the mirrors list are not very reliable and it seems
+that no one really wants to use some random mirror as the default
+option.
+
+Signed-off-by: Jakub Jirutka <jakub@jirutka.cz>
+Upstream-Issue: https://github.com/lxc/lxc/pull/1461
+---
+ templates/lxc-alpine.in | 11 +++--------
+ 1 file changed, 3 insertions(+), 8 deletions(-)
+
+diff --git a/templates/lxc-alpine.in b/templates/lxc-alpine.in
+index fd281f8..44173ee 100644
+--- a/templates/lxc-alpine.in
++++ b/templates/lxc-alpine.in
+@@ -46,7 +46,7 @@ ebf31683b56410ecc4c00acd9f6e2839e237a3b62b5ae7ef686705c7ba0396a9 alpine-devel@l
+ 12f899e55a7691225603d6fb3324940fc51cd7f133e7ead788663c2b7eecb00c alpine-devel@lists.alpinelinux.org-5261cecb.rsa.pub"
+
+ readonly APK_KEYS_URI='http://alpinelinux.org/keys'
+-readonly MIRRORS_LIST_URL='http://rsync.alpinelinux.org/alpine/MIRRORS.txt'
++readonly DEFAULT_MIRROR_URL='http://dl-cdn.alpinelinux.org/alpine'
+
+ : ${APK_KEYS_DIR:=/etc/apk/keys}
+ if ! ls "$APK_KEYS_DIR"/alpine* >/dev/null 2>&1; then
+@@ -76,7 +76,7 @@ usage() {
+ to the host arch.
+ -d, --debug Run this script in a debug mode (set -x and wget w/o -q).
+ -F, --flush-cache Remove cached files before build.
+- -m URL --mirror=URL The Alpine mirror to use; defaults to random mirror.
++ -m URL --mirror=URL The Alpine mirror to use; defaults to $DEFAULT_MIRROR_URL.
+ -r VER, --release=VER The Alpine release branch to install; default is the
+ latest stable.
+
+@@ -130,11 +130,6 @@ parse_arch() {
+ esac
+ }
+
+-random_mirror_url() {
+- local url=$(fetch "$MIRRORS_LIST_URL" | shuf -n 1)
+- [ -n "$url" ] && echo "$url"
+-}
+-
+ run_exclusively() {
+ local lock_name="$1"
+ local timeout=$2
+@@ -477,7 +472,7 @@ extra_packages="$@"
+ # Set global variables.
+ readonly DEBUG="$debug"
+ readonly FLUSH_CACHE="$flush_cache"
+-readonly MIRROR_URL="${mirror_url:-$(random_mirror_url)}"
++readonly MIRROR_URL="${mirror_url:-$DEFAULT_MIRROR_URL}"
+
+ # Validate options.
+ [ -n "$name" ] || die 1 'Missing required option --name'
diff --git a/main/lxc/alpine-default-repos.patch b/main/lxc/alpine-default-repos.patch
new file mode 100644
index 0000000000..a1f03ab3a8
--- /dev/null
+++ b/main/lxc/alpine-default-repos.patch
@@ -0,0 +1,37 @@
+From 288142218ae6cc24bf084fdd5768ad2c83086fb1 Mon Sep 17 00:00:00 2001
+From: Jakub Jirutka <jakub@jirutka.cz>
+Date: Tue, 14 Mar 2017 17:28:47 +0100
+Subject: [PATCH 1/2] lxc-alpine: add community repository to default
+ repositories
+
+Signed-off-by: Jakub Jirutka <jakub@jirutka.cz>
+Upstream-Issue: https://github.com/lxc/lxc/pull/1461
+---
+ templates/lxc-alpine.in | 6 ++++--
+ 1 file changed, 4 insertions(+), 2 deletions(-)
+
+diff --git a/templates/lxc-alpine.in b/templates/lxc-alpine.in
+index 06616b3..fd281f8 100644
+--- a/templates/lxc-alpine.in
++++ b/templates/lxc-alpine.in
+@@ -236,7 +236,6 @@ install() {
+ local branch="$3"
+ local extra_packages="$4"
+ local apk_cache="$LXC_CACHE_DIR/apk/$arch"
+- local repo_url="$MIRROR_URL/$branch/main"
+
+ if [ "$FLUSH_CACHE" = 'yes' ] && [ -d "$apk_cache" ]; then
+ einfo "Cleaning cached APK packages for $arch"
+@@ -249,7 +248,10 @@ install() {
+
+ mkdir -p etc/apk
+ ln -s "$apk_cache" etc/apk/cache
+- echo "$repo_url" > etc/apk/repositories
++
++ local repo; for repo in main community; do
++ echo "$MIRROR_URL/$branch/$repo" >> etc/apk/repositories
++ done
+
+ install_packages "$arch" "alpine-base $extra_packages"
+ make_dev_nodes
+