Commit Graph

17 Commits

Author SHA1 Message Date
Panu Matilainen 416fc709ab Simplify mono file magic regex
- Begin/end restrictions with wildcards on both ends dont make much
  sense, just match on the plain (sub)string
2012-05-07 15:29:14 +03:00
Panu Matilainen f2f4bfe9a5 Relax python file magic regex somewhat
- libmagic sometimes adds trailing descriptions about encodings, line
  terminators and whatnot, we dont want to care about those (RhBug:796218)
- not all python-related strings start with [pP]ython either, sometimes
  libmagic says "a python script" or "a /usr/bin/python script" and
  whatnot, so loose the start-of-line restriction as well
2012-05-07 15:21:47 +03:00
Panu Matilainen 49e398278f Tweak font magic regex a bit (yet again)
- Lose the pointless begin/end restrictions, take the optional
  space into account for both optional parts (one of the later issues
  in RhBug:757105)
2012-05-07 14:54:13 +03:00
Ville Skyttä 9ddcc23d2b Adapt perl and python fileattrs to file 5.10 magics
- file 5.10 has changed magics at least for perl and python scripts, samples:

  5.09: a /usr/bin/perl -w script, ASCII text executable, with very long lines
  5.10: Perl script, ASCII text executable, with very long lines

  5.09: a /usr/bin/python script, ASCII text executable
  5.10: Python script, ASCII text executable

Signed-off-by: Panu Matilainen <pmatilai@redhat.com>
2012-01-10 10:48:13 +02:00
Panu Matilainen 87d9e3c4ad Fix classification of ELF binaries with setuid/setgid bit, oops... 2011-11-28 14:00:45 +02:00
Panu Matilainen fb30c0aac8 Identify "font collection" (data etc) as fonts also (RhBug:757105) 2011-11-25 16:07:38 +02:00
Panu Matilainen db4905f51e Adjust script detection rules to work with file >= 5.07 too (RhBug:712251)
- Somewhere between file 5.05 and 5.07 it started adding encoding
  to script descriptions, eg "<mumble> script text executable" became
  "<mumble> script, <encoding> text executable" breaking what had
  been working for 10+ years in the case of old find-requires.
- Permit either comma or space after "script", this works for both
  old and new file.
2011-06-10 12:11:55 +03:00
Panu Matilainen 6eba5dc468 Fix classification of ELF binaries with sticky bit (RhBug:689182) 2011-03-22 08:36:35 +02:00
Panu Matilainen 9fa3a6c99d Adjust OCaml detection rule for libmagic 5.04 -> 5.05 string change 2011-02-06 09:57:57 +02:00
Panu Matilainen e9cc4c0ba7 Argh, yet more mono dependency generation braindamage
- Unlike some other scripts, mono-find-foo do not have .sh suffix, meh
2011-01-31 10:14:57 +02:00
Panu Matilainen f0f5cb7127 Eww, mono rules both buggy AND missing from tarballs, doh. 2011-01-31 09:21:32 +02:00
Panu Matilainen a9bc1f51ae Rename pattern -> path for, duh, path patterns
- 4.9 alpha used "pattern" but better fix the stupid name now than
  have to live with the non-obvious name forever
2010-12-10 12:33:46 +02:00
Panu Matilainen 449f6c4bea Oops, mono dependency extractors need a bunch of arguments
- Regression from the initial conversion to the new system in
  commit 8c7e53ec80
- The buildroot doesn't need passing as arg anymore but for now,
  just keep it compatible
2010-12-01 11:56:30 +02:00
Panu Matilainen 73dec03ac1 Unbreak perl module dependency extraction
- Dumb attribute vs macro name thinko/typo preventing it from working
  at all, duh.
- At least for now, revert back to magic based pattern: we dont really
  know where all the perl modules might live. OTOH this relies on
  the ugly "all .pm files are perl modules for now" hack inside rpmfc.c.
  We could of course use a loose /.*\\.pm path rule too for the same
  effect and eliminate the hack, but that'd leave strange stuff into
  fileclass tags when libmagic fails to detect its actually perl.
  Need to figure out something better here... maybe allow overriding
  libmagic detected strings from foo.attr or such.
2010-12-01 09:18:29 +02:00
Panu Matilainen 4e8d7c1a46 Require file attribute config to have .attr suffix
- Allows for more precise globbing, avoiding potential issues from
  leftover / accidentally placed files in the fileattrs directory.
2010-10-05 10:08:53 +03:00
Panu Matilainen fb4bc9b7d7 Replace __foo_exeonly attribute with a more generic mechanism
- Use a list of text keyword tokens to allow for more flags without
  requiring adding special processing for every new flag we make
2010-10-05 09:35:45 +03:00
Panu Matilainen 8c7e53ec80 First take at pluggable file attribute + dependency extraction system
- move most of the hardwired classification logic from rpmfc C-code
  to macro-based configuration, supporting drop-in addition of arbitrary
  new attributes + dependency extractors based on regex matching of
  libmagic file types and paths
- just the initial rough conversion of our built-in dependency types,
  various open questions + todo-items remain, plus likely fair amount
  of more-or-less subtle breakage
2010-03-23 16:32:46 +02:00