aboutsummaryrefslogtreecommitdiffstats
path: root/main/alpine-conf
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2014-07-01 11:04:44 +0200
committerNatanael Copa <ncopa@alpinelinux.org>2014-07-01 11:04:44 +0200
commitbfed42109a5e2cd0ff26cb34c9519652ab3ac5fe (patch)
treed2b7abbb433ddfaa615c9dab6bffbc9ea3b081bd /main/alpine-conf
parentac65a8a1fdedfbf4c187eb83ac70385f8026254a (diff)
downloadaports-bfed42109a5e2cd0ff26cb34c9519652ab3ac5fe.tar.bz2
aports-bfed42109a5e2cd0ff26cb34c9519652ab3ac5fe.tar.xz
main/alpine-conf: add support for url args to setup-apkrepos
ref #2862
Diffstat (limited to 'main/alpine-conf')
-rw-r--r--main/alpine-conf/0001-setup-apkrepos-allow-specify-the-repos-from-cmdline.patch102
-rw-r--r--main/alpine-conf/APKBUILD12
2 files changed, 110 insertions, 4 deletions
diff --git a/main/alpine-conf/0001-setup-apkrepos-allow-specify-the-repos-from-cmdline.patch b/main/alpine-conf/0001-setup-apkrepos-allow-specify-the-repos-from-cmdline.patch
new file mode 100644
index 0000000000..81a8beb9d9
--- /dev/null
+++ b/main/alpine-conf/0001-setup-apkrepos-allow-specify-the-repos-from-cmdline.patch
@@ -0,0 +1,102 @@
+From a5ad7c4c0a1e649033699a3ba832c3810fb576dc Mon Sep 17 00:00:00 2001
+From: Natanael Copa <ncopa@alpinelinux.org>
+Date: Tue, 1 Jul 2014 11:01:09 +0200
+Subject: [PATCH] setup-apkrepos: allow specify the repos from cmdline
+
+ref #2862
+---
+ setup-apkrepos.in | 60 ++++++++++++++++++++++++++++++-------------------------
+ 1 file changed, 33 insertions(+), 27 deletions(-)
+
+diff --git a/setup-apkrepos.in b/setup-apkrepos.in
+index 7744d8b..e29572e 100644
+--- a/setup-apkrepos.in
++++ b/setup-apkrepos.in
+@@ -137,7 +137,7 @@ edit_repositories() {
+
+ usage() {
+ cat <<__EOF__
+-usage: setup-apkrepos [-hr]
++usage: setup-apkrepos [-hr] [REPO...]
+
+ Setup apk repositories
+
+@@ -155,7 +155,7 @@ while getopts "hr" opt; do
+ r) JUSTADDRANDOM=1;;
+ esac
+ done
+-
++shift $(($OPTIND - 1))
+
+ # main
+ # install alpine-mirrors if its not already there
+@@ -175,35 +175,41 @@ if [ -r "$APKREPOS_PATH" ]; then
+ APKREPOS=`cat "$APKREPOS_PATH"`
+ fi
+
+-
+-
+ get_alpine_release
+ default_answer=f
+-changed=
+-while true; do
+- if [ -n "$JUSTADDRANDOM" ]; then
+- show_mirror_list > /dev/null
+- add_random_mirror && changed=1 && break
+- else
+- show_mirror_list
+- prompt_setup_method $default_answer
+-
+- default_read answer $default_answer
+- case "$answer" in
+- "done") break;;
+- [0-9]*) add_from_list $answer && changed=1;;
+- /*|http://*|ftp://*|https://*) add_from_url "$answer" && changed=1;;
+- r) add_random_mirror && changed=1;;
+- f) add_fastest_mirror && changed=1;;
+- e) edit_repositories && changed=1 && break;;
+- esac
+- if [ -n "$changed" ]; then
+- break
+- fi
+- fi
++changed=false
++
++if [ $# -gt 0 ]; then
++ # replace the apk repos with the specified ones
++ rm -f "$APKREPOS_PATH"
++ for i; do
++ echo "$i" >> "$APKREPOS_PATH"
++ done
++ changed=true
++fi
++
++if [ -n "$JUSTADDRANDOM" ]; then
++ show_mirror_list > /dev/null
++ add_random_mirror && changed=true
++fi
++
++while ! $changed; do
++ show_mirror_list
++ prompt_setup_method $default_answer
++
++ default_read answer $default_answer
++ case "$answer" in
++ "done") break;;
++ [0-9]*) add_from_list $answer && changed=true;;
++ /*|http://*|ftp://*|https://*) add_from_url "$answer" \
++ && changed=true;;
++ r) add_random_mirror && changed=true;;
++ f) add_fastest_mirror && changed=true;;
++ e) edit_repositories && changed=true;;
++ esac
+ done
+
+-if [ -n "$changed" ]; then
++if $changed; then
+ echo -n "Updating repository indexes... "
+ apk update --quiet $apk_root_opt && echo "done."
+ fi
+--
+2.0.0
+
diff --git a/main/alpine-conf/APKBUILD b/main/alpine-conf/APKBUILD
index 378b70ce21..b9a5c59253 100644
--- a/main/alpine-conf/APKBUILD
+++ b/main/alpine-conf/APKBUILD
@@ -1,13 +1,14 @@
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=alpine-conf
pkgver=3.0.3
-pkgrel=0
+pkgrel=1
pkgdesc="Alpine configuration management scripts"
url=http://git.alpinelinux.org/cgit/$pkgname
arch="all"
license="GPL2"
depends="openrc"
source="http://dev.alpinelinux.org/archive/alpine-conf/alpine-conf-$pkgver.tar.xz
+ 0001-setup-apkrepos-allow-specify-the-repos-from-cmdline.patch
"
_builddir="$srcdir"/$pkgname-$pkgver
@@ -34,6 +35,9 @@ package() {
done
}
-md5sums="c62e9abfb7cb0295de6588ccf87faf19 alpine-conf-3.0.3.tar.xz"
-sha256sums="0b7b5a55648054a9eb885bfffe9c80d4c7170cf29455b16d916115e06ad2eaf7 alpine-conf-3.0.3.tar.xz"
-sha512sums="400151c5d41562faaf00c66be47d058cd7685b03b4803ce36d2d674b0db9575bc9c756cd4f2914e99bcde163db61d34703a5ac6a4c8095006d1f3140c4534c30 alpine-conf-3.0.3.tar.xz"
+md5sums="c62e9abfb7cb0295de6588ccf87faf19 alpine-conf-3.0.3.tar.xz
+b0e80f8bb36976b014542459bb02683a 0001-setup-apkrepos-allow-specify-the-repos-from-cmdline.patch"
+sha256sums="0b7b5a55648054a9eb885bfffe9c80d4c7170cf29455b16d916115e06ad2eaf7 alpine-conf-3.0.3.tar.xz
+eb04470103e66ebe4bf18782775ad80e041e1e3ca6bef3dc9a87ef524f9434df 0001-setup-apkrepos-allow-specify-the-repos-from-cmdline.patch"
+sha512sums="400151c5d41562faaf00c66be47d058cd7685b03b4803ce36d2d674b0db9575bc9c756cd4f2914e99bcde163db61d34703a5ac6a4c8095006d1f3140c4534c30 alpine-conf-3.0.3.tar.xz
+67f0d42faad00a7c4dfa85eda52823ea53e4369f811699b67531c404ecdaecbd5c02b1fb204f0e86de1a2ae846d7f626f0aff58ba3d473f752628d81310b2cb9 0001-setup-apkrepos-allow-specify-the-repos-from-cmdline.patch"