~alpine/devel

This thread contains a patchset. You're looking at the original emails, but you may wish to use the patch review UI. Review patch
1

[alpine-devel] [PATCH] alpine-chroot fixing a few bugs

Details
Message ID
<1411625655-1774-1-git-send-email-systmkor@gmail.com>
Sender timestamp
1411625655
DKIM signature
missing
Download raw message
Patch: +10 -6
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
---
Natanael Copa <ncopa@alpinelinux.org>
Details
Message ID
<20140925162459.4c58b3d4@ncopa-desktop.alpinelinux.org>
In-Reply-To
<1411625655-1774-1-git-send-email-systmkor@gmail.com> (view parent)
Sender timestamp
1411655099
DKIM signature
missing
Download raw message
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:

> 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}



---
Unsubscribe:  alpine-devel+unsubscribe@lists.alpinelinux.org
Help:         alpine-devel+help@lists.alpinelinux.org
---
Reply to thread Export thread (mbox)