Mail archive
alpine-devel

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

From: Natanael Copa <ncopa_at_alpinelinux.org>
Date: Thu, 25 Sep 2014 16:24:59 +0200

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_at_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
> _at_@ -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__
> _at_@ -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`
> _at_@ -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
> _at_@ -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_at_lists.alpinelinux.org
Help:         alpine-devel+help_at_lists.alpinelinux.org
---
Received on Thu Sep 25 2014 - 16:24:59 GMT