Commit Graph

67 Commits

Author SHA1 Message Date
5ef5c8ff4a Use file4 instead of file
This will allow upgrading system file to v5, leaving rpmbuild using
stable file v4.
2021-08-12 13:23:31 +03:00
Ivan Zakharyaschev
d13f11fe4f find-provides: removed optimization for empty lists of files
The same reasons as for find-requires:

1. can be buggy in future;
2. give a chance to the methods to generate some special Provides
2016-04-07 13:58:27 +03:00
Ivan Zakharyaschev
6b43518d50 find-{requires,provides}: switched to the equivalent use of tmpdir.sh 2016-04-05 23:24:45 +03:00
Ivan Zakharyaschev
816c140ae7 find-{requires,provides}: in case of an error in it, the pipe to it will be broken (must not change the visible behavior of rpm-build)
We move "cat > /dev/null" to the only place where consuming the whole
input is useful for there to be no error.

This is done in preparation for a switch to the usage of tmpdir.sh.
2016-04-05 23:22:24 +03:00
9b75decc2e autodeps/linux.*: fix regression introduced along with the recent cleanup 2011-05-24 23:20:04 +00:00
d0efa0675e scripts: cleanup exit/signal handlers 2011-05-14 18:17:53 +00:00
Alexey Tourbin
82f7aeb283 implemented %__find_{requires,provides}_filter and %filter_from_{requires,provides}
The first two macros provide general mechanism for find-requires
and find-provides filtering.  Any valid command or shell syntax can
be used - the command will be executed using "eval" within find-*
script.  The implementation in %___build_pre is not particular
beautiful (as it uses here-docs), but there seems to be no easy
way to quote for eval yet.

The second two commands are built on top of the first: they use
sed as a filtering tool.  The implementation is compatible with Fedora:
http://fedoraproject.org/wiki/Packaging:AutoProvidesAndRequiresFiltering
2011-01-23 02:30:08 +03:00
Alexey Tourbin
d7dbd5f2ff find-{provides,requires,scriptlet-requires}: report method failures 2008-06-04 03:26:23 +04:00
Alexey Tourbin
f178514e7c find-{requires,provides}: fixed %buildroot/.files:* lists for PackagedFiles() 2008-03-30 03:26:30 +04:00
Alexey Tourbin
bf4a93fd36 s/\.packaged-files:/.files:/g 2008-02-18 18:26:21 +03:00
Alexey Tourbin
f298ea3e6b find-requires, find-provides: save packaged files list under $RPM_BUILD_ROOT/.packaged-files:$RPM_SUBPACKAGE_NAME 2008-01-22 22:06:54 +03:00
Alexey Tourbin
66ed9feb2a find-requires, find-provides: sort each dependency list, and use merge sort at the end 2007-08-11 00:56:43 +04:00
Alexey Tourbin
9175b4190a find-requires, find-provides: removed the reset of unused code, specifically for mono and java
rpm-build-mono has been adapted.
Updated rpm-build dependencies:
	Conflicts: rpm-build-mono <= 1.0

rpm-build-java does NOT include java.req in current sisyphus release
1.0.0-alt1.  I have done some major development for rpm-build-java,
but there is still no consensus about it.
Not updated rpm-build dependencies: nothing to do.
2007-08-11 00:48:49 +04:00
Alexey Tourbin
3ed0194c90 find-requires, find-provides: removed ulimit and LD_PRELOAD code 2007-08-03 12:07:58 +04:00
Alexey Tourbin
e4ac5eca65 find-requires, find-provides: removed perl, python, and tcl stuff 2007-08-01 16:05:26 +04:00
Alexey Tourbin
434d4daed5 Merge branch 'master' of git.alt:/people/ldv/packages/rpm into mod
Conflicts:

	autodeps/linux.prov.in
	autodeps/linux.req.in
2007-03-18 12:16:52 +03:00
c226f12904 autodeps/linux.{prov,req}.in: Handle files of type "Mono/.Net assembly" (#11088, ildar@) 2007-03-17 19:59:55 +00:00
Alexey Tourbin
371f6d1527 adapted pam.req and pam.prov 2007-03-12 15:06:07 +03:00
Alexey Tourbin
53b2853dff find-provides: deal with absolute and broken symbolic links 2007-03-12 15:06:06 +03:00
Alexey Tourbin
f0ec810739 factored lib.req and lib.prov
Moved old code from find-requires and find-provides to lib.req and lib.prov.
For some reason, also a few python-related lines was removed.

Adapted lib.req and lib.prov to work without RPM_BUILD_ROOT.

In lib.prov, simplified RPM_FINDPROV_LIB_PATH handling (replaced
`lookup_path "$dir" "$PATH"' with `[ -z "${PATH##* $dir *}" ]').

Added lib.req.files and lib.prov.files.
2007-03-11 15:00:33 +03:00
Alexey Tourbin
767681ad03 adapted pkgconfig.req and pkgconfig.prov
Also enhanced the scripts by using pkg-config --print-errors, because
pkg-config is silent by default.  Also added checks for pkg-config exit
status and valid output.

Also changed the order: libdir/pkgconfig:datadir/pkgconfig instead of
datadir/pkgconfig:libdir/pkgconfig, according to pkg-config(1).
2007-03-11 15:00:29 +03:00
Alexey Tourbin
6dd0803866 adapted shell.req and shell.prov
1) added scripts/shell.req.files and scripts/shell.prov.files.
scripts/shell.req.files has new patterns for '/usr/bin/env bash'
and '/bin/ash'.

2) adapted scripts/shell.req.in and scripts/shell.prov.in
by using ArgvFileAction.  Also made them work with empty RPM_BUILD_ROOT.

Note: now shell.req produces dependencies from .provides.sh even
if the latter is inside RPM_BUILD_ROOT.  The reason is that .provides.sh
and the script can reside in two different subpackages (and otherwise,
rpm will optimize out the dependency).

3) removed corresponding old code from autodeps/linux.req.in
and autodeps/linux.prov.in.
2007-03-11 15:00:23 +03:00
Alexey Tourbin
9717c12847 autodeps/linux.{req,prov}.in: implemented method dispatcher
find-requires is now a dispatcher for /usr/lib/rpm/*.req scripts (methods).
find-provides is now a dispatcher for /usr/lib/rpm/*.prov scripts (methods).

The algorithm is basically as follows:

1) Filter input file list through TOPDIR and SKIPLIST patterns.

2) Run the resulting file list through file(1), which output is (per line)

<input-file-name><tab><optional-single-space><file-magic-type>

3) For each req/prov methods, there must be corresponding *.files
filter (e.g. /usr/lib/rpm/perl.req.files for /usr/lib/rpm/perl.req).
We feed file(1) output to this filter; the filter must print the list
of <input-files-name>s (per line) which will be processed with the
corresponding req/prov method.

4) Each req/prov method is invoked with corresponding file list on its
standard input.  The method must output valid rpm dependencies (per line)
or exit with non-zero code.

Notes:

Unlike find-requires, find-provides runs file(1) with -L option.

RPM_FINDREQ_DEFAULT_METHOD and RPM_FINDPROV_DEFAULT go away.
All available methods are run by default.

The old code has been kept.  I am going to remove it gradually
as I factor particular req/prov scripts.
2007-03-11 15:00:20 +03:00
Alexey Tourbin
1490bfdfd8 enhanced RPM_SCRIPTS_DEBUG support, implemented debug levels
Just setting -x is very noisy.  Here is a better plan.  I implement 3
debug levels: verbose (1), debug (2, implies verbose) and -x (3, implies
debug).  I move RPM_SCRIPTS_DEBUG test from scripts to scripts/functions,
as well as provide Verbose() and Debug() shell functions for use in scripts.

Furthermore, _scripts_debug macro is now automatically set when rpmbuild
is invoked with --verbose option.  Use -vv for debug and -vvv for -x.
2007-03-06 17:23:41 +03:00
7227d450ca Merge branch 'master' of git.alt:/people/damir/packages/rpm 2007-02-11 22:08:09 +00:00
Damir Shayhutdinov
280e69d9a5 Added hooks for Java autoreq facility.
Signed-off-by: Damir Shayhutdinov <damir@altlinux.ru>
2007-02-10 19:16:04 +03:00
f283a6dc1a Implement mono reqprov hooks and enable them by default (#9426). 2006-10-04 16:18:31 +00:00
5416277102 Removed cvsid tags. 2006-05-14 17:05:34 +04:00
783e7d2896 apply "new style provides" rules for sonameless libraries too. 2006-02-23 00:43:25 +00:00
f4465e35f2 s/continue;/continue/ 2006-02-08 16:52:07 +00:00
9506eb04e8 Implemented pkgconfig reqprov support and enabled it by default. 2006-02-02 01:51:38 +00:00
cf0c46f67f enhanced 'file type not available' error reporting 2006-01-14 21:51:24 +00:00
016b4f7cfd do not consider non-ELF shared objects 2006-01-14 20:27:47 +00:00
a3c6fc472b Fix DEF_RPM_FINDPROV_LIB_PATH definition. 2006-01-14 17:59:04 +00:00
f8482f1bf7 Update call to dump_ld_config. 2006-01-12 12:13:11 +00:00
7906742b5d use @RPMCONFIGDIR@/functions 2006-01-11 16:36:22 +00:00
3ea09f279e FindLibProvs: treat PAM modules specially. 2006-01-11 16:32:41 +00:00
8f8fb0ed4c $RPM_LIB is either lib or lib64, prepend it with leading slash; always add $DEF_RPM_FINDPROV_LIB_PATH to RPM_FINDPROV_LIB_PATH 2006-01-11 01:37:14 +00:00
d0d326aef4 Remove old-style provides for sonames in non-default locations 2006-01-10 01:18:39 +00:00
b3cbbc4e0e Pass *.pth files to python.prov (#8812) 2006-01-09 21:03:09 +00:00
9835799623 Added x86_64 support. 2005-06-16 16:18:15 +00:00
1118314978 Added tcl findreqprov support (Sergey Bolshakov, #5364) 2004-10-31 13:39:22 +00:00
72ab1d77ea find-provides: parse unrecognized __init__.py files as python files 2004-06-27 22:00:50 +00:00
58fe0d3fe3 updated python support from Andrey Orlov 2004-04-28 17:03:51 +00:00
9816af01e3 look for python provs 2004-03-01 16:49:03 +00:00
19d7a9436e FindLibProvs: ignore symlinks to shorter locations (aka libdb-4.0.so problem) 2004-02-02 14:26:50 +00:00
6f765764cd changed provides format for sonames in non-default location 2004-01-29 12:27:23 +00:00
42b3a949e9 eliminated unneeded pattern substitutions 2004-01-25 17:19:42 +00:00
05c08c4684 extra provides for sonames in non-default location 2004-01-25 11:46:22 +00:00
8d8cc6ff56 simplify check for is_perl 2004-01-19 13:42:57 +00:00