public inbox for development@lists.ipfire.org
 help / color / mirror / Atom feed
From: Michael Tremer <michael.tremer@ipfire.org>
To: development@lists.ipfire.org
Subject: [PATCH 02/19] coreutils: Drop uname patch
Date: Mon, 19 Aug 2024 10:05:51 +0000	[thread overview]
Message-ID: <20240819100608.991138-3-michael.tremer@ipfire.org> (raw)
In-Reply-To: <20240819100608.991138-1-michael.tremer@ipfire.org>

[-- Attachment #1: Type: text/plain, Size: 6208 bytes --]

This is a patch that has been backported from Gentoo for quite a while
now. However, I did not forget why. And now it won't build with GCC 14,
and since I don't remember why we needed this, I would rather drop it.

Signed-off-by: Michael Tremer <michael.tremer(a)ipfire.org>
---
 lfs/coreutils                                 |   1 -
 .../coreutils/coreutils-9.5-uname-1.patch     | 170 ------------------
 2 files changed, 171 deletions(-)
 delete mode 100644 src/patches/coreutils/coreutils-9.5-uname-1.patch

diff --git a/lfs/coreutils b/lfs/coreutils
index eea5fb451..c7879508a 100644
--- a/lfs/coreutils
+++ b/lfs/coreutils
@@ -88,7 +88,6 @@ $(subst %,%_BLAKE2,$(objects)) :
 $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
 	@$(PREBUILD)
 	@rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar axf $(DIR_DL)/$(DL_FILE)
-	cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/coreutils/coreutils-9.5-uname-1.patch
 	cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/coreutils/coreutils-9.5-i18n-2.patch
 	cd $(DIR_APP) && FORCE_UNSAFE_CONFIGURE=1 && ./configure $(CONFIGURE_OPTIONS)
 	cd $(DIR_APP) && make $(MAKETUNING)
diff --git a/src/patches/coreutils/coreutils-9.5-uname-1.patch b/src/patches/coreutils/coreutils-9.5-uname-1.patch
deleted file mode 100644
index 38c920dfc..000000000
--- a/src/patches/coreutils/coreutils-9.5-uname-1.patch
+++ /dev/null
@@ -1,170 +0,0 @@
-Submitted by:            DJ Lucas (dj_at_linuxfromscratch_dot_org)
-Date:                    2012-04-21
-Initial Package Version: 8.16
-Upstream Status:         Rejected
-Origin:                  Based on Gentoo patch
-Description:             Makes uname -m output more descriptive
-
-Updated to version 9.5
-
---- coreutils-9.5.orig/src/uname.c	2024-01-01 14:27:23.000000000 +0100
-+++ coreutils-9.5/src/uname.c	2024-07-09 21:14:56.460778557 +0200
-@@ -43,6 +43,10 @@
- #  endif
- # endif
- #endif
-+#if defined(__linux__)
-+# define USE_PROCINFO
-+# define UNAME_HARDWARE_PLATFORM
-+#endif
- 
- #include "system.h"
- #include "quote.h"
-@@ -146,6 +150,116 @@
-     }
-   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.  */
-@@ -323,11 +437,15 @@
-       element = "powerpc";
- # endif
- #endif
--#if HAVE_SYSINFO && defined SI_ARCHITECTURE
-+#if ( HAVE_SYSINFO && defined SI_ARCHITECTURE ) || defined(USE_PROCINFO)
-       if (element == unknown)
-         {
-           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
-@@ -360,9 +478,13 @@
-       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
-- 
2.39.2


  parent reply	other threads:[~2024-08-19 10:05 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-19 10:05 Toolchain Update August 2024 Michael Tremer
2024-08-19 10:05 ` [PATCH 01/19] expect: Fix build with GCC 14.2 Michael Tremer
2024-08-19 10:05 ` Michael Tremer [this message]
2024-08-19 10:05 ` [PATCH 03/19] glibc: Update to 2.40 Michael Tremer
2024-08-19 10:05 ` [PATCH 04/19] make.sh: Bump the toolchain version Michael Tremer
2024-08-19 10:05 ` [PATCH 06/19] misc-progs: Fix compilation with GCC 14 Michael Tremer
2024-08-19 10:05 ` [PATCH 07/19] whatmask: Fix build " Michael Tremer
2024-08-19 10:05 ` [PATCH 08/19] ntp: " Michael Tremer
2024-08-19 10:05 ` [PATCH 09/19] setup: Fix compilation issues " Michael Tremer
2024-08-19 10:05 ` [PATCH 10/19] autoconf-archive: New package Michael Tremer
2024-08-19 10:06 ` [PATCH 11/19] berkeley: Fix build with GCC 14 Michael Tremer
2024-08-19 10:06 ` [PATCH 12/19] squidguard: Fix compliation " Michael Tremer
2024-08-19 10:06 ` [PATCH 13/19] ghostscript: Fix compilation " Michael Tremer
2024-08-19 10:06 ` [PATCH 14/19] collectd: Ignore compiler errors Michael Tremer
2024-08-19 10:06 ` [PATCH 15/19] syslinux: Fix build with GCC 14 Michael Tremer
2024-08-19 10:06 ` [PATCH 16/19] tftpd: " Michael Tremer
2024-08-19 10:06 ` [PATCH 17/19] telnet: " Michael Tremer
2024-08-19 10:06 ` [PATCH 18/19] lcdproc: " Michael Tremer
2024-08-19 10:06 ` [PATCH 19/19] gnupg: This package no longer seems to be able to link against LDAP Michael Tremer

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=20240819100608.991138-3-michael.tremer@ipfire.org \
    --to=michael.tremer@ipfire.org \
    --cc=development@lists.ipfire.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