Related: #548834 - remove non-upstream patch for uname -i/-p

The options have been documented as non-portable since 2015:
http://git.savannah.gnu.org/gitweb/?p=coreutils.git;a=commitdiff;h=v8.24-7-g6d67649
This commit is contained in:
Kamil Dudka 2022-08-23 14:33:55 +02:00
parent 23b297bf58
commit cd953e11dd
2 changed files with 13 additions and 54 deletions

View File

@ -1,44 +0,0 @@
src/uname.c | 16 +++++++++++++++-
1 file changed, 15 insertions(+), 1 deletion(-)
diff --git a/src/uname.c b/src/uname.c
index 6371ca2..1ad8fd7 100644
--- a/src/uname.c
+++ b/src/uname.c
@@ -322,6 +322,12 @@ main (int argc, char **argv)
# elif defined __ppc__ || defined __ppc64__
element = "powerpc";
# endif
+#else
+ {
+ static struct utsname u;
+ uname(&u);
+ element = u.machine;
+ }
#endif
#if HAVE_SYSINFO && defined SI_ARCHITECTURE
if (element == unknown)
@@ -347,7 +353,7 @@ main (int argc, char **argv)
if (toprint & PRINT_HARDWARE_PLATFORM)
{
- char const *element = unknown;
+ char *element = unknown;
#if HAVE_SYSINFO && defined SI_PLATFORM
{
static char hardware_platform[257];
@@ -355,6 +361,14 @@ main (int argc, char **argv)
hardware_platform, sizeof hardware_platform))
element = hardware_platform;
}
+#else
+ {
+ static struct utsname u;
+ uname(&u);
+ element = u.machine;
+ if(strlen(element)==4 && element[0]=='i' && element[2]=='8' && element[3]=='6')
+ element[1]='3';
+ }
#endif
#ifdef UNAME_HARDWARE_PLATFORM
if (element == unknown)

View File

@ -1,7 +1,7 @@
Summary: A set of basic GNU tools commonly used in shell scripts Summary: A set of basic GNU tools commonly used in shell scripts
Name: coreutils Name: coreutils
Version: 9.1 Version: 9.1
Release: 6%{?dist} Release: 7%{?dist}
License: GPLv3+ License: GPLv3+
Url: https://www.gnu.org/software/coreutils/ Url: https://www.gnu.org/software/coreutils/
Source0: https://ftp.gnu.org/gnu/%{name}/%{name}-%{version}.tar.xz Source0: https://ftp.gnu.org/gnu/%{name}/%{name}-%{version}.tar.xz
@ -28,28 +28,28 @@ Patch105: coreutils-8.26-selinuxenable.patch
# downstream changes to default DIR_COLORS # downstream changes to default DIR_COLORS
Patch102: coreutils-8.32-DIR_COLORS.patch Patch102: coreutils-8.32-DIR_COLORS.patch
# to be removed (#548834)
Patch103: coreutils-8.2-uname-processortype.patch # df --direct
#df --direct
Patch104: coreutils-df-direct.patch Patch104: coreutils-df-direct.patch
#add note about mkdir --mode behaviour into info documentation(#610559)
# add note about mkdir --mode behaviour into info documentation(#610559)
Patch107: coreutils-8.4-mkdir-modenote.patch Patch107: coreutils-8.4-mkdir-modenote.patch
# sh-utils # add info about TZ envvar to date manpage
#add info about TZ envvar to date manpage
Patch703: sh-utils-2.0.11-dateman.patch Patch703: sh-utils-2.0.11-dateman.patch
# (sb) lin18nux/lsb compliance - multibyte functionality patch # (sb) lin18nux/lsb compliance - multibyte functionality patch
Patch800: coreutils-i18n.patch Patch800: coreutils-i18n.patch
#getgrouplist() patch from Ulrich Drepper. # getgrouplist() patch from Ulrich Drepper.
Patch908: coreutils-getgrouplist.patch Patch908: coreutils-getgrouplist.patch
#SELINUX Patch - implements Redhat changes # SELINUX Patch - implements Redhat changes
#(upstream did some SELinux implementation unlike with RedHat patch) # (upstream did some SELinux implementation unlike with RedHat patch)
Patch950: coreutils-selinux.patch Patch950: coreutils-selinux.patch
Conflicts: filesystem < 3 Conflicts: filesystem < 3
# To avoid clobbering installs # To avoid clobbering installs
Conflicts: coreutils-single Conflicts: coreutils-single
@ -265,6 +265,9 @@ rm -f $RPM_BUILD_ROOT%{_infodir}/dir
%license COPYING %license COPYING
%changelog %changelog
* Tue Aug 23 2022 Kamil Dudka <kdudka@redhat.com> - 9.1-7
- remove non-upstream patch for uname -i/-p (#548834)
* Mon Aug 08 2022 Kamil Dudka <kdudka@redhat.com> - 9.1-6 * Mon Aug 08 2022 Kamil Dudka <kdudka@redhat.com> - 9.1-6
- improve wording of a comment in /etc/DIR_COLORS (#2112593) - improve wording of a comment in /etc/DIR_COLORS (#2112593)