X-Original-To: alpine-devel@lists.alpinelinux.org Delivered-To: alpine-devel@mail.alpinelinux.org Received: from ncopa-desktop.alpinelinux.org (3.203.202.84.customer.cdi.no [84.202.203.3]) (using SSLv3 with cipher ECDHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) (Authenticated sender: n@tanael.org) by mail.alpinelinux.org (Postfix) with ESMTPSA id 91D2FDC006D; Thu, 25 Sep 2014 14:25:02 +0000 (UTC) Date: Thu, 25 Sep 2014 16:24:59 +0200 From: Natanael Copa To: systmkor Cc: alpine-devel@lists.alpinelinux.org, Fabian Affolter Subject: Re: [alpine-devel] [PATCH] alpine-chroot fixing a few bugs Message-ID: <20140925162459.4c58b3d4@ncopa-desktop.alpinelinux.org> In-Reply-To: <1411625655-1774-1-git-send-email-systmkor@gmail.com> References: <1411625655-1774-1-git-send-email-systmkor@gmail.com> X-Mailer: Claws Mail 3.10.1 (GTK+ 2.24.23; x86_64-alpine-linux-musl) X-Mailinglist: alpine-devel Precedence: list List-Id: Alpine Development List-Unsubscribe: List-Post: List-Help: List-Subscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit 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 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 ---