Commit Graph

28 Commits

Author SHA1 Message Date
Panu Matilainen 32055d7946 Drop outdated and unmaintained Mono dependency generators
Upstream Mono is being a good citizen and maintains their own
dependency generators nowadays, so let them.

Closes: #673
2019-04-24 13:43:01 +03:00
Neal Gompa 5ddda1a7d6 fileattrs: Prepare python attr path for Python versions greater than 3.9 2018-10-03 14:19:01 +03:00
Neal Gompa 83bf933b7e fileattrs: Tighten pythondist path regex for metadata (RhBug:1618949)
The current regular expression for matching on Python metadata files was
too greedy, leading to generating dependency information for Python modules
that were actually bundled in another module rather than actually being
installed in a way that is usable and accessible from any Python code
using the system interpreter.

This change tightens the regular expression so that we only match on
modules that are installed in a way that they'll register with
distutils/setuptools based tools (such as pip) and usable as
dependencies for other Python module packages.
2018-10-03 14:19:01 +03:00
Neal Gompa 7bc95b616b fileattrs: Add attr for pythondistdeps
Rather than having the pythondistdeps dependency generator run on
all Python code, this separate attr will activate it only if the
package includes Python dist metadata (such as egg-info or dist-info
for Python Eggs and Python Wheels, respectively).

This is much more efficient, too, since the generator is only run
in circumstances where it will provide useful information.

This is based on the dependency generator attr used in Mageia,
OpenMandriva, and other systems that use the generator.
2018-08-02 12:10:38 +02:00
Florian Festi 5ac4305bdd Do not require the Python library dir to be at a particular place
RPM should not make any assumption about where Python libs are installed.
Resolves #346
2018-02-19 14:50:49 +01:00
Michael Schroeder c69cfdf901 Fix classification of ELF binaries with both setuid/setgid set
There is a ',' between multiple entries.
2017-08-31 12:01:24 +02:00
Mark Wielaard 3d4db6f99f Define AM_CFLAGS inside the Makefile.am files themselves.
Trying to include AM_CFLAGS through a configure generated rpm.am file
doesn't really work because at the time automake runs configure doesn't
exist yet to process rpm.am.in. Just define the AM_CFLAGS substitution
inside the Makefile.am files themselves.

Rename rpm.am.in back to rpm.am.

Signed-off-by: Mark Wielaard <mjw@redhat.com>
2016-12-09 11:35:38 +02:00
Neal Gompa 036829b859 appdata -> metainfo, add support for metainfo files
These provides are specifically for packages providing
AppStream files, which are either going to be *.appdata.xml
or *.metainfo.xml files in /usr/share/appdata or /usr/share/metainfo.

The upstream AppStream specification mandates *.metainfo.xml files
installed into /usr/share/metainfo, but there's still a large body
of legacy AppStream files installed in the legacy location.

For now, let's support both under the new metainfo() Provides.
2016-11-18 14:38:39 +01:00
Igor Gnatenko 9571218345 let debuginfo packages provide the build-id
This patch lets debuginfo packages provide build-id like follows:

 debuginfo(build-id) = c63cb23876c5fa85f36beaff58f8557e1bf22517

Originally this patch was written by Jan Blunck <jblunck@suse.de>.

Signed-off-by: Igor Gnatenko <ignatenko@redhat.com>
2016-08-03 12:10:40 +02:00
Michael Schroeder e6cadc6d5a Add support for automatic appdata() provides
Appdata files contain application information used by the AppStream
project. We generate two provides: appdata() to support enumeration
of all application packages and appdata(filenname) to make it easy
to link installed packages with appdata files.

Signed-off-by: Panu Matilainen <pmatilai@redhat.com>
2013-10-14 09:56:48 +03:00
Panu Matilainen 9b734cee5d Only consider files with .pm suffix as perl modules (RhBug:927211)
- Newer file is more eager to flag files as Perl module source,
  causing false provides to be generated. Require both magic
  and path to match for perllib classification to reduce the pain.
2013-05-22 08:38:53 +03:00
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