diff --git a/file-5.24-nitpick.dif b/file-5.24-nitpick.dif deleted file mode 100644 index f6eaf7d..0000000 --- a/file-5.24-nitpick.dif +++ /dev/null @@ -1,58 +0,0 @@ ---- - src/file.c | 8 ++++++++ - src/file_opts.h | 4 ++-- - 2 files changed, 10 insertions(+), 2 deletions(-) - ---- src/file.c -+++ src/file.c 2018-10-22 07:56:59.735038350 +0000 -@@ -102,10 +102,12 @@ private const struct option long_options - #define OPT_MIME_ENCODING 5 - #define OPT(shortname, longname, opt, def, doc) \ - {longname, opt, NULL, shortname}, -+#define OPT_POSIX OPT - #define OPT_LONGONLY(longname, opt, def, doc, id) \ - {longname, opt, NULL, id}, - #include "file_opts.h" - #undef OPT -+#undef OPT_POSIX - #undef OPT_LONGONLY - {0, 0, NULL, 0} - }; -@@ -645,6 +647,7 @@ docprint(const char *opts, int def) - private void - help(void) - { -+ const unsigned long posix = (unsigned long)getenv("POSIXLY_CORRECT"); - (void)fputs( - "Usage: file [OPTION...] [FILE...]\n" - "Determine type of FILEs.\n" -@@ -652,11 +655,16 @@ help(void) - #define OPT(shortname, longname, opt, def, doc) \ - fprintf(stdout, " -%c, --" longname, shortname), \ - docprint(doc, def); -+#define OPT_POSIX(shortname, longname, opt, def, doc) \ -+ fprintf(stdout, " -%c, --" longname "%s", shortname, \ -+ (shortname == 'L') ? (posix ? " (default)" : "") : (posix ? "" : " (default)")), \ -+ docprint(doc, def); - #define OPT_LONGONLY(longname, opt, def, doc, id) \ - fprintf(stdout, " --" longname), \ - docprint(doc, def); - #include "file_opts.h" - #undef OPT -+#undef OPT_POSIX - #undef OPT_LONGONLY - fprintf(stdout, "\nReport bugs to https://bugs.astron.com/\n"); - exit(EXIT_SUCCESS); ---- src/file_opts.h -+++ src/file_opts.h 2018-10-22 07:55:03.281221021 +0000 -@@ -39,8 +39,8 @@ OPT_LONGONLY("mime-encoding", 0, 0, " - OPT('k', "keep-going", 0, 0, " don't stop at the first match\n") - OPT('l', "list", 0, 0, " list magic strength\n") - #ifdef S_IFLNK --OPT('L', "dereference", 0, 1, " follow symlinks") --OPT('h', "no-dereference", 0, 2, " don't follow symlinks") -+OPT_POSIX('L', "dereference", 0, 1, " follow symlinks") -+OPT_POSIX('h', "no-dereference", 0, 2, " don't follow symlinks") - #endif - OPT('n', "no-buffer", 0, 0, " do not buffer output\n") - OPT('N', "no-pad", 0, 0, " do not pad output\n") diff --git a/file-secure_getenv.patch b/file-secure_getenv.patch index 743b6fe..050e8cf 100644 --- a/file-secure_getenv.patch +++ b/file-secure_getenv.patch @@ -5,8 +5,10 @@ file-5.38/src/magic.c | 10 +++++----- 4 files changed, 16 insertions(+), 6 deletions(-) ---- file-5.38/configure.ac -+++ file-5.38/configure.ac 2019-12-17 09:29:37.751077718 +0000 +Index: file-5.38/configure.ac +=================================================================== +--- file-5.38.orig/configure.ac ++++ file-5.38/configure.ac @@ -115,6 +115,8 @@ if test "$enable_xzlib" != "no"; then fi AC_CHECK_TYPE([sig_t],[AC_DEFINE([HAVE_SIG_T],1,[Have sig_t type])],,[#include ]) @@ -16,19 +18,10 @@ dnl Checks for typedefs, structures, and compiler characteristics. AC_TYPE_OFF_T AC_TYPE_SIZE_T ---- file-5.38/src/file.c -+++ file-5.38/src/file.c 2019-12-17 09:23:55.973524728 +0000 -@@ -647,7 +647,7 @@ docprint(const char *opts, int def) - private void - help(void) - { -- const unsigned long posix = (unsigned long)getenv("POSIXLY_CORRECT"); -+ const unsigned long posix = (unsigned long)secure_getenv("POSIXLY_CORRECT"); - (void)fputs( - "Usage: file [OPTION...] [FILE...]\n" - "Determine type of FILEs.\n" ---- file-5.38/src/file.h -+++ file-5.38/src/file.h 2019-12-17 09:23:55.977524652 +0000 +Index: file-5.38/src/file.h +=================================================================== +--- file-5.38.orig/src/file.h ++++ file-5.38/src/file.h @@ -650,4 +650,12 @@ static const char *rcsid(const char *p) #define __RCSID(a) #endif @@ -42,8 +35,10 @@ +#endif + #endif /* __file_h__ */ ---- file-5.38/src/magic.c -+++ file-5.38/src/magic.c 2019-12-17 09:23:55.977524652 +0000 +Index: file-5.38/src/magic.c +=================================================================== +--- file-5.38.orig/src/magic.c ++++ file-5.38/src/magic.c @@ -183,7 +183,7 @@ get_default_magic(void) free(default_magic); default_magic = NULL; diff --git a/file.changes b/file.changes index 7b40c5f..16f4c64 100644 --- a/file.changes +++ b/file.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Tue Apr 14 20:36:31 UTC 2020 - Andreas Schwab + +- file-5.24-nitpick.dif: remove obsolete patch (bsc#1169512) +- file-secure_getenv.patch: refresh + ------------------------------------------------------------------- Wed Jan 15 09:17:43 UTC 2020 - Dr. Werner Fink diff --git a/file.spec b/file.spec index 7ef10fd..0a01da7 100644 --- a/file.spec +++ b/file.spec @@ -63,7 +63,6 @@ Patch31: file-5.19-biorad.dif Patch32: file-5.19-clicfs.dif Patch33: file-5.16-ocloexec.patch Patch34: file-5.23-endian.patch -Patch35: file-5.24-nitpick.dif Patch37: file-secure_getenv.patch Patch39: file-5.28-btrfs-image.dif Patch40: file-5.38-allow-readlinkat.dif @@ -129,7 +128,6 @@ to develop applications that require the magic "file" interface. %patch32 -p0 -b .clicfs %patch33 -p0 -b .clexe %patch34 -p0 -b .endian -%patch35 -p0 -b .nitpick %patch37 -p1 -b .getenv %patch39 -p1 -b .btrfs %patch40 -p1 -b .readlinkat