pkgsrc/sysutils/file/patches/patch-aa

20 lines
781 B
Text
Raw Normal View History

$NetBSD: patch-aa,v 1.10 2019/12/31 13:24:05 mef Exp $
Update from version 4.26 to 5.00. Pkgsrc changes: o Adapt patch-aa to new file Upstream changes: 2008-12-12 15:50 Christos Zoulas <christos@zoulas.com> * fix initial offset calculation for non 4K sector files * add loop limits to avoid DoS attacks by constructing looping sector references. 2008-12-03 13:05 Christos Zoulas <christos@zoulas.com> * fix memory botches on cdf file parsing. * exit with non-zero value for any error, not just for the last file processed. 2008-11-09 20:42 Charles Longeau <chl@tuxfamily.org> * Replace all str{cpy,cat} functions with strl{cpy,cat} * Ensure that strl{cpy,cat} are included in libmagic, as needed. 2008-11-06 18:18 Christos Zoulas <christos@zoulas.com> * Handle ID3 format files. 2008-11-06 23:00 Reuben Thomas <rrt@sc3d.org> * Fix --mime, --mime-type and --mime-encoding under new scheme. * Rename "ascii" to "text" and add "encoding" test. * Return a precise ("utf-16le" or "utf-16be") MIME charset for UTF-16. * Fix error in comment caused by automatic indentation adding words! 2008-11-06 10:35 Christos Zoulas <christos@astron.com> * use memchr instead of strchr because the string might not be NUL terminated (Scott MacVicar) 2008-11-03 07:31 Reuben Thomas <rrt@sc3d.org> * Fix a printf with a non-literal format string. * Fix formatting and punctuation of help for "--apple". 2008-10-30 11:00 Reuben Thomas <rrt@sc3d.org> * Correct words counts in comments of struct magic. * Fix handle_annotation to allow both Apple and MIME types to be printed, and to return correct code if MIME type is printed (1, not 0) or if there's an error (-1 not 1). * Fix output of charset for MIME type (precede with semi-colon; fixes Debian bug #501460). * Fix potential attacks via conversion specifications in magic strings. * Add a FIXME for Debian bug #488562 (magic files should be read in a defined order, by sorting the names). 2008-10-18 16:45 Christos Zoulas <christos@astron.com> * Added APPLE file creator/type 2008-10-12 10:20 Christos Zoulas <christos@astron.com> * Added CDF parsing 2008-10-09 16:40 Christos Zoulas <christos@astron.com> * filesystem and msdos patches (Joerg Jenderek) 2008-10-09 13:20 Christos Zoulas <christos@astron.com> * correct --exclude documentation issues: remove troff and fortran and rename "token" to "tokens". (Randy McMurchy) 2008-10-01 10:30 Christos Zoulas <christos@astron.com> * Read ~/.magic in addition to the default magic file not instead of, as documented in the man page. 2008-09-10 21:30 Reuben Thomas <rrt@sc3d.org> * Comment out graphviz patterns, as they match too many files. 2008-08-25 23:56 Reuben Thomas <rrt@sc3d.org> * Add text/x-lua MIME type for Lua scripts. * Escape { in regex in graphviz patterns.
2009-03-11 00:30:00 +01:00
Make pkgsrc file look in @sysconfdir@/magic first.
--- src/Makefile.in.orig 2019-12-17 11:13:47.000000000 +0900
+++ src/Makefile.in 2019-12-31 22:20:35.588805149 +0900
@@ -356,10 +356,10 @@ target_alias = @target_alias@
top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
-MAGIC = $(pkgdatadir)/magic
+MAGIC = @sysconfdir/magic
lib_LTLIBRARIES = libmagic.la
nodist_include_HEADERS = magic.h
-AM_CPPFLAGS = -DMAGIC='"$(MAGIC)"'
+AM_CPPFLAGS = -DMAGIC='"$(MAGIC):$(pkgdatadir)/magic"'
Update to 5.17, based on patch provided by Matthias <mf+ml.pkgsrc-users@netzwerkagentursaarland.de> on pkgsrc-users. Changes: 2014-02-12 18:21 Christos Zoulas <christos@zoulas.com> * Count recursion levels through indirect magic 2014-02-11 10:40 Christos Zoulas <christos@zoulas.com> * Prevent infinite recursion on files with indirect offsets of 0 2014-01-30 21:00 Christos Zoulas <christos@zoulas.com> * Add -E flag that makes file print filesystem errors to stderr and exit. 2014-01-08 17:20 Christos Zoulas <christos@zoulas.com> * mime printing could print results from multiple magic entries if there were multiple matches. * in some cases overflow was not detected when computing offsets in softmagic. 2013-12-05 12:00 Christos Zoulas <christos@zoulas.com> * use strcasestr() to for cdf strings * reset to the "C" locale while doing regex operations, or case insensitive comparisons; this is provisional 2013-11-19 20:10 Christos Zoulas <christos@zoulas.com> * always leave magic file loaded, don't unload for magic_check, etc. * fix default encoding to binary instead of unknown which broke recently * handle empty and one byte files, less specially so that --mime-encoding does not break completely. ` 2013-11-06 14:40 Christos Zoulas <christos@zoulas.com> * fix erroneous non-zero exit code from non-existant file and message 2013-10-29 14:25 Christos Zoulas <christos@zoulas.com> * add CDF MSI file detection (Guy Helmer) 2013-09-03 11:56 Christos Zoulas <christos@zoulas.com> * Don't mix errors and regular output if there was an error * in magic_descriptor() don't close the file and try to restore its position 2013-05-30 17:25 Christos Zoulas <christos@zoulas.com> * Don't treat magic as an error if offset was past EOF (Christoph Biedl) 2013-05-28 17:25 Christos Zoulas <christos@zoulas.com> * Fix spacing issues in softmagic and elf (Jan Kaluza) 2013-05-02 18:00 Christos Zoulas <christos@zoulas.com> * Fix segmentation fault with multiple magic_load commands. 2013-04-22 11:20 Christos Zoulas <christos@zoulas.com> * The way "default" was implemented was not very useful because the "if something was printed at that level" was not easily controlled by the user, and the format was bound to a string which is too restrictive. Add a "clear" for that level keyword and make "default" void. This way one can do: >>13 clear x >>13 lelong 1 foo >>13 lelong 2 bar >>13 default x >>>13 lelong x unknown %x 2013-03-25 13:20 Christos Zoulas <christos@zoulas.com> * disallow strength setting in "name" entries 2013-03-06 21:24 Christos Zoulas <christos@zoulas.com> * fix recursive magic separator printing 2013-02-26 19:28 Christos Zoulas <christos@zoulas.com> * limit recursion level for mget * fix pread() related breakage in cdf * handle offsets properly in recursive "use" 2013-02-18 10:39 Christos Zoulas <christos@zoulas.com> * add elf reading of debug info to determine if file is stripped (Jan Kaluza) * use pread() 2013-01-25 18:05 Christos Zoulas <christos@zoulas.com> * change mime description size from 64 to 80 to accommodate OOXML. 2013-01-11 14:50 Christos Zoulas <christos@zoulas.com> * Warn about inconsistent continuation levels. * Change fsmagic to add a space after it prints. 2013-01-10 21:00 Christos Zoulas <christos@zoulas.com> * Make getline public so that file can link against it. Perhaps it is better to rename it, or hide it differently. Fixes builds on platforms that do not provide it. 2013-01-07 16:30 Christos Zoulas <christos@zoulas.com> * Add SuS d{,1,2,4,8}, u{,1,2,4,8} and document what long, int, short, etc is (Guy Harris) 2013-01-06 11:20 Christos Zoulas <christos@zoulas.com> * add magic_version function and constant * Redo memory allocation and de-allocation. (prevents double frees on non mmap platforms) * Fix bug with name/use having to do with passing found state from the parent to the child and back. 2012-12-19 8:47 Christos Zoulas <christos@zoulas.com> * Only print elf capabilities for archs we know (Jan Kaluza) 2012-10-30 19:14 Christos Zoulas <christos@zoulas.com> * Add "name" and "use" file types in order to look inside mach-o files. 2012-09-06 10:40 Christos Zoulas <christos@zoulas.com> * make --version exit 0 (Matthew Schultz) * add string/T (Jan Kaluza) 2012-08-09 2:15 Christos Zoulas <christos@zoulas.com> * add z and t modifiers for our own vasprintf * search for $HOME/.magic.mgc if it is there first * fix reads from a pipe, and preserve errno 2012-05-15 13:12 Christos Zoulas <christos@zoulas.com> * use ctime_r, asctime_r 2012-04-06 17:18 Christos Zoulas <christos@zoulas.com> * Fixes for indirect offsets to handle apple disk formats 2012-04-03 18:26 Christos Zoulas <christos@zoulas.com> * Add windows date field types * More info for windows shortcuts (incomplete)
2014-03-12 19:35:48 +01:00
AM_CFLAGS = $(CFLAG_VISIBILITY) @WARNINGS@
libmagic_la_SOURCES = buffer.c magic.c apprentice.c softmagic.c ascmagic.c \
encoding.c compress.c is_csv.c is_json.c is_tar.c readelf.c print.c \