[arch-commits] Commit in coreutils/trunk (PKGBUILD coreutils-uname.patch)

Allan McRae allan at archlinux.org
Sat May 12 03:37:49 UTC 2012


    Date: Friday, May 11, 2012 @ 23:37:48
  Author: allan
Revision: 158836

upgpkg: coreutils 8.17-1

upstream update, kill uname patch

Modified:
  coreutils/trunk/PKGBUILD
Deleted:
  coreutils/trunk/coreutils-uname.patch

-----------------------+
 PKGBUILD              |   13 +--
 coreutils-uname.patch |  173 ------------------------------------------------
 2 files changed, 4 insertions(+), 182 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2012-05-12 03:22:50 UTC (rev 158835)
+++ PKGBUILD	2012-05-12 03:37:48 UTC (rev 158836)
@@ -3,8 +3,8 @@
 # Contributor: judd <jvinet at zeroflux.org>
 
 pkgname=coreutils
-pkgver=8.16
-pkgrel=2
+pkgver=8.17
+pkgrel=1
 pkgdesc="The basic file, shell and text manipulation utilities of the GNU operating system"
 arch=('i686' 'x86_64')
 license=('GPL3')
@@ -16,12 +16,10 @@
 install=${pkgname}.install
 options=('!emptydirs')
 source=(ftp://ftp.gnu.org/gnu/$pkgname/$pkgname-$pkgver.tar.xz{,.sig}
-	coreutils-uname.patch
 	coreutils-pam.patch
 	su.pam)
-md5sums=('89b06f91634208dceba7b36ad1f9e8b9'
-         '63158176d5bb005c6871242c940eedf1'
-         'c4fcca138b6abf6d443d48a6f0cd8833'
+md5sums=('bbda656ce8ca2c6903948f9faa204ba3'
+         'ebecd29b095aa21b0b2f833f1ec20d70'
          'aad79a2aa6d566c375d7bdd1b0767278'
          'fa85e5cce5d723275b14365ba71a8aad')
 
@@ -31,9 +29,6 @@
   # added su wheel group pam patch (from fedora git)
   patch -Np1 -i ${srcdir}/coreutils-pam.patch
 
-  # linux specific uname improvement (from gentoo portage)
-  patch -Np1 -i ${srcdir}/coreutils-uname.patch
-
   autoreconf -v
   ./configure --prefix=/usr --libexecdir=/usr/lib/coreutils \
               --enable-install-program=su \

Deleted: coreutils-uname.patch
===================================================================
--- coreutils-uname.patch	2012-05-12 03:22:50 UTC (rev 158835)
+++ coreutils-uname.patch	2012-05-12 03:37:48 UTC (rev 158836)
@@ -1,173 +0,0 @@
-On linux platforms, grok /proc/cpuinfo for the CPU/vendor info.
-
-Prob not suitable for upstream seeing as how it's 100% linux-specific
-http://lists.gnu.org/archive/html/bug-coreutils/2005-09/msg00063.html
-
-Patch originally by Carlos E. Gorges <carlos at techlinux.com.br>, but 
-heavily reworked to suck less.
-
-To add support for additional platforms, check out the show_cpuinfo()
-func in the linux/arch/<ARCH>/ source tree of the kernel.
-
---- coreutils/src/uname.c
-+++ coreutils/src/uname.c
-@@ -50,6 +50,11 @@
- # include <mach-o/arch.h>
- #endif
- 
-+#if defined(__linux__)
-+# define USE_PROCINFO
-+# define UNAME_HARDWARE_PLATFORM
-+#endif
-+
- #include "system.h"
- #include "error.h"
- #include "quote.h"
-@@ -138,6 +143,117 @@
-   exit (status);
- }
- 
-+#if defined(USE_PROCINFO)
-+
-+# if defined(__s390__) || defined(__s390x__)
-+#  define CPUINFO_FILE    "/proc/sysinfo"
-+#  define CPUINFO_FORMAT  "%64[^\t :]%*[ :]%256[^\n]%c"
-+# else
-+#  define CPUINFO_FILE    "/proc/cpuinfo"
-+#  define CPUINFO_FORMAT  "%64[^\t:]\t:%256[^\n]%c"
-+# endif
-+
-+# define PROCINFO_PROCESSOR      0
-+# define PROCINFO_HARDWARE_PLATFORM 1
-+
-+static void __eat_cpuinfo_space(char *buf)
-+{
-+	/* first eat trailing space */
-+	char *tmp = buf + strlen(buf) - 1;
-+	while (tmp > buf && isspace(*tmp))
-+		*tmp-- = '\0';
-+	/* then eat leading space */
-+	tmp = buf;
-+	while (*tmp && isspace(*tmp))
-+		tmp++;
-+	if (tmp != buf)
-+		memmove(buf, tmp, strlen(tmp)+1);
-+	/* finally collapse whitespace */
-+	tmp = buf;
-+	while (tmp[0] && tmp[1]) {
-+		if (isspace(tmp[0]) && isspace(tmp[1])) {
-+			memmove(tmp, tmp+1, strlen(tmp));
-+			continue;
-+		}
-+		++tmp;
-+	}
-+}
-+
-+static int __linux_procinfo(int x, char *fstr, size_t s)
-+{
-+	FILE *fp;
-+
-+	char *procinfo_keys[] = {
-+		/* --processor --hardware-platform */
-+		#if defined(__alpha__)
-+			"cpu model", "system type"
-+		#elif defined(__arm__)
-+			"Processor", "Hardware"
-+		#elif defined(__avr32__)
-+			"processor", "cpu family"
-+		#elif defined(__bfin__)
-+			"CPU", "BOARD Name"
-+		#elif defined(__cris__)
-+			"cpu", "cpu model"
-+		#elif defined(__frv__)
-+			"CPU-Core", "System"
-+		#elif defined(__i386__) || defined(__x86_64__)
-+			"model name", "vendor_id"
-+		#elif defined(__ia64__)
-+			"family", "vendor"
-+		#elif defined(__hppa__)
-+			"cpu", "model"
-+		#elif defined(__m68k__)
-+			"CPU", "MMU"
-+		#elif defined(__mips__)
-+			"cpu model", "system type"
-+		#elif defined(__powerpc__) || defined(__powerpc64__)
-+			"cpu", "machine"
-+		#elif defined(__s390__) || defined(__s390x__)
-+			"Type", "Manufacturer"
-+		#elif defined(__sh__)
-+			"cpu type", "machine"
-+		#elif defined(sparc) || defined(__sparc__)
-+			"type", "cpu"
-+		#elif defined(__vax__)
-+			"cpu type", "cpu"
-+		#else
-+			"unknown", "unknown"
-+		#endif
-+	};
-+
-+	if ((fp = fopen(CPUINFO_FILE, "r")) != NULL) {
-+		char key[65], value[257], eol, *ret = NULL;
-+
-+		while (fscanf(fp, CPUINFO_FORMAT, key, value, &eol) != EOF) {
-+			__eat_cpuinfo_space(key);
-+			if (!strcmp(key, procinfo_keys[x])) {
-+				__eat_cpuinfo_space(value);
-+				ret = value;
-+				break;
-+			}
-+			if (eol != '\n') {
-+				/* we need two fscanf's here in case the previous
-+				 * length limit caused us to read right up to the
-+				 * newline ... doing "%*[^\n]\n" wont eat the newline
-+				 */
-+				fscanf(fp, "%*[^\n]");
-+				fscanf(fp, "\n");
-+			}
-+		}
-+		fclose(fp);
-+
-+		if (ret) {
-+			strncpy(fstr, ret, s);
-+			return 0;
-+		}
-+	}
-+
-+	return -1;
-+}
-+
-+#endif
-+
- /* Print ELEMENT, preceded by a space if something has already been
-    printed.  */
- 
-@@ -250,10 +344,14 @@ main (int argc, char **argv)
-   if (toprint & PRINT_PROCESSOR)
-     {
-       char const *element = unknown;
--#if HAVE_SYSINFO && defined SI_ARCHITECTURE
-+#if ( HAVE_SYSINFO && defined SI_ARCHITECTURE ) || defined(USE_PROCINFO)
-       {
-         static char processor[257];
-+#if defined(USE_PROCINFO)
-+        if (0 <= __linux_procinfo (PROCINFO_PROCESSOR, processor, sizeof processor))
-+#else
-         if (0 <= sysinfo (SI_ARCHITECTURE, processor, sizeof processor))
-+#endif
-           element = processor;
-       }
- #endif
-@@ -306,9 +404,13 @@ main (int argc, char **argv)
-       if (element == unknown)
-         {
-           static char hardware_platform[257];
-+#if defined(USE_PROCINFO)
-+          if (0 <= __linux_procinfo (PROCINFO_HARDWARE_PLATFORM, hardware_platform, sizeof hardware_platform))
-+#else
-           size_t s = sizeof hardware_platform;
-           static int mib[] = { CTL_HW, UNAME_HARDWARE_PLATFORM };
-           if (sysctl (mib, 2, hardware_platform, &s, 0, 0) >= 0)
-+#endif
-             element = hardware_platform;
-         }
- #endif




More information about the arch-commits mailing list