X-Original-To: alpine-devel@lists.alpinelinux.org Delivered-To: alpine-devel@lists.alpinelinux.org Received: from mail-ew0-f213.google.com (mail-ew0-f213.google.com [209.85.219.213]) by lists.alpinelinux.org (Postfix) with ESMTP id 58750360F720 for ; Fri, 6 Nov 2009 13:20:19 +0000 (UTC) Received: by ewy9 with SMTP id 9so1037753ewy.25 for ; Fri, 06 Nov 2009 05:20:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:subject:from:to:content-type :date:message-id:mime-version:x-mailer:content-transfer-encoding; bh=QKrtRhlysYXgLkfCEYl8zJrxCz4j9DvlvlpRx6vtqPw=; b=tts6MMeHS91P8Vb1ZAdvb42lZFOvu2Ks6E2wpRJehdiQqX9nAT/oz+KlEVHt2LRB+U WYr6zfj8ViGm1FzTpXb6wXVw4pFsE/ZlrtGEqG82BzC4g/aDjCisqaKCpW1Pl2cndNUY 8Hs/Mcdy8S8CCUhet8cmQOHJJzUKmPIoBgy9s= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=subject:from:to:content-type:date:message-id:mime-version:x-mailer :content-transfer-encoding; b=P9MyMo65ghYYavZOCi+YCsqfr6/uKPu32XQdr5tXjjlpe+Rg4WyAN6O61lI4VTrkgZ 0qz2ABOH00PBcb8wk+VxUWU7HIGnzue/i3GVdxHqzKqMofpeYXCoMHCOVOklj92fd4UY bPYR6NX5IHsqtnvxfO+LodWXzVdCWDQX+n72c= Received: by 10.213.23.201 with SMTP id s9mr4027297ebb.5.1257513618744; Fri, 06 Nov 2009 05:20:18 -0800 (PST) Received: from ?10.65.65.1? (ti211310a081-0085.bb.online.no [85.164.0.85]) by mx.google.com with ESMTPS id 23sm428275eya.12.2009.11.06.05.20.18 (version=SSLv3 cipher=RC4-MD5); Fri, 06 Nov 2009 05:20:18 -0800 (PST) Subject: [alpine-devel] RFC: volatile repo/apkbuilds From: Natanael Copa To: alpine-devel@lists.alpinelinux.org Content-Type: text/plain; charset="UTF-8" Date: Fri, 06 Nov 2009 14:21:57 +0100 Message-ID: <1257513717.1929.632.camel@ncopa-desktop.nor.wtbts.net> X-Mailinglist: alpine-devel Precedence: list List-Id: Alpine Development List-Unsubscribe: List-Post: List-Help: List-Subscribe: Mime-Version: 1.0 X-Mailer: Evolution 2.28.1 Content-Transfer-Encoding: 7bit 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 ---