The package rpms/cpufetch.git has added or updated architecture specific content in its spec file (ExclusiveArch/ExcludeArch or %ifarch/%ifnarch) in commit(s): https://src.fedoraproject.org/cgit/rpms/cpufetch.git/commit/?id=c7a2a51d994b....
Change: +ExclusiveArch: %{arm} aarch64 x86_64 ppc ppc64 ppc64le %{riscv}
Thanks.
Full change: ============
commit c7a2a51d994be3b6aced16f78375ecd0e9836fff Author: Artur Frenszek-Iwicki fedora@svgames.pl Date: Sun Aug 18 20:35:19 2024 +0200
Update to v1.06
diff --git a/.gitignore b/.gitignore index 17ac9a5..a94967c 100644 --- a/.gitignore +++ b/.gitignore @@ -7,3 +7,4 @@ /cpufetch-v1.03.tar.gz /cpufetch-v1.04.tar.gz /cpufetch-v1.05.tar.gz +/cpufetch-v1.06.tar.gz diff --git a/0000-off-by-one-errors.patch b/0000-off-by-one-errors.patch new file mode 100644 index 0000000..900afd4 --- /dev/null +++ b/0000-off-by-one-errors.patch @@ -0,0 +1,33 @@ +--- a/src/arm/midr.c 2024-08-18 16:12:27.000000000 +0200 ++++ b/src/arm/midr.c 2024-08-18 17:11:15.953483660 +0200 +@@ -447,9 +447,9 @@ + } + + char* get_str_features(struct cpuInfo* cpu) { + struct features* feat = cpu->feat; +- uint32_t max_len = strlen("NEON,SHA1,SHA2,AES,CRC32,SVE,SVE2") + 1; ++ uint32_t max_len = strlen("NEON,SHA1,SHA2,AES,CRC32,SVE,SVE2,") + 1; + uint32_t len = 0; + char* string = ecalloc(max_len, sizeof(char)); + + if(feat->NEON) { +--- a/src/common/pci.c ++++ b/src/common/pci.c +@@ -98,7 +98,7 @@ void populate_pci_devices(struct pci_devices * pci) { + int path_size = strlen(PCI_PATH) + strlen(dev->path) + 2; + + // Read vendor_id +- char *vendor_id_path = emalloc(sizeof(char) * (path_size + strlen("vendor"))); ++ char *vendor_id_path = emalloc(sizeof(char) * (path_size + strlen("vendor") + 1)); + sprintf(vendor_id_path, "%s/%s/%s", PCI_PATH, dev->path, "vendor"); + + if ((buf = read_file(vendor_id_path, &filelen)) == NULL) { +@@ -110,7 +110,7 @@ void populate_pci_devices(struct pci_devices * pci) { + } + + // Read device_id +- char *device_id_path = emalloc(sizeof(char) * (path_size + strlen("device"))); ++ char *device_id_path = emalloc(sizeof(char) * (path_size + strlen("device") + 1)); + sprintf(device_id_path, "%s/%s/%s", PCI_PATH, dev->path, "device"); + + if ((buf = read_file(device_id_path, &filelen)) == NULL) { diff --git a/0001-L2-cache-may-not-exist.patch b/0001-L2-cache-may-not-exist.patch new file mode 100644 index 0000000..1610b00 --- /dev/null +++ b/0001-L2-cache-may-not-exist.patch @@ -0,0 +1,25 @@ +--- a/src/common/cpu.c ++++ b/src/common/cpu.c +@@ -133,7 +133,8 @@ char* get_str_l1d(struct cache* cach) { + } + + char* get_str_l2(struct cache* cach) { +- assert(cach->L2->exists); ++ if(!cach->L2->exists) ++ return NULL; + return get_str_cache(cach->L2->size, cach->L2->num_caches); + } + +--- a/src/common/printer.c ++++ b/src/common/printer.c +@@ -733,7 +733,9 @@ bool print_cpufetch_ppc(struct cpuInfo* cpu, STYLE s, struct color** cs, struct + setAttribute(art, ATTRIBUTE_ALTIVEC, altivec); + setAttribute(art, ATTRIBUTE_L1i, l1i); + setAttribute(art, ATTRIBUTE_L1d, l1d); +- setAttribute(art, ATTRIBUTE_L2, l2); ++ if(l2 != NULL) { ++ setAttribute(art, ATTRIBUTE_L2, l2); ++ } + if(l3 != NULL) { + setAttribute(art, ATTRIBUTE_L3, l3); + } diff --git a/cpufetch.spec b/cpufetch.spec index cee3c80..06d57fd 100644 --- a/cpufetch.spec +++ b/cpufetch.spec @@ -2,17 +2,27 @@ Name: cpufetch Summary: Simple tool for determining CPU architecture License: GPL-2.0-only
-Version: 1.05 -Release: 2%{?dist} +Version: 1.06 +Release: 1%{?dist}
URL: https://github.com/Dr-Noob/cpufetch Source0: %{URL}/archive/v%{version}/%{name}-v%{version}.tar.gz
+# The program has a couple of off-by-one errors +# which make it allocate buffers that can't fit the data. +# +# Reported upstream: https://github.com/Dr-Noob/cpufetch/issues/264 +Patch0: 0000-off-by-one-errors.patch + +# Program assumes that a processor must have an L2 cache, +# and crashes if it does not. +Patch1: 0001-L2-cache-may-not-exist.patch + BuildRequires: gcc BuildRequires: make
-# Supports only x86_64, ARM and PowerPC -ExclusiveArch: %{arm} aarch64 x86_64 ppc ppc64 ppc64le +# Supports only x86_64, ARM, PowerPC and RISC-V +ExclusiveArch: %{arm} aarch64 x86_64 ppc ppc64 ppc64le %{riscv}
%description @@ -25,7 +35,6 @@ It currently supports x86_64 CPUs (both Intel and AMD), ARM, and PowerPC.
%build -%set_build_flags %make_build
@@ -50,6 +59,9 @@ mv %{buildroot}%{_mandir}/man1/%{name}.1{.gz,}
%changelog +* Sun Aug 18 2024 Artur Frenszek-Iwicki fedora@svgames.pl - 1.06-1 +- Update to v1.06 + * Wed Jul 17 2024 Fedora Release Engineering releng@fedoraproject.org - 1.05-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild
diff --git a/sources b/sources index 58334cf..8f0c117 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (cpufetch-v1.05.tar.gz) = ec303e292ddc928e5cf2c81e0b38fd0853e1a3ffb9a20413e09677ec91777806c4774a0a6d618adde4f13328c930ce35a80e679609438542486999ab9e1308b4 +SHA512 (cpufetch-v1.06.tar.gz) = ee907372608bed6af713f5e071e08a96c86cf0c7aeff1a7bf8511c2b03804d71e63d23e7aa409c2a7da5a0cf198a8a419e26210174f052c36bffa56135609d07
arch-excludes@lists.fedoraproject.org