summaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2016-06-06 20:19:33 +0200
committerErich Eckner <git@eckner.net>2016-06-06 20:19:33 +0200
commit7143a6618fe2614d49701256cdc1fd0dc9b4c748 (patch)
tree850fb31cc3c95ffc1b437f784697d58fb673a107 /core
parentccd71a5271c569460353f2ec9d9350c79da153c9 (diff)
downloadcrux-patches-7143a6618fe2614d49701256cdc1fd0dc9b4c748.tar.xz
pkgmk: PKGMK_FULL_SOURCE_MIRRORS neu
Diffstat (limited to 'core')
-rw-r--r--core/pkgutils/PKGMK_FULL_SOURCE_MIRRORS.patch.new68
-rw-r--r--core/pkgutils/Pkgfile-apply-patch.patch15
2 files changed, 83 insertions, 0 deletions
diff --git a/core/pkgutils/PKGMK_FULL_SOURCE_MIRRORS.patch.new b/core/pkgutils/PKGMK_FULL_SOURCE_MIRRORS.patch.new
new file mode 100644
index 0000000..ee38b21
--- /dev/null
+++ b/core/pkgutils/PKGMK_FULL_SOURCE_MIRRORS.patch.new
@@ -0,0 +1,68 @@
+diff --git a/pkgmk.conf b/pkgmk.conf
+index b29e3ad..5762735 100644
+--- a/pkgmk.conf
++++ b/pkgmk.conf
+@@ -22,6 +22,7 @@ case ${PKGMK_ARCH} in
+ ;;
+ esac
+
++# PKGMK_FULL_SOURCE_MIRRORS=()
+ # PKGMK_SOURCE_MIRRORS=()
+ # PKGMK_SOURCE_DIR="$PWD"
+ # PKGMK_PACKAGE_DIR="$PWD"
+diff --git a/pkgmk.conf.5.in b/pkgmk.conf.5.in
+index 0af5900..dfadd9d 100644
+--- a/pkgmk.conf.5.in
++++ b/pkgmk.conf.5.in
+@@ -24,8 +24,15 @@ Set make options.
+ .br
+ Default: none
+ .TP
++\fBPKGMK_FULL_SOURCE_MIRRORS=('STRING')\fP
++Set mirrors to check and download source archives from.
++Those mirrors should accept full url's.
++.br
++Default: none
++.TP
+ \fBPKGMK_SOURCE_MIRRORS=('STRING')\fP
+ Set mirrors to check and download source archives from.
++Those mirrors should accept filenames only.
+ .br
+ Default: none
+ .TP
+diff --git a/pkgmk.in b/pkgmk.in
+index 6789eae..13996ef 100755
+--- a/pkgmk.in
++++ b/pkgmk.in
+@@ -127,10 +127,9 @@ download_file() {
+
+ error=1
+
+- BASENAME=`get_basename $1`
+- for REPO in ${PKGMK_SOURCE_MIRRORS[@]}; do
++ for REPO in ${PKGMK_FULL_SOURCE_MIRRORS[@]}; do
+ REPO="`echo $REPO | sed 's|/$||'`"
+- $PKGMK_DOWNLOAD_PROG $DOWNLOAD_OPTS $RESUME_OPTS $REPO/$BASENAME
++ $PKGMK_DOWNLOAD_PROG $DOWNLOAD_OPTS $RESUME_OPTS $REPO/$1
+ error=$?
+ if [ $error == 0 ]; then
+ break
+@@ -138,6 +137,18 @@ download_file() {
+ done
+
+ if [ $error != 0 ]; then
++ BASENAME=`get_basename $1`
++ for REPO in ${PKGMK_SOURCE_MIRRORS[@]}; do
++ REPO="`echo $REPO | sed 's|/$||'`"
++ $PKGMK_DOWNLOAD_PROG $DOWNLOAD_OPTS $RESUME_OPTS $REPO/$BASENAME
++ error=$?
++ if [ $error == 0 ]; then
++ break
++ fi
++ done
++ fi
++
++ if [ $error != 0 ]; then
+ while true; do
+ $PKGMK_DOWNLOAD_PROG $DOWNLOAD_OPTS $RESUME_OPTS $1
+ error=$?
diff --git a/core/pkgutils/Pkgfile-apply-patch.patch b/core/pkgutils/Pkgfile-apply-patch.patch
new file mode 100644
index 0000000..662f5d4
--- /dev/null
+++ b/core/pkgutils/Pkgfile-apply-patch.patch
@@ -0,0 +1,15 @@
+--- Pkgfile 2016-06-01 21:50:22.035228588 +0200
++++ Pkgfile 2016-06-01 21:50:47.785297105 +0200
+@@ -6,9 +6,11 @@
+ name=pkgutils
+ version=5.36
+ release=2
+-source=(http://crux.nu/files/$name-$version.tar.xz)
++source=(http://crux.nu/files/$name-$version.tar.xz
++ PKGMK_FULL_SOURCE_MIRRORS.patch)
+
+ build () {
+ cd $name-$version
++ patch -p1 -i ../PKGMK_FULL_SOURCE_MIRRORS.patch
+ make DESTDIR=$PKG MANDIR=/usr/share/man install
+ }