~alpine/devel

alpine-chroot fixing a few bugs v1 PROPOSED

systmkor: 1
 alpine-chroot fixing a few bugs

 1 files changed, 10 insertions(+), 6 deletions(-)
Export patchset (mbox)
How do I use this?

Copy & paste the following snippet into your terminal to import this patchset into git:

curl -s https://lists.alpinelinux.org/~alpine/devel/patches/380/mbox | git am -3
Learn more about email & git

[alpine-devel] [PATCH] alpine-chroot fixing a few bugs Export this patch

Out of date apk static file, chroot directory, fixed '.latest.txt' file
Changed the file name of the APK_TOOL to the current version. The chroot
used by the APK_TOOl no longer forces the chroot directory to be a sub
directory of the executing current working directory. The '.latest.txt'
file now uses the mirrors format of having the architecture in the file name
Changes to be committed:
 modified:   alpine-chroot

---
 alpine-chroot | 16 ++++++++++------
 1 file changed, 10 insertions(+), 6 deletions(-)

diff --git a/alpine-chroot b/alpine-chroot
index 49555d6..8fe9114 100644
--- a/alpine-chroot
+++ b/alpine-chroot
@@ -20,7 +20,7 @@
# http://wiki.alpinelinux.org/wiki/Setting_up_the_build_environment_in_chroot

MIRROR=http://dl-5.alpinelinux.org/alpine
APK_TOOL=apk-tools-static-2.4.3-r0.apk
APK_TOOL=apk-tools-static-2.4.4-r0.apk

usage() {
        cat <<__EOF__
@@ -52,10 +52,6 @@ while getopts ":h:a:d:r:" opt; do
    esac
done

if [ "$RELEASE" = "" ]; then
    LATEST=`curl --silent $MIRROR/.latest.txt`
    RELEASE=${LATEST:31:3}
fi

if [ "$ARCH" = "" ]; then
	ARCH=`uname -i`
@@ -66,6 +62,13 @@ if [ "$ARCH" != "x86" ] && [ "$ARCH" != "x86_64" ]; then
    exit 1
fi

if [ "$RELEASE" = "" ]; then
    echo "$MIRROR/.latest.$ARCH.txt"
    LATEST=`curl --silent "$MIRROR/.latest.$ARCH.txt"`
    RELEASE=${LATEST:31:3}
    echo $RELEASE
fi

if [ "$CHROOT" = "" ]; then
	CHROOT="alpinechroot-$RELEASE"
fi
@@ -85,13 +88,14 @@ else
fi

build_chroot() {
    echo "$MIRROR/v$RELEASE/main/$ARCH/$APK_TOOL"
    curl --silent $MIRROR/v$RELEASE/main/$ARCH/$APK_TOOL -o $APK_TOOL
    tar -xzf $APK_TOOL
    ./sbin/apk.static \
        -X $MIRROR/v$RELEASE/main \
        -U \
        --allow-untrusted \
        --root ././$CHROOT \
        --root $CHROOT \
        --initdb add alpine-base alpine-sdk

    mkdir -p $CHROOT{/root,/etc/apk,/proc}
-- 
2.1.0



---
Unsubscribe:  alpine-devel+unsubscribe@lists.alpinelinux.org
Help:         alpine-devel+help@lists.alpinelinux.org
---
Fabian, this looks like yours...

You might want have a look at the get_static_apk function here:
https://github.com/lxc/lxc/blob/master/templates/lxc-alpine.in



On Wed, 24 Sep 2014 23:14:15 -0700
systmkor <systmkor@gmail.com> wrote: