Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package file for openSUSE:Factory checked in at 2026-05-27 16:13:35 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/file (Old) and /work/SRC/openSUSE:Factory/.file.new.1937 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "file" Wed May 27 16:13:35 2026 rev:146 rq:1355160 version:5.47 Changes: -------- --- /work/SRC/openSUSE:Factory/file/file.changes 2026-04-02 17:40:43.026235378 +0200 +++ /work/SRC/openSUSE:Factory/.file.new.1937/file.changes 2026-05-27 16:14:00.165628399 +0200 @@ -1,0 +2,6 @@ +Mon May 18 11:54:40 UTC 2026 - Dr. Werner Fink <[email protected]> + +- Add patch file-5.47-s390x.patch from upstream commit + Work around an endianess problem on s390x + +------------------------------------------------------------------- +++ only whitespace diff in changes, re-diffing New: ---- file-5.47-s390x.patch ----------(New B)---------- New:/work/SRC/openSUSE:Factory/.file.new.1937/file.changes- /work/SRC/openSUSE:Factory/.file.new.1937/file.changes:- Add patch file-5.47-s390x.patch from upstream commit /work/SRC/openSUSE:Factory/.file.new.1937/file.changes- Work around an endianess problem on s390x ----------(New E)---------- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ file.spec ++++++ --- /var/tmp/diff_new_pack.HF15gm/_old 2026-05-27 16:14:01.541685090 +0200 +++ /var/tmp/diff_new_pack.HF15gm/_new 2026-05-27 16:14:01.545685254 +0200 @@ -62,6 +62,7 @@ Patch31: file-5.19-biorad.dif Patch32: file-5.19-clicfs.dif Patch37: file-secure_getenv.patch +Patch38: file-5.47-s390x.patch Patch39: file-5.28-btrfs-image.dif BuildRoot: %{_tmppath}/%{name}-%{version}-build %global _sysconfdir /etc @@ -130,6 +131,7 @@ %patch -P 32 -p0 -b .clicfs %endif %patch -P 37 -p1 -b .getenv +%patch -P 38 -p0 -b .endianess %if %{with debugmagic} %patch -P 39 -p1 -b .btrfs %endif ++++++ file-5.47-s390x.patch ++++++ Make guid work on s390x --- src/funcs.c | 20 ++++++++++++++++++++ src/swap.h | 48 ++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 68 insertions(+) --- src/funcs.c +++ src/funcs.c 2026-05-19 08:53:01.275114475 +0000 @@ -31,6 +31,7 @@ FILE_RCSID("@(#)$File: funcs.c,v 1.148 2 #endif /* lint */ #include "magic.h" +#include "swap.h" #include <assert.h> #include <stdarg.h> #include <stdlib.h> @@ -51,6 +52,18 @@ FILE_RCSID("@(#)$File: funcs.c,v 1.148 2 #define SIZE_MAX ((size_t)~0) #endif +file_protected int +file_bigendian(void) +{ + union { + unsigned short x; + unsigned char s[sizeof(unsigned short)]; + } u; + + u.x = 1; + return u.s[0] != 1; +} + file_protected char * file_copystr(char *buf, size_t blen, size_t width, const char *str) { @@ -931,6 +944,13 @@ file_parse_guid(const char *s, uint64_t !getxvalue(&g->data4[6], s + 8, 2) || !getxvalue(&g->data4[7], s + 10, 2)) return -1; + + if (file_bigendian()) { + g->data1 = file_swap4(g->data1); + g->data2 = file_swap2(g->data2); + g->data3 = file_swap2(g->data3); + } + return 0; } --- src/swap.h +++ src/swap.h 2026-04-22 14:09:37.169020814 +0000 @@ -0,0 +1,48 @@ +/* + * Copyright (c) Ian F. Darwin 1986-1995. + * Software written by Ian F. Darwin and others; + * maintained 1995-present by Christos Zoulas and others. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice immediately at the beginning of the file, without modification, + * this list of conditions, and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#ifdef HAVE_BYTESWAP_H +#include <byteswap.h> +#endif +#ifdef HAVE_SYS_BSWAP_H +#include <sys/bswap.h> +#endif + +#if defined(HAVE_BYTESWAP_H) +#define file_swap2(x) bswap_16(x) +#define file_swap4(x) bswap_32(x) +#define file_swap8(x) bswap_64(x) +#elif defined(HAVE_SYS_BSWAP_H) +#define file_swap2(x) bswap16(x) +#define file_swap4(x) bswap32(x) +#define file_swap8(x) bswap64(x) +#else +file_protected uint16_t file_swap2(uint16_t); +file_protected uint32_t file_swap4(uint32_t); +file_protected uint64_t file_swap8(uint64_t); +#endif
