public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Tom Callaway <spot@fedoraproject.org>
To: git-commits@fedoraproject.org
Subject: [rpms/rpm] pmatilai-v6: niagara patch
Date: Mon, 23 Nov 2026 09:25:48 GMT	[thread overview]
Message-ID: <179542594820.1.6666518322021087509.rpms-rpm-58f7f156f9dd@fedoraproject.org> (raw)

A new commit has been pushed.

Repo   : rpms/rpm
Branch : pmatilai-v6
Commit : 58f7f156f9dd1adeca7e54f17448ff0aec5d60ef
Author : Tom Callaway <spot@fedoraproject.org>
Date   : 2009-04-02T17:41:14+00:00
Stats  : +67/-1 in 2 file(s)
URL    : https://src.fedoraproject.org/rpms/rpm/c/58f7f156f9dd1adeca7e54f17448ff0aec5d60ef?branch=pmatilai-v6

Log:
niagara patch

---
diff --git a/rpm-4.6.0-niagara.patch b/rpm-4.6.0-niagara.patch
new file mode 100644
index 0000000..22cb3a5
--- /dev/null
+++ b/rpm-4.6.0-niagara.patch
@@ -0,0 +1,61 @@
+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

diff --git a/rpm.spec b/rpm.spec
index 415681e..b0b5c97 100644
--- a/rpm.spec
+++ b/rpm.spec
@@ -25,7 +25,7 @@
 Summary: The RPM package management system
 Name: rpm
 Version: %{rpmver}
-Release: 0.%{snapver}.7%{?dist}
+Release: 0.%{snapver}.8%{?dist}
 Group: System Environment/Base
 Url: http://www.rpm.org/
 Source0: http://rpm.org/releases/testing/%{name}-%{srcver}.tar.bz2
@@ -52,6 +52,7 @@ Patch204: rpm-4.7.0-rsa-v4.patch
 # These are not yet upstream
 Patch300: rpm-4.7.0-extra-provides.patch
 Patch301: rpm-4.7.0-rpmfc-order.patch
+Patch302: rpm-4.6.0-niagara.patch
 
 # Partially GPL/LGPL dual-licensed and some bits with BSD
 # SourceLicense: (GPLv2+ and LGPLv2+ with exceptions) and BSD 
@@ -197,6 +198,7 @@ that will manipulate RPM packages and databases.
 
 %patch300 -p1 -b .extra-prov
 %patch301 -p1 -b .rpmfc-order
+%patch302 -p1 -b .niagara
 
 %if %{with int_bdb}
 ln -s db-%{bdbver} db
@@ -402,6 +404,9 @@ exit 0
 %doc doc/librpm/html/*
 
 %changelog
+* Thu Apr  2 2009 Tom "spot" Callaway <tcallawa@redhat.com> - 4.7.0-0.beta1.8
+- Fix sparcv9v and sparc64v targets
+
 * Tue Mar 24 2009 Panu Matilainen <pmatilai@redhat.com> - 4.7.0-0.beta1.7
 - prefer more specific types over generic "text" in classification (#491349)
 

                 reply	other threads:[~2026-11-23  9:25 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=179542594820.1.6666518322021087509.rpms-rpm-58f7f156f9dd@fedoraproject.org \
    --to=spot@fedoraproject.org \
    --cc=git-commits@fedoraproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox