rpms/rpm/F-10 rpm-4.6.0-niagara.patch, NONE, 1.1 rpm.spec, 1.311, 1.312
Tom Callaway
spot at fedoraproject.org
Thu Apr 2 17:26:20 UTC 2009
- Previous message (by thread): rpms/python-suds/devel .cvsignore, 1.5, 1.6 python-suds.spec, 1.6, 1.7 sources, 1.5, 1.6
- Next message (by thread): rpms/python-suds/devel python-suds.spec,1.7,1.8 sources,1.6,1.7
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Author: spot
Update of /cvs/pkgs/rpms/rpm/F-10
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv4072
Modified Files:
rpm.spec
Added Files:
rpm-4.6.0-niagara.patch
Log Message:
Fix sparcv9v and sparc64v targets
rpm-4.6.0-niagara.patch:
--- NEW FILE rpm-4.6.0-niagara.patch ---
diff -rNu rpm-4.6.0-orig/lib/rpmrc.c rpm-4.6.0/lib/rpmrc.c
--- rpm-4.6.0-orig/lib/rpmrc.c 2009-03-09 21:54:49.000000000 -0500
+++ rpm-4.6.0/lib/rpmrc.c 2009-03-11 12:00:44.000000000 -0500
@@ -763,6 +763,31 @@
return rc;
}
+#if defined(__linux__) && defined(__sparc__)
+static int is_sun4v()
+{
+ char buffer[4096], *p;
+ int fd = open("/proc/cpuinfo", O_RDONLY);
+ if (read(fd, &buffer, sizeof(buffer) - 1) == -1) {
+ rpmlog(RPMLOG_WARNING, _("read(/proc/cpuinfo) failed\n"));
+ close(fd);
+ return 0;
+ }
+ close(fd);
+
+ p = strstr(buffer, "type");
+ p = strtok(p, "\n");
+ p = strstr(p, "sun");
+ if (p == NULL) {
+ rpmlog(RPMLOG_WARNING, _("/proc/cpuinfo has no 'type' line\n"));
+ return 0;
+ } else if (strcmp(p, "sun4v") == 0) {
+ return 1;
+ }
+ return 0;
+}
+#endif
+
# if defined(__linux__) && defined(__i386__)
#include <setjmp.h>
@@ -1179,6 +1204,13 @@
personality(oldpers);
}
}
+ if (is_sun4v()){
+ if (strcmp(un.machine, "sparcv9") == 0 || strcmp(un.machine, "sparc") == 0 ) {
+ strcpy(un.machine, "sparcv9v");
+ } else if (strcmp(un.machine, "sparc64") == 0 ) {
+ strcpy(un.machine, "sparc64v");
+ }
+ }
# endif /* sparc*-linux */
# if defined(__GNUC__) && defined(__alpha__)
diff -rNu rpm-4.6.0-orig/rpmrc.in rpm-4.6.0/rpmrc.in
--- rpm-4.6.0-orig/rpmrc.in 2009-03-09 21:54:49.000000000 -0500
+++ rpm-4.6.0/rpmrc.in 2009-03-11 11:50:49.000000000 -0500
@@ -312,7 +312,7 @@
arch_compat: sun4d: sparc
arch_compat: sun4m: sparc
arch_compat: sun4u: sparc64
-arch_compat: sparc64v: sparc64
+arch_compat: sparc64v: sparc64 sparcv9v
arch_compat: sparc64: sparcv9
arch_compat: sparcv9v: sparcv9
arch_compat: sparcv9: sparcv8
Index: rpm.spec
===================================================================
RCS file: /cvs/pkgs/rpms/rpm/F-10/rpm.spec,v
retrieving revision 1.311
retrieving revision 1.312
diff -u -r1.311 -r1.312
--- rpm.spec 12 Mar 2009 06:00:21 -0000 1.311
+++ rpm.spec 2 Apr 2009 17:25:50 -0000 1.312
@@ -17,7 +17,7 @@
Summary: The RPM package management system
Name: rpm
Version: %{rpmver}
-Release: 2%{?dist}
+Release: 3%{?dist}
Group: System Environment/Base
Url: http://www.rpm.org/
Source0: http://rpm.org/releases/testing/%{name}-%{srcver}.tar.bz2
@@ -32,6 +32,9 @@
# this as Fedora-specific patch for now
Patch3: rpm-4.6.0-fedora-specspo.patch
+# Fix sparcv9v and sparc64v targets
+Patch4: rpm-4.6.0-niagara.patch
+
# XXX only create provides for pkgconfig and libtool initially
Patch100: rpm-4.6.x-no-pkgconfig-reqs.patch
@@ -374,6 +377,9 @@
%doc doc/librpm/html/*
%changelog
+* Thu Apr 2 2009 Tom "spot" Callaway <tcallawa at redhat.com> - 4.6.0-3
+- Fix sparcv9v and sparc64v targets
+
* Thu Mar 12 2009 Panu Matilainen <pmatilai at redhat.com> - 4.6.0-2
- handle NULL as EVR to rpmdsSingle() (#487881, #485616)
- permit UTF-8 as first char of dependency names (#455119)
- Previous message (by thread): rpms/python-suds/devel .cvsignore, 1.5, 1.6 python-suds.spec, 1.6, 1.7 sources, 1.5, 1.6
- Next message (by thread): rpms/python-suds/devel python-suds.spec,1.7,1.8 sources,1.6,1.7
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the fedora-extras-commits
mailing list