X-Original-To: alpine-devel@lists.alpinelinux.org Delivered-To: alpine-devel@lists.alpinelinux.org Received: from qw-out-2122.google.com (qw-out-2122.google.com [74.125.92.25]) by lists.alpinelinux.org (Postfix) with ESMTP id 41EB11EB587 for ; Mon, 9 Nov 2009 15:08:14 +0000 (UTC) Received: by qw-out-2122.google.com with SMTP id 9so617420qwb.13 for ; Mon, 09 Nov 2009 07:08:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:reply-to:received :in-reply-to:references:date:x-google-sender-auth:message-id:subject :from:to:cc:content-type; bh=H10jdePjzKo6tzW/mgbskJel2B/f6u6esAvLvYqryAk=; b=Dnq4fVgJSWiBkoS/Z67W57a69EbR6EaUqv9xX/rrbQK11jVNs5ksfXGA/Y8HXeYfcI HajE/32LqmJSQ3DOvCIbH4L4dtOwvRmq1v16R2VQQbK3+V+VswVcpprdg3zRldGjukow IIfrrKvg/cpDgkXxuOoUjXDecK+vFqx9dvtsQ= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:reply-to:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; b=FL6mKRSrjaqh4GwCQx6MOQ6uIh/ylx4sm9Y+PgvbohnbDnX9Q4Y/C1sT7DjvbPX0MD MgIyZf9pfag7V3kt7cyK5y6XdUIHUhXbswPLigluzsYCtY7qlDx42D34vIpymCFoCj+5 aZ5+UObtkFQqJqcmgZS1F30s3/wYsHFNdgTT4= X-Mailinglist: alpine-devel Precedence: list List-Id: Alpine Development List-Unsubscribe: List-Post: List-Help: List-Subscribe: MIME-Version: 1.0 Sender: jeremythomerson@gmail.com Reply-To: jeremy@thomersonfamily.com Received: by 10.229.44.19 with SMTP id y19mr1094375qce.48.1257779294190; Mon, 09 Nov 2009 07:08:14 -0800 (PST) In-Reply-To: <1257513717.1929.632.camel@ncopa-desktop.nor.wtbts.net> References: <1257513717.1929.632.camel@ncopa-desktop.nor.wtbts.net> Date: Mon, 9 Nov 2009 09:08:14 -0600 X-Google-Sender-Auth: 43504063c658f3bc Message-ID: <6602aeca0911090708k162fa7bfuc9ad582dce12b7b4@mail.gmail.com> Subject: Re: [alpine-devel] RFC: volatile repo/apkbuilds From: Jeremy Thomerson To: Natanael Copa Cc: alpine-devel@lists.alpinelinux.org Content-Type: multipart/alternative; boundary=001485e7e7d8093dd20477f19049 --001485e7e7d8093dd20477f19049 Content-Type: text/plain; charset=ISO-8859-1 Seems to make sense to me. I have a question, though: Say there are two packages I have installed - PackageA from volatile and PackageB version 1.2.2 from main. If PackageB suddenly shows up in volatile, would my next update upgrade it? I think it would be important that only packages that are already installed as volatile versions are upgraded to other volatile versions. Jeremy On Fri, Nov 6, 2009 at 7:21 AM, Natanael Copa wrote: > Hi, > > Been playing with the idea previously mentioned by Mark Constable with > volatile packages from svn/git/cvs. > > The idea is that each run it will update the sources from git/svn and if > needed, recompile. That way we could have a "volatile" repository which > tracks some upstream projects, like apk-tools, abuild etc. > > This gives us early packages for testing/development. > > What would be nice is if: > * packages are only updated/rebuilt when upstream have changes. so > pkgrel=$(date -u +%Y%m%d%H) > wont do it. > > * package version includes the scm id of some sort. > > * we dont need to modify the apkbuild when things changes upstream > > So far I have been thinking in those lines: > > Set pkgver to "volatile": > pkgver="volatile" > > The must provide a getpkgver() function which will give the pkgrel late. > > The apkbuild must override the fetch() and unpack() functions. > > Example: > > ... > source= > _git_source="git://git.alpinelinux.org/apk-tools" > > getpkgver() { > if [ ! -d "$srcdir"/$pkgname ]; then > unpack > fi > cd "$srcdir"/$pkgname > local tagver=$(git describe --exact-match | sed 's/^v//') > local n=$(git describe --long | cut -d- -f2) > pkgver=${_tagver}_git${n} > } > > fetch() { > msg "Fetching source from $_git_source" > if [ -d "$SRCDEST"/$pkgname/.git ]; then > cd "$SRCDEST"/$pkgname > git pull --rebase > else > rm -rf "$SRCDEST"/$pkgname > git clone "$_git_source" "$SRCDEST"/$pkgname > fi > cd "$SRCDEST"/$pkgname > } > > unpack() { > if [ ! -d "$SRCDEST"/$pkgname ]; then > fetch > fi > mkdir -p "$srcdir"/$pkgname-$pkgver > rsync -a --delete "$SRCDEST"/$pkgname/ \ > "$srcdir"/$pkgname > } > > build() { > cd "$srcdir/$pkgname" > make || return 1 > } > > package() { > cd "$srcdir/$pkgname" > make DESTDIR="$pkgdir" install > } > ... > > Does that make sense? > > Other ideas? > > -nc > > > > --- > Unsubscribe: alpine-devel+unsubscribe@lists.alpinelinux.org > Help: alpine-devel+help@lists.alpinelinux.org > --- > > --001485e7e7d8093dd20477f19049 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Seems to make sense to me.=A0 I have a question, though:=A0 Say there are t= wo packages I have installed - PackageA from volatile and PackageB version = 1.2.2 from main.=A0 If PackageB suddenly shows up in volatile, would my nex= t update upgrade it?=A0 I think it would be important that only packages th= at are already installed as volatile versions are upgraded to other volatil= e versions.

Jeremy

On Fri, Nov 6, 2009 at 7:21 AM= , Natanael Copa <natanael.copa@gmail.com> wrote:
Hi,

Been playing with the idea previously mentioned by Mark Constable with
volatile packages from svn/git/cvs.

The idea is that each run it will update the sources from git/svn and if needed, recompile. That way we could have a "volatile" repository= which
tracks some upstream projects, like apk-tools, abuild etc.

This gives us early packages for testing/development.

What would be nice is if:
* packages are only updated/rebuilt when upstream have changes. so
=A0pkgrel=3D$(date -u +%Y%m%d%H)
wont do it.

* package version includes the scm id of some sort.

* we dont need to modify the apkbuild when things changes upstream

So far I have been thinking in those lines:

Set pkgver to "volatile":
pkgver=3D"volatile"

The must provide a getpkgver() function which will give the pkgrel late.
The apkbuild must override the fetch() and unpack() functions.

Example:

...
source=3D
_git_source=3D"git://git.alpinelinux.org/apk-tools"

getpkgver() {
=A0 =A0 =A0 =A0if [ ! -d "$srcdir"/$pkgname ]; then
=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0unpack
=A0 =A0 =A0 =A0fi
=A0 =A0 =A0 =A0cd "$srcdir"/$pkgname
=A0 =A0 =A0 =A0local tagver=3D$(git describe --exact-match | sed 's/^v= //')
=A0 =A0 =A0 =A0local n=3D$(git describe --long | cut -d- -f2)
=A0 =A0 =A0 =A0pkgver=3D${_tagver}_git${n}
}

fetch() {
=A0 =A0 =A0 =A0msg "Fetching source from $_git_source"
=A0 =A0 =A0 =A0if [ -d "$SRCDEST"/$pkgname/.git ]; then
=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0cd "$SRCDEST"/$pkgname
=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0git pull --rebase
=A0 =A0 =A0 =A0else
=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0rm -rf "$SRCDEST"/$pkgname
=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0git clone "$_git_source" "$S= RCDEST"/$pkgname
=A0 =A0 =A0 =A0fi
=A0 =A0 =A0 =A0cd "$SRCDEST"/$pkgname
}

unpack() {
=A0 =A0 =A0 =A0if [ ! -d "$SRCDEST"/$pkgname ]; then
=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0fetch
=A0 =A0 =A0 =A0fi
=A0 =A0 =A0 =A0mkdir -p "$srcdir"/$pkgname-$pkgver
=A0 =A0 =A0 =A0rsync -a --delete "$SRCDEST"/$pkgname/ \
=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0"$srcdir"/$pkgname
}

build() {
=A0 =A0 =A0 =A0cd "$srcdir/$pkgname"
=A0 =A0 =A0 =A0make || return 1
}

package() {
=A0 =A0 =A0 =A0cd "$srcdir/$pkgname"
=A0 =A0 =A0 =A0make DESTDIR=3D"$pkgdir" install
}
...

Does that make sense?

Other ideas?

-nc



---
Unsubscribe: =A0alpine-devel+unsubscribe@lists.alpinelinux.org
Help: =A0 =A0 =A0 =A0 alpine-devel+help@lists.alpinelinux.org
---


--001485e7e7d8093dd20477f19049-- --- Unsubscribe: alpine-devel+unsubscribe@lists.alpinelinux.org Help: alpine-devel+help@lists.alpinelinux.org ---