X-Original-To: alpine-devel@lists.alpinelinux.org Delivered-To: alpine-devel@lists.alpinelinux.org Received: from mail.renta.net (mail.renta.net [203.25.238.7]) by lists.alpinelinux.org (Postfix) with ESMTP id 51A8761A7E8 for ; Tue, 4 Aug 2009 02:40:19 +0000 (UTC) Received: from [192.168.1.4] (60-240-81-28.static.tpgi.com.au [::ffff:60.240.81.28]) (AUTH: CRAM-MD5 markc@renta.net) by mail.renta.net with esmtp; Tue, 04 Aug 2009 12:40:17 +1000 id 0003000A.4A779F91.000005C5 Message-ID: <4A779F91.6090707@renta.net> Date: Tue, 04 Aug 2009 12:40:17 +1000 From: Mark Constable User-Agent: Thunderbird 2.0.0.22 (X11/20090719) X-Mailinglist: alpine-devel Precedence: list List-Id: Alpine Development List-Unsubscribe: List-Post: List-Help: List-Subscribe: MIME-Version: 1.0 To: alpine-devel@lists.alpinelinux.org Subject: [alpine-devel] How to handle regular git/svn builds Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Perhaps I missed something obvious but I haven't yet come across an example of an APKBUILD pulling source from git or svn repos. ATM I do this with Archlinux by using a non-standard getsource() function in the PKGBUILD. I don't want to use the standard way for two reasons, a) it needlessly self modifies the $pkgver variable in the PKGBUILD and b) expects to pull the git/svn source into $srcdir rather than my preferred $SRCDEST. The implications of a) is that every PKGBUILD is changed with every build so when it comes time to commit the source package changes then EVERY package is going to have a be committed even though it's only a redundant $pkgver variable update that is not even used. It just creates useless git log noise. I solve this problem by using $pkgrel=$(date -u +%Y%m%d%H) which dynamically updates that field and allows me to build unique packages multiple times per day without modifying the PKGBUILD. The second b) point is that I have about 20Gb of cloned and checked out sources and there is no way I want all that bulk intermixed in with my source packages. Anyway, this works but I'm wondering what any official thoughts about handling this might be? --markc ----------------------------------------------------------------- pkgname=apk-tools pkgver=2.0_pre17 pkgrel=$(date -u +%Y%m%d%H) pkgdesc="Alpine Package Keeper - package manager for alpine" depends= makedepends="zlib-dev openssl-dev pkgconfig" source="0001-db-fix-checksum-storing-to-db.patch 0001-io-fix-corruption-of-big-files-on-mmap-write.patch" url="http://git.alpinelinux.org/cgit/apk-tools/" license=GPL-2 build() { _getsource || return 1 cd "$srcdir/$pkgname-$pkgver" sed -i -e 's:-Werror::' Make.rules make || return 1 make DESTDIR="$pkgdir" install cd "$pkgdir/sbin" ln -s apk apk_add ln -s apk apk_audit ln -s apk apk_del ln -s apk apk_index ln -s apk apk_info ln -s apk apk_version } _getsource() { [ -d $SRCDEST ] && cd $SRCDEST || return 1 if [ -d $pkgname/.git ]; then cd $pkgname && git pull origin else git clone git://git.alpinelinux.org/apk-tools $pkgname fi rsync -a --cvs-exclude --delete $SRCDEST/$pkgname/ $srcdir/$pkgname-$pkgver } md5sums="d7944308cefe6f5fc45a24e1840d087e 0001-db-fix-checksum-storing-to-db.patch 57693255bb36abe74423578b83ff2cf4 0001-io-fix-corruption-of-big-files-on-mmap-write.patch" ----------------------------------------------------------------- # . /etc/abuild.conf # ll $REPODEST/main/apk* -rw-r--r-- 1 root root 40419 Aug 4 02:22 /home/packages/main/apk-tools-2.0_pre17-r2009080402.apk --- Unsubscribe: alpine-devel+unsubscribe@lists.alpinelinux.org Help: alpine-devel+help@lists.alpinelinux.org ---