diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2012-06-27 15:42:34 +0000 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2012-06-27 15:45:52 +0000 |
commit | 7bcfb77d399b529354975b5d1e61c520007847e5 (patch) | |
tree | 6c163a211f6a567989dda4a734cd2c5a9f1ec6c3 /main/git | |
parent | 42fabce804cb3c6e031feabcfd3e66f2db741731 (diff) | |
download | aports-7bcfb77d399b529354975b5d1e61c520007847e5.tar.bz2 aports-7bcfb77d399b529354975b5d1e61c520007847e5.tar.xz |
main/git: workaround for uclibc non-threadsafe pread()
Seems like git triggers a bug in uclibc pread(), which appears to
be non-threadsafe.
We work around the issue by disabling threads in index-pack for
now.
Diffstat (limited to 'main/git')
-rw-r--r-- | main/git/APKBUILD | 14 | ||||
-rw-r--r-- | main/git/uclibc-index-pack.patch | 14 |
2 files changed, 26 insertions, 2 deletions
diff --git a/main/git/APKBUILD b/main/git/APKBUILD index e3243afbe6..e134a4966b 100644 --- a/main/git/APKBUILD +++ b/main/git/APKBUILD @@ -1,7 +1,7 @@ # Maintainer: Natanael Copa <ncopa@alpinelinux.org> pkgname=git pkgver=1.7.11.1 -pkgrel=0 +pkgrel=1 pkgdesc="A distributed version control system" url="http://git.or.cz/" arch="all" @@ -12,6 +12,7 @@ subpackages="$pkgname-doc $pkgname-svn $pkgname-perl" makedepends="zlib-dev openssl-dev curl-dev expat-dev perl-dev python-dev" source="http://git-core.googlecode.com/files/git-$pkgver.tar.gz bb-tar.patch + uclibc-index-pack.patch git-daemon.initd git-daemon.confd " @@ -22,9 +23,17 @@ _makeopts="NO_ICONV=YesPlease NO_TCLTK=YesPlease NO_SVN_TESTS=YesPlease" +prepare() { + cd "$srcdir"/$pkgname-$pkgver + for i in $source; do + case $i in + *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;; + esac + done +} + build() { cd "$srcdir"/$pkgname-$pkgver - patch -p1 -i "$srcdir"/bb-tar.patch || return 1 make prefix=/usr DESTDIR="$pkgdir" $_makeopts || return 1 } @@ -66,5 +75,6 @@ svn() { md5sums="2c5d85ec5b6e08986d942461debc9d6b git-1.7.11.1.tar.gz e63a201556c4f089de790805c09a2e5b bb-tar.patch +8ea98a99f3eb127f66a8e99f64e60ade uclibc-index-pack.patch 3f0bdf6ca73bf4f015bc8565ab787969 git-daemon.initd 2258e95d389ccc6de0b5111d53d9eed6 git-daemon.confd" diff --git a/main/git/uclibc-index-pack.patch b/main/git/uclibc-index-pack.patch new file mode 100644 index 0000000000..c5b7ec5cf6 --- /dev/null +++ b/main/git/uclibc-index-pack.patch @@ -0,0 +1,14 @@ +--- ./builtin/index-pack.c.orig ++++ ./builtin/index-pack.c +@@ -39,9 +39,10 @@ + int ofs_first, ofs_last; + }; + +-#if !defined(NO_PTHREADS) && defined(NO_PREAD) ++#if (!defined(NO_PTHREADS) && defined(NO_PREAD)) || defined(__UCLIBC__) + /* NO_PREAD uses compat/pread.c, which is not thread-safe. Disable threading. */ + #define NO_PTHREADS ++ + #endif + + struct thread_local { |