]> git.pld-linux.org Git - packages/file.git/blob - searchpath.patch
rebuild with python 3.10
[packages/file.git] / searchpath.patch
1 still search in /etc/magic
2 still use ~/.magic by default
3
4 --- file-5.39/src/Makefile.am.orig      2020-11-03 18:58:10.356256020 +0100
5 +++ file-5.39/src/Makefile.am   2020-11-03 18:58:16.536576455 +0100
6 @@ -4,7 +4,7 @@
7  
8  bin_PROGRAMS = file
9  
10 -AM_CPPFLAGS = -DMAGIC='"$(MAGIC)"'
11 +AM_CPPFLAGS = -DMAGIC='"/etc/magic:$(MAGIC)"'
12  AM_CFLAGS = $(CFLAG_VISIBILITY) @WARNINGS@
13  
14  libmagic_la_SOURCES = buffer.c magic.c apprentice.c softmagic.c ascmagic.c \
15 --- file-5.06/src/magic.c~      2011-04-07 22:20:30.000000000 +0300
16 +++ file-5.06/src/magic.c       2011-04-18 11:56:38.611292743 +0300
17 @@ -107,7 +107,7 @@
18  private const char *
19  get_default_magic(void)
20  {
21 -       static const char hmagic[] = "/.magic/magic.mgc";
22 +       static const char hmagic[] = "/.magic";
23         static char *default_magic;
24         char *home, *hmagicpath;
25  
26 --- a/src/apprentice.c
27 +++ b/src/apprentice.c
28 @@ -460,7 +460,7 @@ apprentice_1(struct magic_set *ms, const char *fn, int action)
29  #ifndef COMPILE_ONLY
30         map = apprentice_map(ms, fn);
31         if (map == NULL) {
32 -               if (ms->flags & MAGIC_CHECK)
33 +               if (ms->flags & MAGIC_CHECK && strcmp("/etc/magic", fn) != 0)
34                         file_magwarn(ms, "using regular magic file `%s'", fn);
35                 map = apprentice_load(ms, fn, action);
36                 if (map == NULL)
This page took 0.126077 seconds and 3 git commands to generate.