pkgsrc-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

pkg/43084: Fix devel/scmgit-base on big-endian



>Number:         43084
>Category:       pkg
>Synopsis:       Fix devel/scmgit-base on big-endian
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Mar 30 23:25:00 +0000 2010
>Originator:     Holger Weiss
>Release:        NetBSD 5.0_STABLE
>Organization:
Individual Network Berlin e.V.
>Environment:
System: NetBSD petty.weiss.in-berlin.de 5.0_STABLE NetBSD 5.0_STABLE (PETTY) 
#0: Tue Sep 22 00:38:30 CEST 2009 
holger%petty.weiss.in-berlin.de@localhost:/build/kernel/sparc64/PETTY sparc64
Architecture: sparc64
Machine: sparc64
>Description:
On NetBSD/sparc64 (and presumably on all *BSD/big-endian platforms),
git-clone(1) and other Git commands bail out with error messages such
as:

| fatal: pack signature mismatch
| fatal: index-pack failed

This happens in Git versions newer than 1.6.5.2, as compat/bswap.h now
redefines htonl and ntohl to bswap32 not only on selected little-endian
platforms (as intended), but also if bswap32 has been defined in the
included system headers, which is the case at least on NetBSD.  See also
my posting to the Git list:

http://article.gmane.org/gmane.comp.version-control.git/143453
>How-To-Repeat:
At least on NetBSD/sparc64:

$ git clone git://github.com/git/hello-world.git
>Fix:
Apply the following patch.

Index: distinfo
===================================================================
RCS file: /cvsroot/pkgsrc/devel/scmgit-base/distinfo,v
retrieving revision 1.23
diff -u -r1.23 distinfo
--- distinfo    11 Feb 2010 04:54:55 -0000      1.23
+++ distinfo    30 Mar 2010 22:45:04 -0000
@@ -10,3 +10,4 @@
 SHA1 (patch-ag) = 048d9449048e417fab01c3e0e8e6e81d9df3bfac
 SHA1 (patch-ah) = d60b5304109f64f70146a222f6eb1deeb58dd6ac
 SHA1 (patch-ai) = 56b63d4790a11f5eb128186ad5efdd1bcf102f2e
+SHA1 (patch-al) = e63c0dfd28d2ec3eda5dfbacc5c2c302a846f90d
Index: patches/patch-al
===================================================================
RCS file: patches/patch-al
diff -N patches/patch-al
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ patches/patch-al    30 Mar 2010 22:45:04 -0000
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- compat/bswap.h.orig        2010-02-11 00:12:51.000000000 +0100
++++ compat/bswap.h
+@@ -17,6 +17,8 @@ static inline uint32_t default_swab32(ui
+               ((val & 0x000000ff) << 24));
+ }
+ 
++#undef bswap32
++
+ #if defined(__GNUC__) && (defined(__i386__) || defined(__x86_64__))
+ 
+ #define bswap32(x) ({ \



Home | Main Index | Thread Index | Old Index