From f87fa6b7be1502e6884aae5113bb6571ccaf3e6cdef3e24c5d9cfd967b2c52ef Mon Sep 17 00:00:00 2001 From: "Dr. Werner Fink" Date: Thu, 21 Oct 2021 12:56:09 +0000 Subject: [PATCH 1/5] . OBS-URL: https://build.opensuse.org/package/show/Base:System/file?expand=0&rev=230 --- file-5.23-endian.patch | 267 +++++++++++++++++++++-------------------- file.changes | 7 +- 2 files changed, 146 insertions(+), 128 deletions(-) diff --git a/file-5.23-endian.patch b/file-5.23-endian.patch index 37537b4..b3cb328 100644 --- a/file-5.23-endian.patch +++ b/file-5.23-endian.patch @@ -1,168 +1,181 @@ ---- - src/apprentice.c | 71 ++++--------------------------------------------------- - src/cdf.c | 53 +++-------------------------------------- - 2 files changed, 10 insertions(+), 114 deletions(-) +From f67fe8bb658fbc19df76128e1012580cf135da78 Mon Sep 17 00:00:00 2001 +From: Christos Zoulas +Date: Wed, 20 Oct 2021 13:56:15 +0000 +Subject: [PATCH] Use the system byte swapping functions if available (Werner + Fink) +--- + ChangeLog | 4 ++++ + configure.ac | 4 ++-- + src/apprentice.c | 28 ++++++++++++++++++++++++---- + src/cdf.c | 18 +++++++++++++++++- + 4 files changed, 47 insertions(+), 7 deletions(-) + +diff --git ChangeLog ChangeLog +index 0bb334c9..0be9711b 100644 +--- ChangeLog ++++ ChangeLog +@@ -1,3 +1,7 @@ ++2021-10-20 9:55 Christos Zoulas ++ ++ * use the system byte swapping functions if available (Werner Fink) ++ + 2021-10-18 11:57 Christos Zoulas + + * release 5.41 +diff --git configure.ac configure.ac +index ccc57e13..528bb40d 100644 +--- configure.ac ++++ configure.ac +@@ -99,10 +99,10 @@ gl_VISIBILITY + dnl Checks for headers + AC_HEADER_MAJOR + AC_HEADER_SYS_WAIT +-AC_CHECK_HEADERS(stdint.h fcntl.h inttypes.h unistd.h) ++AC_CHECK_HEADERS(stdint.h fcntl.h inttypes.h unistd.h byteswap.h) + AC_CHECK_HEADERS(utime.h wchar.h wctype.h) + AC_CHECK_HEADERS(getopt.h err.h xlocale.h) +-AC_CHECK_HEADERS(sys/mman.h sys/stat.h sys/types.h sys/utime.h sys/time.h sys/sysmacros.h) ++AC_CHECK_HEADERS(sys/bswap.h sys/mman.h sys/stat.h sys/types.h sys/utime.h sys/time.h sys/sysmacros.h) + if test "$enable_zlib" != "no"; then + AC_CHECK_HEADERS(zlib.h) + fi +diff --git src/apprentice.c src/apprentice.c +index eb3b4a59..8f51b922 100644 --- src/apprentice.c -+++ src/apprentice.c 2021-10-19 08:56:33.418646912 +0000 -@@ -50,7 +50,7 @@ FILE_RCSID("@(#)$File: apprentice.c,v 1. ++++ src/apprentice.c +@@ -32,7 +32,7 @@ + #include "file.h" + + #ifndef lint +-FILE_RCSID("@(#)$File: apprentice.c,v 1.309 2021/09/24 13:59:19 christos Exp $") ++FILE_RCSID("@(#)$File: apprentice.c,v 1.310 2021/10/20 13:56:15 christos Exp $") + #endif /* lint */ + + #include "magic.h" +@@ -50,6 +50,12 @@ FILE_RCSID("@(#)$File: apprentice.c,v 1.309 2021/09/24 13:59:19 christos Exp $") #endif #include #include -- ++#ifdef HAVE_BYTESWAP_H +#include ++#endif ++#ifdef HAVE_SYS_BSWAP_H ++#include ++#endif + #define EATAB {while (isascii(CAST(unsigned char, *l)) && \ - isspace(CAST(unsigned char, *l))) ++l;} -@@ -124,9 +124,11 @@ private void mlist_free_all(struct magic +@@ -124,9 +130,21 @@ private void mlist_free_all(struct magic_set *); private void mlist_free(struct mlist *); private void byteswap(struct magic *, uint32_t); private void bs1(struct magic *); --private uint16_t swap2(uint16_t); --private uint32_t swap4(uint32_t); --private uint64_t swap8(uint64_t); + ++#if defined(HAVE_BYTESWAP_H) +#define swap2(x) bswap_16(x) +#define swap4(x) bswap_32(x) +#define swap8(x) bswap_64(x) ++#elif defined(HAVE_SYS_BSWAP_H) ++#define swap2(x) bswap16(x) ++#define swap4(x) bswap32(x) ++#define swap8(x) bswap64(x) ++#else + private uint16_t swap2(uint16_t); + private uint32_t swap4(uint32_t); + private uint64_t swap8(uint64_t); ++#endif + private char *mkdbname(struct magic_set *, const char *, int); private struct magic_map *apprentice_buf(struct magic_set *, struct magic *, size_t); -@@ -3355,67 +3357,6 @@ byteswap(struct magic *magic, uint32_t n +@@ -3355,6 +3373,7 @@ byteswap(struct magic *magic, uint32_t nmagic) bs1(&magic[i]); } --/* -- * swap a short -- */ --private uint16_t --swap2(uint16_t sv) --{ -- uint16_t rv; -- uint8_t *s = RCAST(uint8_t *, RCAST(void *, &sv)); -- uint8_t *d = RCAST(uint8_t *, RCAST(void *, &rv)); -- d[0] = s[1]; -- d[1] = s[0]; -- return rv; --} -- --/* -- * swap an int -- */ --private uint32_t --swap4(uint32_t sv) --{ -- uint32_t rv; -- uint8_t *s = RCAST(uint8_t *, RCAST(void *, &sv)); -- uint8_t *d = RCAST(uint8_t *, RCAST(void *, &rv)); -- d[0] = s[3]; -- d[1] = s[2]; -- d[2] = s[1]; -- d[3] = s[0]; -- return rv; --} -- --/* -- * swap a quad -- */ --private uint64_t --swap8(uint64_t sv) --{ -- uint64_t rv; -- uint8_t *s = RCAST(uint8_t *, RCAST(void *, &sv)); -- uint8_t *d = RCAST(uint8_t *, RCAST(void *, &rv)); ++#if !defined(HAVE_BYTESWAP_H) && !defined(HAVE_SYS_BSWAP_H) + /* + * swap a short + */ +@@ -3394,7 +3413,7 @@ swap8(uint64_t sv) + uint64_t rv; + uint8_t *s = RCAST(uint8_t *, RCAST(void *, &sv)); + uint8_t *d = RCAST(uint8_t *, RCAST(void *, &rv)); -#if 0 -- d[0] = s[3]; -- d[1] = s[2]; -- d[2] = s[1]; -- d[3] = s[0]; -- d[4] = s[7]; -- d[5] = s[6]; -- d[6] = s[5]; -- d[7] = s[4]; ++# if 0 + d[0] = s[3]; + d[1] = s[2]; + d[2] = s[1]; +@@ -3403,7 +3422,7 @@ swap8(uint64_t sv) + d[5] = s[6]; + d[6] = s[5]; + d[7] = s[4]; -#else -- d[0] = s[7]; -- d[1] = s[6]; -- d[2] = s[5]; -- d[3] = s[4]; -- d[4] = s[3]; -- d[5] = s[2]; -- d[6] = s[1]; -- d[7] = s[0]; ++# else + d[0] = s[7]; + d[1] = s[6]; + d[2] = s[5]; +@@ -3412,9 +3431,10 @@ swap8(uint64_t sv) + d[5] = s[2]; + d[6] = s[1]; + d[7] = s[0]; -#endif -- return rv; --} -- ++# endif + return rv; + } ++#endif + protected uintmax_t file_varint2uintmax_t(const unsigned char *us, int t, size_t *l) - { +diff --git src/cdf.c src/cdf.c +index b5ad2f6a..874a6ed3 100644 --- src/cdf.c -+++ src/cdf.c 2021-10-19 08:53:37.577690786 +0000 -@@ -48,6 +48,7 @@ FILE_RCSID("@(#)$File: cdf.c,v 1.120 202 ++++ src/cdf.c +@@ -35,7 +35,7 @@ + #include "file.h" + + #ifndef lint +-FILE_RCSID("@(#)$File: cdf.c,v 1.120 2021/09/24 13:59:19 christos Exp $") ++FILE_RCSID("@(#)$File: cdf.c,v 1.121 2021/10/20 13:56:15 christos Exp $") + #endif + + #include +@@ -48,6 +48,12 @@ FILE_RCSID("@(#)$File: cdf.c,v 1.120 2021/09/24 13:59:19 christos Exp $") #include #include #include ++#ifdef HAVE_BYTESWAP_H +#include ++#endif ++#ifdef HAVE_SYS_BSWAP_H ++#include ++#endif #ifndef EFTYPE #define EFTYPE EINVAL -@@ -124,55 +125,9 @@ cdf_calloc(const char *file __attribute_ +@@ -124,6 +130,15 @@ cdf_calloc(const char *file __attribute__((__unused__)), return calloc(n, u); } --/* -- * swap a short -- */ --static uint16_t --_cdf_tole2(uint16_t sv) --{ -- uint16_t rv; -- uint8_t *s = RCAST(uint8_t *, RCAST(void *, &sv)); -- uint8_t *d = RCAST(uint8_t *, RCAST(void *, &rv)); -- d[0] = s[1]; -- d[1] = s[0]; -- return rv; --} -- --/* -- * swap an int -- */ --static uint32_t --_cdf_tole4(uint32_t sv) --{ -- uint32_t rv; -- uint8_t *s = RCAST(uint8_t *, RCAST(void *, &sv)); -- uint8_t *d = RCAST(uint8_t *, RCAST(void *, &rv)); -- d[0] = s[3]; -- d[1] = s[2]; -- d[2] = s[1]; -- d[3] = s[0]; -- return rv; --} -- --/* -- * swap a quad -- */ --static uint64_t --_cdf_tole8(uint64_t sv) --{ -- uint64_t rv; -- uint8_t *s = RCAST(uint8_t *, RCAST(void *, &sv)); -- uint8_t *d = RCAST(uint8_t *, RCAST(void *, &rv)); -- d[0] = s[7]; -- d[1] = s[6]; -- d[2] = s[5]; -- d[3] = s[4]; -- d[4] = s[3]; -- d[5] = s[2]; -- d[6] = s[1]; -- d[7] = s[0]; -- return rv; --} -+#define _cdf_tole2(x) bswap_16(x) -+#define _cdf_tole4(x) bswap_32(x) -+#define _cdf_tole8(x) bswap_64(x) ++#if defined(HAVE_BYTESWAP_H) ++# define _cdf_tole2(x) bswap_16(x) ++# define _cdf_tole4(x) bswap_32(x) ++# define _cdf_tole8(x) bswap_64(x) ++#elif defined(HAVE_SYS_BSWAP_H) ++# define _cdf_tole2(x) bswap16(x) ++# define _cdf_tole4(x) bswap32(x) ++# define _cdf_tole8(x) bswap64(x) ++#else + /* + * swap a short + */ +@@ -173,6 +188,7 @@ _cdf_tole8(uint64_t sv) + d[7] = s[0]; + return rv; + } ++#endif /* * grab a uint32_t from a possibly unaligned address, and return it in +-- +2.26.2 + diff --git a/file.changes b/file.changes index eb9bb38..bbdd0b7 100644 --- a/file.changes +++ b/file.changes @@ -1,7 +1,12 @@ +------------------------------------------------------------------- +Thu Oct 21 08:33:48 UTC 2021 - Dr. Werner Fink + +- Now file-5.23-endian.patch is at upstream git repository, use it + ------------------------------------------------------------------- Thu Oct 21 06:24:35 UTC 2021 - Dr. Werner Fink -- Remove file-5.38-allow-readlinkat.dif as already doen in latest +- Remove file-5.38-allow-readlinkat.dif as already done in latest file 5.41 ------------------------------------------------------------------- From 80eb29f619b879d706ceab1faac801a5b5730a26c013ba76ca2fcfaf69295c26 Mon Sep 17 00:00:00 2001 From: Dominique Leuenberger Date: Wed, 1 Dec 2021 10:28:59 +0000 Subject: [PATCH 2/5] OBS-URL: https://build.opensuse.org/package/show/Base:System/file?expand=0&rev=231 --- file-5.23-endian.patch | 265 ++++++++++++++++++++--------------------- file.changes | 7 +- 2 files changed, 127 insertions(+), 145 deletions(-) diff --git a/file-5.23-endian.patch b/file-5.23-endian.patch index b3cb328..37537b4 100644 --- a/file-5.23-endian.patch +++ b/file-5.23-endian.patch @@ -1,181 +1,168 @@ -From f67fe8bb658fbc19df76128e1012580cf135da78 Mon Sep 17 00:00:00 2001 -From: Christos Zoulas -Date: Wed, 20 Oct 2021 13:56:15 +0000 -Subject: [PATCH] Use the system byte swapping functions if available (Werner - Fink) - --- - ChangeLog | 4 ++++ - configure.ac | 4 ++-- - src/apprentice.c | 28 ++++++++++++++++++++++++---- - src/cdf.c | 18 +++++++++++++++++- - 4 files changed, 47 insertions(+), 7 deletions(-) + src/apprentice.c | 71 ++++--------------------------------------------------- + src/cdf.c | 53 +++-------------------------------------- + 2 files changed, 10 insertions(+), 114 deletions(-) -diff --git ChangeLog ChangeLog -index 0bb334c9..0be9711b 100644 ---- ChangeLog -+++ ChangeLog -@@ -1,3 +1,7 @@ -+2021-10-20 9:55 Christos Zoulas -+ -+ * use the system byte swapping functions if available (Werner Fink) -+ - 2021-10-18 11:57 Christos Zoulas - - * release 5.41 -diff --git configure.ac configure.ac -index ccc57e13..528bb40d 100644 ---- configure.ac -+++ configure.ac -@@ -99,10 +99,10 @@ gl_VISIBILITY - dnl Checks for headers - AC_HEADER_MAJOR - AC_HEADER_SYS_WAIT --AC_CHECK_HEADERS(stdint.h fcntl.h inttypes.h unistd.h) -+AC_CHECK_HEADERS(stdint.h fcntl.h inttypes.h unistd.h byteswap.h) - AC_CHECK_HEADERS(utime.h wchar.h wctype.h) - AC_CHECK_HEADERS(getopt.h err.h xlocale.h) --AC_CHECK_HEADERS(sys/mman.h sys/stat.h sys/types.h sys/utime.h sys/time.h sys/sysmacros.h) -+AC_CHECK_HEADERS(sys/bswap.h sys/mman.h sys/stat.h sys/types.h sys/utime.h sys/time.h sys/sysmacros.h) - if test "$enable_zlib" != "no"; then - AC_CHECK_HEADERS(zlib.h) - fi -diff --git src/apprentice.c src/apprentice.c -index eb3b4a59..8f51b922 100644 --- src/apprentice.c -+++ src/apprentice.c -@@ -32,7 +32,7 @@ - #include "file.h" - - #ifndef lint --FILE_RCSID("@(#)$File: apprentice.c,v 1.309 2021/09/24 13:59:19 christos Exp $") -+FILE_RCSID("@(#)$File: apprentice.c,v 1.310 2021/10/20 13:56:15 christos Exp $") - #endif /* lint */ - - #include "magic.h" -@@ -50,6 +50,12 @@ FILE_RCSID("@(#)$File: apprentice.c,v 1.309 2021/09/24 13:59:19 christos Exp $") ++++ src/apprentice.c 2021-10-19 08:56:33.418646912 +0000 +@@ -50,7 +50,7 @@ FILE_RCSID("@(#)$File: apprentice.c,v 1. #endif #include #include -+#ifdef HAVE_BYTESWAP_H +- +#include -+#endif -+#ifdef HAVE_SYS_BSWAP_H -+#include -+#endif - #define EATAB {while (isascii(CAST(unsigned char, *l)) && \ -@@ -124,9 +130,21 @@ private void mlist_free_all(struct magic_set *); + isspace(CAST(unsigned char, *l))) ++l;} +@@ -124,9 +124,11 @@ private void mlist_free_all(struct magic private void mlist_free(struct mlist *); private void byteswap(struct magic *, uint32_t); private void bs1(struct magic *); +-private uint16_t swap2(uint16_t); +-private uint32_t swap4(uint32_t); +-private uint64_t swap8(uint64_t); + -+#if defined(HAVE_BYTESWAP_H) +#define swap2(x) bswap_16(x) +#define swap4(x) bswap_32(x) +#define swap8(x) bswap_64(x) -+#elif defined(HAVE_SYS_BSWAP_H) -+#define swap2(x) bswap16(x) -+#define swap4(x) bswap32(x) -+#define swap8(x) bswap64(x) -+#else - private uint16_t swap2(uint16_t); - private uint32_t swap4(uint32_t); - private uint64_t swap8(uint64_t); -+#endif + private char *mkdbname(struct magic_set *, const char *, int); private struct magic_map *apprentice_buf(struct magic_set *, struct magic *, size_t); -@@ -3355,6 +3373,7 @@ byteswap(struct magic *magic, uint32_t nmagic) +@@ -3355,67 +3357,6 @@ byteswap(struct magic *magic, uint32_t n bs1(&magic[i]); } -+#if !defined(HAVE_BYTESWAP_H) && !defined(HAVE_SYS_BSWAP_H) - /* - * swap a short - */ -@@ -3394,7 +3413,7 @@ swap8(uint64_t sv) - uint64_t rv; - uint8_t *s = RCAST(uint8_t *, RCAST(void *, &sv)); - uint8_t *d = RCAST(uint8_t *, RCAST(void *, &rv)); +-/* +- * swap a short +- */ +-private uint16_t +-swap2(uint16_t sv) +-{ +- uint16_t rv; +- uint8_t *s = RCAST(uint8_t *, RCAST(void *, &sv)); +- uint8_t *d = RCAST(uint8_t *, RCAST(void *, &rv)); +- d[0] = s[1]; +- d[1] = s[0]; +- return rv; +-} +- +-/* +- * swap an int +- */ +-private uint32_t +-swap4(uint32_t sv) +-{ +- uint32_t rv; +- uint8_t *s = RCAST(uint8_t *, RCAST(void *, &sv)); +- uint8_t *d = RCAST(uint8_t *, RCAST(void *, &rv)); +- d[0] = s[3]; +- d[1] = s[2]; +- d[2] = s[1]; +- d[3] = s[0]; +- return rv; +-} +- +-/* +- * swap a quad +- */ +-private uint64_t +-swap8(uint64_t sv) +-{ +- uint64_t rv; +- uint8_t *s = RCAST(uint8_t *, RCAST(void *, &sv)); +- uint8_t *d = RCAST(uint8_t *, RCAST(void *, &rv)); -#if 0 -+# if 0 - d[0] = s[3]; - d[1] = s[2]; - d[2] = s[1]; -@@ -3403,7 +3422,7 @@ swap8(uint64_t sv) - d[5] = s[6]; - d[6] = s[5]; - d[7] = s[4]; +- d[0] = s[3]; +- d[1] = s[2]; +- d[2] = s[1]; +- d[3] = s[0]; +- d[4] = s[7]; +- d[5] = s[6]; +- d[6] = s[5]; +- d[7] = s[4]; -#else -+# else - d[0] = s[7]; - d[1] = s[6]; - d[2] = s[5]; -@@ -3412,9 +3431,10 @@ swap8(uint64_t sv) - d[5] = s[2]; - d[6] = s[1]; - d[7] = s[0]; +- d[0] = s[7]; +- d[1] = s[6]; +- d[2] = s[5]; +- d[3] = s[4]; +- d[4] = s[3]; +- d[5] = s[2]; +- d[6] = s[1]; +- d[7] = s[0]; -#endif -+# endif - return rv; - } -+#endif - +- return rv; +-} +- protected uintmax_t file_varint2uintmax_t(const unsigned char *us, int t, size_t *l) -diff --git src/cdf.c src/cdf.c -index b5ad2f6a..874a6ed3 100644 + { --- src/cdf.c -+++ src/cdf.c -@@ -35,7 +35,7 @@ - #include "file.h" - - #ifndef lint --FILE_RCSID("@(#)$File: cdf.c,v 1.120 2021/09/24 13:59:19 christos Exp $") -+FILE_RCSID("@(#)$File: cdf.c,v 1.121 2021/10/20 13:56:15 christos Exp $") - #endif - - #include -@@ -48,6 +48,12 @@ FILE_RCSID("@(#)$File: cdf.c,v 1.120 2021/09/24 13:59:19 christos Exp $") ++++ src/cdf.c 2021-10-19 08:53:37.577690786 +0000 +@@ -48,6 +48,7 @@ FILE_RCSID("@(#)$File: cdf.c,v 1.120 202 #include #include #include -+#ifdef HAVE_BYTESWAP_H +#include -+#endif -+#ifdef HAVE_SYS_BSWAP_H -+#include -+#endif #ifndef EFTYPE #define EFTYPE EINVAL -@@ -124,6 +130,15 @@ cdf_calloc(const char *file __attribute__((__unused__)), +@@ -124,55 +125,9 @@ cdf_calloc(const char *file __attribute_ return calloc(n, u); } -+#if defined(HAVE_BYTESWAP_H) -+# define _cdf_tole2(x) bswap_16(x) -+# define _cdf_tole4(x) bswap_32(x) -+# define _cdf_tole8(x) bswap_64(x) -+#elif defined(HAVE_SYS_BSWAP_H) -+# define _cdf_tole2(x) bswap16(x) -+# define _cdf_tole4(x) bswap32(x) -+# define _cdf_tole8(x) bswap64(x) -+#else - /* - * swap a short - */ -@@ -173,6 +188,7 @@ _cdf_tole8(uint64_t sv) - d[7] = s[0]; - return rv; - } -+#endif +-/* +- * swap a short +- */ +-static uint16_t +-_cdf_tole2(uint16_t sv) +-{ +- uint16_t rv; +- uint8_t *s = RCAST(uint8_t *, RCAST(void *, &sv)); +- uint8_t *d = RCAST(uint8_t *, RCAST(void *, &rv)); +- d[0] = s[1]; +- d[1] = s[0]; +- return rv; +-} +- +-/* +- * swap an int +- */ +-static uint32_t +-_cdf_tole4(uint32_t sv) +-{ +- uint32_t rv; +- uint8_t *s = RCAST(uint8_t *, RCAST(void *, &sv)); +- uint8_t *d = RCAST(uint8_t *, RCAST(void *, &rv)); +- d[0] = s[3]; +- d[1] = s[2]; +- d[2] = s[1]; +- d[3] = s[0]; +- return rv; +-} +- +-/* +- * swap a quad +- */ +-static uint64_t +-_cdf_tole8(uint64_t sv) +-{ +- uint64_t rv; +- uint8_t *s = RCAST(uint8_t *, RCAST(void *, &sv)); +- uint8_t *d = RCAST(uint8_t *, RCAST(void *, &rv)); +- d[0] = s[7]; +- d[1] = s[6]; +- d[2] = s[5]; +- d[3] = s[4]; +- d[4] = s[3]; +- d[5] = s[2]; +- d[6] = s[1]; +- d[7] = s[0]; +- return rv; +-} ++#define _cdf_tole2(x) bswap_16(x) ++#define _cdf_tole4(x) bswap_32(x) ++#define _cdf_tole8(x) bswap_64(x) /* * grab a uint32_t from a possibly unaligned address, and return it in --- -2.26.2 - diff --git a/file.changes b/file.changes index bbdd0b7..eb9bb38 100644 --- a/file.changes +++ b/file.changes @@ -1,12 +1,7 @@ -------------------------------------------------------------------- -Thu Oct 21 08:33:48 UTC 2021 - Dr. Werner Fink - -- Now file-5.23-endian.patch is at upstream git repository, use it - ------------------------------------------------------------------- Thu Oct 21 06:24:35 UTC 2021 - Dr. Werner Fink -- Remove file-5.38-allow-readlinkat.dif as already done in latest +- Remove file-5.38-allow-readlinkat.dif as already doen in latest file 5.41 ------------------------------------------------------------------- From 10ea055727e17af45683c3208aa6b2df2f87e1806e74c3a4e322cc57a716b84e Mon Sep 17 00:00:00 2001 From: Dirk Mueller Date: Tue, 22 Feb 2022 08:27:59 +0000 Subject: [PATCH 3/5] Accepting request 956541 from home:dimstar:Factory - Drop pkgconfig(libseccomp) BuildRequires and stop injecting libseccomp cflags into CFLAGS: libseccomp has been disabled for a long time already. - Move the special 'check' part from install to %check. file 5.41 OBS-URL: https://build.opensuse.org/request/show/956541 OBS-URL: https://build.opensuse.org/package/show/Base:System/file?expand=0&rev=232 --- file.changes | 10 +++++++++- file.spec | 8 ++++---- python-magic.spec | 2 +- 3 files changed, 14 insertions(+), 6 deletions(-) diff --git a/file.changes b/file.changes index eb9bb38..7a9fb22 100644 --- a/file.changes +++ b/file.changes @@ -1,8 +1,16 @@ +------------------------------------------------------------------- +Mon Feb 21 17:09:56 UTC 2022 - Dominique Leuenberger + +- Drop pkgconfig(libseccomp) BuildRequires and stop injecting + libseccomp cflags into CFLAGS: libseccomp has been disabled for a + long time already. +- Move the special 'check' part from install to %check. + ------------------------------------------------------------------- Thu Oct 21 06:24:35 UTC 2021 - Dr. Werner Fink - Remove file-5.38-allow-readlinkat.dif as already doen in latest - file 5.41 + file 5.41 ------------------------------------------------------------------- Tue Oct 19 09:52:12 UTC 2021 - Dr. Werner Fink diff --git a/file.spec b/file.spec index d6dac6c..414d304 100644 --- a/file.spec +++ b/file.spec @@ -1,7 +1,7 @@ # # spec file for package file # -# Copyright (c) 2021 SUSE LLC +# Copyright (c) 2022 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -25,7 +25,6 @@ BuildRequires: libtool BuildRequires: zlib-devel BuildRequires: pkgconfig(bzip2) BuildRequires: pkgconfig(liblzma) -BuildRequires: pkgconfig(libseccomp) URL: http://www.darwinsys.com/file/ # bug437293 %ifarch ppc64 @@ -136,7 +135,7 @@ export LC_ALL=POSIX rm -f Magdir/*,v Magdir/*~ rm -f ltcf-c.sh ltconfig ltmain.sh autoreconf -fiv -export CFLAGS="%{optflags} -DHOWMANY=69632 -fPIE $(pkg-config libseccomp --cflags)" +export CFLAGS="%{optflags} -DHOWMANY=69632 -fPIE $(pkg-config)" %configure --disable-silent-rules --datadir=%{_miscdir} \ --disable-static \ --disable-libseccomp \ @@ -155,7 +154,9 @@ echo '# global magic file is %{_miscdir}/magic(.mgc)' >> %{buildroot}%{_sysc %if %{with decore} install -s dcore %{buildroot}%{_bindir} %endif +rm -f %{buildroot}%{_libdir}/*.la +%check # Check out that the binary does not bail out: LD_LIBRARY_PATH=%{buildroot}%{_libdir} export LD_LIBRARY_PATH @@ -166,7 +167,6 @@ for dir in %{_bindir} /%{_lib} %{_libdir} ; do xargs %{buildroot}%{_bindir}/file -m %{buildroot}%{_miscdir}/magic done unset LD_LIBRARY_PATH -rm -f %{buildroot}%{_libdir}/*.la %post -n %libname -p /sbin/ldconfig diff --git a/python-magic.spec b/python-magic.spec index d4e8f26..50d5b29 100644 --- a/python-magic.spec +++ b/python-magic.spec @@ -1,7 +1,7 @@ # # spec file for package python-magic # -# Copyright (c) 2021 SUSE LLC +# Copyright (c) 2022 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed From 911f1f439769aa63eeb64d3ec241de3e081b0d478562d08dd05cf0f8dfa2e6fa Mon Sep 17 00:00:00 2001 From: "Dr. Werner Fink" Date: Thu, 24 Feb 2022 09:51:57 +0000 Subject: [PATCH 4/5] Accepting request 957235 from home:dimstar:Factory - Fix previous entry: remove stray pkg-config call in CFLAGS (as it was called without parameters, it only made output on stderr, which did not impact CFLAGS; so de facto only a cleanup change). OBS-URL: https://build.opensuse.org/request/show/957235 OBS-URL: https://build.opensuse.org/package/show/Base:System/file?expand=0&rev=233 --- file.changes | 7 +++++++ file.spec | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/file.changes b/file.changes index 7a9fb22..f507d5e 100644 --- a/file.changes +++ b/file.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Thu Feb 24 08:41:32 UTC 2022 - Dominique Leuenberger + +- Fix previous entry: remove stray pkg-config call in CFLAGS (as it + was called without parameters, it only made output on stderr, + which did not impact CFLAGS; so de facto only a cleanup change). + ------------------------------------------------------------------- Mon Feb 21 17:09:56 UTC 2022 - Dominique Leuenberger diff --git a/file.spec b/file.spec index 414d304..3d76f0a 100644 --- a/file.spec +++ b/file.spec @@ -135,7 +135,7 @@ export LC_ALL=POSIX rm -f Magdir/*,v Magdir/*~ rm -f ltcf-c.sh ltconfig ltmain.sh autoreconf -fiv -export CFLAGS="%{optflags} -DHOWMANY=69632 -fPIE $(pkg-config)" +export CFLAGS="%{optflags} -DHOWMANY=69632 -fPIE" %configure --disable-silent-rules --datadir=%{_miscdir} \ --disable-static \ --disable-libseccomp \ From bcbe81218673783219c0baa8557608f9df2c9ee14e7b9710a2f77219828d1486 Mon Sep 17 00:00:00 2001 From: "Dr. Werner Fink" Date: Thu, 24 Feb 2022 10:07:30 +0000 Subject: [PATCH 5/5] libseccomp sandboxing OBS-URL: https://build.opensuse.org/package/show/Base:System/file?expand=0&rev=234 --- file-rpmlintrc | 1 - file.changes | 7 ++++++- file.spec | 6 +++--- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/file-rpmlintrc b/file-rpmlintrc index 08be22c..a124502 100644 --- a/file-rpmlintrc +++ b/file-rpmlintrc @@ -1,3 +1,2 @@ -addFilter(".*W:.*no-dependency-on file.*/file-libs/libfile.*") addFilter(".*W:.*name-repeated-in-summary.*") addFilter(".*:.*shlib-fixed-dependency.*") diff --git a/file.changes b/file.changes index f507d5e..cd2448e 100644 --- a/file.changes +++ b/file.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Thu Feb 24 10:05:17 UTC 2022 - Dr. Werner Fink + +- Reenable libseccomp sandboxing + ------------------------------------------------------------------- Thu Feb 24 08:41:32 UTC 2022 - Dominique Leuenberger @@ -16,7 +21,7 @@ Mon Feb 21 17:09:56 UTC 2022 - Dominique Leuenberger ------------------------------------------------------------------- Thu Oct 21 06:24:35 UTC 2021 - Dr. Werner Fink -- Remove file-5.38-allow-readlinkat.dif as already doen in latest +- Remove file-5.38-allow-readlinkat.dif as already done in latest file 5.41 ------------------------------------------------------------------- diff --git a/file.spec b/file.spec index 3d76f0a..d63dcfc 100644 --- a/file.spec +++ b/file.spec @@ -22,9 +22,10 @@ Name: file BuildRequires: bash >= 4.0 BuildRequires: libtool -BuildRequires: zlib-devel BuildRequires: pkgconfig(bzip2) BuildRequires: pkgconfig(liblzma) +BuildRequires: pkgconfig(libseccomp) +BuildRequires: pkgconfig(zlib) URL: http://www.darwinsys.com/file/ # bug437293 %ifarch ppc64 @@ -135,10 +136,9 @@ export LC_ALL=POSIX rm -f Magdir/*,v Magdir/*~ rm -f ltcf-c.sh ltconfig ltmain.sh autoreconf -fiv -export CFLAGS="%{optflags} -DHOWMANY=69632 -fPIE" +export CFLAGS="%{optflags} -DHOWMANY=69632 -fPIE $(pkg-config libseccomp --cflags)" %configure --disable-silent-rules --datadir=%{_miscdir} \ --disable-static \ - --disable-libseccomp \ --enable-fsect-man5 make %{?_smp_mflags} pkgdatadir='$(datadir)' LDFLAGS="-pie"